CN109561104A - A kind of communication protocol conversion method and device - Google Patents

A kind of communication protocol conversion method and device Download PDF

Info

Publication number
CN109561104A
CN109561104A CN201811625993.6A CN201811625993A CN109561104A CN 109561104 A CN109561104 A CN 109561104A CN 201811625993 A CN201811625993 A CN 201811625993A CN 109561104 A CN109561104 A CN 109561104A
Authority
CN
China
Prior art keywords
message
sent
data
configuration file
protocol
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
CN201811625993.6A
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.)
SHENZHEN CHUANGMENG TIANDI TECHNOLOGY CO LTD
Original Assignee
SHENZHEN CHUANGMENG TIANDI TECHNOLOGY CO LTD
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHENZHEN CHUANGMENG TIANDI TECHNOLOGY CO LTD filed Critical SHENZHEN CHUANGMENG TIANDI TECHNOLOGY CO LTD
Priority to CN201811625993.6A priority Critical patent/CN109561104A/en
Publication of CN109561104A publication Critical patent/CN109561104A/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/08Protocols for interworking; Protocol conversion

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)
  • Computer And Data Communications (AREA)

Abstract

This application discloses a kind of communication protocol conversion method and devices.This method comprises: obtaining message to be sent and target protocol;It is chosen and the message to be sent and matched first configuration file of target protocol from database;The message to be sent is converted into object message by first configuration file.Also disclose corresponding device.By executing preassigned communication protocol template, object message is converted by message to be sent.The conversion module for being suitable for the communication protocol of target network system is executed by configuration file, generate executable code, the main body of the packet after change data type is imported into executable code again, obtains object message, can realize message transmissions between any two different communication protocols.

Description

A kind of communication protocol conversion method and device
Technical field
This application involves field of computer technology more particularly to a kind of communication protocol conversion methods and device.
Background technique
Computer networking technology is grown rapidly, and establishes a large amount of diversified network system, and different systems is made Communication protocol is also different, this results in directly carrying out data transmission between various systems.
Now, when a network system needs and another is carried out data transmission using different communication protocol system, It generally requires to modify the source code of present networks system, to smoothly complete the transmission of the data between two systems, but in this way It modifies relatively cumbersome, cannot achieve the versatility of communication Protocol Conversion, and frequently modification system source code can be brought surely to system Qualitative hidden danger and safety risks.
Summary of the invention
The application provides a kind of communication protocol conversion method and device, it can be achieved that completing data between different communication protocol Transmission.
In a first aspect, providing a kind of communication protocol conversion method, comprising: obtain message to be sent and target protocol;From The agreement and matched first configuration file of target protocol with the message to be sent are chosen in database;Match by described first It sets file and the message to be sent is converted into object message.
In a kind of mode in the cards, the agreement and target chosen from database with the message to be sent Matched first configuration file of agreement, comprising: determine the agreement of the message to be sent;According to the agreement of the message to be sent With the target protocol, first configuration file is determined, wherein first configuration file is used to turn the first protocol massages Change target protocol message into, first agreement is the message protocol to be sent.
It is described to be converted the message to be sent by first configuration file in the mode of alternatively possible realization For object message, comprising: the data of the message to be sent are carried out data conversion, obtain the first data, wherein described first The data type of data is the data type of first configuration file;Execute the protocol conversion mould in first configuration file Plate obtains the first executable file;First data are imported into first executable file, obtain the object message.
In another mode in the cards, the data by the message to be sent carry out data conversion, obtain First data, comprising: the message to be sent is unfolded in the time domain, obtains data information corresponding with timestamp, wherein institute Stating timestamp is the timestamp for reading the message to be sent;Determine the starting of the ending time stamp and end of identification of origin identification Timestamp, wherein the origin identification and the end of identification belong to the message to be sent;By the ending time stamp and institute The data between initial time stamp are stated as data to be converted;It is described first by the data type conversion of the data to be converted The data type of configuration file.
In another mode in the cards, the method also includes: obtain the second configuration file;Described second is matched It sets file to store to the database, obtains updated database.The another aspect of the application provides a kind of computer can Storage medium is read, instruction is stored in the computer readable storage medium, when run on a computer, so that computer Execute method described in above-mentioned various aspects.
Second aspect provides a kind of communication protocol conversion device, comprising: first acquisition unit, it is to be sent for obtaining Message and target protocol;Selection unit, for choosing agreement and target protocol with the message to be sent from database The first configuration file matched;Converting unit, for the message to be sent to be converted to target by first configuration file Message.
In a kind of mode in the cards, the selection unit includes: first to determine subelement, for determine it is described to Send the agreement of message;Second determines subelement, for the agreement and the target protocol according to the message to be sent, determines First configuration file, wherein first configuration file is used to the first protocol massages being converted into target protocol message, institute Stating the first agreement is the message protocol to be sent.
In the mode of alternatively possible realization, the converting unit includes: conversion subunit, and being used for will be described to be sent The data of message carry out data conversion, obtain the first data, wherein the data type of first data is first configuration The data type of file;Subelement is executed, for executing the protocol conversion template in first configuration file, obtaining first can Execute file;Subelement is imported, for first data to be imported first executable file, obtains the target report Text.
In another mode in the cards, the conversion subunit is also used to: by the message to be sent in time domain Upper expansion obtains data information corresponding with timestamp, wherein the timestamp is the time for reading the message to be sent Stamp;And determine the ending time stamp of origin identification and the initial time stamp of end of identification, wherein the origin identification and described End of identification belongs to the message to be sent;And using the data between the ending time stamp and the initial time stamp as Data to be converted;And by the data type conversion of the data to be converted be first configuration file data type.
In another mode in the cards, described device further include: second acquisition unit, for obtaining the second configuration File;Storage unit obtains updated database for storing second configuration file to the database.
The third aspect provides a kind of communication protocol conversion device, comprising: including processor, memory;The processor It is configured as that described device is supported to execute corresponding function in above-mentioned first aspect and its method of any possible implementation Energy.Memory saves the necessary program of described device (instruction) and data for coupling with processor.Optionally, the dress Setting to include input/output interface, for supporting the communication between described device and other devices.
Fourth aspect provides a kind of computer readable storage medium, is stored in the computer readable storage medium Instruction, when run on a computer, so that computer executes above-mentioned first aspect and its any possible implementation Method.
5th aspect, provides a kind of computer program product comprising instruction, when run on a computer, so that The method that computer executes above-mentioned first aspect and its any possible implementation.
The another aspect of the application provides a kind of computer program product comprising instruction, when it runs on computers When, so that computer executes method described in above-mentioned various aspects.
The application loads corresponding configuration according to the communication protocol of message to be sent and the communication protocol of target network system File, and the conversion module for being suitable for the communication protocol of target network system is executed by configuration file, executable code is generated, The main body of the packet after change data type is imported into executable code again, obtains object message, it can be any two different logical Message transmissions are realized between letter agreement, and it is not necessary to modify the source codes of network system for entire conversion process, are greatly improved network system The stability and safety of system, meanwhile, the workload of network system developer and the difficulty of maintenance of network system can be greatly reduced Degree.In addition, user can realize the transmission between more multi-communication protocol according to by more new database.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application or in background technique below will be implemented the application Attached drawing needed in example or background technique is illustrated.
Fig. 1 is a kind of flow diagram of communication protocol conversion method provided by the embodiments of the present application;
Fig. 2 is the flow diagram of another communication protocol conversion method provided by the embodiments of the present application;
Fig. 3 is protocol conversion template grammar schematic diagram provided by the embodiments of the present application;
Fig. 4 is protocol conversion exemplary diagram provided by the embodiments of the present application;
Fig. 5 is a kind of structural schematic diagram of communication protocol conversion device provided by the embodiments of the present application;
Fig. 6 is a kind of hardware structural diagram of communication protocol conversion device provided by the embodiments of the present application.
Specific embodiment
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application Attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
The description and claims of this application and term " first " in above-mentioned attached drawing, " second " etc. are for distinguishing Different objects, are not use to describe a particular order.In addition, term " includes " and " having " and their any deformations, it is intended that It is to cover and non-exclusive includes.Such as the process, method, system, product or equipment for containing a series of steps or units do not have It is defined in listed step or unit, but optionally further comprising the step of not listing or unit, or optionally also wrap Include other step or units intrinsic for these process, methods, product or equipment.
Referenced herein " embodiment " is it is meant that a particular feature, structure, or characteristic described can wrap in conjunction with the embodiments It is contained at least one embodiment of the application.Each position in the description occur the phrase might not each mean it is identical Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and Implicitly understand, embodiment described herein can be combined with other embodiments.
Technical solution in ord to more clearly illustrate embodiments of the present application or in background technique below will be implemented the application Attached drawing needed in example or background technique is illustrated.
The embodiment of the present application is described below with reference to the attached drawing in the embodiment of the present application.
Referring to Fig. 1, Fig. 1 is a kind of flow diagram of communication protocol conversion method provided by the embodiments of the present application.
101, message to be sent and target protocol are obtained.
The embodiment of the present disclosure can be used as conversion module (including the module of application scheme) and run on first network system In, first network system can detect the conversion for whether needing to carry out communications protocol format to sent message automatically, work as detection To when being converted, message to be sent and target protocol are sent to conversion module, wherein target protocol refers to target network The communication protocol of system (i.e. the target network system of the first system communication).
102, the agreement and matched first configuration file of target protocol with above-mentioned message to be sent are chosen from database.
Above-mentioned conversion module includes a database, there is the pre-stored multiple conversion configurations texts of user in database Part, configuration file include the conversion module and data type converter of communication protocol.It should be pointed out that above-mentioned configuration text Part is all formulated according to the demand of user.After conversion module gets message to be sent and target protocol, so that it may according to generation The communication protocol and target protocol of message are sent, selects matched first configuration file, such as: the communication protocol of message to be sent is A, target protocol B then choose the configuration file that B is converted to by A from database.
103, above-mentioned message to be sent is converted to by object message by above-mentioned first configuration file.
The communication Protocol Conversion template in the first configuration file is executed, the executable code under target protocol format is obtained, It is to be appreciated that the executable code does not include the content of message to be sent.The content in message to be sent is carried out simultaneously Data conversion makes the data format of content match with target protocol.
For the embodiment of the present application according to the communication protocol of message to be sent and the communication protocol of target network system, load is corresponding Configuration file, and the conversion module for being suitable for the communication protocol of target network system is executed by configuration file, generation can hold Line code, then the main body of the packet after change data type is imported into executable code, object message is obtained, it can be at any two kinds not Realize that message transmissions, entire conversion process are greatly improved it is not necessary to modify the source code of network system between same communication protocol The stability and safety of network system.
Referring to Fig. 2, Fig. 2 is the flow diagram of another communication protocol conversion method provided by the embodiments of the present application.
201, message to be sent and target protocol are obtained.
The embodiment of the present disclosure can be used as conversion module (including the module of application scheme) and run on first network system In, when first network system detection is to the message for needing to be sent to the second network system, automatically by message to be sent and target Agreement is sent to conversion module, wherein target protocol feeling the pulse with the finger-tip mark network system (i.e. the target network system of the first system communication) Communication protocol.
That is to say, be, need to only be written in the source code of first network system will be pending by developer in the embodiments of the present disclosure Text and the target protocol of delivering newspaper are sent to the code of conversion module.
Message is the data cell exchanged in network with transmission, the character string text being made of multirow data, i.e. website one The secondary property data block to be sent.Message contains complete data information to be sent, and length is very inconsistent, and length is unlimited And it is variable.Message is made of heading, main body of the packet and tail portion.Heading is asking of need to handling of client server The content and attribute asked or responded.Heading includes that request is capable and request header, main body of the packet mainly include that should be sent Data.The heading of different communication protocol, the format of main body of the packet and tail portion are different, according to the head of message to be sent Portion and tail portion you can learn that the current communication protocol of message to be sent, and to main body of the packet carry out corresponding parsing can then obtain to Send the content sent needed for message.
202, the agreement of above-mentioned message to be sent is determined.
203, according to the agreement of above-mentioned message to be sent and above-mentioned target protocol, the first configuration file is determined.
Above-mentioned conversion module includes a database, and database includes the pre-stored multiple conversion configurations texts of user Part, configuration file include the conversion module and data type converter of communication protocol.It should be pointed out that above-mentioned configuration text Part is all formulated according to the demand of user.After conversion module gets message to be sent and target protocol, so that it may according to generation The communication protocol and target protocol of message are sent, selects matched first configuration file, such as: the communication protocol of message to be sent is A, target protocol B then choose the configuration file that B is converted to by A from database.
It is to be appreciated that the configuration file in database is all formulated according to the demand of user, that is to say, that for Data transmission between any two different communication protocols, can all pre-establish corresponding configuration file, and will make Configuration file imports database, the source code without going modification network system.
204, the data of above-mentioned message to be sent are subjected to data conversion, obtain the first data.
Above-mentioned message to be sent is unfolded in the time domain, obtains data information corresponding with timestamp, wherein the above-mentioned time Stamp is the timestamp for reading above-mentioned message to be sent.As described above, message has origin identification, main body of the packet and end of identification group At the timestamp for the message to be sent that root is previously obtained, it may be determined that the starting of the ending time stamp and end of identification of origin identification Timestamp, the data between ending time stamp and initial time stamp are the main body of message to be sent, will arrive the master for sending message Body is as data to be converted.It should be pointed out that the sequence of above-mentioned timestamp reads the sequence consensus of message with terminal.
Since the format of the main body of the packet of different communication protocol is different, it is therefore desirable to treat the data type of change data It is converted, such as the message format of JavaScript object numbered musical notation (JavaScript Object Notation, JSON) are as follows:
{
" status ": 0,
" message ": " success ",
" data ": " hello "
}
And for same content, at extensible markup language (extensible markup language, XML) Message format is then are as follows:
<root>
<code>0</code>
<msg>success</msg>
<body>hello</body>
<root>
In this way, it is necessary to be matched the data type conversion of above-mentioned data to be converted for described first by the first configuration file Set the data type of file.
205, the protocol conversion template in above-mentioned first configuration file is executed, the first executable file is obtained.
Conversion of first configuration file in addition to that can carry out data type to main body of the packet to be sent, further includes protocol conversion mould Plate.Protocol conversion template includes the origin identification and end of identification of target protocol, by executing the agreement in the first configuration file Conversion module can get the first executable file, the i.e. executable code of the origin identification of target protocol and end of identification.
The resolution rules of protocol conversion template in the embodiment of the present disclosure can be found in lower example:
As shown in figure 3, template grammar by<?>package;Corresponding character string can be then generated by the data that template grammer wraps up Content.Complete syntax are as follows: executor!Expression, wherein!For connector, the left side of connector is executor, even Connecing is expression on the right of symbol, and different executor has different processing logics, and multiple executor can be by more A "!" be attached, such as: <? print!json!Data? >.
As shown in figure 4, print is specifically acted on as one of executor, realize the function of output, to main body of the packet into Row data type is converted to the main body of the packet under JOSN format and completes to export, and difference may be implemented in actual application scenarios Executor meet the needs of different.
In the example of another specific implementation, the communication protocol of two network systems is identical, but the origin identification of message Or the character of end of identification may be different, with it is above-mentioned to different communication protocol setting conversion module as, for origin identification or The different situation of the character of end of identification can also pre-establish corresponding configuration file, be stored in database, needing to carry out message When transmission, by loading corresponding configuration file, the origin identification or end of identification of message to be sent are converted.
It is to be appreciated that the conversion of main body of the packet data type and the sequence of execution protocol conversion template can exchange, Be also possible to carry out simultaneously, the application again this be not specifically limited.
206, above-mentioned first data are imported into first executable file, obtains object message.
In the executable of the origin identification and end of identification for obtaining the main body of the packet and target protocol that converted data type It after code, is equivalent to obtain the full content of object message, at this point, data conversion will be completed by way of passing ginseng Main body of the packet imports the first executable file, obtains object message.Object message is sent to the second network system, Ji Keshi again Data between existing first network system and the second network system are transmitted.
207, the second configuration file is obtained.
As described above, formulated when configuration file in database according to user demand, so, when first network system needs To carry out data transmission with third network system, and can not be with the communication protocol and third of first network system in database When the configuration file that the communication protocol of network system matches, so that it may according to the communication of first network system and third network system Agreement formulates the second configuration file.The communication protocol of above-mentioned third network system and the communication protocol or second of first network system The communication protocol of network system is all different.
208, above-mentioned second configuration file is stored to above-mentioned database, obtains updated database.
For the embodiment of the present application according to the communication protocol of message to be sent and the communication protocol of target network system, load is corresponding Configuration file, and the conversion module for being suitable for the communication protocol of target network system is executed by configuration file, generation can hold Line code, then the main body of the packet after change data type is imported into executable code, object message is obtained, it can be at any two kinds not Realize that message transmissions, entire conversion process are greatly improved it is not necessary to modify the source code of network system between same communication protocol The stability and safety of network system, meanwhile, the workload and network system dimension of network system developer can be greatly reduced The difficulty of shield.In addition, user can realize the transmission between more multi-communication protocol according to by more new database.
It is above-mentioned to illustrate the method for the embodiment of the present application, the device of the embodiment of the present application is provided below.
Referring to Fig. 5, Fig. 5 is a kind of structural schematic diagram of communication protocol conversion device provided by the embodiments of the present application, it should Device 1 includes: first acquisition unit 11, selection unit 12, converting unit 13, second acquisition unit 14 and storage unit 15.Its In:
First acquisition unit 11, for obtaining message to be sent and target protocol;
Selection unit 12, for being chosen from database and the agreement of the message to be sent and target protocol matched the One configuration file;
Converting unit 13, for the message to be sent to be converted to object message by first configuration file;
Second acquisition unit 14, for obtaining the second configuration file;
Storage unit 15 obtains updated database for storing second configuration file to the database.
Further, the selection unit 12 includes: the first determining subelement 121, for determining the message to be sent Agreement;Second determines subelement 122, described in determining according to the agreement of the message to be sent and the target protocol First configuration file, wherein first configuration file is used to the first protocol massages being converted into target protocol message, and described the One agreement is the message protocol to be sent.
Further, the converting unit 13 includes: conversion subunit 131, for by the data of the message to be sent Data conversion is carried out, the first data are obtained, wherein the data type of first data is the data of first configuration file Type;Subelement 132 is executed, for executing the protocol conversion template in first configuration file, obtains the first executable text Part;Subelement 133 is imported, for first data to be imported first executable file, obtains the object message.
Further, the conversion subunit 131 is also used to: the message to be sent is unfolded in the time domain, obtain with The corresponding data information of timestamp, wherein the timestamp is the timestamp for reading the message to be sent;And determine starting The ending time stamp of mark and the initial time stamp of end of identification, wherein the origin identification and the end of identification belong to institute State message to be sent;And using the data between the ending time stamp and the initial time stamp as data to be converted;With And by the data type conversion of the data to be converted be first configuration file data type.
For the embodiment of the present application according to the communication protocol of message to be sent and the communication protocol of target network system, load is corresponding Configuration file, and the conversion module for being suitable for the communication protocol of target network system is executed by configuration file, generation can hold Line code, then the main body of the packet after change data type is imported into executable code, object message is obtained, it can be at any two kinds not Realize that message transmissions, entire conversion process are greatly improved it is not necessary to modify the source code of network system between same communication protocol The stability and safety of network system.
Fig. 6 is a kind of hardware structural diagram of communication protocol conversion device provided by the embodiments of the present application.The converting means Setting 2 includes processor 21, can also include input unit 22, output device 23 and memory 24.The input unit 22, output dress It sets and is connected with each other between 23, memory 24 and processor 21 by bus.
Memory include but is not limited to be random access memory (random access memory, RAM), read-only storage Device (read-only memory, ROM), Erasable Programmable Read Only Memory EPROM (erasable programmable read Only memory, EPROM) or portable read-only memory (compact disc read-only memory, CD-ROM), The memory is used for dependent instruction and data.
Input unit is used for output data and/or signal for input data and/or signal and output device.Output Device and input unit can be independent device, be also possible to the device of an entirety.
Processor may include be one or more processors, for example including one or more central processing unit (central Processing unit, CPU), in the case where processor is a CPU, which can be monokaryon CPU, be also possible to more Core CPU.
Memory is used for the program code and data of storage networking device.
Processor is used to call the program code and data in the memory, executes the step in above method embodiment. For details, reference can be made to the descriptions in embodiment of the method, and details are not described herein.
It is understood that Fig. 6 illustrate only a kind of simplified design of communication protocol conversion device.In practical application In, communication protocol conversion device can also separately include necessary other elements, including but not limited to it is any number of input/it is defeated Device, processor, controller, memory etc. out, and all communication protocol conversion devices that the embodiment of the present application may be implemented are all Within the scope of protection of this application.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed Scope of the present application.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed systems, devices and methods, it can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or It partly generates according to process or function described in the embodiment of the present application.The computer can be general purpose computer, dedicated meter Calculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage medium In, or transmitted by the computer readable storage medium.The computer instruction can be from a web-site, meter Calculation machine, server or data center pass through wired (such as coaxial cable, optical fiber, Digital Subscriber Line (digital subscriber Line, DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or number It is transmitted according to center.The computer readable storage medium can be any usable medium that computer can access either The data storage devices such as server, the data center integrated comprising one or more usable mediums.The usable medium can be Magnetic medium, (for example, floppy disk, hard disk, tape), optical medium are (for example, digital versatile disc (digital versatile Disc, DVD)) or semiconductor medium (such as solid state hard disk (solid state disk, SSD)) etc..
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, the process Relevant hardware can be instructed to complete by computer program, which can be stored in computer-readable storage medium, should Program is when being executed, it may include such as the process of above-mentioned each method embodiment.And storage medium above-mentioned includes: read-only memory (read-only memory, ROM) or random access memory (random access memory, RAM), magnetic or disk Etc. the medium of various program storage codes.

Claims (12)

1. a kind of communication protocol conversion method characterized by comprising
Obtain message to be sent and target protocol;
The agreement and matched first configuration file of target protocol with the message to be sent are chosen from database;
The message to be sent is converted into object message by first configuration file.
2. the method according to claim 1, wherein described choose and the message to be sent from database Agreement and matched first configuration file of target protocol, comprising:
Determine the agreement of the message to be sent;
According to the agreement of the message to be sent and the target protocol, first configuration file is determined, wherein described first Configuration file is used to for the first protocol massages being converted into target protocol message, and first agreement is the message association to be sent View.
3. method according to claim 1 or 2, which is characterized in that it is described by first configuration file will it is described to It sends message and is converted to object message, comprising:
The data of the message to be sent are subjected to data conversion, obtain the first data, wherein the data class of first data Type is the data type of first configuration file;
The protocol conversion template in first configuration file is executed, the first executable file is obtained;
First data are imported into first executable file, obtain the object message.
4. according to the method described in claim 3, it is characterized in that, the data by the message to be sent carry out data turn It changes, obtains the first data, comprising:
The message to be sent is unfolded in the time domain, obtains corresponding with timestamp data information, wherein the timestamp is Read the timestamp of the message to be sent;
Determine the ending time stamp of origin identification and the initial time stamp of end of identification, wherein the origin identification and the knot Beam identification belongs to the message to be sent;
Using the data between the ending time stamp and the initial time stamp as data to be converted;
It is the data type of first configuration file by the data type conversion of the data to be converted.
5. the method according to claim 1, wherein the method also includes:
Obtain the second configuration file;
Second configuration file is stored to the database, updated database is obtained.
6. a kind of communication protocol conversion device characterized by comprising
First acquisition unit, for obtaining message to be sent and target protocol;
Selection unit, for being chosen from database and matched first configuration of the agreement of the message to be sent and target protocol File;
Converting unit, for the message to be sent to be converted to object message by first configuration file.
7. device according to claim 6, which is characterized in that the selection unit includes:
First determines subelement, for determining the agreement of the message to be sent;
Second determines subelement, for the agreement and the target protocol according to the message to be sent, determines that described first matches Set file, wherein first configuration file is used to the first protocol massages being converted into target protocol message, first agreement For the message protocol to be sent.
8. device according to claim 6 or 7, which is characterized in that the converting unit includes:
Conversion subunit obtains the first data, wherein described for the data of the message to be sent to be carried out data conversion The data type of first data is the data type of first configuration file;
It executes subelement and obtains the first executable file for executing the protocol conversion template in first configuration file;
Subelement is imported, for first data to be imported first executable file, obtains the object message.
9. device according to claim 8, which is characterized in that the conversion subunit is also used to:
The message to be sent is unfolded in the time domain, obtains corresponding with timestamp data information, wherein the timestamp is Read the timestamp of the message to be sent;
And determine the ending time stamp of origin identification and the initial time stamp of end of identification, wherein the origin identification and institute It states end of identification and belongs to the message to be sent;
And using the data between the ending time stamp and the initial time stamp as data to be converted;
And by the data type conversion of the data to be converted be first configuration file data type.
10. device according to claim 6, which is characterized in that described device further include:
Second acquisition unit, for obtaining the second configuration file;
Storage unit obtains updated database for storing second configuration file to the database.
11. a kind of communication protocol conversion device characterized by comprising processor, memory;The computer-readable storage Instruction is stored in medium, when run on a computer, so that computer is executed as described in any one of Claims 1 to 5 Method.
12. a kind of computer readable storage medium, which is characterized in that instruction is stored in the computer readable storage medium, When run on a computer, so that computer executes method as claimed in any one of claims 1 to 5.
CN201811625993.6A 2018-12-28 2018-12-28 A kind of communication protocol conversion method and device Pending CN109561104A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811625993.6A CN109561104A (en) 2018-12-28 2018-12-28 A kind of communication protocol conversion method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811625993.6A CN109561104A (en) 2018-12-28 2018-12-28 A kind of communication protocol conversion method and device

Publications (1)

Publication Number Publication Date
CN109561104A true CN109561104A (en) 2019-04-02

Family

ID=65871785

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811625993.6A Pending CN109561104A (en) 2018-12-28 2018-12-28 A kind of communication protocol conversion method and device

Country Status (1)

Country Link
CN (1) CN109561104A (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110225076A (en) * 2019-04-16 2019-09-10 深圳壹账通智能科技有限公司 File interaction method, apparatus, electronic equipment and storage medium
CN110611674A (en) * 2019-09-20 2019-12-24 北京三快在线科技有限公司 Protocol interaction method, system and storage medium between different computer systems
CN110633254A (en) * 2019-09-19 2019-12-31 中国银行股份有限公司 Data interaction method and device
CN110708307A (en) * 2019-09-29 2020-01-17 北京明略软件系统有限公司 Transcoder generation method and apparatus, electronic device, and storage medium
CN110719290A (en) * 2019-10-15 2020-01-21 杭州鸿雁智能科技有限公司 Protocol translation method and device for home interconnected network
CN111064716A (en) * 2019-12-05 2020-04-24 深圳猛犸电动科技有限公司 Message conversion method, device, storage medium and server
CN111083153A (en) * 2019-12-24 2020-04-28 杭州求是优脉科技有限公司 Service access method, device and equipment between medical interfaces and readable storage medium
CN111552838A (en) * 2020-03-26 2020-08-18 平安医疗健康管理股份有限公司 Data processing method and device, computer equipment and storage medium
CN111562909A (en) * 2020-05-06 2020-08-21 北京金堤科技有限公司 Class-based application implementation method and device, electronic equipment and storage medium
CN112532564A (en) * 2019-09-17 2021-03-19 中国移动通信集团广东有限公司 Service calling method and device and electronic equipment
CN113098842A (en) * 2021-03-02 2021-07-09 深圳市智莱科技股份有限公司 Data transmission method based on docking debugging system, docking debugging system and medium
CN113542216A (en) * 2021-06-04 2021-10-22 北京机电工程研究所 Automatic conversion method and device for interface protocol
CN113938533A (en) * 2021-10-15 2022-01-14 京东科技信息技术有限公司 Communication method and device between applications, electronic equipment and computer readable medium
CN114666356A (en) * 2020-12-04 2022-06-24 中国联合网络通信集团有限公司 Control method and device of data acquisition gateway and storage medium
CN114827297A (en) * 2022-04-29 2022-07-29 中国建设银行股份有限公司 Protocol adaptation method, device, equipment and storage medium
CN115447647A (en) * 2022-08-17 2022-12-09 交控科技股份有限公司 Vehicle simulation construction method and device based on modeling development
CN116614565A (en) * 2023-07-18 2023-08-18 河北六联通信科技有限公司 Multi-protocol fusion communication method, platform, system and medium for scene law enforcement
CN117914957A (en) * 2023-12-21 2024-04-19 北京国科天迅科技股份有限公司 Multi-protocol interactive communication method, device, equipment, storage medium and product

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1864392A (en) * 2003-10-14 2006-11-15 国际商业机器公司 Method and apparatus for translating data packets from one network protocol to another
CN101132570A (en) * 2006-08-22 2008-02-27 中兴通讯股份有限公司 Provisioning server and provisioning method
CN102546442A (en) * 2012-03-09 2012-07-04 北京神州数码思特奇信息技术股份有限公司 Communication protocol conversion technology
CN102594833A (en) * 2012-03-09 2012-07-18 北京神州数码思特奇信息技术股份有限公司 Communication protocol adapting method and system
CN104331292A (en) * 2014-11-03 2015-02-04 重庆邮电大学 Method for generating configuration for middleware protocol conversion of Internet of vehicles
CN107172012A (en) * 2017-04-18 2017-09-15 北京思特奇信息技术股份有限公司 A kind of message format conversion method and system
US10019499B2 (en) * 2015-08-06 2018-07-10 International Business Machines Corporation Adaptive payload management
CN108366050A (en) * 2018-01-25 2018-08-03 北京电子工程总体研究所 A kind of common communication protocol processing method
CN108833394A (en) * 2018-06-07 2018-11-16 中国人民解放军63889部队 The protocol conversion algorithm of data collection system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1864392A (en) * 2003-10-14 2006-11-15 国际商业机器公司 Method and apparatus for translating data packets from one network protocol to another
CN101132570A (en) * 2006-08-22 2008-02-27 中兴通讯股份有限公司 Provisioning server and provisioning method
CN102546442A (en) * 2012-03-09 2012-07-04 北京神州数码思特奇信息技术股份有限公司 Communication protocol conversion technology
CN102594833A (en) * 2012-03-09 2012-07-18 北京神州数码思特奇信息技术股份有限公司 Communication protocol adapting method and system
CN104331292A (en) * 2014-11-03 2015-02-04 重庆邮电大学 Method for generating configuration for middleware protocol conversion of Internet of vehicles
US10019499B2 (en) * 2015-08-06 2018-07-10 International Business Machines Corporation Adaptive payload management
CN107172012A (en) * 2017-04-18 2017-09-15 北京思特奇信息技术股份有限公司 A kind of message format conversion method and system
CN108366050A (en) * 2018-01-25 2018-08-03 北京电子工程总体研究所 A kind of common communication protocol processing method
CN108833394A (en) * 2018-06-07 2018-11-16 中国人民解放军63889部队 The protocol conversion algorithm of data collection system

Cited By (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110225076A (en) * 2019-04-16 2019-09-10 深圳壹账通智能科技有限公司 File interaction method, apparatus, electronic equipment and storage medium
CN112532564B (en) * 2019-09-17 2022-09-13 中国移动通信集团广东有限公司 Service calling method and device and electronic equipment
CN112532564A (en) * 2019-09-17 2021-03-19 中国移动通信集团广东有限公司 Service calling method and device and electronic equipment
CN110633254A (en) * 2019-09-19 2019-12-31 中国银行股份有限公司 Data interaction method and device
CN110611674B (en) * 2019-09-20 2021-01-01 北京三快在线科技有限公司 Protocol interaction method, system and storage medium between different computer systems
CN110611674A (en) * 2019-09-20 2019-12-24 北京三快在线科技有限公司 Protocol interaction method, system and storage medium between different computer systems
CN110708307A (en) * 2019-09-29 2020-01-17 北京明略软件系统有限公司 Transcoder generation method and apparatus, electronic device, and storage medium
CN110708307B (en) * 2019-09-29 2021-12-07 北京明略软件系统有限公司 Transcoder generation method and apparatus, electronic device, and storage medium
CN110719290A (en) * 2019-10-15 2020-01-21 杭州鸿雁智能科技有限公司 Protocol translation method and device for home interconnected network
CN111064716A (en) * 2019-12-05 2020-04-24 深圳猛犸电动科技有限公司 Message conversion method, device, storage medium and server
CN111064716B (en) * 2019-12-05 2022-03-11 深圳猛犸电动科技有限公司 Message conversion method, device, storage medium and server
CN111083153A (en) * 2019-12-24 2020-04-28 杭州求是优脉科技有限公司 Service access method, device and equipment between medical interfaces and readable storage medium
CN111552838A (en) * 2020-03-26 2020-08-18 平安医疗健康管理股份有限公司 Data processing method and device, computer equipment and storage medium
CN111552838B (en) * 2020-03-26 2023-02-03 深圳平安医疗健康科技服务有限公司 Data processing method and device, computer equipment and storage medium
CN111562909A (en) * 2020-05-06 2020-08-21 北京金堤科技有限公司 Class-based application implementation method and device, electronic equipment and storage medium
CN111562909B (en) * 2020-05-06 2024-04-02 北京金堤科技有限公司 Class-based application implementation method and device, electronic equipment and storage medium
CN114666356B (en) * 2020-12-04 2023-07-25 中国联合网络通信集团有限公司 Control method and device of data acquisition gateway and storage medium
CN114666356A (en) * 2020-12-04 2022-06-24 中国联合网络通信集团有限公司 Control method and device of data acquisition gateway and storage medium
CN113098842A (en) * 2021-03-02 2021-07-09 深圳市智莱科技股份有限公司 Data transmission method based on docking debugging system, docking debugging system and medium
CN113542216A (en) * 2021-06-04 2021-10-22 北京机电工程研究所 Automatic conversion method and device for interface protocol
CN113938533A (en) * 2021-10-15 2022-01-14 京东科技信息技术有限公司 Communication method and device between applications, electronic equipment and computer readable medium
CN113938533B (en) * 2021-10-15 2024-02-02 京东科技信息技术有限公司 Inter-application communication method and device, electronic equipment and computer readable medium
CN114827297A (en) * 2022-04-29 2022-07-29 中国建设银行股份有限公司 Protocol adaptation method, device, equipment and storage medium
CN114827297B (en) * 2022-04-29 2024-04-16 中国建设银行股份有限公司 Protocol adaptation method, device, equipment and storage medium
CN115447647A (en) * 2022-08-17 2022-12-09 交控科技股份有限公司 Vehicle simulation construction method and device based on modeling development
CN116614565A (en) * 2023-07-18 2023-08-18 河北六联通信科技有限公司 Multi-protocol fusion communication method, platform, system and medium for scene law enforcement
CN116614565B (en) * 2023-07-18 2023-10-10 河北六联通信科技有限公司 Multi-protocol fusion communication method, platform, system and medium for scene law enforcement
CN117914957A (en) * 2023-12-21 2024-04-19 北京国科天迅科技股份有限公司 Multi-protocol interactive communication method, device, equipment, storage medium and product

Similar Documents

Publication Publication Date Title
CN109561104A (en) A kind of communication protocol conversion method and device
CN111083225B (en) Data processing method and device in Internet of things platform and Internet of things platform
CN109768970B (en) Configurable universal protocol generation method
CN106354568A (en) Method and device for communication between different processes
CN108259598A (en) A kind of awareness apparatus unified access method based on isomery fusion and cloud analytic technique
CN103532756A (en) Command line system and command line operation method based on webmaster system
CN108334411A (en) Resource transfer method and device based on Redfish in a kind of BMC
CN110445860A (en) A kind of file transmitting method, device, terminal device and storage medium
CN111683066A (en) Heterogeneous system integration method and device, computer equipment and storage medium
CN110210212A (en) A kind of data processing method, device and relevant device
CN109460220A (en) The predefined code generating method of message, device, electronic equipment and storage medium
CN107222461B (en) Communication processing method and device
CN110334147A (en) A kind of method of data synchronization and device
CN111315026A (en) Channel selection method, device, gateway and computer readable storage medium
CN109446052B (en) Verification method and device for application program
CN109446146B (en) State transition sequence generation method of application layer communication protocol
KR20150080997A (en) Multiple tactical datalink message processing method using markup language
CN111314805B (en) Debugging method and device for intercommunication OMCI (OMCI) messages of GPON (gigabit passive optical network) system
CN115604115A (en) Configuration information analysis method and device, electronic equipment and storage medium
CN109271454A (en) A kind of method and the network equipment that data are synchronous
CN109032582A (en) A kind of method and device generating server O&amp;M script
CN104933086B (en) A kind of data processing method and its device
WO2017041550A1 (en) Device simulator communication method and system
CN108629048A (en) A kind of routing parameter transmits optimization method and system
US20130290486A1 (en) Communication device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190402

RJ01 Rejection of invention patent application after publication