A connection establishment method, device, system and medium

By interacting with cloud devices and terminal devices to determine the protocol parsing components, the high cost problem caused by the pre-integration of protocol parsing components in industrial gateways is solved, efficient and flexible communication connection establishment is achieved, and a variety of industrial field equipment protocols are supported.

CN116032993BActive Publication Date: 2025-09-12CHINA MOBILE COMM LTD RES INST +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111235873.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-22
Publication Date
2025-09-12
Estimated Expiration
2041-10-22

AI Technical Summary

Technical Problem

The protocol fragmentation of industrial field devices requires industrial gateways to pre-integrate a large number of communication protocol parsing components, which increases hardware and software costs and makes it impossible to update in real time.

Method used

The protocol parsing component is determined through interaction between the cloud device and the terminal device. The cloud device generates and sends the protocol parsing component to the gateway device. The gateway device establishes a communication connection based on the received message, avoiding the pre-integration of a large number of protocol parsing components.

Benefits of technology

It reduces the hardware and software costs of gateway devices, improves protocol parsing efficiency and flexibility, supports a variety of industrial field device protocols, and expands the scope of application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116032993B_ABST
    Figure CN116032993B_ABST
Patent Text Reader

Abstract

The present application discloses a connection establishment method, device, system and medium; the method is applied to a cloud device, and the method includes: receiving a kth resolution request sent by a gateway device; wherein the kth resolution request is determined by the gateway device based on the kth connection request when the gateway device receives the kth connection request sent by a terminal device; the kth resolution request includes at least a kth parameter; the kth parameter includes at least a data transmission characteristic parameter of the kth connection request; k is an integer greater than or equal to 1; when the kth parameter completely matches the kth protocol information stored in the cloud device, generating a kth message including a protocol resolution component associated with the kth protocol information; sending the kth message to the gateway device, so that the gateway device can establish a communication connection of the kth protocol information type through the protocol resolution component.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network technology, and in particular to a connection establishment method, device, system and medium. Background Art

[0002] With the rapid development of the Industrial Internet, more and more types of industrial field devices are interacting with master control devices through industrial gateways. However, with the diversification of industrial field devices, the number of protocols used by these devices is diverse, even including undisclosed private protocols. This has directly led to the increasingly serious fragmentation of industrial field device protocols. In order to establish a communication connection between industrial field devices and master control devices, related technologies usually require the pre-integration of a large number of communication protocol parsing components on the industrial gateway. After the industrial field device sends a protocol parsing request to the industrial gateway, the industrial gateway traverses the large number of pre-integrated communication protocol parsing components to find the corresponding protocol parsing component and finally establishes a communication connection. This solution increases the software and hardware costs of the industrial gateway. Summary of the Invention

[0003] Based on the above problems, embodiments of the present application provide a connection establishment method, device, system and medium.

[0004] The technical solution provided by the embodiments of this application is as follows:

[0005] An embodiment of the present application provides a connection establishment method, which is applied to a cloud device; the method includes:

[0006] Receiving a kth resolution request sent by a gateway device; wherein the kth resolution request is determined by the gateway device based on the kth connection request when the gateway device receives the kth connection request sent by the terminal device; the kth resolution request includes at least a kth parameter; the kth parameter includes at least a data transmission characteristic parameter of the kth connection request; k is an integer greater than or equal to 1;

[0007] In a case where the kth parameter completely matches the kth protocol information stored in the cloud device, generating a kth message including a protocol parsing component associated with the kth protocol information;

[0008] The kth message is sent to the gateway device, so that the gateway device can establish a communication connection of the kth protocol information type through the protocol parsing component.

[0009] The present application also provides another connection establishment method, which is applied to a gateway device and includes:

[0010] Receiving a k-th connection request sent by a terminal device; wherein k is an integer greater than or equal to 1;

[0011] Determine a kth resolution request based on the kth connection request, and send the kth resolution request to the cloud device; wherein the kth resolution request includes at least a kth parameter; the kth parameter includes at least a data transmission characteristic parameter of the kth connection request;

[0012] receiving a kth message sent by the cloud device; wherein the kth message is generated by the cloud device when the kth parameter completely matches the kth protocol information stored in the cloud device;

[0013] A protocol parsing component is obtained from the k-th message, and a communication connection of the k-th protocol information type is established through the protocol parsing component.

[0014] An embodiment of the present application further provides a cloud device, comprising a first transceiver module and a first processing module, wherein:

[0015] The first transceiver module is configured to receive a kth resolution request sent by a gateway device; wherein the kth resolution request is determined by the gateway device based on the kth connection request when the gateway device receives the kth connection request sent by the terminal device; the kth resolution request includes at least a kth parameter; the kth parameter includes at least a data transmission characteristic parameter of the kth connection request; k is an integer greater than or equal to 1;

[0016] The first processing module is configured to generate a kth message including a protocol parsing component associated with the kth protocol information when the kth parameter completely matches the kth protocol information stored in the cloud device;

[0017] The first transceiver module is further configured to send the kth message to the gateway device, so that the gateway device can establish a communication connection of the kth protocol information type through the protocol parsing component.

[0018] An embodiment of the present application further provides another cloud device, comprising a first processor and a first memory, wherein:

[0019] The first memory stores a computer program that can be run on the first processor; when the first processor executes the computer program, the connection establishment method described above can be implemented.

[0020] An embodiment of the present application further provides a gateway device, comprising a second transceiver module and a second processing module, wherein:

[0021] The second transceiver module is configured to receive a kth connection request sent by a terminal device; wherein k is an integer greater than or equal to 1;

[0022] The second processing module is configured to determine a kth resolution request based on the kth connection request, and send the kth resolution request to the cloud device; wherein the kth resolution request includes at least a kth parameter; and the kth parameter includes at least a data transmission characteristic parameter of the kth connection request;

[0023] The second transceiver module is further configured to receive a kth message sent by the cloud device; wherein the kth message is generated by the cloud device when the kth parameter completely matches the kth protocol information stored in the cloud device;

[0024] The second processing module is further configured to obtain a protocol parsing component from the k-th message, and establish a communication connection of the k-th protocol information type through the protocol parsing component.

[0025] An embodiment of the present application further provides another gateway device, the gateway device including a second processor and a second memory, wherein:

[0026] The second memory stores a computer program; when the second processor executes the computer program, the connection establishment method described above can be implemented.

[0027] An embodiment of the present application further provides a connection establishment system, which includes the cloud device as described above, the gateway device as described above, and the terminal device.

[0028] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, it can implement any connection establishment method applied to a cloud device or to a gateway device.

[0029] From the above, it can be seen that in the connection establishment method provided by the embodiment of the present application, when the terminal device sends the kth connection request to the gateway device, the gateway device parses the kth connection request to determine the kth resolution request and then sends it to the cloud device. When the cloud device determines that the kth parameter in the kth resolution request completely matches the kth protocol information, it can generate the kth message including the protocol resolution component associated with the kth protocol information. Only after receiving the kth message, the gateway device establishes a communication connection of the kth protocol information type based on the protocol resolution component in the kth message.

[0030] Compared with the solution in the related art of pre-integrating a large number of protocol parsing components in the gateway device, in the communication establishment method provided in the embodiment of the present application, the gateway device does not need to pre-integrate a large number of protocol parsing components, but only needs to load the protocol parsing components according to the messages sent by the cloud device, thereby reducing the hardware storage cost of the gateway device, saving the software cost of the gateway device matching the protocol parsing components, and improving the efficiency of the protocol parsing of the gateway device. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 A schematic diagram of a first flow chart of a connection establishment method provided in an embodiment of the present application;

[0032] Figure 2 A second flow chart of the connection establishment method provided in an embodiment of the present application;

[0033] Figure 3 A first structural diagram of a cloud device provided in an embodiment of the present application;

[0034] Figure 4 A second structural diagram of the cloud device provided in an embodiment of the present application;

[0035] Figure 5 A first structural diagram of a gateway device provided in an embodiment of the present application;

[0036] Figure 6 A second structural diagram of a gateway device provided in an embodiment of the present application;

[0037] Figure 7 A schematic diagram of the structure of a connection establishment system provided in an embodiment of the present application;

[0038] Figure 8 A first structural diagram of establishing a communication connection for a connection establishment system provided in an embodiment of the present application;

[0039] Figure 9 A second structural diagram of establishing a communication connection for the connection establishment system provided in an embodiment of the present application;

[0040] Figure 10 A third structural diagram of establishing a communication connection by the connection establishment system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application.

[0042] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.

[0043] With the development of industrial Internet technologies, diverse industrial field devices are able to achieve efficient and fast data transmission between them and master control devices through the protocol parsing and connection establishment functions of industrial gateways. However, in actual applications, as the functional diversity of industrial field devices increases, the types and number of protocols used by industrial field devices are showing a significant increase, and some industrial field devices even adopt undisclosed proprietary protocols. In this case, industrial gateways, as the communication bridge for data transmission between industrial field devices and master control devices, need to take on the tasks of parsing a wider range of industrial field device protocols and converting north-south protocols.

[0044] In related technologies, in order to enrich the protocol parsing and connection establishment functions of industrial gateways, a large number of communication protocol parsing components are usually pre-integrated into the industrial gateway. These communication protocol parsing components include the protocol parsing components used by the vast majority of industrial field devices. When the industrial gateway receives a connection request from an industrial field device, it traverses the large number of integrated communication protocol parsing components, searches for the protocol parsing component corresponding to the industrial field device, parses the communication protocol of the industrial gateway device, and finally establishes a communication connection between the master device and the industrial field device. If the industrial gateway does not pre-integrate the communication protocol used by the industrial field device, the communication connection between the industrial field device and the master device cannot be achieved. Moreover, when the types and functions of industrial field devices are limited, the communication protocols and protocol parsing components pre-integrated in the industrial gateway become redundant data.

[0045] The above-mentioned solutions in the related technologies directly lead to the waste of hardware storage resources in the industrial gateway, increasing the hardware cost of the industrial gateway; and, configuring a large number of industrial protocol matching and comparison codes in the industrial gateway also increases the software cost of the industrial gateway.

[0046] To address the above issues, embodiments of the present application provide a connection establishment method, device, system, and medium. In the connection establishment method provided by embodiments of the present application, a cloud device and a terminal device interact with each other through a gateway device to determine a protocol parsing component, and then the protocol parsing component is sent to the gateway device for the gateway device to establish a communication connection through the protocol parsing component. A large number of protocol parsing components are not pre-integrated in the gateway device, thereby reducing the software and hardware costs of the gateway device.

[0047] The embodiment of the present application first provides a connection establishment method, which is applied to a cloud device.

[0048] In one embodiment, the cloud device can be in the same network as the main control device; exemplarily, the cloud device can be in different networks from the main control device; exemplarily, the main control device can be a host device of a gateway device, and the terminal device can be a slave device of the gateway device; exemplarily, the main control device can be a computer device, or an intelligent mobile electronic device; the main control device can be a physical machine device or a virtual machine device; exemplarily, the main control device can be a local device or a cloud device.

[0049] In one embodiment, the cloud device and the master device may be the same device, but this embodiment of the present application does not limit this.

[0050] It should be noted that the above method can be implemented by a processor of a cloud device, and the above processor can be at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, and a microprocessor.

[0051] Figure 1 A first flow chart of the connection establishment method provided in an embodiment of the present application is shown as follows: Figure 1 As shown, the method may include steps 101 to 103:

[0052] Step 101: Receive the kth resolution request sent by a gateway device.

[0053] Among them, the kth resolution request is determined by the gateway device based on the kth connection request when it receives the kth connection request sent by the terminal device; the kth resolution request includes at least the kth parameter; the kth parameter includes at least the data transmission characteristic parameter of the kth connection request; k is an integer greater than or equal to 1.

[0054] In one embodiment, the terminal device may be an industrial field device. For example, the terminal device may be at least one of a sensor device, agricultural machinery, mining equipment, metallurgical equipment, power equipment, and chemical equipment.

[0055] In one implementation, there may be multiple terminal devices, the types of the terminal devices may be different, and the locations where the terminal devices are set may be different.

[0056] In one implementation, the kth connection request may be sent after the terminal device is started, which is not limited in this embodiment of the present application.

[0057] In one embodiment, the data transmission characteristic parameters of the k-th connection request may include at least one of an order parameter of the k-th connection request, a frequency parameter, an address parameter of the terminal device, and a type parameter of the terminal device. Exemplarily, the order parameter may include the order of the k-th connection request relative to the first connection request initiated by the terminal device. Exemplarily, the k-th connection request may be the k-th connection request sent by the terminal device, in which case the order parameter may be k. The frequency parameter may include the number of connection requests initiated by the terminal device within a specified time period. Exemplarily, the specified time period may be 1 minute. The address parameter of the terminal device may include the physical address or network address of the terminal device. The type parameter of the terminal device may include at least one of a data acquisition type, a mechanical operation type, and a remote control type.

[0058] In one embodiment, the kth parameter may also include the time parameter of the kth connection request and / or the kth resolution request; illustratively, the time parameter of the kth resolution request may include the generation time of the kth resolution request, and may also include the sending time of the kth resolution request; the time parameter of the kth connection request may include the time when the terminal device sends the kth connection request, and may also include the time when the gateway device receives the kth connection request.

[0059] In one embodiment, the kth resolution request, in addition to including the kth parameter, may also include the body of the kth connection request.

[0060] Exemplarily, the gateway device determines the kth resolution request based on the kth connection request, which may be implemented in the following manner:

[0061] The gateway device parses the kth connection request to obtain the kth parameter and the package body of the kth connection request; and based on the communication protocol between the gateway device and the cloud device, combines the kth parameter and the package body of the kth connection request to obtain the kth parsing request.

[0062] Step 102: When the kth parameter completely matches the kth protocol information stored in the cloud device, generate a kth message including a protocol parsing component associated with the kth protocol information.

[0063] In one embodiment, the cloud device may pre-store multiple protocol information and may also store protocol parsing components associated with the protocol information; illustratively, the cloud device may also dynamically update the protocol information and protocol parsing components to meet the communication needs between multiple terminal devices.

[0064] In one embodiment, the kth protocol information may include multiple parameter information related to the kth type of communication protocol; exemplarily, the kth parameter completely matches the kth protocol information stored in the cloud device, and it can be indicated that each parameter in the kth parameter completely matches the parameter of the corresponding type in the kth protocol information.

[0065] In one embodiment, after the kth protocol information is determined, a protocol parsing component associated with the kth protocol type may be obtained from a plurality of protocol parsing components pre-stored in the cloud device according to the kth protocol information.

[0066] In one embodiment, the kth message may carry kth additional data in addition to the protocol parsing component associated with the kth protocol type; illustratively, the kth additional data may include matching result data indicating that the kth parameter completely matches the kth protocol information.

[0067] Step 103: Send the kth message to the gateway device, so that the gateway device can establish a communication connection of the kth protocol information type through the protocol parsing component.

[0068] In one embodiment, after the gateway device receives the kth message, it parses the kth message to obtain the kth additional data, and determines that the kth protocol information stored in the cloud device completely matches the kth parameter in the kth resolution request. At this time, the protocol resolution component associated with the kth protocol information can be obtained from the kth message.

[0069] Exemplarily, the gateway device can parse the kth connection request based on the protocol parsing component and send a message of successful parsing to the terminal device, thereby establishing a communication connection of the kth protocol information type between the master device and the terminal device; exemplary, the communication connection can also be a communication connection of the kth protocol information type between the gateway device and the terminal device.

[0070] From the above, it can be seen that in the connection establishment method provided by the embodiment of the present application, the terminal device sends the kth connection request to the gateway device, the gateway device parses the kth connection request to determine the kth resolution request and then sends it to the cloud device. When the cloud device determines that the kth parameter in the kth resolution request completely matches the kth protocol information, it can generate a kth message including a protocol resolution component associated with the kth protocol information. Only after receiving the kth message, the gateway device establishes a communication connection of the kth protocol information type based on the protocol resolution component in the kth message.

[0071] Compared with the solution in the related art of pre-integrating a large number of protocol parsing components in the gateway device, in the communication establishment method provided in the embodiment of the present application, the gateway device does not need to pre-integrate a large number of protocol parsing components, but only needs to load the protocol parsing components according to the messages sent by the cloud device, thereby reducing the hardware storage cost of the gateway device, saving the software cost of the gateway device matching the protocol parsing components, and improving the efficiency of the protocol parsing of the gateway device.

[0072] Moreover, with the help of the powerful data processing capabilities and efficient data update capabilities of the cloud device, when the type and / or function of the terminal device changes, when the resolution request related to the new device type and / or function is received from the gateway device, the cloud device can also update the protocol information stored and managed by it and the protocol resolution component associated with the protocol information based on the parameter information contained in the resolution request related to the new device type and / or function, thereby improving the efficiency of the cloud device in determining the protocol resolution component. In the related art, the protocol resolution component pre-integrated in the gateway device is solidified and cannot be updated in real time. Therefore, the communication establishment method provided in the embodiment of the present application can also improve the success rate of communication establishment between the gateway device and the terminal device. It not only reduces the software and hardware costs of the gateway device, but also greatly improves the flexibility of the gateway device, thereby expanding the application scope and application scenarios of the gateway device.

[0073] Based on the aforementioned embodiments, in the communication establishment method provided in the embodiments of the present application, the kth parameter includes at least one piece of information including the sending port of the kth connection request, the number of bytes of the kth connection request, and the data structure characteristics of the kth connection request; the kth protocol information includes at least one piece of information including the transmission port of the kth protocol, the number of bytes of the data packet of the kth protocol type, and the data structure characteristics of the data packet of the kth protocol type.

[0074] In one embodiment, the sending port of the kth connection request may be the port through which the terminal device sends the kth connection request; the number of bytes of the kth connection request may include the number of bytes occupied by the packet body and header of the kth connection request; the data structure characteristics of the kth connection request may include the structural characteristics of the packet body and header in the kth connection request.

[0075] In one embodiment, the kth parameter may also include at least one of the underlying bearer protocol and timestamp information of the terminal device.

[0076] In one embodiment, the transmission port of the kth protocol may include the sending and receiving port of the kth protocol type data packet specified by the kth protocol; the number of bytes of the kth protocol type data packet may be expressed in the form of a range of the number of bytes occupied by the kth protocol type data packet, for example, the size of the kth protocol type data packet is between the first data and the second data; the data structure characteristics of the kth protocol type data packet may include the relative position relationship of at least one data in the kth protocol type data packet, and the number of bits occupied by each type of data.

[0077] In one implementation, the kth protocol information may further include at least one of verification information, keyword information, and encoding information.

[0078] In an embodiment of the present application, the gateway device can obtain different parameters based on the analysis of different connection requests sent by the terminal device. The cloud device can determine the protocol information based on the matching relationship between different parameters and protocol information, thereby providing a diversified and flexible method for determining protocol information and improving the efficiency of protocol information matching.

[0079] The communication establishment method provided in the embodiment of the present application may further include steps A1 to A3:

[0080] Step A1: When the kth parameter does not completely match the kth protocol information and k is greater than 1, remove the kth protocol information and the matching degree information associated with the kth protocol information from the k-1th list to obtain the kth list.

[0081] The matching degree information associated with the kth protocol information includes information on the matching degree between the first parameter and at least one protocol information stored in the cloud device; the first parameter includes a data transmission characteristic parameter of the first connection request.

[0082] Exemplarily, the terminal device can send a first connection request to the gateway device. After receiving the first connection request, the gateway device obtains a first parsing request containing a first parameter based on the first connection request, and sends the first parsing request to the cloud device. After receiving the first parsing request, the cloud device can obtain the matching degree information between the first parameter and at least one protocol information stored in the cloud device.

[0083] Exemplarily, when the first parameter completely matches any protocol information stored in the cloud device, such as the first protocol information, the cloud device can generate a first message including a protocol parsing component associated with the first protocol information, and send the first message to the gateway device. The gateway device can parse the communication protocol of the terminal device based on the protocol component associated with the first protocol information, thereby establishing a communication connection of the first protocol information type.

[0084] Exemplarily, when the first parameter does not completely match any protocol information stored in the cloud device, the cloud device can obtain the matching degree information between the first parameter and at least two protocol information stored in the cloud device, thereby establishing a first list; exemplary, the first list can include at least two protocol information, and the matching degree information between each of the at least two protocol information and the first parameter.

[0085] Exemplarily, in the first list, at least two types of protocol information can be sorted according to the degree of matching, for example, the matching degree information of protocol information A is the first matching degree; the matching degree information of protocol information B is the second matching degree; and the matching degree information of protocol information C is the third matching degree; wherein the first matching degree is greater than the second matching degree, and the second matching degree is greater than the third matching degree, then, in the first list, the order of the protocol information from the head to the end of the table is: protocol information A, protocol information B, and protocol information C.

[0086] In one embodiment, when the terminal device has not changed, the communication protocol of the terminal device has not changed, and the terminal device fails to successfully establish a communication connection by sending a first connection request, the terminal device may initiate a connection request again, such as the kth connection request; exemplarily, the kth connection request may carry information different from the first connection request, so that the gateway device can obtain a new kth parameter and transmit it to the cloud device. The cloud device can obtain the kth list based on the kth parameter and the k-1th list. Since the kth list is obtained by removing the kth protocol information and the matching degree information associated with the kth protocol information from the k-1 list, the number of protocol information contained in the kth list is less than the number of protocol information contained in the k-1 list, thereby reducing the matching range of the kth parameter and improving the matching efficiency of the protocol information.

[0087] In one embodiment, in the k-1th list, the matching degree information of the kth protocol information may be higher than the matching degree information of other protocol information in the k-1th list.

[0088] In one embodiment, in order to reduce the probability of the protocol information with the highest matching degree in the k-1 list being mistakenly eliminated, after receiving the k-th resolution request, the cloud device can first determine whether to eliminate the k-th protocol information from the k-1 list based on the matching relationship between the k-th parameter and the k-th protocol information in the k-1 list.

[0089] Exemplarily, if the kth protocol information in the k-1th list completely matches the kth parameter, the process shown in steps 102 to 103 can be executed; if the kth protocol information in the k-1th list does not completely match the kth parameter, the kth protocol information and the matching degree information associated with the kth protocol information can be removed from the k-1th list to obtain the kth list.

[0090] Step A2: Based on the matching degree information in the kth list, select the k+1th protocol information from the kth list.

[0091] The matching degree information between the first parameter and the (k+1)th protocol information is greater than the matching degree information between the first parameter and other protocol information in the (k)th list.

[0092] Exemplarily, in an embodiment of the present application, when k is greater than 1, the kth list is obtained based on the first list. Therefore, the matching degree information associated with the protocol information contained in the kth list is the matching degree information between the protocol information in the kth list and the first parameter.

[0093] Exemplarily, in order to improve the matching efficiency between the kth parameter and the protocol information, the protocol information in the kth list may be sorted in descending order of matching degree information.

[0094] Exemplarily, selecting the k+1th protocol information from the kth list based on the matching degree information may be implemented in any of the following ways:

[0095] When the protocol information in the kth list is sorted from high to low according to the matching degree information, the first protocol information in the kth list may be directly selected as the k+1th protocol information.

[0096] If the protocol information in the kth list is not sorted from high to low according to the matching degree information, the matching degree information in the kth list can be compared to obtain the protocol information associated with the highest matching degree information as the k+1th protocol information.

[0097] Step A3: Generate the k+1th message based on the k+1th protocol information, and send the k+1th message to the gateway device.

[0098] Exemplarily, generating the k+1th message based on the k+1th protocol information may be implemented in any of the following ways:

[0099] After obtaining the k+1th protocol information, the k+1th information is generated according to the matching relationship between the k+1th protocol information and the kth parameter information.

[0100] If the k+1th protocol information completely matches the kth parameter information, a protocol parsing component associated with the k+1th protocol information is obtained, and the k+1th information is generated based on the protocol parsing component.

[0101] If the k+1th protocol information and the kth parameter information do not completely match, the k+1th information is generated based on the result of the incomplete match between the k+1th protocol information and the kth parameter information.

[0102] From the above, it can be seen that in an embodiment of the present application, after the cloud device receives the kth resolution request, if the kth parameter does not completely match the kth protocol information in the k-1th list, it can obtain the kth list based on the k-1th list, thereby narrowing the scope of subsequent protocol information matching and further improving the efficiency of subsequent protocol information matching.

[0103] Based on the above embodiment, in the connection establishment method provided in the embodiment of the present application, after sending the k+1th message to the gateway device, the following operations may also be performed:

[0104] Receive the k+1th resolution request sent by the gateway device.

[0105] Among them, the k+1th resolution request is determined by the gateway device based on the k+1th connection request when it receives the k+1th connection request; the k+1th resolution request includes at least the k+1th parameter; the k+1th parameter includes at least the data transmission characteristic parameter of the k+1th connection request; the k+1th connection request is sent by the terminal device when it receives the k+1th message and determines that the data structure of the k+1th message does not match the target data structure.

[0106] In one embodiment, after receiving the k+1th message, the gateway device sends the k+1th message or the package body of the k+1th message to the terminal device. The terminal device parses the data structure of the k+1th message or the package body of the k+1th message, and determines whether to send the k+1th connection request based on the matching relationship between the parsing result and the target data structure.

[0107] Exemplarily, when the parsing result completely matches the target data structure, the k+1th connection request may not be sent; exemplary, the k+1th connection request may be a reply message packet of the terminal device to the k+1th message.

[0108] In one implementation, the target data structure may be a data structure specified by a communication protocol used by the terminal device.

[0109] Exemplarily, the k+1th parameter may be different from the first parameter or the kth parameter; exemplary, the k+1th parameter may be a supplement and refinement of the first parameter and / or the kth parameter; exemplary, the k+1th parameter may carry the same parameters as the first parameter and / or the kth parameter, and may also include parameters different from the first parameter and / or the kth parameter.

[0110] Exemplarily, when the cloud device receives the k+1th resolution request, it can determine whether to remove the protocol information from the kth list to obtain the k+1th list based on the matching relationship between the k+1th parameter in the k+1th resolution request and the protocol information with the highest matching degree information in the kth list; if the k+1th parameter and the protocol information with the highest matching degree information in the kth list are completely matched, the k+2th reply information can be generated based on the protocol resolution component associated with the protocol information and sent to the gateway device; if the k+1th parameter and the protocol information with the highest matching program information in the kth list are not completely matched, the k+1th list can be obtained based on the kth list, and the protocol information with the highest matching degree information can be selected from the k+1 list, and based on the matching relationship between the protocol information and the k+1th parameter information, it is determined whether the protocol resolution component associated with the protocol information can be obtained.

[0111] As can be seen from the above, in the connection establishment method provided in the embodiment of the present application, the terminal device can establish a communication connection of the kth protocol information type by implementing real-time information exchange between the terminal device and the cloud device through the gateway device. Therefore, the connection establishment method provided in the embodiment of the present application can not only reduce the software and hardware costs of the gateway device, but also automatically determine the protocol parsing component corresponding to the terminal device, thereby improving the efficiency of the gateway device in determining the protocol parsing component and increasing the intelligence level of the gateway device in determining the protocol parsing component.

[0112] Based on the foregoing embodiments, an embodiment of the present application further provides a connection establishment method applied to a gateway device.

[0113] It should be noted that the method can be implemented by a processor of a gateway device. Exemplarily, the processor of the gateway device can be at least one of an ASIC, a DSP, a DSPD, a PLD, an FPGA, a CPU, a controller, a microcontroller, and a microprocessor.

[0114] Figure 2 This is a second flow chart of the connection establishment method provided in the embodiment of the present application. Figure 2 As shown, the method may include steps 201 to 204:

[0115] Step 201: Receive the kth connection request sent by the terminal device.

[0116] Here, k is an integer greater than or equal to 1.

[0117] Step 202: Based on the k-th connection request, determine the k-th resolution request, and send the k-th resolution request to the cloud device.

[0118] The kth resolution request includes at least the kth parameter; the kth parameter includes at least the data transmission characteristic parameter of the kth connection request.

[0119] Step 203: Receive the kth message sent by the cloud device.

[0120] The kth message is generated by the cloud device when the kth parameter completely matches the kth protocol information stored in the cloud device.

[0121] Step 204: Obtain a protocol parsing component from the kth message, and establish a communication connection of the kth protocol information type through the protocol parsing component.

[0122] From the above, it can be seen that in the connection establishment method provided in the embodiment of the present application, the gateway device does not need to pre-integrate a large number of communication protocols and communication protocol parsing components. Only when a connection request sent by a terminal device is received, a communication connection of the kth protocol information type is established based on the protocol parsing component carried in the message sent by the cloud device, thereby reducing the software and hardware costs of the gateway device and improving the flexibility of the gateway device in protocol parsing and establishing communication connections.

[0123] Based on the above embodiment, the connection establishment method applied to the gateway device provided in the embodiment of the present application may further include steps B1 to B4:

[0124] Step B1: Receive the k+1th message sent by the cloud device.

[0125] Step B2: Send the k+1th message to the terminal device.

[0126] Step B3: Receive the k+1th connection request sent by the terminal device.

[0127] The k+1th connection request is sent by the terminal device after receiving the k+1th message and determining that the data structure of the k+1th message does not match the target data structure.

[0128] Step B4: Determine the k+1th resolution request based on the k+1th connection request, and send the k+1th resolution request to the cloud device; wherein the k+1th resolution request includes the k+1th parameter; the k+1th parameter includes the data transmission characteristic parameter of the k+1th connection request.

[0129] From the above, it can be seen that in the connection establishment method applied to the gateway device provided in the embodiment of the present application, the terminal device can also send the k+1th connection request to the gateway device when it determines that the k+1th message sent by the cloud device does not match the target data structure. The gateway device can parse the k+1th connection request to obtain the k+1th resolution request and continue to send it to the cloud device until a protocol resolution component that can successfully establish a communication connection is obtained.

[0130] Therefore, the connection establishment method applied to the gateway device provided in the embodiment of the present application realizes the conversation interaction between the terminal device and the cloud device in determining the protocol parsing component through at least two data interaction processes between the terminal device and the cloud device, thereby further improving the flexibility of determining the protocol parsing component and broadening the application scenarios of the gateway device.

[0131] Based on the aforementioned embodiment, the kth parameter includes at least one piece of information including the sending port of the kth connection request, the number of bytes of the kth connection request, and the data structure characteristics of the kth connection request; the kth protocol information includes at least one piece of information including the transmission port of the kth protocol, the number of bytes of the data packet of the kth protocol type, and the data structure characteristics of the data packet of the kth protocol type.

[0132] Based on the above embodiment, the present application embodiment further provides a cloud device 3, Figure 3 This is a first structural diagram of the cloud device 3 provided in the embodiment of the present application. Figure 3 As shown, the cloud device 3 may include a first transceiver module 301 and a first processing module 302, wherein:

[0133] The first transceiver module 301 is configured to receive a kth resolution request sent by a gateway device; wherein the kth resolution request is determined by the gateway device based on the kth connection request when the gateway device receives the kth connection request sent by the terminal device; the kth resolution request includes at least a kth parameter; the kth parameter includes at least a data transmission characteristic parameter of the kth connection request; k is an integer greater than or equal to 1;

[0134] A first processing module 302 is configured to generate a kth message including a protocol parsing component associated with the kth protocol information if the kth parameter completely matches the kth protocol information stored in the cloud device;

[0135] The first transceiver module 301 is further configured to send the kth message to the gateway device, so that the gateway device can establish a communication connection of the kth protocol information type through the protocol parsing component.

[0136] In some embodiments, the first processing module 302 is configured to, if the kth parameter does not completely match the kth protocol information and k is greater than 1, remove the kth protocol information and the matching degree information associated with the kth protocol information from the k-1th list to obtain a kth list; wherein the matching degree information associated with the kth protocol information includes matching degree information between the first parameter and at least one protocol information stored in the cloud device; the first parameter includes a data transmission characteristic parameter of the first connection request;

[0137] The first processing module 302 is further configured to select the k+1th protocol information from the kth list based on the matching degree information in the kth list; wherein the matching degree information between the first parameter and the k+1th protocol information is greater than the matching degree information between the first parameter and other protocol information in the kth list;

[0138] The first processing module 302 is further configured to generate a k+1th message based on the k+1th protocol information.

[0139] The first transceiver module 301 is configured to send the k+1th message to a gateway device.

[0140] In some embodiments, the first transceiver module 301 is used to receive the k+1th resolution request sent by the gateway device; wherein, the k+1th resolution request is determined by the gateway device based on the k+1th connection request when it receives the k+1th connection request; the k+1th resolution request includes at least the k+1th parameter; the k+1th parameter includes at least the data transmission characteristic parameter of the k+1th connection request; the k+1th connection request is sent by the terminal device when it receives the k+1th message and determines that the data structure of the k+1th message does not match the target data structure.

[0141] In some embodiments, the kth parameter includes at least one of the sending port of the kth connection request, the number of bytes of the kth connection request, and the data structure characteristics of the kth connection request; the kth protocol information includes at least one of the transmission port of the kth protocol, the number of bytes of the data packet of the kth protocol type, and the data structure characteristics of the data packet of the kth protocol type.

[0142] Based on the above embodiment, the present application embodiment further provides a cloud device 3, Figure 4 This is a second structural diagram of the cloud device 3 provided in the embodiment of the present application, as shown in FIG. Figure 4 As shown, the cloud device 3 may include a first processor 401 and a first memory 402; wherein:

[0143] The first memory 402 stores a computer program that can be run on the first processor 401; when the first processor 401 executes the computer program, it can implement the connection establishment method applied to the cloud device as described in any of the previous embodiments.

[0144] The first transceiver module 301 and the first processing module 302 may be implemented by the first processor 401 .

[0145] It should be noted that the first processor 401 can be at least one of an ASIC, a DSP, a DSPD, a PLD, an FPGA, a CPU, a controller, a microcontroller, and a microprocessor.

[0146] The first memory 402 can be a volatile memory (volatile memory), such as a random access memory (RAM); or a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), flash memory, a hard disk drive (HDD) or a solid state drive (SSD); or a combination of the above types of memory, and provides instructions and data to the first processor 401.

[0147] Based on the above embodiment, the embodiment of the present application further provides a gateway device 5, Figure 5 A first structural diagram of the gateway device 5 provided in an embodiment of the present application is shown as follows: Figure 5 As shown, the gateway device 5 may include a second transceiver module 501 and a second processing module 502, wherein:

[0148] The second transceiver module 501 is configured to receive a kth connection request sent by a terminal device, where k is an integer greater than or equal to 1.

[0149] The second processing module 502 is used to determine the kth resolution request based on the kth connection request, and send the kth resolution request to the cloud device; wherein the kth resolution request includes at least the kth parameter; the kth parameter includes at least the data transmission characteristic parameter of the kth connection request.

[0150] The second transceiver module 501 is further configured to receive a kth message sent by the cloud device; wherein the kth message is generated by the cloud device when the kth parameter completely matches the kth protocol information stored in the cloud device.

[0151] The second processing module 502 is further configured to obtain a protocol parsing component from the kth message, and establish a communication connection of the kth protocol information type through the protocol parsing component.

[0152] In some embodiments, the second transceiver module 501 is used to receive the k+1th message sent by the cloud device; send the k+1th message to the terminal device; receive the k+1th connection request sent by the terminal device; wherein the k+1th connection request is sent by the terminal device after receiving the k+1th message and determining that the data structure of the k+1th message does not match the target data structure.

[0153] The second processing module 502 is used to determine the k+1th resolution request based on the k+1th connection request, and send the k+1th resolution request to the cloud device; wherein the k+1th resolution request includes the k+1th parameter; the k+1th parameter includes the data transmission characteristic parameter of the k+1th connection request.

[0154] In some embodiments, the kth parameter includes at least one of the sending port of the kth connection request, the number of bytes of the kth connection request, and the data structure characteristics of the kth connection request; the kth protocol information includes at least one of the transmission port of the kth protocol, the number of bytes of the data packet of the kth protocol type, and the data structure characteristics of the data packet of the kth protocol type.

[0155] Based on the above embodiment, the present application embodiment further provides another gateway device 5, Figure 6 A second structural diagram of the gateway device 5 provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the gateway device 5 may include a second processor 601 and a second memory 602, wherein:

[0156] The second memory 602 stores a computer program; when the second processor 601 executes the computer program, it can implement the connection establishment method applied to the gateway device as described in any of the above items.

[0157] It should be noted that the second transceiver module 501 and the second processing module 502 can be implemented by the second processor 601 .

[0158] The second processor 601 may be at least one of an ASIC, a DSP, a DSPD, a PLD, an FPGA, a CPU, a controller, a microcontroller, and a microprocessor.

[0159] The second memory 602 may be a volatile memory, such as RAM; or a non-volatile memory, such as ROM, flash memory, HDD or SSD; or a combination of the above types of memory, and provide instructions and data to the processor.

[0160] Based on the above embodiment, the present application embodiment further provides a connection establishment system 7, Figure 7 A structural diagram of the connection establishment system 7 provided in an embodiment of the present application is shown as follows: Figure 7 As shown, the system may include the cloud device 3, the gateway device 5 and the terminal device 701 as described in the above embodiment.

[0161] Figure 8 This is a schematic diagram of the first structure of the connection establishment system 7 provided in the embodiment of the present application to establish a communication connection. Figure 8 In the embodiment, the terminal device 701 may be an industrial field device, the gateway device 5 may be a fifth generation mobile communication technology (5G) gateway, and the cloud device 3 may be a protocol parsing device deployed in the cloud, or a protocol parsing platform.

[0162] like Figure 8 As shown: the terminal device 701 sends a first connection request to the gateway device 5; the gateway device 5 determines a first parsing request including a first parameter based on the first connection request, and sends the first parsing request to the cloud device 3.

[0163] Exemplarily, the cloud device 3 performs a matching operation and determines that the first parameter completely matches the first protocol information in the cloud device 3, then generates a first message including a protocol parsing component associated with the first protocol information, and sends the first message to the gateway device 5; after receiving the first message, the gateway device 5 parses the first message to obtain the protocol parsing component associated with the first protocol information, and parses the communication protocol of the terminal device 701 through the protocol parsing component, thereby establishing a communication connection of the kth protocol information type.

[0164] Exemplarily, the cloud device 3 performs a matching operation. If it is determined that the first parameter does not completely match any protocol information, a first list is generated based on the matching degree information between the first parameter and at least two protocol information, and a second message is generated based on the protocol information with the highest matching degree information in the first list, and then the second message is sent to the gateway device 5. After receiving the second message, the gateway device 5 can parse the package body of the second message and send the package body of the second message to the terminal device 701, or directly send the second message to the terminal device 701. The terminal device 701 parses the package body of the second message or the second message to obtain the package body of the second message or the data structure of the second message. If it is determined that the data structure is different from the target data structure, a second connection request can be sent to the gateway device 5. Exemplarily, the second connection request can be a reply message from the terminal device 701 to the package body of the second message or the second message. After receiving the second connection request, the gateway device 5 generates a second parsing request based on the second connection request and sends the second parsing request to the cloud device 3. The above process can be executed in a loop until the cloud device 3 determines the target protocol parsing component that matches the terminal device 701.

[0165] Figure 9 This is a second structural diagram of the connection establishment system 7 provided in an embodiment of the present application establishing a communication connection.

[0166] The terminal device 701 sends a first connection request to the gateway device 5; the gateway device 5 determines a first parsing request including a first parameter based on the first connection request, and sends the first parsing request to the cloud device 3; after the cloud device 3 matches the first parameter in the first parsing request with at least one protocol information, it determines that the first protocol information completely matches the first parameter, and then generates a first message including a protocol parsing component associated with the first protocol information, and sends the first message to the gateway device 5; the gateway device 5 parses the first message to obtain the protocol parsing component associated with the first protocol information, loads the protocol parsing component, and parses the protocol used by the terminal device, thereby establishing a communication connection.

[0167] Figure 10 A third structural diagram of the connection establishment system 7 provided in an embodiment of the present application establishing a communication connection.

[0168] The terminal device 701 sends a first connection request to the gateway device 5; the gateway device 5 determines a first parsing request including a first parameter based on the first connection request and sends it to the cloud device 3; when the cloud device 3 determines that the first parameter does not completely match any protocol information, it obtains a first list, and generates a first message based on the first protocol information with the highest matching degree information in the first list, and replies to the first message to the gateway device 5; the gateway device 5 can send the first message or send the package body of the first message to the terminal device 701; when the terminal device 701 determines that the data structure of the first message or the package body of the first message is different from the target data structure, it sends a second connection request to the gateway device 5 based on the first message or the package body of the first message; the second gateway device 5 generates a second parsing request including a second parameter based on the second connection request, and sends the second parsing request to the cloud device 3.

[0169] Exemplarily, when the cloud device 3 receives the second resolution request, it first matches the second parameter in the second resolution request and the first protocol information in the first list. If the two are not completely matched, the first protocol information is removed from the first list to obtain the second list. Then, a second message is generated based on the second protocol information with the highest matching degree in the second list, and the second message is replied to the gateway device 5; the gateway device 5 can send the second message to the terminal device 701.

[0170] When the terminal device 701 determines that the data structure of the second message or the package body of the second message is different from the target data structure, it can send a third connection request; exemplarily, the third connection request can be the reply data of the terminal device 701 to the second message or the package body of the second message; after receiving the third connection request, the gateway device 5 can determine a third parsing request including a third parameter based on the third connection request, and send the third parsing request to the cloud device 3; the cloud device 3 matches the third parameter with the protocol information with the highest matching degree information in the second list. Exemplarily, the protocol information can be recorded as the third protocol information; when the two are completely matched, a third message can be generated based on the third protocol information, and the third message can be sent to the gateway device 5; after receiving the third message, the gateway device 5 parses the protocol parsing component associated with the third protocol information from the third message, and establishes a communication connection through the component.

[0171] As can be seen from the above, the connection establishment system provided in the embodiment of the present application, through data exchange between the terminal device 701, the gateway device 5, and the cloud device 3, can ultimately determine and issue the protocol parsing plug-in for parsing the protocol. In this way, on the basis of reducing the software and hardware costs of the gateway device 5, the loading status of the protocol parsing plug-in in the gateway device 5 can also be flexibly and dynamically adjusted based on at least one factor such as the type, function, and number of terminal devices 701.

[0172] Moreover, through the data interaction between the cloud device 3 and the terminal device 701, when a variety of protocol information and protocol parsing components are pre-stored in the cloud device 3, the cloud device 3 will not blindly send down the protocol parsing components, but will determine the order of the sent protocol information according to the matching degree information between the protocol information and the parameters contained in the parsing request, thereby enabling the cloud device 3 to accurately locate the protocol information and the protocol parsing components.

[0173] In this way, on the one hand, the waste of transmission resources caused by repeated parameter transmission and matching caused by the direct delivery of protocol parsing components by the cloud device 3 is reduced, and the time cost caused by the gateway device installing and uninstalling the protocol parsing components is reduced. On the other hand, it also reflects the collaborative response between the cloud device 3 and the terminal device 701. In this way, when the 5G industrial gateway has limited software and hardware resources and insufficient computing power, it can also fully utilize the powerful computing power and massive data storage characteristics of the cloud platform, thereby realizing efficient collaboration between the cloud device 3 and the gateway device 5, and providing technical support for the large-scale popularization of 5G vertical industry applications.

[0174] From the above, it can be seen that the connection establishment method and connection establishment system 7 provided in the embodiment of the present application realize the determination of the protocol parsing plug-in based on parameter matching and comparison, so that the 5G industrial gateway protocol parsing component can be determined simply and efficiently, solving the problem of increased industrial gateway software and hardware costs caused by industrial protocol fragmentation.

[0175] Based on the above embodiments, the embodiments of the present application also provide a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by the processor, it can implement the connection establishment method applied to the gateway device 5 or the cloud device 3 as described in any of the previous embodiments.

[0176] The above description of the various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced with each other and will not be repeated herein for the sake of brevity.

[0177] The methods disclosed in the various method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0178] The features disclosed in the various product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0179] The features disclosed in the various method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0180] It should be noted that the above-mentioned computer-readable storage medium can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface storage, an optical disc, or a compact disc read-only memory (CD-ROM); it can also be various electronic devices that include one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0181] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0182] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0183] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus necessary general hardware nodes, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0184] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0185] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device that implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0186] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0187] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A connection establishment method, characterized in that: The method is applied to a cloud device; the method includes: Receiving a kth resolution request sent by a gateway device; wherein the kth resolution request is determined by the gateway device based on the kth connection request when the gateway device receives the kth connection request sent by the terminal device; the kth resolution request includes at least a kth parameter; the kth parameter includes at least a data transmission characteristic parameter of the kth connection request; k is an integer greater than or equal to 1; In a case where the kth parameter completely matches the kth protocol information stored in the cloud device, generating a kth message including a protocol parsing component associated with the kth protocol information; Sending the kth message to the gateway device, so that the gateway device establishes a communication connection of the kth protocol information type through the protocol parsing component; If the kth parameter does not completely match the kth protocol information and k is greater than 1, remove the kth protocol information and the matching degree information associated with the kth protocol information from the k-1th list to obtain a kth list; wherein the matching degree information associated with the kth protocol information represents information on the matching degree between the first parameter and at least one protocol information stored in the cloud device; the first parameter includes a data transmission characteristic parameter of the first connection request; Based on the matching degree information in the kth list, selecting the k+1th protocol information from the kth list; wherein the matching degree information between the first parameter and the k+1th protocol information is greater than the matching degree information between the first parameter and other protocol information in the kth list; Generate a k+1th message based on the k+1th protocol information, and send the k+1th message to the gateway device.

2. The method according to claim 1, characterized in that After sending the k+1th message to the gateway device, the method further includes: Receive the k+1th resolution request sent by the gateway device; wherein, the k+1th resolution request is determined by the gateway device based on the k+1th connection request when the gateway device receives the k+1th connection request; the k+1th resolution request includes at least the k+1th parameter; the k+1th parameter includes at least the data transmission characteristic parameter of the k+1th connection request; the k+1th connection request is sent by the terminal device when it receives the k+1th message and determines that the data structure of the k+1th message does not match the target data structure.

3. The method according to claim 1, characterized in that The kth parameter includes at least one of the sending port of the kth connection request, the number of bytes of the kth connection request, and the data structure characteristics of the kth connection request; the kth protocol information includes at least one of the transmission port of the kth protocol, the number of bytes of the data packet of the kth protocol information type, and the data structure characteristics of the data packet of the kth protocol information type.

4. A connection establishment method, characterized in that: The method is applied to a gateway device, and the method includes: Receiving a k-th connection request sent by a terminal device; wherein k is an integer greater than or equal to 1; Determine a kth resolution request based on the kth connection request, and send the kth resolution request to the cloud device; wherein the kth resolution request includes at least a kth parameter; the kth parameter includes at least a data transmission characteristic parameter of the kth connection request; receiving a kth message sent by the cloud device; wherein the kth message is generated by the cloud device when the kth parameter completely matches the kth protocol information stored in the cloud device; Obtaining a protocol parsing component from the kth message, and establishing a communication connection of the kth protocol information type through the protocol parsing component; Receiving the k+1th message sent by the cloud device; wherein the k+1th message is generated by the cloud device based on the k+1th protocol information when the kth parameter does not completely match the kth protocol information and k is greater than 1; Sending the k+1th message to the terminal device; receiving a k+1th connection request sent by the terminal device; wherein the k+1th connection request is sent by the terminal device when it receives the k+1th message and determines that the data structure of the k+1th message does not match the target data structure; Determine a k+1th resolution request based on the resolution of the k+1th connection request, and send the k+1th resolution request to the cloud device; wherein the k+1th resolution request includes a k+1th parameter; the k+1th parameter includes a data transmission characteristic parameter of the k+1th connection request.

5. The method according to claim 4, characterized in that The kth parameter includes at least one of the sending port of the kth connection request, the number of bytes of the kth connection request, and the data structure characteristics of the kth connection request; the kth protocol information includes at least one of the transmission port of the kth protocol, the number of bytes of the data packet of the kth protocol information type, and the data structure characteristics of the data packet of the kth protocol information type.

6. A cloud device, characterized in that: The cloud device includes a first transceiver module and a first processing module, wherein: The first transceiver module is configured to receive a kth resolution request sent by a gateway device; wherein the kth resolution request is determined by the gateway device based on the kth connection request when the gateway device receives the kth connection request sent by the terminal device; the kth resolution request includes at least a kth parameter; the kth parameter includes at least a data transmission characteristic parameter of the kth connection request; k is an integer greater than or equal to 1; The first processing module is configured to generate a kth message including a protocol parsing component associated with the kth protocol information when the kth parameter completely matches the kth protocol information stored in the cloud device; The first transceiver module is further configured to send the kth message to the gateway device, so that the gateway device can establish a communication connection of the kth protocol information type through the protocol parsing component; The first processing module is further configured to, when the kth parameter does not completely match the kth protocol information and k is greater than 1, remove the kth protocol information and the matching degree information associated with the kth protocol information from the k-1th list to obtain a kth list; wherein the matching degree information associated with the kth protocol information represents information on the matching degree between the first parameter and at least one protocol information stored in the cloud device; the first parameter includes a data transmission characteristic parameter of the first connection request; and based on the matching degree information in the kth list, select the k+1th protocol information from the kth list; wherein the matching degree information between the first parameter and the k+1th protocol information is greater than the matching degree information between the first parameter and other protocol information in the kth list; and generate a k+1th message based on the k+1th protocol information; The first transceiver module is further configured to send the k+1th message to the gateway device.

7. A cloud device, characterized in that: The cloud device includes a first processor and a first memory, wherein: The first memory stores a computer program that can be run on the first processor; when the first processor executes the computer program, the connection establishment method according to any one of claims 1 to 3 can be implemented.

8. A gateway device, characterized in that: The gateway device includes a second transceiver module and a second processing module, wherein: The second transceiver module is configured to receive a kth connection request sent by a terminal device; wherein k is an integer greater than or equal to 1; The second processing module is configured to determine a kth resolution request based on the kth connection request, and send the kth resolution request to the cloud device; wherein the kth resolution request includes at least a kth parameter; and the kth parameter includes at least a data transmission characteristic parameter of the kth connection request; The second transceiver module is further configured to receive a k-th message sent by the cloud device; wherein the k-th message is generated by the cloud device when the k-th parameter completely matches the k-th protocol information stored in the cloud device; receive a k+1-th message sent by the cloud device; wherein the k+1-th message is generated by the cloud device based on the k+1-th protocol information when the k-th parameter does not completely match the k-th protocol information and k is greater than 1; send the k+1-th message to the terminal device; receive a k+1-th connection request sent by the terminal device; wherein the k+1-th connection request is sent by the terminal device when it receives the k+1-th message and determines that the data structure of the k+1-th message does not match the target data structure; The second processing module is further used to obtain a protocol parsing component from the kth message, establish a communication connection of the kth protocol information type through the protocol parsing component; determine the k+1th parsing request based on the k+1th connection request, and send the k+1th parsing request to the cloud device; wherein, the k+1th parsing request includes a k+1th parameter; the k+1th parameter includes a data transmission characteristic parameter of the k+1th connection request.

9. A gateway device, characterized in that: The gateway device includes a second processor and a second memory, wherein: The second memory stores a computer program; when the second processor executes the computer program, it can implement the connection establishment method according to any one of claims 4 to 5.

10. A connection establishment system, characterized in that: The connection establishment system includes the cloud device according to claim 6 or 7, the gateway device according to any one of claims 8 to 9, and a terminal device.

11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the connection establishment method according to any one of claims 1 to 3 or any one of claims 4 to 5 can be implemented.

Citation Information

Patent Citations

  • Method and system for automatically analyzing industrial field protocol based on gateway identification

    CN111917717A