CN113824710B - Communication protocol conversion method and device and computer readable storage medium - Google Patents

Communication protocol conversion method and device and computer readable storage medium Download PDF

Info

Publication number
CN113824710B
CN113824710B CN202111083070.4A CN202111083070A CN113824710B CN 113824710 B CN113824710 B CN 113824710B CN 202111083070 A CN202111083070 A CN 202111083070A CN 113824710 B CN113824710 B CN 113824710B
Authority
CN
China
Prior art keywords
request
request body
conversion
request information
converting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111083070.4A
Other languages
Chinese (zh)
Other versions
CN113824710A (en
Inventor
王鑫文
王永永
李绍斌
宋德超
王沅召
杨丰玮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun 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 Gree Electric Appliances Inc of Zhuhai, Zhuhai Lianyun Technology Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202111083070.4A priority Critical patent/CN113824710B/en
Publication of CN113824710A publication Critical patent/CN113824710A/en
Application granted granted Critical
Publication of CN113824710B publication Critical patent/CN113824710B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2816Controlling appliance services of a home automation network by calling their functionalities

Abstract

The invention discloses a communication protocol conversion method and device and a computer readable storage medium. Wherein, the method comprises the following steps: receiving first request information sent by a first system, wherein the first system is a local system, and the first request information is protocol conversion request information sent by the first system; analyzing the first request information to obtain a first request body of the first system; converting the first request body according to a preset conversion mode to obtain a second request body, wherein the second request body is a request body which can be identified by a second system; and returning the second request body to the first system, wherein the first system generates a first control instruction based on the second request body, and sends the first control instruction to the second system so as to enable the second system to operate based on the first control instruction. The method and the device solve the technical problem that in the related technology, the cooperation failure rate among multiple systems is high or even the cooperation cannot be realized due to inconsistent communication modes of all household equipment systems.

Description

Communication protocol conversion method and device and computer readable storage medium
Technical Field
The invention relates to the field of smart home, in particular to a communication protocol conversion method and device and a computer readable storage medium.
Background
Manufacturers' smart home devices become more and more fine, and a set of smart home scheme may include smart home devices of all parties, so that convenience is brought to life, but challenges are brought to cross-manufacturer system control. When the communication protocols and communication modes of the local home system and the third-party system are not matched, the communication with the third-party system and the feedback of the control instruction of the third-party system are difficult to execute, so that the cooperative failure rate among the multiple systems is high, and even the cooperation is not possible.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a communication protocol conversion method, a device and a computer readable storage medium thereof, which at least solve the technical problem that in the related technology, the cooperation failure rate among multiple systems is high or even the cooperation cannot be realized due to inconsistent communication modes of all household equipment systems.
According to an aspect of an embodiment of the present invention, a method for converting a communication protocol is provided, including: receiving first request information sent by a first system, wherein the first system is a local system, and the first request information is protocol conversion request information sent by the first system; analyzing the first request information to obtain a first request body of the first system; converting the first request body according to a preset conversion mode to obtain a second request body, wherein the second request body is a request body which can be identified by a second system; and returning the second request body to the first system, wherein the first system generates a first control instruction based on the second request body and sends the first control instruction to the second system so as to enable the second system to operate based on the first control instruction.
Optionally, before receiving the first request message sent by the first system, the method for converting the communication protocol further includes: and configuring a conversion interface between the first system and the second system, wherein the second system is an access system except the first system, and the conversion interface is a protocol conversion interface.
Optionally, before receiving the first request message sent by the first system, the method for converting the communication protocol further includes: acquiring the first request body of the first system and a third request body of the second system; determining a first function of each parameter in the first requester and a second function of each parameter in the second requester; determining a corresponding relation between each field in the first request body and each field in the second request body based on the first function and the second function; and determining a predetermined conversion mode between the first system and the second system based on the corresponding relation.
Optionally, the first request information includes identification information of the first requester and the second system, where the identification information of the second system is obtained by analyzing, by the first system, a second control instruction sent by the second system.
Optionally, converting the first request body according to a predetermined conversion manner to obtain a second request body, including: calling the predetermined conversion mode based on the identification information; and converting the first request body by using the preset conversion mode to obtain the second request body.
Optionally, the method for converting a communication protocol further includes: receiving second request information sent by the first system, wherein the second request information is a protocol conversion request; acquiring request body change information based on the second request information; and updating the predetermined conversion mode based on the request body change information.
According to another aspect of the embodiments of the present invention, there is provided a conversion apparatus for a communication protocol, including: a receiving module, configured to receive first request information sent by a first system, where the first system is a local system, and the first request information is protocol conversion request information sent by the first system; the analysis module is used for analyzing the first request information to obtain a first request body of the first system; the conversion module is used for converting the first request body according to a preset conversion mode to obtain a second request body, wherein the second request body is a request body which can be identified by a second system; and the return module is used for returning the second request body to the first system, wherein the first system generates a first control instruction based on the second request body and sends the first control instruction to the second system so as to enable the second system to operate based on the first control instruction.
Optionally, the apparatus for converting a communication protocol further includes: the configuration module is configured to configure a conversion interface between a first system and a second system before receiving first request information sent by the first system, where the second system is an access system other than the first system, and the conversion interface is a protocol conversion interface.
Optionally, the apparatus for converting a communication protocol further includes: an obtaining module, configured to obtain a first request body of a first system and a third request body of a second system before receiving first request information sent by the first system; a first determining module, configured to determine a first function of each parameter in the first requester and a second function of each parameter in the second requester; a second determining module, configured to determine, based on the first function and the second function, a corresponding relationship between each field in the first request body and each field in the second request body; and the third determining module is used for determining a preset conversion mode between the first system and the second system based on the corresponding relation.
Optionally, the first request information includes identification information of the first requester and the second system, where the identification information of the second system is obtained by analyzing, by the first system, a second control instruction sent by the second system.
Optionally, the conversion module includes: the calling unit is used for calling the preset conversion mode based on the identification information; and the conversion unit is used for converting the first request body by using the preset conversion mode to obtain the second request body.
Optionally, the apparatus for converting a communication protocol further includes: a receiving unit, configured to receive second request information sent by the first system, where the second request information is a protocol conversion request; an acquisition unit configured to acquire request body change information based on the second request information; and the updating unit is used for updating the predetermined conversion mode based on the request body change information.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is executed by a processor, the computer-readable storage medium is controlled by a device to execute any one of the above methods for converting a communication protocol.
According to another aspect of the embodiment of the present invention, there is provided a processor, where the processor is configured to run a computer program, where the computer program executes the method for converting a communication protocol described in any one of the above.
In the embodiment of the invention, first request information sent by a first system is received, wherein the first system is a local system, and the first request information is protocol conversion request information sent by the first system; analyzing the first request information to obtain a first request body of the first system; converting the first request body according to a preset conversion mode to obtain a second request body, wherein the second request body is a request body which can be identified by a second system; and returning the second request body to the first system, wherein the first system generates a first control instruction based on the second request body, and sends the first control instruction to the second system so as to enable the second system to operate based on the first control instruction. By the communication protocol conversion method, the purposes that the first request information sent by the first system is used for converting the first request body to obtain the second request body and returning the second request body to the first system are achieved, the technical effect of enhancing the cooperation among multiple intelligent home systems is achieved, and the technical problem that cooperation among multiple systems is high in failure rate and even cannot cooperate due to the fact that communication modes of home equipment systems of all parties in related technologies are inconsistent is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a flowchart of a method for converting a communication protocol according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a protocol conversion configurability, according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a protocol conversion process according to an embodiment of the invention;
fig. 4 is a schematic diagram of a communication protocol conversion apparatus according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the 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 invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention 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 is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or described herein. 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.
Example 1
In accordance with an embodiment of the present invention, there is provided a method embodiment of a method for converting a communication protocol, it should be noted that the steps illustrated in the flowchart of the accompanying drawings 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 flowchart, in some cases the steps illustrated or described may be performed in an order different than that illustrated herein.
Fig. 1 is a flowchart of a method for converting a communication protocol according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, receiving first request information sent by a first system, where the first system is a local system, and the first request information is protocol conversion request information sent by the first system.
Optionally, in the above step, the first system is a local system to which another system is to be accessed, and the first request information is protocol conversion request information sent to the protocol conversion system when the first system receives the control instruction sent by the third-party system and determines that the first system is the third-party system.
And step S104, analyzing the first request information to obtain a first request body of the first system.
Optionally, in the above step, the first request information is analyzed to obtain first request body information of the first system, where the request body information is data sent by the system to the interactive interface, that is, when the data needs to be sent from the system to the interactive interface, the data needs to be sent in a form of being converted into a request body, which is helpful to ensure information security and transmission speed.
And step S106, converting the first request body according to a preset conversion mode to obtain a second request body, wherein the second request body is a request body which can be identified by a second system.
Optionally, in the above step, the protocol conversion system analyzes a parameter corresponding relationship in the first request information, obtains initial ID information of the third-party system, analyzes a corresponding relationship between the local system and the third-party system according to a principle of the query field, and converts the first request information into second request information, where the second request information may be identified by the second system.
And step S108, returning the second request body to the first system, wherein the first system generates a first control instruction based on the second request body and sends the first control instruction to the second system so as to enable the second system to operate based on the first control instruction.
Optionally, in the above step, the first system generates a first control instruction that can be recognized by the second system on the basis of the second request body, and sends the first control instruction to the third-party system (i.e., the second system) to achieve access and control over the third-party system.
As can be seen from the above, in the embodiment of the present invention, first request information sent by a first system may be received, where the first system is a local system, and the first request information is protocol conversion request information sent by the first system; then, the first request information is analyzed to obtain a first request body of the first system; then, converting the first request body according to a preset conversion mode to obtain a second request body, wherein the second request body is a request body which can be identified by a second system; and finally, returning the second request body to the first system, wherein the first system generates a first control instruction based on the second request body and sends the first control instruction to the second system so that the second system operates based on the first control instruction. By the communication protocol conversion method, the purposes that the first request information sent by the first system is used for converting the first request body to obtain the second request body and returning the second request body to the first system are achieved, the technical effect of enhancing the cooperation among multiple intelligent home systems is achieved, and the technical problem that cooperation among multiple systems is high in failure rate and even cannot cooperate due to the fact that communication modes of home equipment systems of all parties in related technologies are inconsistent is solved.
As an optional embodiment, before receiving the first request message sent by the first system, the method for converting the communication protocol further includes: and configuring a conversion interface between the first system and a second system, wherein the second system is an access system except the first system, and the conversion interface is a protocol conversion interface.
In the above alternative embodiment, before the first system sends the first request message, the protocol conversion system configures the interface requestors of the first system and the second system, that is, the two systems provide the format of the interface conversion requestors, including but not limited to the json format requestors.
Fig. 2 is a schematic diagram of configurable protocol conversion according to an embodiment of the present invention, and as shown in fig. 2, when creating a corresponding relationship, a local system (i.e., a first system) and a third-party system (i.e., a second system) first provide respective interface request body information, and then a protocol conversion system administrator may determine the corresponding relationship of interface parameters, where the protocol conversion system administrator refers to a specific module that determines a parameter corresponding relationship in a protocol conversion system, and then records the parameter corresponding relationship in the protocol conversion system; when the corresponding relation is modified, the local system informs a protocol conversion manager of the change of the corresponding relation, then the protocol conversion system manager finds out the changed key field, correspondingly changes the key field in the system, and records the corresponding relation update record of the corresponding parameter in the protocol conversion system, wherein the third-party system can be more than one party, but a developer is not required to modify a program for each protocol configuration, so that the adaptation cost of protocol conversion is greatly reduced.
As an optional embodiment, before receiving the first request message sent by the first system, the method for converting a communication protocol further includes: acquiring a first request body of a first system and a third request body of a second system; determining a first function of each parameter in a first request body and a second function of each parameter in a second request body; determining the corresponding relation between each field in the first request body and each field in the second request body based on the first function and the second function; and determining a predetermined conversion mode between the first system and the second system based on the corresponding relation.
In the above optional embodiment, each field of the request body is an execution parameter of a corresponding instruction, incompatibility of systems of both parties occurs in the naming, data format and specific meaning of the field, a protocol conversion system administrator takes the request parameters of both parties, and the corresponding relationship between the fields of the interface request bodies of both parties is found according to the specific function of each parameter. For example, the t field of the request body a is the target air conditioner temperature, the format is a number, the specific meaning is the degree centigrade indicated by the number, the temp field of the request body B is the air conditioner target temperature, the format is a character string, for example, 26 ℃, 90 ° F, wherein the specific unit is indicated in the field, then the system administrator can determine the specific conversion step, then enter the corresponding relation and calculation step of each pair of parameters in the protocol conversion system, and mark as null if the corresponding parameters such as the server time and other fields are absent and have no influence on the instruction execution.
As an optional embodiment, the first request information includes identification information of the first request body and the second system, where the identification information of the second system is obtained by analyzing, by the first system, a second control instruction sent by the second system.
In the above optional embodiment, the first request information includes request body information of the first system and ID information of the second system, where the ID information of the second system is obtained by parsing a control instruction sent from the second system to the first system, and the ID information of the second system is a basis for the first system to determine whether the second system is a third-party system.
As an alternative embodiment, converting the first request entity according to a predetermined conversion manner to obtain the second request entity includes: calling a predetermined conversion mode based on the identification information; and converting the first request body by using a preset conversion mode to obtain a second request body.
In the above optional embodiment, when the first request body is received, the returned control instruction cannot be identified by the third party system, so that the first request body information is converted into the second request body information according to a predetermined conversion mode, so as to achieve the purpose of communicating and controlling the third party system.
As an optional embodiment, the method for converting a communication protocol further includes: receiving second request information sent by the first system, wherein the second request information is a protocol conversion request; acquiring request body change information based on the second request information; the predetermined conversion scheme is updated based on the requester change information.
Fig. 3 is a schematic diagram of a protocol conversion process according to an embodiment of the present invention, as shown in fig. 3, when a local system receives a control instruction of a third-party device, the local system determines that the local system is a third-party system device according to information such as a device id of the third-party system, and then the local system sends a protocol conversion request to the protocol conversion system together with the third-party system id and an original json request body of a first system, and then the protocol conversion system receives the request, and then, according to pre-configured interface information, each field of the original json request body is used as an input, formatted, and output as a json request body that can be identified by the third-party system, and then returns to the local system, and finally, the local system sends a request to the third-party system using a new request body after receiving, and finally, the third-party system executes the control instruction and returns a result.
As can be seen from the above, in the embodiment of the present invention, a configurable relationship is formed between the converted protocol and the target protocol parameter in the conversion system through the embodiment of the present invention, dynamic creation and modification can be achieved, configurability of converting the third party manufacturer instruction protocol into the local protocol is achieved, a protocol basis is provided for cooperative control of intelligent homes of all parties, a technical problem that in the field of intelligent homes, the instructions of intelligent home platforms of all parties are not completely consistent and how to unify the intelligent home platforms and use the same control interface for the outside is solved, and the purpose of efficiently creating and updating the instruction relationship of the multi-party system is achieved.
Example 2
According to another aspect of the embodiment of the present invention, there is provided a device for converting a communication protocol, and fig. 4 is a schematic diagram of the device for converting a communication protocol according to the embodiment of the present invention, as shown in fig. 4, the device for converting a communication protocol includes: a receiving module 41, an analyzing module 43, a converting module 45 and a returning module 47. The following describes the conversion device of the communication protocol.
The receiving module 41 is configured to receive first request information sent by a first system, where the first system is a local system, and the first request information is protocol conversion request information sent by the first system.
The parsing module 43 is configured to parse the first request information to obtain a first request body of the first system.
And a converting module 45, configured to convert the first request body according to a predetermined conversion manner to obtain a second request body, where the second request body is a request body that can be identified by the second system.
And a returning module 47, configured to return the second request body to the first system, where the first system generates a first control instruction based on the second request body, and sends the first control instruction to the second system, so that the second system operates based on the first control instruction.
It should be noted that the receiving module 41, the analyzing module 43, the converting module 45, and the returning module 47 correspond to steps S102 to S108 in embodiment 1, and the modules are the same as the corresponding steps in the implementation example and the application scenario, but are not limited to the disclosure in embodiment 1. It should be noted that the modules described above as part of the apparatus may be implemented in a computer system such as a set of computer executable instructions.
As can be seen from the above, in the embodiment of the present invention, first, the receiving module 41 may be utilized to receive first request information sent by a first system, where the first system is a local system, and the first request information is protocol conversion request information sent by the first system; then, the analysis module 43 is used for analyzing the first request information to obtain a first request body of the first system; then, the conversion module 45 is used for converting the first request body according to a preset conversion mode to obtain a second request body, wherein the second request body is a request body which can be identified by a second system; finally, the returning module 47 returns the second request body to the first system, where the first system generates the first control instruction based on the second request body and sends the first control instruction to the second system, so that the second system operates based on the first control instruction. Through the communication protocol conversion device provided by the embodiment of the invention, the purposes that the first request information sent by the first system is used for converting the first request body to obtain the second request body and returning the second request body to the first system are achieved, so that the technical effect of enhancing the collaboration among multiple intelligent home systems is realized, and the technical problem that the collaboration fault rate among the multiple systems is high or even the collaboration cannot be realized due to inconsistent communication modes of all home equipment systems in the related technology is solved.
Optionally, the apparatus for converting a communication protocol further includes: the configuration module is used for configuring a conversion interface between the first system and a second system before receiving first request information sent by the first system, wherein the second system is an access system except the first system, and the conversion interface is a protocol conversion interface.
Optionally, the apparatus for converting a communication protocol further includes: the acquisition module is used for acquiring a first request body of a first system and a third request body of a second system before receiving first request information sent by the first system; the first determining module is used for determining a first function of each parameter in the first request body and a second function of each parameter in the second request body; the second determining module is used for determining the corresponding relation between each field in the first request body and each field in the second request body based on the first function and the second function; and the third determining module is used for determining a preset conversion mode between the first system and the second system based on the corresponding relation.
Optionally, the first request information includes identification information of the first requester and the second system, where the identification information of the second system is obtained by analyzing, by the first system, a second control instruction sent by the second system.
Optionally, a conversion module comprising: the calling unit is used for calling a preset conversion mode based on the identification information; and the conversion unit is used for converting the first request body by using a preset conversion mode to obtain a second request body.
Optionally, the apparatus for converting a communication protocol further includes: the receiving unit is used for receiving second request information sent by the first system, wherein the second request information is a protocol conversion request; an acquisition unit configured to acquire request body variation information based on the second request information; and the updating unit is used for updating the preset conversion mode based on the request body change information.
Example 3
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium including a stored computer program, wherein when the computer program is executed by a processor, the apparatus where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned methods for converting a communication protocol.
Example 4
According to another aspect of the embodiments of the present invention, there is provided a processor, configured to execute a computer program, where the computer program executes the method for converting a communication protocol of any one of the above.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is substantially or partly contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and amendments can be made without departing from the principle of the present invention, and these modifications and amendments should also be considered as the protection scope of the present invention.

Claims (8)

1. A method for converting a communication protocol, comprising:
receiving first request information sent by a first system, wherein the first system is a local system, and the first request information is protocol conversion request information sent by the first system;
analyzing the first request information to obtain a first request body of the first system;
converting the first request body according to a preset conversion mode to obtain a second request body, wherein the second request body is a request body which can be identified by a second system;
returning the second request body to the first system, wherein the first system generates a first control instruction based on the second request body and sends the first control instruction to the second system so that the second system operates based on the first control instruction;
wherein the method further comprises:
receiving second request information sent by the first system, wherein the second request information is a protocol conversion request;
acquiring request body change information based on the second request information;
updating the predetermined conversion mode based on the request body change information;
before receiving the first request information sent by the first system, the method further comprises:
acquiring the first request body of the first system and a third request body of the second system;
determining a first function of each parameter in the first requester and a second function of each parameter in the second requester;
determining a corresponding relation between each field in the first request body and each field in the second request body based on the first function and the second function;
and determining a predetermined conversion mode between the first system and the second system based on the corresponding relation.
2. The method of claim 1, further comprising, prior to receiving the first request message sent by the first system:
and configuring a conversion interface between the first system and the second system, wherein the second system is an access system except the first system, and the conversion interface is a protocol conversion interface.
3. The method according to claim 1, wherein the first request information includes identification information of the first requester and the second system, and wherein the identification information of the second system is obtained by parsing, by the first system, a second control command sent by the second system.
4. The method of claim 3, wherein transforming the first requestor in a predetermined transformation manner to obtain a second requestor comprises:
calling the predetermined conversion mode based on the identification information;
and converting the first request body by using the preset conversion mode to obtain the second request body.
5. An apparatus for converting a communication protocol, comprising:
a receiving module, configured to receive first request information sent by a first system, where the first system is a local system, and the first request information is protocol conversion request information sent by the first system;
the analysis module is used for analyzing the first request information to obtain a first request body of the first system;
the conversion module is used for converting the first request body according to a preset conversion mode to obtain a second request body, wherein the second request body is a request body which can be identified by a second system;
the return module is used for returning the second request body to the first system, wherein the first system generates a first control instruction based on the second request body and sends the first control instruction to the second system so as to enable the second system to operate based on the first control instruction;
wherein, the conversion device of the communication protocol further comprises: an obtaining module, configured to obtain a first request body of a first system and a third request body of a second system before receiving first request information sent by the first system; a first determining module, configured to determine a first function of each parameter in the first requester and a second function of each parameter in the second requester; a second determining module, configured to determine, based on the first function and the second function, a correspondence between each field in the first request body and each field in the second request body; and the third determining module is used for determining a preset conversion mode between the first system and the second system based on the corresponding relation.
6. The apparatus of claim 5, further comprising:
the configuration module is configured to configure a conversion interface between a first system and a second system before receiving first request information sent by the first system, where the second system is an access system other than the first system, and the conversion interface is a protocol conversion interface.
7. A computer-readable storage medium, comprising a stored computer program, wherein when the computer program is executed by a processor, the computer-readable storage medium controls a device to execute the method for converting a communication protocol according to any one of claims 1 to 4.
8. A processor for executing a computer program, wherein the computer program executes to perform the method for converting a communication protocol according to any one of claims 1 to 4.
CN202111083070.4A 2021-09-15 2021-09-15 Communication protocol conversion method and device and computer readable storage medium Active CN113824710B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111083070.4A CN113824710B (en) 2021-09-15 2021-09-15 Communication protocol conversion method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111083070.4A CN113824710B (en) 2021-09-15 2021-09-15 Communication protocol conversion method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113824710A CN113824710A (en) 2021-12-21
CN113824710B true CN113824710B (en) 2022-12-06

Family

ID=78914563

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111083070.4A Active CN113824710B (en) 2021-09-15 2021-09-15 Communication protocol conversion method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113824710B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110995647A (en) * 2019-10-24 2020-04-10 珠海格力电器股份有限公司 Protocol conversion method, device, equipment, storage medium and system
CN113206836A (en) * 2021-04-12 2021-08-03 河海大学 Method for realizing protocol conversion of API gateway in industrial internet

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105743957B (en) * 2014-12-12 2019-11-12 阿里巴巴集团控股有限公司 A kind of control method of smart machine, system and intelligent terminal
CN107360068A (en) * 2017-06-30 2017-11-17 广东美的制冷设备有限公司 Household appliance controlling system, method and its equipment
CN107493211A (en) * 2017-08-29 2017-12-19 海信集团有限公司 The control method and device of intelligent home device
CN113135476A (en) * 2021-03-23 2021-07-20 北京金茂绿建科技有限公司 Ladder control method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110995647A (en) * 2019-10-24 2020-04-10 珠海格力电器股份有限公司 Protocol conversion method, device, equipment, storage medium and system
CN113206836A (en) * 2021-04-12 2021-08-03 河海大学 Method for realizing protocol conversion of API gateway in industrial internet

Also Published As

Publication number Publication date
CN113824710A (en) 2021-12-21

Similar Documents

Publication Publication Date Title
CN112073471B (en) Control method and device of equipment, storage medium and electronic device
CN105739317A (en) Intelligent household control method, device and system
US10495336B2 (en) Energy operations across domains
CN113691635B (en) Method and device for calling microservice, electronic equipment and readable storage medium
CN107168765A (en) A kind of method and system of remote compilation software
WO2007001121A1 (en) Device management system and method for setting configuration-value therein
CN112532711A (en) Edge computing application deployment method, terminal, edge computing node and storage medium
EP2811690B1 (en) Method and apparatus for managing wireless docking network
CN111582824A (en) Cloud resource synchronization method, device, equipment and storage medium
CN114697150A (en) Command issuing method and device, storage medium and electronic device
CN113824710B (en) Communication protocol conversion method and device and computer readable storage medium
CN110750327A (en) Virtual network function management method and system, agent device, and storage medium
CN108509311A (en) A kind of apparatus monitoring method, device, storage medium and computer equipment
CN111901209B (en) Internet of things communication method, internet of things communication board, computer equipment and storage medium
CN116033006A (en) Data processing method, system, storage medium and electronic device
CN109274715A (en) The platform resource management system of vehicle-mounted multi-channel communication systems
CN113824587A (en) Multi-communication protocol equipment management method and system
WO2014176954A1 (en) Processing method, device and system for data of distributed storage system
CN112416897B (en) Log query method and device, storage medium and electronic device
CN112732296B (en) Software version updating method and device, storage medium and electronic equipment
WO2019062850A1 (en) Data interaction method, device and equipment
CN117135011B (en) Method for adapting gateway to multiple cloud platforms based on MQTT communication and gateway system
CN111182012B (en) Intelligent equipment management method, device and system
CN115174296B (en) Equipment function access method and device, storage medium and electronic device
CN115314329A (en) Attribute value conversion method and device, storage medium and electronic 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
GR01 Patent grant
GR01 Patent grant