Equipment adaptation method and device based on communication adapter, equipment and medium

By acquiring and converting communication interface information and adapting with protocol identifiers, the problem that communication adapters in the prior art cannot adapt to multiple optical storage charging devices is solved, and the adaptation success rate and compatibility are improved.

CN119052350APending Publication Date: 2024-11-29XIAN RONGJUFENG ENERGY TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411095228.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The existing communication adapters cannot effectively adapt to the communication interfaces and communication protocols of many different types of optical storage charging devices, resulting in the inability to adapt to the corresponding optical storage charging devices.

Method used

By obtaining the communication interface information of the target device and the communication adapter, the adaptation result is determined, and the interface adaptation conversion is performed when the adaptation is not done, the conversion interface information is obtained, and the communication specification adaptation is performed in combination with the protocol identification information to achieve adaptation.

Benefits of technology

The interface and protocol adaptation success rate between the communication adapter and the target device is improved, effective adaptation is achieved, and the compatibility and signal transmission stability problems between the adapter and the device are solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119052350A_ABST
    Figure CN119052350A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an equipment adaptation method and device based on a communication adapter, equipment and a medium, and the method comprises the steps: obtaining communication interface information corresponding to target equipment and communication interface information corresponding to the communication adapter; based on the communication interface information corresponding to the target device and the communication adapter, determining whether a communication interface adapted to the target device exists in the communication adapter, and obtaining an adaptation result; when the adaptation result is that the target equipment is not matched with the communication adapter, interface adaptation conversion is carried out according to communication interface information corresponding to the target equipment and the communication adapter, and conversion interface information of the communication adapter is obtained; according to the conversion interface information and the protocol identification information of the target device, communication protocol adaptation is carried out, and adaptation of the target device and the communication adapter is completed; the protocol identification information is used for representing the communication protocol applied by the target equipment. Therefore, the adaptation success rate of the target equipment and the communication adapter can be improved, and effective adaptation of the communication adapter and the target equipment is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of wireless communication technology, and in particular to a device adaptation method, apparatus, device and medium based on a communication adapter. Background Art

[0002] In the current power grid collection system, in order to realize the remote control of the power grid collection system for the photovoltaic storage and charging equipment, the photovoltaic storage and charging equipment needs to establish a remote connection with the power grid collection system of the substation through a communication adapter that is compatible with it. However, with the rapid development of new energy technologies, the number of photovoltaic storage and charging equipment has increased sharply, resulting in an increase in the types of communication interfaces and communication protocols used in photovoltaic storage and charging equipment.

[0003] In the process of adapting the communication adapter to the optical storage and charging device, it is necessary to adapt the communication adapter based on the communication interface in the optical storage and charging device and the communication protocol used by the optical storage and charging device. However, the current communication adapter cannot adapt to a variety of different types of communication interfaces and communication protocols, resulting in the communication adapter being unable to effectively adapt to the corresponding optical storage and charging device.

[0004] Therefore, how to solve the problem in the prior art that the communication adapter cannot be effectively adapted to the optical storage and charging device has become a technical problem that technical personnel in this field urgently need to solve. Summary of the invention

[0005] In view of this, in order to solve the problem in the prior art that the communication adapter cannot be effectively adapted to the optical storage and charging device, the embodiments of the present application provide a device adaptation method, apparatus, device and medium based on a communication adapter.

[0006] The embodiments of the present application disclose the following technical solutions:

[0007] In a first aspect, the present application provides a device adaptation method based on a communication adapter, comprising:

[0008] Acquire communication interface information corresponding to the target device and the communication adapter;

[0009] Based on the communication interface information corresponding to the target device and the communication adapter, determining whether there is a communication interface in the communication adapter that is adapted to the target device, and obtaining an adaptation result;

[0010] When the adaptation result is not compatible, performing interface adaptation conversion according to the communication interface information corresponding to the target device and the communication adapter, to obtain conversion interface information of the communication adapter;

[0011] According to the conversion interface information and the protocol identification information of the target device, communication protocol adaptation is performed to complete the adaptation of the target device and the communication adapter; the protocol identification information is used to indicate the communication protocol applied by the target device.

[0012] In one possible implementation, the communication adapter includes: an HRF communication unit; the HRF communication unit forms a wireless communication network with a communication node through an external antenna; the HRF communication unit is used to: send a target device control signal from the communication node to the target device, and receive feedback data information generated by the target device in response to the target device control signal.

[0013] In a possible implementation, performing interface adaptation conversion according to the communication interface information corresponding to the target device and the communication adapter to obtain the conversion interface information of the communication adapter includes:

[0014] Determining a conversion interface in the communication adapter corresponding to the target device according to the communication interface information of the target device;

[0015] Establishing a connection between the conversion interface and the communication interface of the target device through a patch cord corresponding to the communication interface information of the target device;

[0016] Based on the wiring harness property information of the patch harness and the conversion interface of the communication adapter, the conversion interface information of the communication adapter is determined.

[0017] In a possible implementation, after completing the adaptation between the target device and the communication adapter, the method includes:

[0018] Acquiring a communication protocol between the communication adapter and the target device;

[0019] A mapping relationship between the protocol identification information of the target device and the communication protocol is constructed, and the mapping relationship is saved in a preset adaptation library.

[0020] In a possible implementation manner, after completing the adaptation between the target device and the communication adapter, the method further includes:

[0021] In response to a target device control signal, performing protocol conversion on the target device control signal according to a communication protocol between the communication adapter and the target device to obtain a protocol conversion message, and sending the protocol conversion message to the target device;

[0022] According to the communication protocol applied by the control signal of the target device, the control response message from the target device is converted into a protocol to obtain a feedback signal; the control response message is a response message of the target device to the protocol converted message.

[0023] In a possible implementation manner, after obtaining the adaptation result, the method further includes:

[0024] When the adaptation result is adaptation, determining the adaptation interface information of the communication interface adapted to the target device in the communication adapter;

[0025] According to the adaptation interface information and the protocol identification information of the target device, communication protocol adaptation is performed to complete the adaptation of the target device and the communication adapter.

[0026] In a possible implementation, the communication interface of the communication adapter includes: a USB communication interface, a 485 communication interface and a CAN communication interface.

[0027] In a second aspect, an embodiment of the present application provides a device adaptation apparatus based on a communication adapter, comprising:

[0028] An interface information acquisition module, used to acquire communication interface information corresponding to the target device and the communication adapter;

[0029] An adaptation determination module, configured to determine whether there is a communication interface in the communication adapter that is adapted to the target device based on the communication interface information corresponding to the target device and the communication adapter, and obtain an adaptation result;

[0030] An adaptation conversion module, used for, when the adaptation result is not compatible, performing interface adaptation conversion according to the communication interface information corresponding to the target device and the communication adapter, to obtain conversion interface information of the communication adapter;

[0031] The protocol adaptation module is used to perform communication protocol adaptation according to the conversion interface information and the protocol identification information of the target device to complete the adaptation between the target device and the communication adapter; the protocol identification information is used to indicate the communication protocol used by the target device.

[0032] In a third aspect, an embodiment of the present application provides an electronic device, the device comprising: a processor, a memory, and a system bus;

[0033] The processor and the memory are connected via the system bus;

[0034] The memory is used to store one or more programs, and the one or more programs include instructions. When the instructions are executed by the processor, the processor executes the execution steps of any possible device adaptation method based on the communication adapter in the first aspect.

[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed on a computer, the computer executes the operating steps of any possible device adaptation method based on a communication adapter according to the first aspect above.

[0036] Compared with the prior art, the present application has the following beneficial effects: the embodiment of the present application provides a device adaptation method, apparatus, device and medium based on a communication adapter. In the device adaptation method based on a communication adapter in the embodiment of the present application, it is necessary to determine whether there is a communication interface adapted to the target device in the communication adapter based on the communication interface information corresponding to the target device and the communication adapter. Correspondingly, when there is no communication interface adapted to the target device in the communication adapter, interface adaptation conversion is performed according to the communication interface information corresponding to the two, so that the converted communication interface in the communication adapter can be adapted to the communication interface of the target device, and the corresponding conversion interface information is obtained. Finally, according to the conversion interface information and the protocol identification information of the target device, the communication protocol applied by the target device is adapted to the conversion interface information of the communication adapter, so that the conversion interface in the communication adapter can effectively adapt to the communication protocol applied by the target device. In this way, on the basis of the interface adaptation between the communication adapter and the target device, the adaptation of the communication protocol can be further realized, the adaptation success rate of the communication protocol and the communication interface of the two is improved, and the effective adaptation between the communication adapter and the target device is realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0038] Figure 1 A schematic diagram of the structure of a communication adapter provided in an embodiment of the present application;

[0039] Figure 2 A flow chart of a device adaptation method based on a communication adapter provided in an embodiment of the present application;

[0040] Figure 3 A schematic diagram of a process flow of interface adaptation conversion provided in an embodiment of the present application;

[0041] Figure 4 A flowchart of another device adaptation method based on a communication adapter provided in an embodiment of the present application;

[0042] Figure 5 A schematic diagram of the communication process between a photovoltaic storage and charging device and a power grid collection system provided in an embodiment of the present application;

[0043] Figure 6 A schematic diagram of the structure of a device adaptation device based on a communication adapter provided in an embodiment of the present application;

[0044] Figure 7 A schematic diagram of the structure of a device adapting to an electronic device based on a communication adapter provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] As described above, in the process of adapting the communication adapter to the optical storage and charging device, it is necessary to adapt the communication adapter based on the communication interface in the optical storage and charging device and the communication protocol used by the optical storage and charging device. However, the current communication adapter cannot adapt to a variety of different types of communication interfaces and communication protocols, resulting in the communication adapter being unable to effectively adapt to the corresponding optical storage and charging device.

[0046] In order to solve the above problems, the embodiment of the present application provides a device adaptation method, apparatus, device and medium based on a communication adapter. In the device adaptation method based on a communication adapter in the embodiment of the present application, it is necessary to determine whether there is a communication interface adapted to the target device in the communication adapter based on the communication interface information corresponding to the target device and the communication adapter. Correspondingly, when there is no communication interface adapted to the target device in the communication adapter, interface adaptation conversion is performed according to the communication interface information corresponding to the two, so that the converted communication interface in the communication adapter can be adapted to the communication interface of the target device, and the corresponding conversion interface information is obtained. Finally, according to the conversion interface information and the protocol identification information of the target device, the communication protocol applied by the target device is adapted to the conversion interface information of the communication adapter, so that the conversion interface in the communication adapter can effectively adapt to the communication protocol applied by the target device. In this way, on the basis of the interface adaptation between the communication adapter and the target device, the adaptation of the communication protocol can be further realized, the adaptation success rate of the communication protocol and the communication interface of the two is improved, and the effective adaptation between the communication adapter and the target device is realized.

[0047] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0048] Next, a device adaptation method based on a communication adapter provided in an embodiment of the present application will be introduced in conjunction with a specific structural diagram of the communication adapter.

[0049] See also Figure 1 , which is a schematic diagram of the structure of a communication adapter provided in an embodiment of the present application. As shown in the figure, Figure 1 The communication adapter shown includes a power interface, an HRF (Highspeed Radio Frequency) communication unit, a USB communication interface, a CAN communication interface, a 485 communication interface, and an infrared interface. The power interface is used to provide direct current to the communication adapter through a device connected to the communication adapter. In a possible implementation, the direct current can be maintained in the range of 12V to 38V, thereby ensuring the stable operation of the communication adapter.

[0050] The HRF communication unit is used to form a wireless communication network with an external communication node through an external antenna connected thereto, thereby receiving a target device control signal sent from the external communication node to the target device. Correspondingly, the HRF communication unit can also receive feedback data information generated by the target device for the target device control signal, and transmit the feedback data information back to the communication node according to the wireless communication network, thereby establishing communication between the communication node and the target device.

[0051] In actual application scenarios, the device connected to the communication adapter can be a photovoltaic storage and charging device, and its external communication node can be a power grid collection system in the substation. The power grid collection system in the substation can send a control signal to the photovoltaic storage and charging device connected to the adapter through the wireless communication network constructed by the HRF communication unit through the communication adapter, thereby controlling the operating status of the photovoltaic storage and charging device and obtaining the operating data of the photovoltaic storage and charging device.

[0052] It should be noted that for the current low-voltage power grid collection system, the communication between the power grid collection system and the optical storage and charging equipment is based on power line carrier technology and dual-mode communication technology. In the current communication scheme based on dual-mode communication technology, the wired 485 communication scheme is mainly used. The scheme requires the communication adapter to be connected to the collection terminal of the power grid collection system through a wired connection. This method is limited by the limitations of wired connections, and there are problems such as difficulty in wiring over long distances and difficulty in equipment maintenance. In the communication scheme based on power line carrier technology, since the switching action of high-power optical storage and charging equipment will generate a large amount of harmonic interference, the addition of the power line carrier communication network may seriously affect the communication effect.

[0053] Therefore, in a possible implementation, the communication adapter including the HRF communication unit in the embodiment of the present application can be directly connected to the existing dual-mode communication network. The wireless network formed by the HRF communication unit and the power grid collection system is used to realize the communication between the communication adapter and the power grid collection system, thereby realizing efficient communication between the power grid collection system and the optical storage and charging device. It is no longer necessary to establish the connection between the communication adapter and the power grid collection system through a wired connection. Based on the high communication rate and high reliability of HRF, remote and efficient communication of the optical storage and charging device is realized.

[0054] Further, in Figure 1 In the communication adapter shown, the communication interfaces supported in the communication adapter are USB communication interface, CAN communication interface and 485 communication interface. When the communication interface of the target device connected to it is one of the three, the communication adapter can directly adapt to the target device. When the communication interface of the target device is different from the communication interface supported by the communication adapter, it is necessary to connect a transfer harness to the corresponding communication interface of the communication adapter, and connect the transfer harness to the communication interface of the target device, so as to realize the conversion of the interface.

[0055] Take the Growatt inverter as an example of the target device. The communication interface of the Growatt inverter is the DB9 communication interface, which is not compatible with the communication adapter. In this case, it is necessary to connect the corresponding adapter harness to the USB communication interface in the communication adapter, and establish a connection between the USB communication interface and the DB9 communication interface through the adapter harness, so as to achieve the interface conversion.

[0056] Regarding the three types of communication interfaces used in the communication adapter, namely USB, CAN and 485, these three types of interfaces can meet the communication needs of most devices. Among them, the USB communication interface can be adapted to different versions, the CAN communication interface is widely used in the field of industrial automation, and the 485 communication interface is a common serial communication interface. Therefore, through these three types of interfaces, most of the interface conversions can be achieved, thereby coping with the problem that when the optical storage and charging equipment is adapted to the communication adapter, the interface type is easily inconsistent, resulting in the inability to adapt.

[0057] Correspondingly, the infrared interface is used to receive the protocol identification information and conversion interface information of the target device, so that the communication protocol can be adapted through the communication protocol and communication interface specifically applied by the target device. In a possible implementation, the protocol identification information and conversion interface information of the target device can be imported into the communication adapter through an external interactive terminal such as an operation and maintenance handheld device, so that the communication adapter can adapt the communication protocol according to the obtained information, thereby completing the adaptation of the target device and the communication adapter.

[0058] Next, a device adaptation method based on a communication adapter provided in an embodiment of the present application will be introduced in conjunction with specific embodiment drawings.

[0059] See also Figure 2 , which is a flow chart of a device adaptation method based on a communication adapter provided in an embodiment of the present application, and specifically includes the following steps:

[0060] S101: Acquire communication interface information corresponding to the target device and the communication adapter.

[0061] First, you need to obtain the communication interface information of the target device and the communication adapter. The communication interface information of the target device is used to indicate the communication interface used by the target device. Taking the Growatt inverter as an example of the target device, the DB9 communication interface used by it is the communication interface information of its device. The communication interface information of the communication adapter is used to indicate the communication interface supported by the communication adapter. Figure 1 It can be seen from the description that in the communication adapter of the embodiment of the present application, the communication interfaces it supports include USB communication interface, CAN communication interface and 485 communication interface. These three types of communication interfaces can adapt to the communication interfaces of most devices through interface conversion.

[0062] S102: Based on the communication interface information corresponding to the target device and the communication adapter, determine whether there is a communication interface in the communication adapter that is adapted to the target device, and obtain an adaptation result.

[0063] Accordingly, after determining the communication interface used by the target device and the communication interface supported by the communication adapter, the corresponding adaptation result is obtained by determining whether there is a communication interface directly adapted to the target device in the communication adapter. When there is no communication interface directly adapted to the target device in the communication adapter, the corresponding adaptation result is determined to be unmatched.

[0064] S103: When the adaptation result is not compatible, interface adaptation conversion is performed according to the communication interface information corresponding to the target device and the communication adapter, to obtain conversion interface information of the communication adapter.

[0065] When the communication interface supported in the communication adapter is not compatible with the communication interface used by the target device, an interface adaptation conversion is performed according to the communication interface specifically used by the target device and the communication interface supported in the communication adapter, and the communication interface in the communication adapter is converted into a communication interface adapted to the target device, thereby obtaining the conversion interface information of the communication adapter after the interface conversion.

[0066] By Figure 1 From the description, it can be seen that the conversion of the communication adapter interface needs to be completed through the communication interface supported by the communication adapter and the corresponding adapter harness. The conversion interface information of the communication adapter is used to indicate the conversion interface applied by the communication adapter when performing interface conversion, as well as the harness attribute information of the adapter harness used during interface conversion. In actual application scenarios, different types of adapter harnesses have large differences in physical interfaces, signal types, and power requirements. Therefore, when performing interface conversion on the communication interface in the communication adapter through an adapter harness, it is necessary to determine the adapter harness to be used based on the interface type of the communication interface, thereby ensuring the adaptation compatibility between the communication adapter and the target device and the stability of signal transmission.

[0067] Next, the process of interface adaptation and conversion will be introduced in conjunction with the drawings of specific embodiments.

[0068] See also Figure 3 , which is a schematic diagram of a process of interface adaptation conversion provided by an embodiment of the present application, specifically comprising the following steps:

[0069] S201: Determine a conversion interface corresponding to the target device in the communication adapter according to the communication interface information of the target device.

[0070] In the process of interface adaptation and conversion, it is necessary to determine the conversion interface corresponding to the communication interface in the communication adapter according to the communication interface applied by the target device. Among them, different types of communication interfaces of the target device correspond to different conversion interfaces in the communication adapter. For example, when the target device is a Growatt inverter whose applied communication interface is a DB9 communication interface, it is necessary to determine the USB communication interface in the communication adapter as the conversion interface in the communication adapter. The conversion interface in the communication adapter is determined by the communication interface supported by the communication adapter itself, and the specific conversion interface needs to be determined by the type of the communication interface of the target device.

[0071] S202: Establishing a connection between the conversion interface and the communication interface of the target device through a patch cord corresponding to the communication interface information of the target device;

[0072] After determining the conversion interface in the communication adapter corresponding to the target device, the conversion interface on the communication adapter is connected to the communication interface of the target device through a patch cord corresponding to the conversion interface, thereby establishing a connection between the communication adapter and the target device.

[0073] S203: Determine the conversion interface information of the communication adapter based on the wiring harness attribute information of the adapter wiring harness and the conversion interface of the communication adapter.

[0074] Finally, based on the specific harness attribute information of the adapter harness and the conversion interface on the communication adapter, the conversion interface information of the communication adapter can be constructed. Among them, the harness attribute information is used to represent the harness type of the adapter harness and related harness attributes. For example, for a USB adapter harness of a USB communication interface, the harness type of its USB adapter harness can be: USB-A, USB-B, USB-C, and Micro-USB, etc., and its corresponding harness attributes can be: support for high-speed data transmission, reversible insertion, and the power supply capability of the adapter harness. Correspondingly, for an adapter harness of a 485 communication interface, its corresponding harness attributes can be: the 485 adapter harness adopts a shielding layer design, and the 485 adapter harness can be adapted to a variety of different physical interfaces such as terminal blocks, DB9, and RJ45.

[0075] The conversion interface information of the communication adapter relative to the target device can be obtained through the conversion interface information of the communication interface and the harness property information of the adapter harness corresponding to the conversion interface.

[0076] S104: Perform communication protocol adaptation according to the conversion interface information and the protocol identification information of the target device to complete the adaptation of the target device and the communication adapter; the protocol identification information is used to indicate the communication protocol used by the target device.

[0077] The communication protocol refers to the rules and standards that the communication adapter and the target device must follow when transmitting data. The communication protocol defines the format and sequence of data transmission, as well as the exchange method of control information, etc. By determining the communication protocol between the communication adapter and the target device, it can be ensured that the communication adapter and the target device can exchange information in real time and reliably.

[0078] Furthermore, the protocol identification information of the target device is used to indicate the communication protocol applied by the target device when communicating. Optionally, the protocol identification information of the target device can be any identification that can be used to indicate the communication protocol applied by the target device. In actual application scenarios, different optical storage and charging devices often correspond to different manufacturer information, and different types of manufacturers often correspond to different communication protocols. Therefore, in one possible implementation, the manufacturer information corresponding to the target device can be used as the protocol identification information of the target device, and the communication protocol applied by the target device is determined by the manufacturer information of the target device. In another possible implementation, the abbreviation of the name of the communication protocol can also be directly used as the identification information of the target device. The protocol identification information of the target device is intended to indicate the communication protocol applied by the target device when communicating. This embodiment does not specifically limit the form of the protocol identification information.

[0079] Therefore, after determining the conversion interface information of the communication adapter and the protocol identification information of the target device, the communication protocol is adapted through the communication protocol applied by the target device and the attribute information of the corresponding conversion interface and adapter harness, which can effectively determine the communication protocol between the target device and the communication adapter, thereby completing the adaptation between the target device and the communication adapter.

[0080] In a possible implementation, the communication protocol between the target device and the communication adapter can be established based on the Modbus protocol on the basis of the above conversion interface information and protocol identification information. The Modbus protocol is a widely used industrial specification. Combining the Modbus protocol to determine the communication protocol between the target device and the communication adapter can further improve the compatibility between the target device and the communication adapter and improve the adaptation efficiency of the two.

[0081] In a possible implementation, after the communication adapter and the target device are adapted, since the communication adapter and the target device establish a communication protocol between the two during the adaptation process, when an external communication node sends a control instruction to the target device through the communication adapter, the communication adapter can perform protocol conversion on the control execution according to the communication protocol between the communication adapter and the target device, and send the protocol conversion message corresponding to the control instruction to the target device, so that the target device can effectively respond to the control instruction.

[0082] See also Figure 4, which is a flow chart of another device adaptation method based on a communication adapter provided in an embodiment of the present application, specifically comprising the following steps:

[0083] S301: In response to a target device control signal, according to a communication protocol between the communication adapter and the target device, perform protocol conversion on the target device control signal to obtain a protocol conversion message, and send the protocol conversion message to the target device;

[0084] The communication adapter receives a target device control signal sent by an external communication node to the target device, and performs protocol conversion on the target device control signal according to the communication protocol between the adapter and the target device, thereby converting the control instructions in the control signal into a protocol conversion message that can be quickly recognized by the target device, so that the target device can quickly provide feedback signals according to the corresponding protocol conversion message, thereby improving the communication effectiveness and stability between the target device and the external communication node.

[0085] Specifically, during the protocol conversion process, it is necessary to perform the protocol conversion based on the source protocol of the communication protocol between the communication adapter and the target device. For example, when the communication protocol between the communication adapter and the target device is a protocol generated based on the Modbus protocol, the Modbus protocol is the source protocol. Through the protocol conversion tool corresponding to the source protocol, the target device control signal can be effectively converted to the protocol, thereby converting the target device control signal into the corresponding protocol conversion message.

[0086] S302: Perform protocol conversion on a control response message from the target device according to the communication protocol applied by the control signal of the target device to obtain a feedback signal; the control response message is a response message of the target device to the protocol conversion message.

[0087] Correspondingly, when the target device receives the protocol message sent by the communication adapter, it will respond to the protocol message to generate a control response message, and send the control response message to the communication adapter. In order to transmit the control response message back to the external communication node, the communication adapter needs to convert the control response message back to the original protocol form according to the communication protocol applied by the control signal of the target device, and obtain the corresponding feedback signal, so that the communication node can successfully receive the feedback information sent by the target device.

[0088] Next, taking the photovoltaic storage and charging device as an exemplary device of the target device and the power grid collection system of the substation as an exemplary communication node of the external communication node, combined with the specific embodiment drawings, the communication process between the photovoltaic storage and charging device and the power grid collection system through the communication adapter in the embodiment of the present application is introduced.

[0089] See also Figure 5 , this figure is a schematic diagram of the communication process between a photovoltaic storage and charging device and a power grid collection system provided in an embodiment of the present application. As shown in the figure, the power grid collection system in the substation includes a collection master station and a collection terminal, and the communication adapter and the photovoltaic storage and charging device are adapted based on the Modbus protocol.

[0090] In order to obtain the voltage value of the photovoltaic storage and charging equipment, the power grid collection system sends a collection voltage command from the collection master station to the collection terminal, and the collection terminal outputs the collection voltage instruction generated by the 645 protocol to the communication adapter. After receiving the collection voltage instruction, the communication adapter converts the collection voltage instruction according to the Modbus protocol and sends a collection voltage message based on the Modbus protocol to the photovoltaic storage and charging equipment. The photovoltaic storage device responds based on the message and then sends a Modbus response message back to the communication adapter. The communication adapter re-converts the Modbus response message and converts it into a voltage instruction with the same protocol as the collection voltage instruction, thereby sending the final voltage instruction generated based on the 645 protocol to the collection terminal and finally to the collection master station. In this way, the communication between the power grid collection system of the substation and the photovoltaic storage and charging equipment through the communication adapter is completed.

[0091] In addition, in another possible implementation, after the adaptation between the target device and the communication adapter is completed, a mapping relationship between the protocol identification information and the communication protocol can be constructed according to the protocol identification information of the target device and the communication protocol between the target device and the communication adapter, and the mapping relationship is stored in a preset adaptation library. In this way, when the adaptation between the target device and the communication adapter is performed, the protocol identification information of the target device is directly obtained, and the corresponding communication protocol is searched in the preset adaptation library. When the corresponding communication protocol exists in the preset adaptation library, it is no longer necessary to perform the step of obtaining the conversion interface information, and the adaptation can be performed directly based on the communication protocol stored in the preset adaptation library, thereby improving the adaptation efficiency between the target device and the communication adapter.

[0092] In another possible implementation, when determining whether there is a communication interface adapted to the target device in the communication adapter, if the adaptation result is adaptation, there is no need to perform subsequent interface adaptation conversion steps, and the communication interface information adapted to the target device in the communication adapter can be directly determined as the adaptation interface information, thereby improving the adaptation efficiency between the communication adapter and the target device.

[0093] The embodiment of the present application provides a device adaptation method, apparatus, device and medium based on a communication adapter. In the device adaptation method based on a communication adapter in the embodiment of the present application, it is necessary to determine whether there is a communication interface adapted to the target device in the communication adapter based on the communication interface information corresponding to the target device and the communication adapter. Correspondingly, when there is no communication interface adapted to the target device in the communication adapter, interface adaptation conversion is performed according to the communication interface information corresponding to the two, so that the converted communication interface in the communication adapter can be adapted to the communication interface of the target device, and the corresponding conversion interface information is obtained. Finally, according to the conversion interface information and the protocol identification information of the target device, the communication protocol applied by the target device is adapted to the conversion interface information of the communication adapter, so that the conversion interface in the communication adapter can effectively adapt to the communication protocol applied by the target device. In this way, on the basis of the interface adaptation between the communication adapter and the target device, the adaptation of the communication protocol can be further realized, the adaptation success rate of the communication protocol and the communication interface of the two is improved, and the effective adaptation between the communication adapter and the target device is realized.

[0094] A device adaptation apparatus based on a communication adapter provided in an embodiment of the present application is introduced below. The device adaptation apparatus based on a communication adapter described below and the device adaptation method based on a communication adapter described above can refer to each other.

[0095] See also Figure 6 , which is a schematic diagram of the structure of a device adaptation device based on a communication adapter provided in an embodiment of the present application, specifically including the following modules:

[0096] The interface information acquisition module 100 is used to acquire the communication interface information corresponding to the target device and the communication adapter;

[0097] The adaptation determination module 200 is used to determine whether there is a communication interface in the communication adapter that is adapted to the target device based on the communication interface information corresponding to the target device and the communication adapter, and obtain an adaptation result;

[0098] The adaptation conversion module 300 is used to perform interface adaptation conversion according to the communication interface information corresponding to the target device and the communication adapter respectively, to obtain the conversion interface information of the communication adapter when the adaptation result is not compatible;

[0099] The protocol adaptation module 400 is used to perform communication protocol adaptation according to the conversion interface information and the protocol identification information of the target device to complete the adaptation between the target device and the communication adapter; the protocol identification information is used to indicate the communication protocol used by the target device.

[0100] In one possible implementation, the communication adapter includes: an HRF communication unit; the HRF communication unit forms a wireless communication network with a communication node through an external antenna; the HRF communication unit is used to: send a target device control signal from the communication node to the target device, and receive feedback data information generated by the target device in response to the target device control signal.

[0101] In a possible implementation, the adaptation conversion module 300 is specifically configured to:

[0102] Determining a conversion interface in the communication adapter corresponding to the target device according to the communication interface information of the target device;

[0103] Establishing a connection between the conversion interface and the communication interface of the target device through a patch cord corresponding to the communication interface information of the target device;

[0104] Based on the wiring harness property information of the patch harness and the conversion interface of the communication adapter, the conversion interface information of the communication adapter is determined.

[0105] In a possible implementation, the device further includes: a protocol acquisition module; the protocol acquisition module is specifically configured to:

[0106] Acquiring a communication protocol between the communication adapter and the target device;

[0107] A mapping relationship between the protocol identification information of the target device and the communication protocol is constructed, and the mapping relationship is saved in a preset adaptation library.

[0108] In a possible implementation, the device further includes: a communication module; the communication module is used to:

[0109] In response to a target device control signal, performing protocol conversion on the target device control signal according to a communication protocol between the communication adapter and the target device to obtain a protocol conversion message, and sending the protocol conversion message to the target device;

[0110] According to the communication protocol applied by the control signal of the target device, the control response message from the target device is converted into a protocol to obtain a feedback signal; the control response message is a response message of the target device to the protocol converted message.

[0111] In a possible implementation, the device further includes: a first adaptation module; the first adaptation module is used to:

[0112] When the adaptation result is adaptation, determining the adaptation interface information of the communication interface adapted to the target device in the communication adapter;

[0113] According to the adaptation interface information and the protocol identification information of the target device, communication protocol adaptation is performed to complete the adaptation of the target device and the communication adapter.

[0114] In a possible implementation, the communication interface of the communication adapter includes: a USB communication interface, a 485 communication interface and a CAN communication interface.

[0115] See also Figure 7 , which is a schematic diagram of a structure of a device adapting to an electronic device based on a communication adapter provided in an embodiment of the present application, including:

[0116] A memory 11, used for storing computer programs;

[0117] The processor 12 is configured to implement the steps of a device adaptation method based on a communication adapter as described in any of the above method embodiments when executing the computer program.

[0118] In this embodiment, the device may be a vehicle-mounted computer, a PC (Personal Computer), or a terminal device such as a smart phone, a tablet computer, a PDA, or a portable computer.

[0119] The device may include a memory 11 , a processor 12 , and a bus 13 .

[0120] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the device, such as a hard disk of the device. In other embodiments, the memory 11 can also be an external storage device of the device, such as a plug-in hard disk equipped on the device, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Further, the memory 11 can also include both an internal storage unit of the device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the device, such as program codes for executing fault prediction methods, etc., but can also be used to temporarily store data that has been output or is to be output. The processor 12 can be a central processing unit (CPU) in some embodiments.

[0121] In some embodiments, the processor 12 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor or other data processing chip, and is used to run program codes or process data stored in the memory 11, such as program codes for executing a fault prediction method.

[0122] The bus 13 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0123] Furthermore, the device may also include a network interface 14, which may optionally include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the device and other electronic devices.

[0124] Optionally, the device may further include a user interface 15, which may include a display (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 15 may also include a standard wired interface and a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the device and to display a visual user interface.

[0125] Figure 7 Only the device with components 11-15 is shown, and it can be understood by those skilled in the art that Figure 7 The structure shown does not constitute a limitation of the device, and may include fewer or more components than shown, or combine certain components, or arrange the components differently.

[0126] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for methods, devices, electronic devices and media, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The methods, devices, electronic devices and media described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0127] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A device adaptation method based on a communication adapter, characterized in that: Includes: Acquire communication interface information corresponding to the target device and the communication adapter; Based on the communication interface information corresponding to the target device and the communication adapter, determining whether there is a communication interface in the communication adapter that is adapted to the target device, and obtaining an adaptation result; When the adaptation result is not compatible, performing interface adaptation conversion according to the communication interface information corresponding to the target device and the communication adapter, to obtain conversion interface information of the communication adapter; According to the conversion interface information and the protocol identification information of the target device, communication protocol adaptation is performed to complete the adaptation of the target device and the communication adapter; the protocol identification information is used to indicate the communication protocol applied by the target device.

2. The method according to claim 1, characterized in that The communication adapter includes: an HRF communication unit; the HRF communication unit forms a wireless communication network with a communication node through an external antenna; the HRF communication unit is used to: send a target device control signal from the communication node to the target device, and receive feedback data information generated by the target device for the target device control signal.

3. The method according to claim 1, characterized in that The performing interface adaptation conversion according to the communication interface information corresponding to the target device and the communication adapter to obtain the conversion interface information of the communication adapter includes: Determining a conversion interface in the communication adapter corresponding to the target device according to the communication interface information of the target device; Establishing a connection between the conversion interface and the communication interface of the target device through a patch cord corresponding to the communication interface information of the target device; Based on the harness property information of the patch harness and the conversion interface of the communication adapter, the conversion interface information of the communication adapter is determined.

4. The method according to claim 1, characterized in that After completing the adaptation between the target device and the communication adapter, the method further comprises: Acquiring a communication protocol between the communication adapter and the target device; A mapping relationship between the protocol identification information of the target device and the communication protocol is constructed, and the mapping relationship is saved in a preset adaptation library.

5. The method according to claim 4, characterized in that After completing the adaptation between the target device and the communication adapter, the method further includes: In response to a target device control signal, performing protocol conversion on the target device control signal according to a communication protocol between the communication adapter and the target device to obtain a protocol conversion message, and sending the protocol conversion message to the target device; According to the communication protocol applied by the control signal of the target device, the control response message from the target device is converted into a protocol to obtain a feedback signal; the control response message is a response message of the target device to the protocol converted message.

6. The method according to claim 1, characterized in that After obtaining the adaptation result, the method further includes: When the adaptation result is adaptation, determining the adaptation interface information of the communication interface adapted to the target device in the communication adapter; According to the adaptation interface information and the protocol identification information of the target device, communication protocol adaptation is performed to complete the adaptation of the target device and the communication adapter.

7. The method according to claim 1, characterized in that The communication interface of the communication adapter includes: a USB communication interface, a 485 communication interface and a CAN communication interface.

8. A device adaptation device based on a communication adapter, characterized in that: include: An interface information acquisition module, used to acquire communication interface information corresponding to the target device and the communication adapter; An adaptation determination module, configured to determine whether there is a communication interface in the communication adapter that is adapted to the target device based on the communication interface information corresponding to the target device and the communication adapter, and obtain an adaptation result; An adaptation conversion module, used for, when the adaptation result is not compatible, performing interface adaptation conversion according to the communication interface information corresponding to the target device and the communication adapter, to obtain conversion interface information of the communication adapter; The protocol adaptation module is used to perform communication protocol adaptation according to the conversion interface information and the protocol identification information of the target device to complete the adaptation between the target device and the communication adapter; the protocol identification information is used to indicate the communication protocol used by the target device.

9. An electronic device, characterized in that: The device includes: a processor, a memory and a system bus; The processor and the memory are connected via the system bus; The memory is used to store one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by the processor, the processor executes the device adaptation method based on a communication adapter according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed on a computer, the computer is enabled to execute the operation steps of the device adaptation method based on a communication adapter according to any one of claims 1 to 7.