CN113853011A - Data interaction method, gateway, data interaction device and data interaction system - Google Patents

Data interaction method, gateway, data interaction device and data interaction system Download PDF

Info

Publication number
CN113853011A
CN113853011A CN202010598897.8A CN202010598897A CN113853011A CN 113853011 A CN113853011 A CN 113853011A CN 202010598897 A CN202010598897 A CN 202010598897A CN 113853011 A CN113853011 A CN 113853011A
Authority
CN
China
Prior art keywords
data
terminal
sending
time slot
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010598897.8A
Other languages
Chinese (zh)
Inventor
赵凯
边毅
张莹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202010598897.8A priority Critical patent/CN113853011A/en
Publication of CN113853011A publication Critical patent/CN113853011A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/04Wireless resource allocation
    • H04W72/044Wireless resource allocation based on the type of the allocated resource
    • H04W72/0446Resources in time domain, e.g. slots or frames
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/50Allocation or scheduling criteria for wireless resources
    • H04W72/53Allocation or scheduling criteria for wireless resources based on regulatory allocation policies

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a data interaction method, a gateway, a data interaction device and a data interaction system, wherein the method comprises the following steps: receiving a data request of each terminal, downloading corresponding data from a server according to the data request of each terminal, and storing the data downloaded from the server to a local place; calculating a data sending time slot according to the sum of locally stored data to be sent, the data sending rate and the number of sending channels; and in the data transmission time slot, awakening the corresponding terminals in sequence according to the time sequence of the data request of each terminal so as to transmit data to the corresponding terminals. The data interaction method can feed back the requests of a plurality of terminals to allocate time slots and manage different channels so as to reasonably allocate data issuing time and ensure effective sequential transmission of data.

Description

Data interaction method, gateway, data interaction device and data interaction system
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a data interaction method, a computer-readable storage medium, a gateway, a data interaction apparatus, and a data interaction system.
Background
The Internet of Things (The Internet of Things, IOT for short) is to collect any object or process needing monitoring, connection and interaction in real time and collect various required information such as sound, light, heat, electricity, mechanics, chemistry, biology and location through various devices and technologies such as various information sensors, radio frequency identification technologies, global positioning systems, infrared sensors and laser scanners, and to realize ubiquitous connection of objects and people through various possible network accesses, so as to realize intelligent sensing, identification and management of objects and processes. The internet of things is an information bearer based on the internet, a traditional telecommunication network and the like, and all common physical objects which can be independently addressed form an interconnected network.
The method is based on a wireless communication technology, except professional protocols such as WIFI and Bluetooth, a private protocol is mostly adopted in the field of 434 Mhz-based wireless communication. In the protocol implementation, a contention channel mechanism or a simple time division multiplexing technology is adopted, and RSSI (Received Signal Strength Indication) detection and the like are simply adopted to avoid data loss caused by collision with other user data. The technologies have certain effects on products of the same company, but the effects of products of different companies, especially products which do not adopt avoidance measures in an information coverage area are not great.
In addition, in modern wireless communication, a physical channel is a single channel, and only one message can occupy the channel at the same time to be transmitted correctly. If a plurality of information occupy the channel at the same time, the information will interfere with each other, resulting in data transmission errors.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, a first objective of the present invention is to provide a data interaction method, which allocates time slots by feeding back requests of multiple terminals and manages different channels to reasonably allocate data transmission time, so as to ensure effective sequential transmission of data, and solve the problem that information generated by a civil wireless channel is collided and lost under the condition of lacking management and uniform protocols.
A second object of the invention is to propose a computer-readable storage medium.
A third object of the present invention is to propose a gateway.
The fourth purpose of the invention is to provide a data interaction device.
A fifth object of the present invention is to provide a data interaction system.
In order to achieve the above object, an embodiment of a first aspect of the present invention provides a data interaction method, including the following steps: receiving a data request of each terminal, downloading corresponding data from a server according to the data request of each terminal, and storing the data downloaded from the server to a local place; calculating a data sending time slot according to the sum of locally stored data to be sent, the data sending rate and the number of sending channels; and in the data sending time slot, awakening the corresponding terminals in sequence according to the time sequence of the data request of each terminal so as to send data to the corresponding terminals.
According to the data interaction method, the data request of each terminal is received, corresponding data are downloaded from the server according to the data request of each terminal, the data downloaded from the server are stored to the local, the data sending time slot is calculated according to the sum of the data to be sent, the data sending rate and the number of sending channels, which are stored locally, and the corresponding terminals are awakened in sequence according to the time sequence of the data request of each terminal in the data sending time slot so as to send the data to the corresponding terminals. Therefore, the method can feed back the requests of a plurality of terminals to allocate the time slots, manage different channels, reasonably allocate data issuing time and ensure effective sequential transmission of the data.
In addition, the data interaction method proposed according to the above embodiment of the present invention may further have the following additional technical features:
according to an embodiment of the present invention, in the current data transmission time slot, if the data request of the terminal is continuously received, while the data is transmitted to the corresponding terminal, the corresponding data is downloaded from the server to the local according to the data request of the continuously received terminal, and the next data transmission time slot is calculated according to the sum of the data to be transmitted, the data transmission rate and the number of the transmission channels, which are locally stored, so as to update the current data transmission time slot.
According to an embodiment of the present invention, after data is sent to any one terminal, whether the acknowledgement information fed back by the terminal is received is further determined, wherein if the acknowledgement information fed back by the terminal is not received, the data sent to the terminal is put into a retransmission module, and a delay time slot is calculated according to the data sending time slot, the total amount of retransmission data already stored in the retransmission module, the data sent to the terminal, and the data sending rate of the retransmission module, so that the terminal receives the data when the delay time slot arrives.
According to one embodiment of the present invention, the data transmission time slot is calculated according to the following formula:
t1 ═ S1/(V1 × N), where T1 is the data transmission slot, S1 is the sum of the data to be transmitted stored locally, V1 is the data transmission rate, and N is the number of transmission channels.
According to one embodiment of the invention, the delay time slot is calculated according to the following formula:
t2 ═ T1+ (S2+ S3)/V2, where T1 is a data transmission slot, T2 is a delay slot, S2 is the total amount of complementary data already stored in the complementary module, S3 is data transmitted to the terminal, and V2 is the data transmission rate of the complementary module.
In order to achieve the above object, a second embodiment of the present invention provides a computer-readable storage medium, on which a data interaction program is stored, and the data interaction program, when executed by a processor, implements the data interaction method as described above.
The computer-readable storage medium of the embodiment of the invention can distribute time slots for requesting feedback of a plurality of terminals and manage different channels by executing the data interaction method, so as to reasonably distribute data issuing time and ensure effective sequential transmission of data.
In order to achieve the above object, a third embodiment of the present invention provides a gateway, which includes a memory, a processor, and a data interaction program stored on the memory and executable on the processor, and when the processor executes the data interaction program, the data interaction method as described above is implemented.
The gateway of the embodiment of the invention can feed back the requests of a plurality of terminals to allocate time slots and manage different channels by executing the data interaction method, so as to reasonably allocate data issuing time and ensure effective sequential transmission of data.
In order to achieve the above object, a fourth aspect of the present invention provides a data interaction apparatus, including: the receiving and sending module is used for receiving the data request of each terminal; the information processing module is used for downloading corresponding data from a server according to the data request of each terminal and storing the data downloaded from the server to the local; and the transceiving processing module is used for calculating a data sending time slot according to the locally stored sum of the data to be sent, the data sending rate and the number of sending channels, and sequentially waking up the corresponding terminals according to the time sequence of the data request of each terminal in the data sending time slot so as to send data to the corresponding terminals through the transceiving module.
According to the data interaction device provided by the embodiment of the invention, the data request of each terminal is received through the transceiver module, corresponding data is downloaded from the server through the information processing module according to the data request of each terminal, the data downloaded from the server is stored to the local, the transceiver processing module calculates the data sending time slot according to the sum of the data to be sent, the data sending rate and the number of sending channels which are stored locally, and in the data sending time slot, the corresponding terminals are awakened in sequence according to the time sequence of the data request of each terminal so as to send the data to the corresponding terminals through the transceiver module. Therefore, the device can feed back the requests of a plurality of terminals to allocate time slots and manage different channels so as to reasonably allocate data issuing time and ensure effective sequential transmission of data.
In order to achieve the above object, a fifth embodiment of the present invention provides a data interaction system, which includes a gateway and a plurality of terminals, where the terminals are configured to send a data request to the gateway and receive data sent by the gateway; the gateway is used for receiving the data request of each terminal, downloading corresponding data from a server according to the data request of each terminal, storing the data downloaded from the server to the local, calculating a data sending time slot according to the sum of the data to be sent, the data sending rate and the number of sending channels, which are stored locally, and sequentially waking up the corresponding terminals according to the time sequence of the data request of each terminal in the data sending time slot so as to send the data to the corresponding terminals.
According to the data interaction system provided by the embodiment of the invention, the terminals send data requests to the gateway and receive data issued by the gateway, the gateway receives the data requests of each terminal, downloads corresponding data from the server according to the data requests of each terminal, stores the data downloaded from the server to the local, calculates data sending time slots according to the sum of data to be sent, the data sending rate and the number of sending channels which are stored locally, and awakens the corresponding terminals in sequence according to the time sequence of the data requests of each terminal in the data sending time slots so as to send the data to the corresponding terminals. Therefore, the system can feed back the requests of a plurality of terminals to allocate time slots and manage different channels so as to reasonably allocate data issuing time and ensure effective sequential transmission of data.
In addition, the data interaction system proposed according to the above embodiment of the present invention may further have the following additional technical features:
according to an embodiment of the present invention, the gateway is further configured to, in the current data transmission timeslot, if a data request of the terminal is continuously received, download corresponding data from the server to the local according to the data request continuously received from the terminal while transmitting the data to the corresponding terminal, and calculate a next data transmission timeslot according to a locally stored sum of data to be transmitted, a data transmission rate, and the number of transmission channels, so as to update the current data transmission timeslot.
According to an embodiment of the present invention, the gateway is further configured to determine whether to receive the acknowledgement information fed back by the terminal after sending data to any terminal, wherein if the acknowledgement information fed back by the terminal is not received, the data sent to the terminal is put into a retransmission module, and a delay time slot is calculated according to the data sending time slot, the total amount of retransmission data already stored in the retransmission module, the data sent to the terminal, and the data sending rate of the retransmission module, so that the terminal receives the data when the delay time slot arrives.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flow diagram of a data interaction method according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a data interaction system according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of data interaction according to one embodiment of the invention;
FIG. 4 is a schematic diagram of the operation of a gateway according to one embodiment of the present invention;
FIG. 5 is a block schematic diagram of a gateway according to an embodiment of the present invention;
FIG. 6 is a block diagram of a data interaction device according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
A data interaction method, a computer-readable storage medium, a gateway, a data interaction apparatus, and a data interaction system according to embodiments of the present invention are described below with reference to the accompanying drawings.
Fig. 1 is a flowchart of a data interaction method according to an embodiment of the present invention.
As shown in fig. 1, the data interaction method according to the embodiment of the present invention may include the following steps:
and S1, receiving the data request of each terminal, downloading corresponding data from the server according to the data request of each terminal, and storing the data downloaded from the server to the local. Each terminal should have various parameters such as respective ID, electric quantity, heartbeat interval and the like.
In the embodiment of the present invention, in order to facilitate data interaction, in general, the mobile terminal communicates with the server through the gateway, so as to download data corresponding to the mobile terminal from the server. The gateway can comprise a processor and a memory, wherein the processor comprises an information processor, a transceiving processor and a wireless chip. As shown in fig. 2, the server may be a cloud server, and is responsible for data compression, system security key maintenance, and legal device list and gateway transceiving channel maintenance; the information processor is responsible for transmitting the state of the mobile terminal and data (such as a display picture) of the mobile terminal under the claim gateway to the server; the receiving and transmitting processor is responsible for the management of the sending time of the data stored in the gateway, is a real manager of the time slot, is connected with the information processor through a high-speed Serial port or a Serial Peripheral Interface (SPI), and quickly receives and transmits various information; the wireless chip is responsible for receiving and transmitting data and is a main body of receiving and transmitting wireless data in the time slot.
The wireless chip receives the data request of each terminal and sends the request of the terminal to the transceiving processor, the transceiving processor and the information processing module carry out information processing interaction, and the information processor reports a terminal list mounted on the gateway, wherein the list comprises various parameters such as IDs (identity) of all terminals, electric quantity, heartbeat interval and the like. After the information processor reports the list, the cloud server returns whether the information such as pictures and the like of each terminal needs to be updated and a data storage path. Information to be transmitted is downloaded from the cloud server to the gateway local (memory) via the network in advance according to each terminal ID, and thus, by requesting the cloud server to be stored in the gateway local in advance, the information can be transmitted immediately when the feedback time arrives.
In one embodiment of the invention, information exchange may be performed by identifying different CMD (Command prompt) commands in the Command word and parsing the subsequent data. The interaction format of the data is shown in table 1 below:
TABLE 1
Object ID Command word Source ID Requesting content Check byte
8 bytes 1 byte 8 bytes N byte 2 bytes
As a possible implementation manner of the present invention, the precision of the time slot is controlled by the transceiving processor, and an ACK (acknowledgement character) data frame for the secondary protocol is specifically required, for example, as shown in table 2.
TABLE 2
Object ID Command word Source ID Check byte
8 bytes CMD1 8 bytes 2 bytes
As a possible implementation of the invention, the HAVE-TASK frame composition sent by the gateway to the terminal can be as shown in table 3.
TABLE 3
Object ID Command word Source ID Interaction channel 1 Interaction channel 2 Appointment time Check byte
8 bytes CMD2 8 bytes 1 byte 1 byte T1、T2 2 bytes
As a possible implementation of the present invention, the composition of NO-TASK frames sent by the gateway to the terminal may be as shown in table 4.
TABLE 4
Object ID Command word Source ID Check byte
8 bytes CMD3 8 bytes 2 bytes
As a possible implementation manner of the present invention, the composition of the heartbeat frame sent by the terminal to the gateway may be as shown in table 5.
TABLE 5
Object ID Command word Source ID Gateway shapeState parameter Check byte
8 bytes CMD4 8 bytes N byte 2 bytes
The gateway receives the terminal data request (the terminal sends a heartbeat frame CMD4 to the gateway), and the terminal data request is transmitted to the transceiver processor through the wireless chip, and the transceiver processor selects a free channel to immediately feed back to the wireless chip and transmit the free channel to the wireless terminal. And simultaneously, data required to be fed back by the terminal is requested to a data processor and stored in an information list to be sent. The information list to be sent includes information data, channel data and time data.
And S2, calculating the data sending time slot according to the sum of the data to be sent, the data sending rate and the number of sending channels which are locally stored. The sum of the data to be sent stored locally is the sum of a plurality of data which are downloaded from the server and stored locally in advance according to the data requests of the plurality of terminals; the number of transmission channels is the number of idle channels.
And S3, in the data transmission time slot, waking up the corresponding terminals in sequence according to the time sequence of the data request of each terminal so as to transmit data to the corresponding terminals. It should be noted that the transmission slot also becomes a sleep time of the terminal, and the corresponding terminal is in a sleep state in the transmission slot and wakes up when the transmission slot arrives.
The receiving and transmitting processor in the gateway can inquire whether the data to be transmitted exists or not at regular time and inquire the validity of the data transmitting time slot, and as a possible implementation mode of the invention, the data transmitting time slot is calculated according to the following formula: t1 ═ S1/(V1 × N), where T1 is the data transmission slot, S1 is the sum of the data to be transmitted stored locally, V1 is the data transmission rate, and N is the number of transmission channels.
It can be understood that the faster the gateway transmission rate, the greater the number of transmission channels included in the gateway, and the shorter the data processing time.
The example of two terminals requesting data in fig. 3 is taken as an example for illustration. And awakening the corresponding terminals in sequence according to the time sequence of the data request of each terminal so as to send data to the corresponding terminals. For example, the terminal 1 and the terminal 2, the time sequence of the terminal 1 is arranged before the terminal 2, in the sending time slot of the terminal 1, when the time is reached, the information processor immediately sends the time to the wireless chip, selects a corresponding channel to transmit data, transmits the data corresponding to the terminal 1 downloaded to the local gateway in advance to the terminal 1, deletes the data corresponding to the terminal 1 from the memory of the gateway after the data corresponding to the terminal 1 is successfully transmitted, and reduces the sum of the data to be processed in the transmission process. Similarly, in the transmission timeslot of the terminal 2, when the time is reached, the information processor immediately sends the time to the wireless chip, selects the corresponding channel for data transmission, and transmits the data corresponding to the terminal 2 downloaded to the local gateway in advance to the terminal 2.
Therefore, the time for providing the whole channel to transmit information can be divided into a plurality of time slices (time slots for short) by using the principle of time division multiplexing, for example, the interaction is divided into two interval stages, the time slots are distributed to each signal source for use, each signal monopolizes the channel in the time slot of the signal source to transmit data, and the effective sequential transmission of the data is ensured.
In addition, because the data request is initiated in advance, the data processing chip is requested to feed back the server for remaining time, and meanwhile, the time interval between the data request and the data transmission can serve other terminal requests. The maintenance of the information list creates the memory capacity of the data request, and the data transmission can be carried out immediately at the moment the data needs to be sent, without considering the delay of the system or the network.
According to one embodiment of the invention, in the current data transmission time slot, if the data request of the terminal is continuously received, the corresponding data is downloaded from the server to the local according to the data request continuously received by the terminal while the data is transmitted to the corresponding terminal, and the next data transmission time slot is calculated according to the sum of the data to be transmitted, the data transmission rate and the number of the transmission channels which are locally stored, so as to update the current data transmission time slot.
That is, in the current data transmission time slot, if there is still a terminal to transmit a data request, the wireless chip still receives the data request of the terminal and transmits the request of the terminal to the receiving and transmitting server, the receiving and transmitting processor performs information processing interaction with the information processing module, and the information processor reports a terminal list mounted on the gateway, where the list includes various parameters such as IDs, electric quantities, heartbeat intervals, and the like of all terminals. And downloading information to be transmitted to a gateway local (memory) from the cloud server in advance through a network according to the ID of each terminal, calculating the next data transmission time slot according to the latest locally stored sum of data to be transmitted, the data transmission rate and the number of transmission channels, and updating the current data transmission time slot. And when the time is up, the information processor immediately sends the information to the wireless chip, selects a corresponding channel for data transmission, and transmits the data corresponding to the terminal downloaded to the local gateway in advance to the terminal.
Still taking fig. 3 as an example, when a data request of a terminal, for example, the terminal 3 (not shown in the figure), is continuously received in a sending timeslot corresponding to the terminal 1, data corresponding to the terminal 3 is downloaded from the cloud server to the local gateway, a next data sending timeslot T1 'is calculated according to a locally stored sum of data to be sent (data of the terminal 1, data of the terminal 2, and data of the terminal 3), a data sending rate, and the number of sending channels, and the data sending timeslot T1 of the terminal 1, the terminal 2, and the terminal 3 is updated to T1'.
Similarly, when a data request of a terminal, for example, the terminal 3 (not shown in the figure), is continuously received in the sending timeslot corresponding to the terminal 2, the data transmission of the terminal 1 is still the original sending timeslot T1, the data corresponding to the terminal 3 is downloaded from the cloud server to the local gateway, the next data sending timeslot T1 'is calculated according to the sum of the data to be sent (the data of the terminal 2 and the data of the terminal 3), the data sending rate and the number of sending channels, and the data sending timeslots T1 of the terminal 2 and the terminal 3 are updated to be T1'.
It should be noted that if a data request from a terminal, for example, terminal 4, is still received, the update method of the transmission time slot is the same as the update method of the above-mentioned continuous reception terminal 3. After the data corresponding to the terminal is successfully transmitted, the data corresponding to the terminal stored in the memory of the local gateway is deleted, so that the sum of the data to be sent stored in the local gateway is reduced, and the data request of the terminal can be continuously received.
In order to verify whether the terminal data is successfully transmitted or not, according to an embodiment of the present invention, after the data is sent to any terminal, it is further determined whether to receive the confirmation information fed back by the terminal, wherein if the confirmation information fed back by the terminal is not received, the data sent to the terminal is put into a retransmission module, and a delay time slot is calculated according to the data sending time slot, the total amount of retransmission data already stored in the retransmission module, the data sent to the terminal, and the data sending rate of the retransmission module, so that the terminal receives the data when the delay time slot arrives.
Specifically, as shown in fig. 3, taking the terminal 1 as an example, after the transceiver processor transmits data to the terminal 1, the transceiver processor is further configured to receive feedback information of the terminal 1, where the feedback information includes whether the request data is successfully received. If the ACK is received, which indicates that the data transmission is successfully completed, the data corresponding to the terminal 1 is deleted from the queue (i.e., the queue of the data to be transmitted). If the ACK is not received, the transceiving processor puts the data of the terminal 1 into the retransmission module, calculates a delay time slot T2 (the unit is ms, the unit of T1 is also ms) according to the data transmission time slot T1, the total amount of the retransmission data stored in the retransmission module, the data transmitted to the terminal and the data transmission rate of the retransmission module, and the receiving and transmitting processor comprises a timer which is responsible for counting down the delay time slot T2 and transmits the data once again when the count down is zero (the data transmission at this time adopts a faster modulation speed, and the channel is different from the general data transmission without interfering with each other). Thus, each identical data is transmitted at most twice, and the second data does not need to judge ACK. The terminal 1 manages whether the data transmission is successful or not, and if the data transmission is failed, the data request is carried out at the next information interaction time point.
The method for calculating the delay time slot T2 requires that the retransmission module reports how long it takes to transmit the data stored in the retransmission module when receiving the retransmission data. However, if there is no data to be transmitted in the retransmission module, the delay time slot T2 may be a fixed threshold or delayed by a predetermined time from the transmission time slot T1. When there is no data to be transmitted in the reissue module, the delay time slot T2 can be calculated according to the data amount of the data that the current terminal needs to transmit.
As a possible implementation of the present invention, the delay time slot is calculated according to the following formula: t2 ═ T1+ (S2+ S3)/V2, where T1 is a data transmission slot, T2 is a delay slot, S2 is the total amount of complementary data already stored in the complementary module, S3 is data transmitted to the terminal, and V2 is the data transmission rate of the complementary module.
In order to realize the interaction relationship among the modules in the gateway, as a specific example, as shown in fig. 4, the whole gateway is divided into three threads, one thread is responsible for information interaction with the cloud server, one thread is responsible for managing information transceiving alignment, and the other thread is responsible for driving the wireless chip to perform data transceiving. The chip driver (wireless chip) is switched to a receiving mode for receiving a data request sent by a terminal, when the information is determined to be received, the data request of the terminal is transmitted to a receiving and sending processor, the receiving and sending processor and the information processor are interacted, the information processor downloads data corresponding to the terminal from a cloud server and sends the data to the receiving and sending processor, the receiving and sending processor stores the received information and calculates a sending time slot (information list updating time), when the information list time counts down and returns to zero, a thread is blocked in sleep (namely the sending time slot is zero), the terminal data is sent to the wireless chip and sent to the terminal through the wireless chip, the feedback data of the terminal is received through the wireless chip, whether ACK is received or not is judged within a certain time, if yes, the data of the terminal is clear in a receiving and sending information list, if the ACK is not received, the transceiving processor transfers the data to a complementary sending module (a complementary sending module communication module), and deletes the terminal data in the receiving and sending information list after the complementary sending is completed.
In conclusion, the data interaction method of the invention has the advantages that the time slot is allocated by the data request feedback, the data is immediately issued after being prepared, the intermediate waiting time can provide the data request of other terminals, the data is requested to be locally stored to the server in advance, the feedback time is immediately sent when the data arrives, the data is managed by adopting the channel and the time, the collision can be effectively avoided, the data processing chip is only responsible for the data requesting and the data list management, and the data time accuracy can be effectively ensured.
In summary, according to the data interaction method of the embodiment of the present invention, a data request of each terminal is received, corresponding data is downloaded from a server according to the data request of each terminal, the data downloaded from the server is stored locally, a data transmission time slot is calculated according to a locally stored sum of data to be transmitted, a data transmission rate, and a number of transmission channels, and in the data transmission time slot, the corresponding terminals are sequentially waken according to a time sequence of the data request of each terminal to transmit data to the corresponding terminals. Therefore, the method can feed back the requests of a plurality of terminals to allocate the time slots, manage different channels, reasonably allocate data issuing time and ensure effective sequential transmission of the data.
Corresponding to the above embodiment, the present invention further provides a computer readable storage medium, on which a data interaction program is stored, and the data interaction program, when executed by a processor, implements the data interaction method as described above.
The computer-readable storage medium of the embodiment of the invention can distribute time slots for requesting feedback of a plurality of terminals and manage different channels by executing the data interaction method, so as to reasonably distribute data issuing time and ensure effective sequential transmission of data.
Fig. 5 is a block schematic diagram of a gateway according to an embodiment of the present invention.
As shown in fig. 5, the gateway 100 according to the embodiment of the present invention includes: comprises a memory 110, a processor 120 and a data interaction program stored on the memory 110 and operable on the processor 120, wherein the processor 120 implements the data interaction method as described above when executing the data interaction program.
The gateway of the embodiment of the invention can feed back the requests of a plurality of terminals to allocate time slots and manage different channels by executing the data interaction method, so as to reasonably allocate data issuing time and ensure effective sequential transmission of data.
FIG. 6 is a block diagram of a data interaction device according to an embodiment of the present invention.
As shown in fig. 6, the data interaction apparatus 200 according to an embodiment of the present invention may include: a transceiving module 210, an information processing module 220, and a transceiving processing module 230.
The transceiver module 210 is configured to receive a data request of each terminal. The information processing module 220 is used for downloading corresponding data from the server according to the data request of each terminal, and storing the data downloaded from the server to the local. The transceiving processing module 230 is configured to calculate a data transmission time slot according to a locally stored sum of data to be transmitted, a data transmission rate, and the number of transmission channels, and sequentially wake up corresponding terminals according to a time sequence of a data request of each terminal in the data transmission time slot, so as to transmit data to the corresponding terminals through the transceiving module 210.
It should be noted that, for details that are not disclosed in the data interaction apparatus according to the embodiment of the present invention, please refer to details that are disclosed in the data interaction method according to the embodiment of the present invention, and detailed descriptions thereof are omitted here.
FIG. 2 is a schematic diagram of a data interaction system according to an embodiment of the present invention.
As shown in fig. 2, the data interaction system according to the embodiment of the present invention may include a gateway and a plurality of terminals.
The terminal is used for sending a data request to the gateway and receiving data sent by the gateway. The gateway is used for receiving the data request of each terminal, downloading corresponding data from the server according to the data request of each terminal, storing the data downloaded from the server to the local, calculating a data sending time slot according to the sum of the data to be sent, the data sending rate and the number of sending channels, which are stored locally, and awakening the corresponding terminals in sequence according to the time sequence of the data request of each terminal in the data sending time slot so as to send the data to the corresponding terminals.
According to an embodiment of the present invention, the gateway is further configured to, during the current data transmission time slot, if a data request of the terminal is continuously received, download corresponding data from the server to the local according to the data request continuously received from the terminal while transmitting the data to the corresponding terminal, and calculate a next data transmission time slot according to a locally stored sum of data to be transmitted, the data transmission rate, and the number of transmission channels, so as to update the current data transmission time slot.
According to an embodiment of the present invention, the gateway is further configured to determine whether to receive the acknowledgement information fed back by the terminal after sending data to any one terminal, wherein if the acknowledgement information fed back by the terminal is not received, the data sent to the terminal is put into the retransmission module, and the delay time slot is calculated according to the data sending time slot, the total amount of the retransmission data already stored in the retransmission module, the data sent to the terminal, and the data sending rate of the retransmission module, so that the terminal receives the data when the delay time slot arrives.
It should be noted that, for details that are not disclosed in the data interaction system according to the embodiment of the present invention, please refer to details that are disclosed in the data interaction method according to the embodiment of the present invention, and details are not repeated herein.
According to the data interaction system provided by the embodiment of the invention, the terminals send data requests to the gateway and receive data issued by the gateway, the gateway receives the data requests of each terminal, downloads corresponding data from the server according to the data requests of each terminal, stores the data downloaded from the server to the local, calculates data sending time slots according to the sum of data to be sent, the data sending rate and the number of sending channels which are stored locally, and awakens the corresponding terminals in sequence according to the time sequence of the data requests of each terminal in the data sending time slots so as to send the data to the corresponding terminals. Therefore, the system can feed back the requests of a plurality of terminals to allocate time slots and manage different channels so as to reasonably allocate data issuing time and ensure effective sequential transmission of data.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (11)

1. A data interaction method is characterized by comprising the following steps:
receiving a data request of each terminal, downloading corresponding data from a server according to the data request of each terminal, and storing the data downloaded from the server to a local place;
calculating a data sending time slot according to the sum of locally stored data to be sent, the data sending rate and the number of sending channels;
and in the data sending time slot, awakening the corresponding terminals in sequence according to the time sequence of the data request of each terminal so as to send data to the corresponding terminals.
2. The data interaction method of claim 1, wherein in a current data transmission time slot, if a data request of a terminal is continuously received, while transmitting data to a corresponding terminal, downloading corresponding data from the server to a local according to the data request of the continuously received terminal, and calculating a next data transmission time slot according to a locally stored sum of data to be transmitted, a data transmission rate, and the number of transmission channels, so as to update the current data transmission time slot.
3. The data interaction method according to claim 1 or 2, wherein after sending data to any one terminal, it is further determined whether to receive the acknowledgement information fed back by the terminal, wherein,
if the confirmation information fed back by the terminal is not received, the data sent to the terminal is put into a complementary sending module, and a delay time slot is calculated according to the data sending time slot, the total quantity of the complementary sending data stored in the complementary sending module, the data sent to the terminal and the data sending rate of the complementary sending module, so that the terminal receives the data when the delay time slot arrives.
4. The data interaction method of claim 1, wherein the data transmission time slot is calculated according to the following formula:
t1 ═ S1/(V1 × N), where T1 is the data transmission slot, S1 is the sum of the data to be transmitted stored locally, V1 is the data transmission rate, and N is the number of transmission channels.
5. The data interaction method of claim 3, wherein the delay time slot is calculated according to the following formula:
t2 ═ T1+ (S2+ S3)/V2, where T1 is a data transmission slot, T2 is a delay slot, S2 is the total amount of complementary data already stored in the complementary module, S3 is data transmitted to the terminal, and V2 is the data transmission rate of the complementary module.
6. A computer-readable storage medium, on which a data interaction program is stored, the data interaction program, when executed by a processor, implementing the data interaction method of any one of claims 1-5.
7. A gateway, comprising a memory, a processor, and a data interaction program stored on the memory and executable on the processor, wherein the processor implements the data interaction method as claimed in any one of claims 1 to 5 when executing the data interaction program.
8. A data interaction device, comprising:
the receiving and sending module is used for receiving the data request of each terminal;
the information processing module is used for downloading corresponding data from a server according to the data request of each terminal and storing the data downloaded from the server to the local;
and the transceiving processing module is used for calculating a data sending time slot according to the locally stored sum of the data to be sent, the data sending rate and the number of sending channels, and sequentially waking up the corresponding terminals according to the time sequence of the data request of each terminal in the data sending time slot so as to send data to the corresponding terminals through the transceiving module.
9. A data interaction system is characterized by comprising a gateway and a plurality of terminals, wherein,
the terminal is used for sending a data request to the gateway and receiving data sent by the gateway;
the gateway is used for receiving the data request of each terminal, downloading corresponding data from a server according to the data request of each terminal, storing the data downloaded from the server to the local, calculating a data sending time slot according to the sum of the data to be sent, the data sending rate and the number of sending channels, which are stored locally, and sequentially waking up the corresponding terminals according to the time sequence of the data request of each terminal in the data sending time slot so as to send the data to the corresponding terminals.
10. The data interaction system of claim 9, wherein the gateway is further configured to, during a current data transmission time slot, if a data request from a terminal continues to be received, while transmitting data to the corresponding terminal, download corresponding data from the server to the local according to the data request from the terminal that continues to be received, and calculate a next data transmission time slot according to a locally stored sum of data to be transmitted, a data transmission rate, and the number of transmission channels, so as to update the current data transmission time slot.
11. The data interaction system of claim 9 or 10, wherein the gateway is further configured to determine whether to receive the acknowledgement information fed back by any one of the terminals after sending data to the terminal, wherein,
if the confirmation information fed back by the terminal is not received, the data sent to the terminal is put into a complementary sending module, and a delay time slot is calculated according to the data sending time slot, the total quantity of the complementary sending data stored in the complementary sending module, the data sent to the terminal and the data sending rate of the complementary sending module, so that the terminal receives the data when the delay time slot arrives.
CN202010598897.8A 2020-06-28 2020-06-28 Data interaction method, gateway, data interaction device and data interaction system Pending CN113853011A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010598897.8A CN113853011A (en) 2020-06-28 2020-06-28 Data interaction method, gateway, data interaction device and data interaction system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010598897.8A CN113853011A (en) 2020-06-28 2020-06-28 Data interaction method, gateway, data interaction device and data interaction system

Publications (1)

Publication Number Publication Date
CN113853011A true CN113853011A (en) 2021-12-28

Family

ID=78972591

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010598897.8A Pending CN113853011A (en) 2020-06-28 2020-06-28 Data interaction method, gateway, data interaction device and data interaction system

Country Status (1)

Country Link
CN (1) CN113853011A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114786246A (en) * 2022-02-25 2022-07-22 京东方数字科技有限公司 Communication control method, communication system, electronic device, and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101764746A (en) * 2009-12-17 2010-06-30 中国电力科学研究院 Method and device for sending data
US20120113826A1 (en) * 2010-11-08 2012-05-10 Heng Zhou Idle Interval Generation in Telecommunication Systems
CN106535286A (en) * 2016-12-16 2017-03-22 浙江大学 TDMA-based sea-surface wireless communication networking method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101764746A (en) * 2009-12-17 2010-06-30 中国电力科学研究院 Method and device for sending data
US20120113826A1 (en) * 2010-11-08 2012-05-10 Heng Zhou Idle Interval Generation in Telecommunication Systems
CN106535286A (en) * 2016-12-16 2017-03-22 浙江大学 TDMA-based sea-surface wireless communication networking method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
田雨;宋晓鸥;: "协作重传的动态TDMA时隙分配算法", 电视技术, no. 23, 2 December 2014 (2014-12-02) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114786246A (en) * 2022-02-25 2022-07-22 京东方数字科技有限公司 Communication control method, communication system, electronic device, and readable storage medium

Similar Documents

Publication Publication Date Title
US10334530B2 (en) Access and power management for centralized networks
KR102218619B1 (en) Method and apparatus for flexible transmission slot allocation in wireless lan system
KR101761962B1 (en) Method and apparatus for performing communication in a wireless communication network
US8953547B2 (en) Power-saving TDMA MAC for wireless body area networks
CN109831753B (en) Electronic price tag, gateway and electronic price tag system
US11889415B2 (en) Method and apparatus for wireless reception
US20140269474A1 (en) Power saving for low latency deterministic networks in wireless personal area networks
US9119185B2 (en) Power-saving hub messages in wireless body area networks
CN105321094A (en) Device selection
US20140292537A1 (en) Emergency handling in a body area network
US20060274713A1 (en) Methods of channel access in a meshed network
US9136973B2 (en) Flexible reservation-based MAC for wireless body area networks
WO2013035058A1 (en) Mac enhancement to support multi-periodic gts allocation for personal area network (pan) systems
US20110289175A1 (en) Method for reserving resources on a centralized network
CN113853011A (en) Data interaction method, gateway, data interaction device and data interaction system
WO2022082530A1 (en) Communication method and apparatus
US8855693B2 (en) Method and apparatus for controlling wireless devices
CN111586876B (en) Data scheduling method and device for narrowband Internet of things
CN112929251A (en) CAN-based slave station data refreshing method, device and system
CN104053218B (en) Wireless communications method, wireless device and wireless coordinator
KR20140081321A (en) Data comunication method in non-beacon wireless network and non-beacon wireless network comunication system
CN114124324B (en) Method and device for cooperative communication of multiple access points
CN105744638A (en) Scheduling method and system, access point and station
WO2022267864A1 (en) Phr transmission method, base station, terminal, electronic device and storage medium
EP4376488A1 (en) Method and apparatus for accessing cell served by base station, storage medium, and electronic apparatus

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