CN111371632B - Communication method, device, equipment and storage medium - Google Patents

Communication method, device, equipment and storage medium Download PDF

Info

Publication number
CN111371632B
CN111371632B CN201811592853.3A CN201811592853A CN111371632B CN 111371632 B CN111371632 B CN 111371632B CN 201811592853 A CN201811592853 A CN 201811592853A CN 111371632 B CN111371632 B CN 111371632B
Authority
CN
China
Prior art keywords
chip
protocol
data transmission
communication
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811592853.3A
Other languages
Chinese (zh)
Other versions
CN111371632A (en
Inventor
陈建州
郭雷
王路
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201811592853.3A priority Critical patent/CN111371632B/en
Publication of CN111371632A publication Critical patent/CN111371632A/en
Application granted granted Critical
Publication of CN111371632B publication Critical patent/CN111371632B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/24Negotiation of communication capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Environmental & Geological Engineering (AREA)
  • Communication Control (AREA)

Abstract

The invention provides a communication method, a device, equipment and a storage medium which can be applied to the Internet of things. The device may include a main control chip and an external communication chip, where the main control chip can enable the internet of things device to perform data interaction with the outside through running a first type communication protocol, and the external communication chip can enable the internet of things device to perform data interaction with the outside through running a second type protocol. The data transmission performance between the main control chip and the external communication chip based on different data transmission protocols can be estimated, and the data transmission protocol between the main control chip and the external communication chip is determined according to the estimated result. Thus, the networking performance of the equipment can be ensured. Optionally, a data transmission mechanism between chips can be configured to establish a reliable interaction channel, and an adaptation layer supporting the AT instruction set and the reconfigurable interface can be configured to reduce the adaptation cost.

Description

Communication method, device, equipment and storage medium
Technical Field
The present invention relates to the field of internet of things, and in particular, to a communication method, device, equipment and storage medium applied to the internet of things.
Background
The construction of the Internet of things has become one of important consensus in the fields of smart cities, smart home, industrial upgrading and the like. As application scenarios increase, the networking manner of devices has also changed significantly. The change not only includes the richness of point-to-point connection modes, such as the use of network protocols such as Lora, NB-IoT and the like, but also includes the increase of end-to-end transmission modes, such as the popularization of transmission protocols such as MQTT, COAP and the like.
In existing device networking schemes, a system on chip (SoC) approach is typically adopted, i.e., a point-to-point protocol runs on the same chip as an end-to-end protocol. Although the mode has higher integration level, the application and the protocol are coupled in aspects of interfaces, configuration, performance and the like, which is not beneficial to the transplanting and popularization of the scheme.
Accordingly, there is a need for an improved device networking scheme that addresses the deficiencies of the prior art.
Disclosure of Invention
It is an object of the present invention to provide a communication scheme to solve at least one of the problems described above.
According to a first aspect of the present invention, there is provided a communication method, a first chip for running a first type of communication protocol, a second chip for running a second type of communication protocol, the first chip and the second chip being located in the same device, the method comprising: estimating the performance of data transmission between the first chip and the second chip based on different data transmission protocols; and determining a data transmission protocol between the first chip and the second chip according to the estimated result.
Optionally, the step of estimating the performance of data transmission between the first chip and the second chip based on different data transmission protocols includes: according to the resource requirement of the target scene, configuring a test program of which the resource required by operation is equivalent to the resource requirement of the target scene; based on the test program, the performance of data transmission between the first chip and the second chip based on different data transmission protocols is estimated.
Optionally, the method further comprises: and estimating the resource requirements of the target scene according to the resource requirements of one or more application scenes.
Optionally, the method further comprises: and configuring an adaptation layer, wherein the adaptation layer is used for providing one or more data transmission protocols, and the first chip and the second chip perform data interaction based on the data transmission protocols.
Optionally, the adaptation layer is further configured to provide one or more functional interfaces for managing the connection between the first chip and the second chip.
Optionally, the one or more functional interfaces include: a first interface for establishing a connection between the first chip and the second chip based on a predetermined data transfer protocol; and/or a second interface for closing a connection established between the first chip and the second chip based on a predetermined data transfer protocol.
Optionally, the one or more functional interfaces include: a third interface for transmitting data based on an established connection between the first chip and the second chip; and/or a fourth interface for receiving data based on an established connection between the first chip and the second chip.
Optionally, the data transmission protocol includes at least one of: MQTT; COAT; SSL; TCP; UDP.
Optionally, the method further comprises: configuring a data transmission mechanism between the first chip and the second chip, the data transmission mechanism configured to: under the condition that the length of first data sent by a first chip to a second chip is larger than a first preset threshold value, the first data are segmented to obtain a plurality of first fragments, the plurality of first fragments are sent to the second chip in a round, and at least one first fragment is sent in each round; and/or under the condition that the length of the second data sent by the second chip to the first chip is greater than a second preset threshold value, splitting the second data to obtain a plurality of second fragments, and sending the plurality of second fragments to the first chip in turn, wherein at least one second fragment is sent in each turn.
Optionally, the step of transmitting the plurality of first fragments to the second chip in rounds includes: after at least one first fragment of the current round is sent to the second chip one by one, judging whether the second chip receives all the first fragments of the current round, and resending the missing first fragments to the second chip under the condition that the second chip does not receive part or all of the first fragments of the current round; and/or. The step of transmitting the plurality of second fragments to the first chip in rounds comprises: after at least one second segment of the current round is sent to the first chip one by one, judging whether the first chip receives all the second segments of the current round, and resending the missing second segments to the first chip under the condition that the first chip does not receive part or all of the second segments of the current round.
Optionally, the first data is an AT instruction, and/or the second data is response data sent by the second chip to the first chip for the received first data.
Optionally, the first chip is a master control chip, and/or the first type communication protocol is an end-to-end protocol; and/or the second chip is an external communication chip and/or the second type of communication protocol is a point-to-point protocol.
Optionally, the first type of communication protocol comprises at least one of: MQTT and COAP; the second type of communication protocol includes at least one of: 2G, 3G, 4G, lora, NB-IoT, wi-Fi.
According to a second aspect of the present invention, there is also provided a communication method applied to an internet of things device, the internet of things device including a main control chip and an external communication chip, the main control chip being capable of enabling the internet of things device to interact data with the outside through running a first type communication protocol, the external communication chip being capable of enabling the internet of things device to interact data with the outside through running a second type protocol, the method comprising: the performance of data transmission between the main control chip and the external communication chip based on different data transmission protocols is estimated; and determining a data transmission protocol between the main control chip and the external communication chip according to the estimated result.
According to a third aspect of the present invention, there is also provided a communication device comprising: the first chip can enable the communication equipment to perform data interaction with the outside through running a first type communication protocol; the second chip can enable the Internet of things equipment to perform data interaction with the outside through running a second type protocol; the transmission protocol configuration component is used for estimating the performance of data transmission between the first chip and the second chip based on different data transmission protocols, and determining the data transmission protocol between the first chip and the second chip according to the estimated result.
According to a fourth aspect of the present invention, there is also provided a communication apparatus, a first chip for running a first type of communication protocol, a second chip for running a second type of communication protocol, the first chip and the second chip being located in the same device, the apparatus comprising: the performance estimating module is used for estimating the performance of data transmission between the first chip and the second chip based on different data transmission protocols; and the transmission protocol determining module is used for determining a data transmission protocol between the first chip and the second chip according to the estimated result.
According to a fifth aspect of the present invention, there is also presented a computing device comprising: a processor; and a memory having executable code stored thereon which, when executed by the processor, causes the processor to perform the method as described in the first or second aspect of the invention.
According to a sixth aspect of the present invention there is also provided a non-transitory machine-readable storage medium having stored thereon executable code which when executed by a processor of an electronic device causes the processor to perform a method as set out in the first or second aspect of the present invention.
According to the invention, the first type communication protocol and the second type communication protocol are separated into different chips (such as a main control chip and an external communication chip), the performance of data transmission between the chips based on different data transmission protocols is estimated, and the data transmission protocol between the chips is determined according to the estimated result, so that the data transmission protocol with the best performance can be selected to establish connection, and the networking performance of equipment can be ensured.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following more particular descriptions of exemplary embodiments of the disclosure as illustrated in the accompanying drawings wherein like reference numbers generally represent like parts throughout exemplary embodiments of the disclosure.
Fig. 1 shows a schematic flow chart of a data transmission mechanism between a main control chip and an external communication chip according to an embodiment of the invention.
Fig. 2 shows a schematic structural diagram of an adaptation layer according to an embodiment of the invention.
FIG. 3 shows a schematic flow chart of a performance estimation method according to an embodiment of the invention.
FIG. 4 illustrates a schematic diagram of estimating resource requirements of a target scenario based on resource requirements of a typical application, according to an embodiment of the invention.
Fig. 5 shows a schematic diagram of the run lengths of the different adaptation modes based on the test.
Fig. 6 shows a schematic structural diagram of a communication device according to an embodiment of the present invention.
Fig. 7 shows a schematic structural diagram of an internet of things device according to an embodiment of the invention.
Fig. 8 shows a schematic structural diagram of a communication apparatus according to an embodiment of the present invention.
FIG. 9 illustrates a schematic diagram of a computing device according to an embodiment of the invention.
Detailed Description
Preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[ PREPARATION ] A method for producing a polypeptide
And (3) a main control chip: the device is a core component of a main board or a hard disk, is a bridge for connecting all devices, and is also a brain for controlling the operation of the devices. The main control chip can be a chip running in the Internet of things equipment, such as an MCU chip.
MCU: microcontroller Unit the micro control unit, also called a single chip microcomputer (Single Chip Microcomputer) or a single chip microcomputer, is to properly reduce the frequency and specification of a central processing unit (Central Process Unit; CPU), integrate peripheral interfaces such as a Memory (Memory), a counter (Timer), USB, A/D conversion, UART, PLC, DMA and the like, and even LCD driving circuits on a single chip to form a chip-level computer, and perform different combination control for different application occasions.
And (3) externally connecting a communication chip: and the communication chip is connected with the main control chip through UART, SPI and other modes.
Protocol adaptation: and the main control chip is used for realizing an interactive interface with the communication chip, which is required for external communication.
Reconfigurable interface: the interaction interface of the main control chip and the communication chip can be adjusted according to the requirements.
[ scheme overview ]
Different chips may be provided to implement different types of communication protocols, e.g. a first type of communication protocol may be run by a first chip and a second type of communication protocol may be run by a second chip. The first chip and the second chip are located in the same device, the first chip can be a main control chip, and the second chip can be an external communication chip. The first type of protocol may be an end-to-end protocol, such as may include, but is not limited to, MQTT and/or COAP, and the second type of protocol may be a point-to-point protocol, such as may include, but is not limited to, one or more of 2G, 3G, 4G, lora, NB-IoT, wi-Fi. Therefore, the point-to-point protocol and the end-to-end protocol can be separated, the coupling degree is reduced well, and the flexibility of a networking scheme is improved.
The device may perform data interaction with the outside world by running a first type communication protocol through the first chip, such as an Application (APP) installed on the device may perform data interaction with the outside world by running the first type communication protocol through the first chip. The device may also perform data interaction with the outside world by running the second type communication protocol through the second chip, for example, an application installed on the device may also perform data interaction with the outside world by running the second type communication protocol through the first chip.
Taking the first chip as a main control chip and the second chip as an external communication chip as an example, the external communication chip can provide an AT instruction interface, and the main control chip can control the external communication chip through the AT instruction, thereby managing connection and receiving and transmitting data. Although this approach may enable separation of applications from protocols, it still has the following three issues:
1) Lack of adjustment mechanism: the user generally selects to use the AT instruction according to the adaptation cost, so that planning is difficult according to the application requirements, chip resources and actual performance, and the networking performance of the equipment cannot be ensured;
2) Lack of reliable transmission channels: the main control chip and the communication chip are generally connected through UART or SPI, the transmission reliability is limited by physical connection or driving realization, and when data transmission is wrong, the end-to-end connection needs disconnection reconnection;
3) Lack of a uniform adaptation layer: the user needs to realize the adaptation AT the main control chip side, and the adaptation not only comprises AT instruction conversion, but also comprises data caching, connection management, event notification and the like, so that the adaptation cost is greatly increased.
Aiming at the problems of the first aspect, considering simple protocol separation, the networking performance of the equipment cannot be guaranteed to be optimal, the invention proposes that the performance of data transmission between a first chip (such as a main control chip) and a second chip (such as an external communication chip) based on different data transmission protocols can be estimated, and the data transmission protocol between the chips is determined according to the estimated result, so that the data transmission protocol with the best performance can be selected to establish connection, and the networking performance of the equipment can be guaranteed.
Optionally, in view of the foregoing problem of the second aspect, the present invention further proposes that a data transmission mechanism between the first chip and the second chip may be configured to establish a reliable interaction channel between the first chip and the second chip. And/or, in view of the above-mentioned problem of the third aspect, the present invention may further configure an adaptation layer for the first chip and the second chip, so as to reduce the adaptation cost.
The aspects of the invention are further described below.
[ data Transmission mechanism ]
In order to ensure that the data interacted between the first chip and the second chip can arrive correctly and orderly, the disconnection caused by error data is avoided. The data transfer mechanism between the first chip and the second chip may be configured to establish a reliable interaction channel between the first chip and the second chip.
The data transmission mechanism of the invention mainly comprises three aspects: data fragmentation, CRC check, and acknowledgement retransmission.
1. Data slicing
In order to ensure the integrity of the data, each piece of data transmitted between the first chip and the second chip can be transmitted as an independent data packet and numbered. Taking the first chip as a main control chip and the second chip as an external communication chip as an example, the data (for convenience of distinction, may be referred to as "first data") sent by the first chip to the second chip may be an AT instruction, and the data (for convenience of distinction, may be referred to as "second data") sent by the second chip to the first chip may be response data sent by the second chip to the first chip with respect to the received first data, that is, an AT response. Each AT command or AT response may be transmitted as an independent data packet and numbered.
And under the condition that the length of the first data sent by the first chip to the second chip is larger than a first preset threshold value, the first data can be segmented to obtain a plurality of first fragments, the plurality of first fragments are sent to the second chip in a round, and at least one first fragment is sent in each round. The length can be configured according to the actual performance requirement
And under the condition that the length of second data sent by the second chip to the first chip is larger than a second preset threshold value, the second data can be segmented to obtain a plurality of second fragments, the second fragments are sent to the first chip in turn, and at least one second fragment is sent in each turn.
The first predetermined threshold and the second predetermined threshold may be the same or different. The first predetermined threshold and the second predetermined threshold may be set according to actual conditions, for example, may be determined according to an underlying transmission rate and an error rate.
Each slice (first slice or second slice) has a corresponding slice ID, which can be written as 0 if the data (first data/second data) transferred between the first chip and the second chip does not need to be sliced. As an example, delivery to the upper layer may occur if and only if all fragments of a packet arrive. The fragment length may be configured according to actual performance requirements, which will not be described in detail herein.
2. Acknowledgement retransmission
When the first chip sends first data to the second chip and the first data is divided into a plurality of first fragments, after at least one first fragment of the current round is sent to the second chip one by one, it may be determined whether the second chip receives all the first fragments of the current round, and when the second chip does not receive part or all of the first fragments of the current round, the missing first fragments are resent to the second chip.
And when the second chip sends the second data to the first chip and the second data is divided into a plurality of second fragments, after at least one second fragment of the current round is sent to the first chip one by one, whether the first chip receives all the second fragments of the current round can be judged, and when the first chip does not receive part or all of the second fragments of the current round, the missing second fragments are resent to the first chip.
As an example of the present invention, the transmitting end (first chip/second chip) and the receiving end (second chip/first chip) may agree on the number of fragments transmitted each round, and after receiving all fragments transmitted by the transmitting end in the current round, the receiving end may determine whether there is a missing fragment according to the number of fragments, and in case that there is a missing fragment, may notify the number of the missing fragment to the transmitting end, so that the transmitting end retransmits the missing fragment.
As another example of the present invention, the transmitting end may transmit only one burst per round, the receiving end may transmit a notification (may be referred to as ACK) of successful reception of the burst of the current round to the transmitting end after receiving the burst of the current round, and in case that the burst of the current round is not received for more than a predetermined period of time, the receiving end may transmit a notification (may be referred to as NACK) of not receiving the burst to the transmitting end so that the transmitting end retransmits the burst of the current round. The sending end may retransmit the current round of fragments in response to receiving the NACK, or may retransmit the current round of fragments without receiving the ACK for more than a predetermined period of time. The predetermined time period may be configured according to actual performance requirements.
3. CRC check
The transmitting end (first chip/second chip) may add a CRC check bit to each slice (first slice/second slice) and check the same by the receiving end (second chip/first chip), and when the check is correct, the receiving end may send an ACK to the transmitting end to confirm, and when the check is incorrect, may send a NACK to notify. The theory of CRC check is mature, and the specific implementation process of CRC check is not described here.
In order to prevent ACK or NACK from being not sent, the transmitting end may determine whether transmission fails through a timer. When NACK is received or ACK is not received for more than a predetermined period of time, the transmitting end may retransmit the missing fragments, e.g., may retransmit all fragments of the current round. And starting the sending of the fragments of the next round until the ACK is received or the maximum retransmission times are reached.
Taking the first chip as a main control chip and the second chip as an external communication chip, and sending one slice each time as an example, as shown in fig. 1, the main control chip may send the slice 1 to the communication chip first. After receiving the fragment 1, the communication chip can check that the communication chip is correct and send the ACK. In response to receiving the ACK, the master chip begins transmitting fragment 2. After receiving the fragment 2, the communication chip performs verification, checks errors and sends NACK to the main control chip. In response to receiving the NACK, the main control chip retransmits the fragment 2, and in response to receiving the ACK transmitted by the communication chip, or the maximum retransmission number is reached, the main control chip starts the transmission of the next round. The maximum number of retransmissions may be configured according to the actual performance requirements.
The data transmission mechanism (namely the established reliable interaction channel) can ensure the correctness of data transmission of the first chip and the second chip under any throughput, is independent of the realization of the bottom layer, and has lower transplanting cost.
[ Adaptation layer ]
The invention provides a unified adaptation layer for the first chip and the second chip.
The adaptation layer may provide one or more data transfer protocols, and the first chip and the second chip may interact with data based on the data transfer protocols provided by the adaptation layer. The data transmission protocol provided by the adaptation layer may include, but is not limited to, at least one of: MQTT, COAT, SSL, TCP, UDP.
The adaptation layer may also provide one or more functional interfaces for managing the connection between the first chip and the second chip. As shown in fig. 2, the functional interfaces provided by the adaptation layer may include, but are not limited to, a first interface (set-up interface), a second interface (close interface), a third interface (send interface), and a fourth interface (receive interface).
The first interface is used to establish a connection, such as may be established between the first chip and the second chip based on a predetermined data transfer protocol. The second interface is used to close the connection, e.g. a connection established between the first chip and the second chip based on a predetermined data transfer protocol may be closed.
The third interface is for transmitting data based on an established connection between the first chip and the second chip, and the fourth interface is for receiving data based on an established connection between the first chip and the second chip.
The adaptation layer realizes unified connection management through the first interface and the second interface, for example, connection based on different types of transmission protocols can be established between the first chip and the second chip through the first interface, and connection can be closed through the second interface.
Through the third interface and the fourth interface, the adaptation layer realizes a universal data caching and notification mechanism and can allow a user to configure synchronous and asynchronous transmission modes. For example, typical protocol AT conversions provided by the adaptation layer may include: MQTT (Message Queuing Telemetry Transport, message queue telemetry transport), COAP (Constrained Application Protocol, constraint application protocol), SSL (Secure Sockets Layer ), TCP (Transmission Control Protocol, transmission control protocol), UDP (User Datagram Protocol ), and allows users to add or clip protocols. When the first chip and the second chip perform data interaction, the data transmission and the data reception can be uniformly performed by the adaptation layer, so that the adaptation cost can be reduced.
As an example, the selection of the adaptation protocol may be set by a configuration file. For example, when a user selects an adapted MQTT in a configuration file, the compile-time interface implements AT conversions that will interface to the MQTT. In some application scenarios, user data requires multiple connections at the same time. Thus, the adaptation layer may support the simultaneous existence of multiple protocol AT conversions. After setting a plurality of protocols in the configuration file, the user selects the type of connection through parameters when calling the interface.
The adaptation layer can provide support and reconfigurable interfaces of the AT instruction set, and the adaptation cost can be well reduced based on the unified interface provided by the adaptation layer and the AT conversion realization of a typical protocol, so that the adaptation adjustment based on the performance estimation is possible.
[ Performance prediction ]
The performance of data transmission between the first chip and the second chip based on different data transmission protocols can be estimated. And determining a data transmission protocol between the first chip and the second chip according to the estimated result. If so, the best data transmission protocol can be selected to establish connection according to the estimated result.
In the invention, performance estimation can be performed according to actual application requirements. Taking the first chip as a main control chip and the second chip as an external communication chip as an example, under the condition that an application program on the device performs data interaction with the outside through the external communication chip running a second type protocol, the data obtained through interaction needs to be sent to the main control chip for processing, so that performance can be estimated according to the resource requirement of the application program, and the connection can be established by selecting the data transmission protocol with the best performance.
FIG. 3 shows a schematic flow chart of a method of performance estimation.
As shown in fig. 3, in step S310, a test program is configured.
The test program is used for testing the performance of data transmission between the first chip and the second chip. Based on the test program, the performance of data transmission between the first chip and the second chip based on different data transmission protocols can be estimated.
As an example, the performance estimation method shown in fig. 3 may be input by a development board and a target scene, that is, performance estimation may be performed by the development board, and the target scene may be determined according to an actual application scene. For example, in the case that an application program on the device needs to perform data interaction with the outside through the second chip running the second type protocol, an application scene of the application program may be taken as a target scene.
The test program may be configured to run resources corresponding to the resource requirements of the target scenario based on the resource requirements of the target scenario (e.g., computing resource requirements and/or bandwidth resource requirements). Wherein the resource requirements of the target scenario may be estimated based on the resource requirements of one or more application scenarios.
As an example, the configurable items provided by the test program for resource requirements may include computation amount per unit time (i.e., CPU computing resource requirements) and traffic per unit time (i.e., bandwidth resource requirements). In order to make the test program as real as possible, the resource requirement of the target scene can be estimated according to the resource requirement of the application scene with quantized resource requirement. As shown in fig. 4, the resource requirement of the Target Scenario (Target Scenario) may be estimated according to a plurality of typical applications with known (i.e., quantized) resource requirements, such as Health Monitor (Health Monitor), automatic measurement (Automated Metering), location awareness (Location Awareness), monitoring (Surveillance), etc., such as in the case that the Target Scenario has the same bandwidth resource requirement as the automatic measurement, but a higher computational resource requirement, the resource requirement of the Target Scenario may be estimated according to the resource requirement of the automatic measurement Scenario.
In step S320, an adaptation method is configured.
During the first test, an adaptation mode can be selected according to the resource requirement of the target scene. The adaptation method mentioned herein, that is, selecting a data transmission protocol between the first chip and the second chip, for example, may select one from data transmission protocols such as MQTT, COAP, SSL, TCP/UDP provided by the adaptation layer as the adaptation method between the first chip and the second chip. When the adaptation mode is configured, relevant details can be further adapted according to actual conditions, the first chip is taken as a main control chip, the second chip is taken as a communication chip, the resource requirements of the target scene comprise computing resource requirements as an example, and the protocol can be preferably operated on the side of the communication chip under the condition of higher computing resource requirements.
In step S330, a test program is run, and the running time period is recorded.
The test program can operate locally and interact with the remote service for a certain number of rounds. As an example, the performance index obtained by running the test program may be a running duration, which may be an average duration of one or more runs, and may be obtained at the end of the test program.
In step S340, the adaptation method is adjusted.
After testing the currently configured adaptation scheme, the next adaptation scheme may be selected for testing. When the adaptive modes are more, the test can be performed by adopting a dichotomy without traversing all conditions. After the adaptation mode is adjusted, step S330 may be continuously executed to run the test program and record the running time. In this way, the operating times of different adaptation modes can be obtained.
In step S350, an adaptive formula is determined according to the test result.
And after all necessary tests are finished, the operation time length of each adaptive mode can be obtained. As shown in fig. 5, according to the operation time length of different adaptation modes, a basis may be provided for selecting the adaptation mode between the first chip and the second chip. Optionally, in determining the adaptation mode, the operation time length and the adaptation cost of the adaptation mode may be referred to simultaneously to determine the best adaptation mode.
The invention can be realized as a communication method applied to the equipment of the Internet of things. The Internet of things equipment can comprise a main control chip and an external communication chip, the main control chip can enable the Internet of things equipment to conduct data interaction with the outside through operation of a first type communication protocol, and the external communication chip can enable the Internet of things equipment to conduct data interaction with the outside through operation of a second type protocol. For the first type protocol and the second type protocol, reference may be made to the above related description, and no further description is given here.
The performance of data transmission between the main control chip and the external communication chip based on different data transmission protocols can be estimated;
and determining a data transmission protocol between the main control chip and the external communication chip according to the estimated result. The adaptation can be performed from three aspects of a data transmission mechanism, an adaptation layer and performance estimation. Specific adaptation procedures can be found in the related description above, and are not described here again. By providing a reliable transmission channel and a unified adaptation layer and allowing a user to adjust the adaptation scheme according to actual performance, overall performance improvement can be achieved.
The invention may also be implemented as a communication device. As shown in fig. 6, the communication device 600 may include a first chip 610, a second chip 620, and a transport protocol configuration component 630. Wherein the communication device 600 may be an internet of things device.
The first chip 610 is capable of enabling a communication device to interact data with the outside world by running a first type of communication protocol. The second chip 620 can enable the internet of things device to perform data interaction with the outside through running the second type of protocol. For the first chip, the second chip, the first type communication protocol and the second type communication protocol, reference may be made to the above related descriptions, and no further description is given here.
The transmission protocol configuration component 630 is configured to predict performance of data transmission between the first chip and the second chip based on different data transmission protocols, and determine the data transmission protocol between the first chip and the second chip according to the prediction result. The specific processing procedure of the transport protocol configuration component 630 may be referred to above and will not be described herein.
Optionally, the communication device 600 may further include a data transmission configuration component and/or an adaptation component (not shown in the figures). The data transmission configuration component is used for configuring a data transmission mechanism between the first chip and the second chip so as to establish a reliable interaction channel for the first chip and the second chip. The adaptation component is used for configuring the adaptation layer to reduce the adaptation cost. For the procedure of the data transmission configuration component configuring the data transmission mechanism and the adaptation component configuring the adaptation layer, reference may be made to the above related description, and the detailed description is omitted here.
Fig. 7 shows a schematic structural diagram of an internet of things device according to an embodiment of the invention.
As shown in fig. 7, the device includes a main control chip (MCU) and a communication chip (i.e., an external communication chip). The master control chip may support a first type of communication protocol (e.g., an end-to-end communication protocol) and the communication chip may support a second type of communication protocol (e.g., a point-to-point communication protocol). For the first type of communication protocol and the second type of communication protocol, reference may be made to the above related description, and no further description is given here.
A reliable interaction channel (i.e. configuring the data transmission mechanism described above), an adaptation layer and performance prediction may be established between the main control chip and the communication chip. The implementation process of the specific reliable interaction channel, the adaptation layer and the performance estimation can be referred to the above related description, and will not be repeated here.
The reliable interaction channel provides a layer reliable mechanism, and can ensure that the data (AT instruction and AT response) transmitted by the main control chip and the communication chip can arrive in sequence AT any throughput.
The adaptation layer can provide AT instruction set support and a reconfigurable interface, and can realize unified connection management and universal data caching and notification mechanism. The dashed line shown in fig. 7 is the output of the adaptation mechanism, i.e. the adaptation interface is divided. As shown in fig. 7, through the adaptation layer, the main control chip can communicate with the communication chip through MQTT/COAP AT, and also can perform AT interaction AT SSL layer or TCP/UDP. Compared with the adaptation of AT instruction conversion, data caching, connection management, event notification and the like AT the main control chip side, the adaptation cost can be greatly reduced through the adaptation layer.
The adaptation mode can be planned according to application requirements, chip resources and actual performances through performance prediction.
Fig. 8 shows a schematic structural diagram of a communication apparatus according to an embodiment of the present invention. Wherein the functional modules of the communication device may be implemented by hardware, software, or a combination of hardware and software implementing the principles of the present invention. Those skilled in the art will appreciate that the functional modules depicted in fig. 8 may be combined or divided into sub-modules to implement the principles of the invention described above. Accordingly, the description herein may support any possible combination, or division, or even further definition of the functional modules described herein.
The functional modules that the communication device may have and the operations that each functional module may perform are briefly described, and details related thereto are referred to the above related description and are not repeated herein.
Referring to fig. 8, a communication device 800 includes a performance estimation module 810 and a transmission protocol determination module 820.
The performance estimation module 810 is configured to estimate performance of data transmission between the first chip and the second chip based on different data transmission protocols. The transmission protocol determining module 820 is configured to determine a data transmission protocol between the first chip and the second chip according to the estimated result.
The first chip is used for running a first type of communication protocol, the second chip is used for running a second type of communication protocol, and the first chip and the second chip are located in the same device.
As an example, the first chip may be a master chip and/or the first type of communication protocol may be an end-to-end protocol, e.g. the first type of communication protocol comprises at least one of: MQTT, COAP. The second chip may be an external communication chip and/or the second type of communication protocol may be a point-to-point protocol. For example, the second type of communication protocol may include at least one of: 2G, 3G, 4G, lora, NB-IoT, wi-Fi.
As an example, the performance estimation module 810 may configure a test program that is equivalent to the resource requirement of the target scenario according to the resource requirement of the target scenario, and based on the test program, estimate the performance of data transmission between the first chip and the second chip based on different data transmission protocols. Optionally, the communication device 800 may further include an estimation module, where the estimation module is configured to estimate the resource requirement of the target scenario according to the resource requirements of one or more application scenarios.
In one embodiment of the present invention, the communication device 800 may further include an adaptation layer configuration module configured to configure an adaptation layer, where the adaptation layer is configured to provide one or more data transmission protocols, and the first chip and the second chip interact data based on the data transmission protocols. The adaptation layer is further used for providing one or more functional interfaces, and the functional interfaces are used for managing connection between the first chip and the second chip. For the functional interface, reference may be made to the above related description, and no further description is given here.
In another embodiment of the present invention, the communication apparatus 800 may further include a data transmission mechanism configuration module configured to configure a data transmission mechanism between the first chip and the second chip. For the data transmission mechanism, reference may be made to the above related description, and no further description is given here.
Fig. 9 is a schematic diagram of a computing device that may be used to implement the communication method described above according to an embodiment of the invention.
Referring to fig. 9, a computing device 900 includes a memory 910 and a processor 920.
Processor 920 may be a multi-core processor or may include multiple processors. In some embodiments, processor 920 may include a general-purpose host processor and one or more special coprocessors such as, for example, a Graphics Processor (GPU), a Digital Signal Processor (DSP), etc. In some embodiments, the processor 920 may be implemented using custom circuitry, for example, an application specific integrated circuit (ASIC, application Specific Integrated Circuit) or a field programmable gate array (FPGA, field Programmable Gate Arrays).
Memory 910 may include various types of storage units, such as system memory, read Only Memory (ROM), and persistent storage. Where the ROM may store static data or instructions required by the processor 920 or other modules of the computer. The persistent storage may be a readable and writable storage. The persistent storage may be a non-volatile memory device that does not lose stored instructions and data even after the computer is powered down. In some embodiments, the persistent storage device employs a mass storage device (e.g., magnetic or optical disk, flash memory) as the persistent storage device. In other embodiments, the persistent storage may be a removable storage device (e.g., diskette, optical drive). The system memory may be a read-write memory device or a volatile read-write memory device, such as dynamic random access memory. The system memory may store instructions and data that are required by some or all of the processors at runtime. Furthermore, memory 910 may include any combination of computer-readable storage media including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), magnetic and/or optical disks may also be employed. In some implementations, memory 910 may include readable and/or writable removable storage devices such as Compact Discs (CDs), digital versatile discs (e.g., DVD-ROMs, dual-layer DVD-ROMs), blu-ray discs read only, super-density discs, flash memory cards (e.g., SD cards, min SD cards, micro-SD cards, etc.), magnetic floppy disks, and the like. The computer readable storage medium does not contain a carrier wave or an instantaneous electronic signal transmitted by wireless or wired transmission.
The memory 910 has stored thereon executable code that, when processed by the processor 920, causes the processor 920 to perform the communication methods described above.
The communication method, apparatus and device according to the present invention have been described in detail above with reference to the accompanying drawings.
Furthermore, the method according to the invention may also be implemented as a computer program or computer program product comprising computer program code instructions for performing the steps defined in the above-mentioned method of the invention.
Alternatively, the invention may also be embodied as a non-transitory machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) having stored thereon executable code (or a computer program, or computer instruction code) which, when executed by a processor of an electronic device (or computing device, server, etc.), causes the processor to perform the steps of the above-described method according to the invention.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems and methods according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The foregoing description of embodiments of the invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the various embodiments described. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the improvement of technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (18)

1. A communication method, characterized in that a first chip is used for running a first type of communication protocol, a second chip is used for running a second type of communication protocol, the first chip and the second chip are located in the same device, the device is capable of performing data interaction with the outside through the first type of communication protocol or the second type of communication protocol, the method comprises:
estimating the performance of data transmission between the first chip and the second chip based on different data transmission protocols;
and determining a data transmission protocol between the first chip and the second chip according to the estimated result.
2. The communication method according to claim 1, wherein the step of estimating the performance of data transmission between the first chip and the second chip based on different data transmission protocols comprises:
according to the resource requirement of a target scene, configuring a test program of which the resource required by operation is equivalent to the resource requirement of the target scene;
based on the test program, the performance of data transmission between the first chip and the second chip based on different data transmission protocols is estimated.
3. The communication method according to claim 2, characterized by further comprising:
and estimating the resource requirements of the target scene according to the resource requirements of one or more application scenes.
4. The communication method according to claim 1, characterized by further comprising:
and configuring an adaptation layer, wherein the adaptation layer is used for providing one or more data transmission protocols, and the first chip and the second chip perform data interaction based on the data transmission protocols.
5. The communication method according to claim 4, wherein,
the adaptation layer is further configured to provide one or more functional interfaces for managing the connection between the first chip and the second chip.
6. The communication method of claim 5, wherein the one or more functional interfaces comprise:
a first interface for establishing a connection between the first chip and the second chip based on a predetermined data transfer protocol; and/or
And a second interface for closing a connection established between the first chip and the second chip based on a predetermined data transfer protocol.
7. The communication method of claim 5, wherein the one or more functional interfaces comprise:
A third interface for transmitting data based on an established connection between the first chip and the second chip; and/or
And a fourth interface for receiving data based on an established connection between the first chip and the second chip.
8. The communication method of claim 4, wherein the data transmission protocol comprises at least one of:
MQTT;
COAT;
SSL;
TCP;
UDP。
9. the communication method according to claim 1, characterized by further comprising: configuring a data transfer mechanism between the first chip and the second chip, the data transfer mechanism configured to:
under the condition that the length of first data sent by the first chip to the second chip is larger than a first preset threshold value, the first data is segmented to obtain a plurality of first fragments, the plurality of first fragments are sent to the second chip in a round, and at least one first fragment is sent in each round; and/or
And under the condition that the length of second data sent by the second chip to the first chip is larger than a second preset threshold value, cutting the second data to obtain a plurality of second fragments, and sending the plurality of second fragments to the first chip in a round manner, wherein at least one second fragment is sent in each round.
10. The communication method according to claim 9, wherein,
the step of transmitting the plurality of first fragments to the second chip in a round manner comprises the following steps: after at least one first fragment of the current round is sent to the second chip one by one, judging whether the second chip receives all the first fragments of the current round, and resending the missing first fragments to the second chip under the condition that the second chip does not receive part or all of the first fragments of the current round; and/or
The step of transmitting the plurality of second fragments to the first chip in a round manner comprises the following steps: after at least one second segment of the current round is sent to the first chip one by one, judging whether the first chip receives all the second segments of the current round, and resending the missing second segments to the first chip under the condition that the first chip does not receive part or all of the second segments of the current round.
11. The communication method according to claim 9, wherein,
the first data is an AT command, and/or
The second data is response data sent by the second chip to the first chip for the received first data.
12. The communication method according to any one of claims 1 to 11, characterized in that,
the first chip is a main control chip, and/or the first type communication protocol is an end-to-end protocol; and/or
The second chip is an external communication chip and/or the second type communication protocol is a point-to-point protocol.
13. The communication method according to claim 12, wherein,
the first type of communication protocol includes at least one of: MQTT and COAP;
the second type of communication protocol includes at least one of: 2G, 3G, 4G, lora, NB-IoT, wi-Fi.
14. The communication method applied to the Internet of things equipment is characterized in that the Internet of things equipment comprises a main control chip and an external communication chip, the main control chip can enable the Internet of things equipment to conduct data interaction with the outside through running a first type communication protocol, and the external communication chip can enable the Internet of things equipment to conduct data interaction with the outside through running a second type protocol, and the method comprises the following steps:
the performance of data transmission between the main control chip and the external communication chip based on different data transmission protocols is estimated;
And determining a data transmission protocol between the main control chip and the external communication chip according to the estimated result.
15. A communication device, comprising:
the first chip can enable the communication equipment to perform data interaction with the outside through running a first type communication protocol;
the second chip can enable the communication equipment to perform data interaction with the outside through running a second type protocol;
the transmission protocol configuration component is used for estimating the performance of data transmission between the first chip and the second chip based on different data transmission protocols, and determining the data transmission protocol between the first chip and the second chip according to the estimated result.
16. A communication device, wherein a first chip is configured to operate a first type of communication protocol and a second chip is configured to operate a second type of communication protocol, the first chip and the second chip being located in a same device, the device being capable of data interaction with the outside through the first type of communication protocol or the second type of communication protocol, the device comprising:
the performance estimating module is used for estimating the performance of data transmission between the first chip and the second chip based on different data transmission protocols;
And the transmission protocol determining module is used for determining a data transmission protocol between the first chip and the second chip according to the estimated result.
17. A computing device, comprising:
a processor; and
a memory having executable code stored thereon, which when executed by the processor causes the processor to perform the method of any of claims 1 to 14.
18. A non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform the method of any of claims 1 to 14.
CN201811592853.3A 2018-12-25 2018-12-25 Communication method, device, equipment and storage medium Active CN111371632B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811592853.3A CN111371632B (en) 2018-12-25 2018-12-25 Communication method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811592853.3A CN111371632B (en) 2018-12-25 2018-12-25 Communication method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111371632A CN111371632A (en) 2020-07-03
CN111371632B true CN111371632B (en) 2023-04-28

Family

ID=71211396

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811592853.3A Active CN111371632B (en) 2018-12-25 2018-12-25 Communication method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111371632B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112422239B (en) * 2020-11-17 2022-11-01 展讯半导体(成都)有限公司 Communication processing method, device, apparatus and storage medium
CN113300967B (en) * 2021-02-05 2024-03-12 阿里巴巴集团控股有限公司 RDMA network transmission method, RDMA network transmission device and RDMA network communication system
CN115314159B (en) * 2022-08-02 2023-08-04 成都爱旗科技有限公司 Method and device for transmitting data between chips
CN117708015A (en) * 2023-07-11 2024-03-15 荣耀终端有限公司 Control circuit, method and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6381721B1 (en) * 1998-05-15 2002-04-30 Stmicroelectronics Limited Detecting communication errors across a chip boundary

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6851014B2 (en) * 2002-03-22 2005-02-01 Programmable Microelectronics Corp. Memory device having automatic protocol detection
CN100550891C (en) * 2003-09-05 2009-10-14 华为技术有限公司 Improve the method for wireless network transmissions performance
KR100784256B1 (en) * 2005-04-15 2007-12-11 주식회사 케이티프리텔 Non contact type integrated circuit card and method for communicating data by multiprotocol
JP2009020924A (en) * 2007-07-10 2009-01-29 Toshiba Corp Semiconductor integrated circuit
US9736680B2 (en) * 2012-06-27 2017-08-15 Google Inc. Techniques for transferring a data payload utilizing near-field communication
CN104425299B (en) * 2013-08-27 2017-08-11 珠海艾派克微电子有限公司 The method that chip manufacture device and application chip processing unit (plant) carry out chip manufacture
EP2958028B1 (en) * 2014-06-20 2020-05-13 Nagravision S.A. Physical interface module
CN106533793B (en) * 2016-12-12 2019-08-20 深圳市瑞凌实业股份有限公司 Communication means and system based on CAN protocol

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6381721B1 (en) * 1998-05-15 2002-04-30 Stmicroelectronics Limited Detecting communication errors across a chip boundary

Also Published As

Publication number Publication date
CN111371632A (en) 2020-07-03

Similar Documents

Publication Publication Date Title
CN111371632B (en) Communication method, device, equipment and storage medium
RU2653284C2 (en) Structure of harq frame data and method of transmission and receiving with harq in systems using blind detection
TWI707558B (en) User equipment and method for performing repetition
CN108055111B (en) Data transmission method and device
US7921215B2 (en) Method and apparatus for optimizing and prioritizing the creation of a large number of VPN tunnels
US10116424B2 (en) Method and apparatus for transmitting and receiving data
CN111132358B (en) Data packet transmission method, terminal and storage medium
WO2019137492A1 (en) Uplink control information transmission method and device
US20170127445A1 (en) Apparatus and method for controlling connection interval in wireless communication system supporting bluetooth scheme
WO2015165255A1 (en) Data transmission method and device
JP2016518749A (en) Method and apparatus for using more transmission opportunities in a distributed network topology with limited HARQ processes
US20160359950A1 (en) Systems and methods for improved trivial file transfer protocol
WO2015035588A1 (en) Information obtaining method, terminal, base station and system
CN116112121B (en) Wireless communication method, system, equipment and medium
CN116886576A (en) Multi-control storage cluster communication timeout control method, device, equipment and medium
TW201943295A (en) A method and a device for transmitting up-link control information
US9924383B2 (en) Method and terminal for transmitting and receiving data according to a transmission speed of data
CN117157921A (en) Data transmission method, device, equipment and storage medium based on low-power consumption Bluetooth
US20120072520A1 (en) System and Method for Establishing Reliable Communication in a Connection-Less Environment
KR101793496B1 (en) Apparatus and method of communicating automatic repeat request (arq) feedback in a wireless communication network
CN110099001A (en) The machinery of consultation of two-way converting parameters of detection time, device and electronic equipment
JP2016019198A (en) Communication apparatus, control method for communication apparatus, and program
US20130194959A1 (en) Bi-directional link margin establishment for wireless embedded systems
WO2018170745A1 (en) Carrier aggregation-based demodulation method and apparatus
CN117202371B (en) LoRa multi-node big data transmission processing method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40032525

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant