A control method and system for a recycling machine with built-in dual WiFi
Through dual WiFi control methods, the channel and resource allocation are optimized, the interference problem in long-distance transmission is solved, the network throughput and stability is improved, and the anti-interference ability is enhanced.
Patent Information
- Application Number
- CN202210332042.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-31
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-03-31
AI Technical Summary
During long-distance transmission, WIFI signals are susceptible to interference, resulting in communication interruptions and network performance degradation, especially in complex wireless environments, and prior art is difficult to effectively manage channel resources and reduce interference.
The dual WiFi control method is adopted to select high-priority channels through channel priority sorting and resource allocation algorithms, and resource allocation is allocated according to the priority of STA and channel usage frequency. Combined with interference modeling and scheduling algorithms, network resource utilization and anti-interference performance are optimized.
It improves the throughput and stability of wireless networks, enhances the anti-interference ability of long-distance WiFi networks, and improves network performance.
Smart Images

Figure CN114828279B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer communication, and particularly relates to a control method and system for recycling a built-in dual-WiFi in a machine. Background Art
[0002] Among numerous wireless communication technologies, the most popular one is the WIFI communication technology. The essence of the WIFI technology is the conversion between digital signals and radio signals. The sender and the receiver respectively implement the operations of converting and restoring data content. This transmission is basically carried out by a wireless network card. When data is transmitted from far to near to a device, the wireless network card can display the received data link network information in the receptor network. Regardless of the form of the data at the bottom layer during the transmission process, the transmission rate can be increased in this way.
[0003] For the transmission of wireless networks, it is generally divided into two roles: AP (Access Point, wireless access node, usually a wireless router, a smart phone as a wireless hotspot, etc.) and client. In the WIFI era of pursuing higher throughput, higher spectral efficiency, and better link stability, several scheduling access methods are more advantageous than the competition-based access method. However, for long-distance transmission, unexpected situations may occur when transmitting signals, such as lightning, interference from adjacent frequencies, etc. The signals in the air will be interfered, resulting in the inability to transmit complete data, and the communication will be interrupted or incorrect information will appear, thereby reducing the network performance. Summary of the Invention
[0004] In view of this, the present invention provides a control method and system for recycling a built-in dual-WiFi in a machine. The AP sorts the channels according to the usage frequency or load of the channels and selects the channel with the highest priority for use. The algorithm has low complexity and fast convergence speed. The channel-related information needs to be collected by the STA side and then fed back to the AP. The following specific technical solutions are adopted to achieve this.
[0005] In a first aspect, the present invention provides a control method for recycling a built-in dual-WiFi in a machine, including the following steps:
[0006] Initialize the main controller in the machine. When powering on, configure the external clock source parameters of the main controller, initialize the IO ports and serial ports, and write the preset sensor event and monitoring task event flags into the terminal vector program through timer initialization;
[0007] Send AT commands through the serial port to initialize the WIFI module. The initialization includes setting the WIFI mode, station name password, and enabling data transparent transmission, and simulating the initialization of the IC and sending the relevant device startup protocol. Among them, the AT command set is sent from the terminal device or data terminal device to the terminal adapter or data terminal device;
[0008] Create each sensor task and monitoring task. The monitoring task is used to monitor whether the sensor has completed the measurement work in one cycle. If the sensor task is not completed, it will be reflected in the return value of the monitoring task.
[0009] When all sensor tasks are completed, a specified communication protocol will be sent to the WIFI and Bluetooth modules in the interrupt, and the timer clock will be suspended to ensure that the monitoring task can be restarted again. When the transmission is completed, a semaphore will be cleared, and the low-power mode will be entered to save power and the RTC real-time clock interrupt will be enabled.
[0010] As a further improvement of the above technical solution, when all sensor tasks are completed, a specified communication protocol will be sent to the WIFI and Bluetooth modules in the interrupt, including:
[0011] The AP sorts the channels according to the usage frequency or load of the channels, selects the channel with the highest priority to use, and the channel-related information needs to be collected by the STA side and fed back to the AP.
[0012] After initializing and enabling the AP, each AP randomly selects a channel, and the access point AP will start the channel switching timer. When the STA has no data transmission, it will actively monitor and scan the surrounding spectrum environment.
[0013] The STA feeds back the results of the monitoring and scanning to the associated AP. When the AP is idle, it will passively monitor the surrounding frequency offset environment to obtain the surrounding spectrum information. The AP will use the information fed back by the STA and the information it perceives as the data support for subsequent channel sorting.
[0014] Sort the channels according to the channel priority, sort according to the channel usage frequency and according to the channel load according to different optimization objectives. When the channel switching timer expires, the access point AP selects the channel with the highest priority and switches to that channel.
[0015] As a further improvement of the above technical solution, when allocating RU resources to the STA with the highest current priority while ensuring that the STA with guaranteed allocated resources obtains basic resources according to the priority of the STA, including:
[0016] According to the number of scheduled STAs N STA and the priority of the STA, divide the set R of STAs to be allocated resources into two sets according to the priority. The first set is R1, where the STA are the N1 STAs with the highest priority, and the remaining N STA -N1 STAs are the set R2;
[0017] Divide the resources W1 for the STA with the highest priority in the RU resource set W, and the division condition is that the remaining RU resources W2 available for division after division = W - W1 ≥ (N STA - N1) × 26 - tone RU;
[0018] Update the set R = R2, W = W2, and repeat the above steps until W2 = W - W1 ≥ (N STA - N1) × 26 - tone RU is equal or all scheduled STAs obtain resources.
[0019] As a further improvement of the above technical solution, the antenna parameters of the built - in WiFi module, the uplink - downlink service ratio, the service arrival intensity, the scene parameters of the STA position and distance are passed into the STA scheduling and the STAs scheduled in each period are determined;
[0020] According to the log - normal shadow fading model, antenna parameters and scene parameters, calculate the useful signal and interference signal received by each STA to obtain the SINR of each STA, then according to the SINR and MCS look - up table, obtain the corresponding MCS, and then obtain the corresponding transmission rate according to the MCS rate table for throughput statistics;
[0021] Generate the traffic volume requested by each STA in each period according to the Poisson arrival model. The data volume not transmitted will be retained as the data volume to be transmitted in the next period, and the uplink - downlink traffic volume requests will be adjusted according to the uplink - downlink traffic volume ratio;
[0022] According to the known overlapping area STAs and the allocated RU resource results, adjust the RUs used by the overlapping area STAs with the same RU and re - allocate the RUs, and calculate the throughput of each AP according to the RU resource allocation results and the STAMCS information fed back by the SINR module.
[0023] As a further improvement of the above technical solution, according to the known overlapping area STAs and the allocated RU resource results, adjust the RUs used by the overlapping area STAs with the same RU and re - allocate the RUs, including:
[0024] Compare the RU results of the STAs in the overlapping area. When it is found that multiple overlapping area STAs under different APs are allocated the same RU resources, randomly select one of the APs and exchange the RUs of the STAs generating the overlap with the RUs of the non - overlapping area STAs. Priority exchange is performed when the RU resource specifications of both parties are the same.
[0025] As a further improvement of the above technical solution, according to the log - normal shadow fading model, antenna parameters and scene parameters, calculate the useful signal and interference signal received by each STA to obtain the SINR of each STA, including:
[0026] Describe the interference or overlap degree between channels, and preset the channel interference factor f ij , the expression is where c i represents the channel allocated to tower column i, and c m is the maximum number of overlapping channels. In the 2.4 GHz band, c m = 5. After setting the channel interference factor, the interference H j of the AP using channel c i on the STAs associated with the AP using channel c ij is quantified as where P tj is the transmission power of the AP using channel C j , G t is the transmitting antenna gain, G r is the receiving antenna gain, and P L is the path loss;
[0027] If the selection probabilities of each channel are the same before optimization and the channel selection between each tower column is relatively independent, list all the cases where the STAs are affected by far-field interference when different tower columns are in use, and obtain the interference magnitude that the STAs under the tower column are affected by when using a certain channel.
[0028] As a further improvement of the above technical solution, list all the cases where the STAs are affected by far-field interference when different tower columns are in use, and obtain the interference magnitude that the STAs under the tower column are affected by when using a certain channel, including:
[0029] Take the expectation of all the interference cases that a tower column is affected by on a certain channel as the interference prediction value when the tower column uses this channel, and obtain the channel interference prediction matrix W N×F , where W ij is the interference prediction value when tower column i uses channel j;
[0030] Preset that there are N tower columns and a total of F channels are available for allocation. To determine the interference relationship between tower column i and tower column j, it is necessary to define the interference topology matrix G N×N , where g ij = n, and n is the number of STAs associated with the AP on tower column i in the overlapping area between tower column i and tower column j;
[0031] Set the channel allocation matrix A N×F , where Then set the objective function S. S represents the interference that all tower columns are affected by under the current channel allocation, and its expression is S = G × A * P tj W. Let K = G × A. K reflects the interference structure generated by the tower column on the overlapping area STAs on a certain channel, and the interference structure is used to consider the quantity factors of the tower column and the interfered STAs.
[0032] As a further improvement of the above technical solution, simulating the device startup protocol related to the initialization and transmission of the analog IC, including:
[0033] The MCS value of each STA on different RUs, that is, the transmission rate of each STA on different RUs. When resources are limited and the optimization goal is to maximize throughput, the resource allocation algorithm allocates resources to STAs with high transmission rates to achieve the maximum throughput. Its expression is m' = argmax{v m}, where v m is the transmission rate corresponding to the m-th STA on different RUs;
[0034] Determine the priority of each STA through the proportional fairness factor. When allocating time resources, give priority to STAs with high priority. Determine the STA priority by introducing the proportional fairness factor f(t), and its expression is where is the transmission rate of the m-th STA in the current scheduling period, and R m (t) is the average data rate received by the m-th STA before time t;
[0035] Determine the STA with the highest priority according to the proportional fairness factor f(t), and its expression is m' = argmax{f(t)}. The expression of the average data rate is where T c is the time window for adopting the statistical average rate.
[0036] As a further improvement of the above technical solution, through timer initialization, write the preset sensor event and monitoring task event flag bits into the terminal vector program, including:
[0037] According to the transceiver, when receiving data, it will extract the data packet from the protocol stack and first perform CRC check. The CRC data of the last two bytes at the end of the data packet is the check code;
[0038] After unpacking the data, perform an exclusive OR calculation operation on the data of the N-th byte in the packet and each subsequent byte of data, and then add 1. Use the calculated data of the (N + 1)-th byte as the data packet length of the communication protocol, and distinguish the types of communication protocols according to the different lengths;
[0039] Use the calculated (N + 2)-th data group as the starting data of the protocol content, and use the (2N + 2)-th data group as the tail data of the protocol content for protocol parsing.
[0040] In the second aspect, the present invention also provides a control system for a recycling machine with built-in dual Wi-Fi, including:
[0041] The configuration unit is used to initialize the main controller in the machine, configure the external clock source parameters of the main controller when powered on, initialize the IO ports and serial ports, and write the preset sensor event and monitoring task event flag bits into the terminal vector program through timer initialization;
[0042] The connection unit is used to initialize the WIFI module by sending AT commands through the serial port. The initialization includes setting the WIFI mode, station name password, and enabling data transparent transmission, and initializing the simulation IC and sending the relevant device startup protocol. Among them, the AT command set is sent from the terminal device or data terminal device to the terminal adapter or data terminal device;
[0043] The creation unit is used to create each sensor task and monitoring task. The monitoring task is used to monitor whether the sensor has completed the measurement work in a round of cycle. If the sensor task is not completed, it will be reflected in the return value of the monitoring task;
[0044] The processing unit is used to send the specified communication protocol to the WIFI and Bluetooth modules in the interrupt when all sensor tasks are completed, and the timer clock will be suspended to ensure that the monitoring task can be restarted again. When the sending is completed, the semaphore will be cleared, enter the low-power mode to save power and enable the RTC real-time clock interrupt.
[0045] The present invention provides a control method and system for recycling the built-in dual WIFI in the machine. By initializing the main controller in the machine, configuring the external clock source parameters of the main controller when powered on, initializing the IO ports and serial ports, writing the preset sensor event and monitoring task event flag bits into the terminal vector program through timer initialization, initializing the WIFI module by sending AT commands through the serial port. The initialization includes setting the WIFI mode, station name password, and enabling data transparent transmission, initializing the simulation IC and sending the relevant device startup protocol, creating each sensor task and monitoring task. The monitoring task is used to monitor whether the sensor has completed the measurement work in a round of cycle. If the sensor task is not completed, it will be reflected in the return value of the monitoring task. When all sensor tasks are completed, the specified communication protocol will be sent to the WIFI and Bluetooth modules in the interrupt, and the timer clock will be suspended to ensure that the monitoring task can be restarted again. When the sending is completed, the semaphore will be cleared, enter the low-power mode to save power and enable the RTC real-time clock interrupt. The AP sorts the channels according to the usage frequency or load of the channels, selects the channel with the highest priority to use. This algorithm has low complexity and fast convergence speed. The channel-related information needs to be collected by the STA side and then fed back to the AP. Through the monitoring of the overall network status of the supervised area network by the centralized controller, for the long-distance WIFI network application scenario, the corresponding resource allocation algorithm and anti-interference strategy are used to improve the resource utilization rate, anti-interference ability and throughput of the network, and improve the working performance of the wireless network. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention, and therefore should not be regarded as a limitation of the scope. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.
[0047] Figure 1 It is a flowchart of the control method for the built-in dual-WiFi of the recycling machine of the present invention;
[0048] Figure 2 It is a process diagram of the transmission communication protocol of the present invention;
[0049] Figure 3 It is a scheduling flowchart of the enhanced WiFi transmission of the present invention;
[0050] Figure 4 It is a flowchart of the communication encryption of the present invention;
[0051] Figure 5 It is a flowchart of the control system for the built-in dual-WiFi of the recycling machine of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0052] The embodiments of the present invention will be described in detail below. The examples of the embodiments are shown in the drawings, where the same or similar reference numerals indicate the same or similar elements or elements with the same or similar functions throughout. The embodiments described by referring to the drawings below are exemplary and are only used to explain the present invention and should not be construed as a limitation of the present invention.
[0053] It should be noted that when an element is referred to as being "fixed to" another element, it can be directly on the other element or there can also be an intermediate element. When an element is considered to be "connected" to another element, it can be directly connected to the other element or there may be an intermediate element at the same time. On the contrary, when an element is referred to as being "directly on" another element, there is no intermediate element. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are only for the purpose of illustration.
[0054] In the present invention, unless otherwise clearly specified and defined, terms such as "installation", "connection", "connection", "fixation", etc. shall be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or integrated; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two components or the interaction relationship between two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0055] Referring to Figure 1 , the present invention provides a control method for a recycling machine with built-in dual WiFi, including the following steps:
[0056] S10: Initialize the main controller in the machine. When powered on, configure the external clock source parameters of the main controller, initialize the IO ports and serial ports, and write the preset sensor event and monitoring task event flags into the terminal vector program through timer initialization;
[0057] S11: Send AT commands through the serial port to initialize the WIFI module. The initialization includes setting the WIFI mode, station name password, and enabling data transparent transmission, and simulating the initialization of the IC and sending the relevant device startup protocol. Among them, the AT command set is sent from the terminal device or data terminal device to the terminal adapter or data terminal device;
[0058] S12: Create each sensor task and monitoring task. The monitoring task is used to monitor whether the sensor has completed the measurement work in one round of cycle. If the sensor task is not completed, it will be reflected in the return value from the monitoring task;
[0059] S13: When all sensor tasks are completed, send the specified communication protocol to the WIFI and Bluetooth modules in the interrupt, and the timer clock will be suspended to ensure that the monitoring task can be restarted again. When the sending is completed, the semaphore will be cleared, enter the low-power mode to save power, and enable the RTC real-time clock interrupt.
[0060] In this embodiment, when ensuring that the STA obtaining the basic resources allocates the RU resources according to the priority of the STA, the RU resources are allocated to the STA with the highest current priority. According to the number N of scheduled STAs STA and the priority of the STA, the set R of STAs to be allocated resources is divided into two sets according to the priority. The first set is R1, where the STA is the N1 STAs with the highest priority, and the remaining N STA -N1 STAs are the set R2; divide the resources W1 for the STA with the highest priority in the RU resource set W, and the division condition is that the remaining RU resources W2 available for division after division = W - W1 ≥ (N STA-(N1)×26-tone RU; Update the set R = R2, W = W2, and repeat the above steps until W2 = W - W1 ≥ (N STA -N1)×26-tone RU is equal or all scheduled STAs obtain resources.
[0061] It should be noted that the MCS value of each STA on different RUs is the transmission rate of each STA on different RUs. When resources are limited and the optimization goal is to maximize throughput, the resource allocation algorithm allocates resources to STAs with high transmission rates to maximize throughput, and its expression is m' = argmax{v m}, where v m is the transmission rate corresponding to the m-th STA on different RUs; the priority of each STA is determined by the proportional fairness factor, and when allocating time resources, STAs with high priority are preferentially satisfied. The proportional fairness factor f(t) is introduced to determine the STA priority, and its expression is where is the transmission rate of the m-th STA in the current scheduling period, and R m (t) is the average data rate received by the m-th STA before time t; the STA with the highest priority is determined according to the proportional fairness factor f(t), and its expression is m' = argmax{f(t)}, and the expression of the average data rate is where, T c is the time window for using the statistical average rate.
[0062] It should be understood that by the collaborative management of the interface and the channel to improve network throughput, the network centralized server can directly search the channel load and regularly run and update the channel allocation. According to the defined link importance factor, i.e., the link load or the number of hops from the link to the network management, the links are sorted in descending order, and all links are divided into multiple interference-free link sets. The transmission time of each data frame is also divided into multiple time slots, corresponding to each group of interference-free links respectively. Only the links in the corresponding interference-free link set are scheduled in each time slot, improving the stability of network transmission.
[0063] Refer to Figure 2 , when all sensor tasks are completed, a specified communication protocol will be sent to the WIFI and Bluetooth modules in the interrupt, including:
[0064] S20: The AP sorts the channels according to the usage frequency or load of the channels, selects the channel with the highest priority to use, and the channel-related information needs to be collected by the STA side and fed back to the AP;
[0065] S21: After initializing and enabling the AP, each AP randomly selects a channel. The access point AP will start a channel switching timer. When the STA has no data transmission, it actively monitors and scans the surrounding spectrum environment;
[0066] S22: The STA feeds back the results of the monitoring and scanning to the associated AP. When the AP is idle, it performs passive interference monitoring on the surrounding frequency offset environment to obtain the surrounding spectrum information. The AP uses the information fed back by the STA and the information it senses as the data support for subsequent channel sorting;
[0067] S23: Sort the channels according to the channel priority, sort according to the channel usage frequency and the channel load according to different optimization objectives. When the channel switching timer expires, the access point AP selects the channel with the highest priority and switches to that channel.
[0068] In this embodiment, it is flexibly selected according to the service between maximizing system throughput and user fairness. In the long-distance WiFi network scenario, the AC interacts with 4 APs on the same tower column, including the number of associated STAs below the AP, the RU resources used, the transmit power, the traffic volume of each STA, the interference situation, etc., so that the AC can perform global monitoring on the network status of the area. Several STAs are associated with each AP, and each STA will report its own traffic volume and measurement report to the AP, and the AP will report it to the AC. The AC combines these information with the scheduling algorithm to obtain the scheduling result and send it to the AP through a specific frame. The AP schedules each STA according to the scheduling result.
[0069] Refer to Figure 3 , and input the antenna parameters of the built-in WiFi module, the uplink and downlink traffic ratio, the traffic arrival intensity, and the scenario parameters of the STA position and distance into the STA scheduling to determine the STAs scheduled in each period;
[0070] S30: Calculate the useful signal and interference signal received by each STA according to the log-normal shadow fading model, antenna parameters and scenario parameters to obtain the SINR of each STA, then obtain the corresponding MCS according to the SINR and MCS look-up table, and then obtain the corresponding transmission rate according to the MCS rate table for throughput statistics;
[0071] S31: Generate the traffic volume requested by each STA in each period according to the Poisson arrival model. The data volume not transmitted will be retained as the data volume to be transmitted in the next period. The uplink and downlink traffic volume requests will be adjusted according to the uplink and downlink traffic volume ratio;
[0072] S32: According to the known overlapping area STAs and the allocated RU resource results, adjust the overlapping area STAs to use the same RU and re-allocate the RU, and calculate the throughput of each AP according to the RU resource allocation result and the STAMCS information fed back by the SINR module.
[0073] In this embodiment, the RU results of the STAs in the overlapping area are compared. When it is found that multiple STAs in the overlapping areas under different APs are assigned the same RU resources, one of the APs is randomly selected, and the RUs of the STAs with overlapping are exchanged with the RU resources of the STAs in the non-overlapping area. The exchange is preferentially performed when the RU resource specifications of both parties are the same.
[0074] It should be noted that according to the lognormal shadow fading model, antenna parameters, and scenario parameters, the useful signal and interference signal received by each STA are calculated to obtain the SINR of each STA, which describes the interference or overlapping degree between channels, and a preset channel interference factor f ij , and the expression is where c i represents the channel assigned to tower column i, c m is the maximum number of overlapping channels. In the 2.4 GHz band, c m = 5. After setting the channel interference factor, the interference H j of the AP using channel c i on the STAs associated with the AP using channel c ij is quantified as where P tj is the transmission power of the AP using channel C j , G t is the transmitting antenna gain, G r is the receiving antenna gain, P L is the path loss; if the probabilities of selecting each channel are the same before optimization and the channel selection between each tower column is relatively independent, all cases of the far-field interference received by the STAs when the tower columns use different channels are listed, and the interference magnitude received by the STAs under the tower column when using a certain channel is obtained.
[0075] It should be understood that all cases of the far-field interference received by the STAs when the tower columns use different channels are listed, and the interference magnitude received by the STAs under the tower column when using a certain channel is obtained. The expectation of all interference cases received by the tower column on a certain channel is calculated as the interference prediction value of the tower column when using this channel, and the channel interference prediction matrix W N×F is obtained, where W ij is the interference prediction value of tower column i when using channel j; it is preset that there are N tower columns and a total of F channels are available for allocation. To determine the interference relationship between tower column i and tower column j, an interference topology matrix G N×N needs to be defined, where g ij = n, and n is the number of STAs associated with the AP on tower column i in the overlapping area between tower column i and tower column j; a channel allocation matrix A N×F is set, where Then, set the objective function S. S represents the interference suffered by all tower columns under the current channel allocation, and its expression is S = G × A * P tj W. Let K = G × A. K reflects the interference structure generated by the tower column on the overlapping area STA on a certain channel. The interference structure is used to consider the quantity factors of the tower column and the interfered STA.
[0076] Refer to Figure 4 , and through timer initialization, write the preset sensor event and monitoring task event flag bits into the terminal vector program, including:
[0077] S40: When the transceiver parties receive data, they will extract the data packet from the protocol stack and first perform CRC check. The CRC data of the last two bytes at the end of the data packet is the check code;
[0078] S41: After unpacking the data, perform an exclusive OR calculation operation on the data of the Nth byte in the packet and the data of each subsequent byte, and then add 1. Use the calculated data of the (N + 1)th byte as the data packet length of the communication protocol, and distinguish the types of communication protocols according to the different lengths;
[0079] S42: Use the calculated (N + 2) data groups as the starting data of the protocol content, and use the (2N + 2)th data group as the tail data of the protocol content for protocol parsing.
[0080] In this embodiment, when the devices complete connection pairing with each other, the security and integrity of the data content during the transceiver process. For the secondary connection, in the way that the control end actively scans the broadcast packet, join the wireless local area network or perform re-pairing connection with the Bluetooth name that has been connected. When sending data, just run the above steps in reverse. When generating the data of the Nth byte, it is necessary to call the random number generation algorithm inside the system, and ensure that each generated random number is different from the previous one in logical judgment to achieve a simple dynamic encryption function and improve the security of network communication.
[0081] Refer to Figure 5 , the present invention also provides a control system for a recycling machine with built-in dual WiFi, including:
[0082] A configuration unit for initializing the main controller in the machine, configuring the external clock source parameters of the main controller when powered on, initializing the IO port and serial port, and writing the preset sensor event and monitoring task event flag bits into the terminal vector program through timer initialization;
[0083] A connection unit for initializing the WIFI module by sending AT commands through a serial port. The initialization includes setting the WIFI mode, station name and password, and enabling data transparent transmission, and simulating the initialization of the IC and sending the relevant device startup protocol. Among them, the AT command set is sent from a terminal device or a data terminal device to a terminal adapter or a data terminal device.
[0084] A creation unit for creating various sensor tasks and monitoring tasks. The monitoring task is used to monitor whether the sensor has completed the measurement work in a round of cycle. If the sensor task is not completed, it will be reflected in the return value of the monitoring task.
[0085] A processing unit for sending a specified communication protocol to the WIFI and Bluetooth modules in an interrupt when all sensor tasks are completed, and suspending the timer clock to ensure that the monitoring task can be restarted again. When the sending is completed, a semaphore will be cleared, entering the low-power mode to save power and enabling the RTC real-time clock interrupt.
[0086] In this embodiment, through the interference analysis and interference modeling of the long-distance WiFi network scenario, the interference situation in this network scenario is clarified by calculation. According to the interference analysis results, different optimization objectives can be used for priority sorting to achieve the maximum system throughput or user proportion fairness. Resource adjustment in the overlapping area for users in the adjacent AP overlapping area can avoid the situation where users in the overlapping area use the same resources and cannot perform data transmission. According to the network interference topology matrix and interference prediction matrix, the channel allocation when the far-field interference of the network is minimized is solved by linear programming. The AP sorts the channels according to the usage frequency or load of the channels, and selects the channel with the highest priority to use. The algorithm has low complexity and fast convergence speed. The channel-related information needs to be collected at the STA end and then fed back to the AP. Through the monitoring of the overall network status of the supervised area by the centralized controller, for the long-distance WiFi network application scenario, the corresponding resource allocation algorithm and interference reduction strategy are used to improve the resource utilization rate, anti-interference ability and throughput of the network, and improve the working performance of the wireless network.
[0087] In all the examples shown and described here, any specific value should be interpreted as merely exemplary and not as a limitation. Therefore, other examples of the exemplary embodiments may have different values.
[0088] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore,
[0089] Once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0090] The above-described embodiments merely represent several implementation manners of the present invention. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all fall within the protection scope of the present invention.
Claims
1. A control method for a recycling machine with built-in dual WiFi, characterized in that, It includes the following steps: Initialize the main controller in the machine. When powered on, configure the external clock source parameters of the main controller, initialize the IO ports and serial ports, and write the preset sensor event and monitoring task event flags into the terminal vector program through timer initialization; Send AT commands through the serial port to initialize the WIFI module. The initialization includes setting the WIFI mode, station name password, and enabling data transparent transmission, and initializing the simulation IC and sending the relevant device startup protocol. Among them, the AT command set is sent from the terminal device or data terminal device to the terminal adapter or data terminal device; Create each sensor task and monitoring task. The monitoring task is used to monitor whether the sensor has completed the measurement work in a round of cycle. If the sensor task is not completed, it will be reflected in the return value from the monitoring task; When all sensor tasks are completed, send the specified communication protocol to the WIFI and Bluetooth modules in the interrupt, and the timer clock will be suspended to ensure that the monitoring task can be restarted again. When the sending is completed, a semaphore will be cleared, enter the low-power mode to save power and enable the RTC real-time clock interrupt; When all sensor tasks are completed, send the specified communication protocol to the WIFI and Bluetooth modules in the interrupt, including: The AP sorts the channels according to the usage frequency or load of the channels, selects the channel with the highest priority to use, and the channel-related information needs to be collected by the STA side and fed back to the AP; After initializing and enabling the AP, each AP randomly selects a channel. The access point AP will start the channel switching timer. When the STA has no data transmission, it will actively monitor and scan the surrounding spectrum environment; The STA feeds back the results of the monitoring and scanning to the associated AP. When the AP is idle, it conducts passive interference monitoring on the surrounding frequency offset environment to obtain the surrounding spectrum information. The AP uses the information fed back by the STA and the information it perceives as the data support for subsequent channel sorting; Sort the channels according to the channel priority, sort according to the channel usage frequency and according to the channel load according to different optimization objectives. When the channel switching timer times out, the access point AP selects the channel with the highest priority and switches to that channel; When allocating RU resources to the STA with the highest current priority while ensuring that the STA with guaranteed allocated resources obtains the basic resources according to the priority of the STA, including: According to the number N of STAs scheduled STA and the priorities of the STAs, the set R of STAs to which resources are to be allocated is divided into two sets according to the priorities. The first set is R1, where the STAs are the N1 STAs with the highest priorities, and the remaining N STA - N1 STAs are the set R2; Divide resource W1 for the STA with the highest priority in the RU resource set W, and the division condition is that the remaining available RU resource W2 = W - W1 ≥ (N STA - N1) × 26 - tone RU; Update the set R = R2, W = W2, and repeat the above steps until W2 = W - W1 ≥ (N STA - N1) × 26 - tone RU is equal or all the scheduled STAs obtain resources; Pass the antenna parameters of the built-in WiFi module, the uplink and downlink service ratio, the service arrival intensity, the scene parameters of the STA location and distance into the STA scheduling and determine the STA scheduled in each period; Calculate the useful signal and interference signal received by each STA according to the lognormal shadow fading model, antenna parameters and scene parameters to obtain the SINR of each STA, then obtain the corresponding MCS according to the SINR and MCS look-up table, and then obtain the corresponding transmission rate according to the MCS rate table for throughput statistics; Generate the traffic volume requested by each STA in each period according to the Poisson arrival model. The data volume that has not been transmitted will be retained as the data volume to be transmitted in the next period. The uplink and downlink traffic volume requests will be adjusted according to the uplink and downlink traffic volume ratio; According to the known overlapping area STAs and the allocated RU resource results, adjust the STAs in the overlapping area using the same RU and re-allocate the RUs, and calculate the throughput of each AP according to the RU resource allocation results and the STAMCS information fed back by the SINR module.
2. The control method for the built-in dual WiFi of the recycling machine according to claim 1, wherein According to the known overlapping area STAs and the allocated RU resource results, adjust the STAs in the overlapping area using the same RU and re-allocate the RUs, including: Compare the RU results of the STAs in the overlapping area. When it is found that multiple STAs in different APs are allocated the same RU resource, randomly select one of the APs, and exchange the RU of the overlapping STAs with the RU resource of the non-overlapping area STAs. Give priority to the exchange when the RU resource specifications of both parties are the same.
3. The control method for the built-in dual Wi-Fi of the recycling machine according to claim 2, characterized in that, Calculate the useful signal and interference signal received by each STA according to the log-normal shadow fading model, antenna parameters, and scenario parameters to obtain the SINR of each STA, including: Describes the degree of interference or overlap between channels, and presets the channel interference factor f ij , and the expression is where c i represents the channel allocated to tower column i, and c m is the maximum number of overlapping channels. In the 2.4GHZ band, c m = 5. After setting the channel interference factor, the interference H j of the AP using channel c i on the STA associated with the AP using channel c ij is quantified as where P tj is the transmission power of the AP using channel C j , G t is the transmitting antenna gain, G r is the receiving antenna gain, and P L is the path loss; If the probability of each channel being selected is the same before optimization and the channel selection between each tower is relatively independent, list all the cases where the STA under the tower is affected by far-field interference when using different channels, and obtain the interference magnitude received by the STA under the tower when using a certain channel.
4. The control method of the built-in dual WiFi in the recycling machine according to claim 3, characterized in that, List all the cases where the STA under the tower is affected by far-field interference when using different channels, and obtain the interference magnitude received by the STA under the tower when using a certain channel, including: Taking the expectation of all interference situations suffered by the tower column on a certain channel as the interference prediction value of the tower column when using this channel, and obtaining the channel interference prediction matrix W N×F , where W ij is the interference prediction value of tower column i when using channel j; It is assumed that there are N tower columns and a total of F channels are available for allocation. To determine the interference relationship between tower column i and tower column j, an interference topology matrix G needs to be defined N×N , where g ij = n, and n is the number of STAs associated with the AP on tower column i in the overlapping area between tower column i and tower column j; Set the channel allocation matrix A N×F , where Then set the objective function S. S represents the interference suffered by all tower columns under the current channel allocation, and its expression is S = G × A * P tj W. Let K = G × A. K reflects the interference structure generated by the tower column on the overlapping area STA on a certain channel. The interference structure is used to consider the number factors of the tower column and the interfered STA.
5. The control method of the built-in dual WiFi in the recycling machine according to claim 1, characterized in that, Simulate the initialization of the IC and the device startup protocol related to transmission, including: The MCS value of each STA on different RUs, that is, the transmission rate of each STA on different RUs. When resources are limited and the optimization goal is to maximize throughput, the resource allocation algorithm allocates resources to the STA with a high transmission rate to achieve the maximum throughput. Its expression is m' = argmax{v m}, where v m is the transmission rate corresponding to the m-th STA on different RUs; Determine the priority of each STA through the proportional fairness factor, and preferentially satisfy the STA with a higher priority when allocating time resources. Determine the STA priority by introducing the proportional fairness factor f(t), and its expression is where is the transmission rate of the m-th STA in the current scheduling period, and R m (t) is the average data rate received by the m-th STA before time t; Determine the STA with the highest priority according to the proportional fairness factor f(t), and its expression is m' = argmax{f(t)}. The expression for the average data rate is where T c is the time window for adopting the statistical average rate.
6. The control method of the built-in dual WiFi of the recycling machine according to claim 1, characterized in that, Initialize the timer to write the preset sensor event and monitoring task event flag bits into the terminal vector program, including: According to the fact that both the sender and receiver will extract the data packet from the protocol stack when receiving data, first perform CRC check. The CRC data of the last two bytes at the end of the data packet is the check code; After unpacking the data, perform an exclusive OR calculation operation on the data of the Nth byte in the packet and the data of each subsequent byte, then add 1, and use the calculated data of the (N + 1)th byte as the data packet length of the communication protocol. Distinguish the types of communication protocols according to the different lengths. Use the calculated (N + 2) data groups as the starting data of the protocol content, and use the (2N + 2) data group as the tail data of the protocol content for protocol parsing.
7. A system for applying the control method of the built-in dual Wi-Fi of the recycling machine according to any one of claims 1-6, characterized in that, Including: A configuration unit for initializing the main controller in the machine, configuring the external clock source parameters of the main controller when powered on, initializing the IO ports and serial ports, and initializing the timer to write the preset sensor event and monitoring task event flag bits into the terminal vector program; A connection unit for initializing the WIFI module by sending AT commands through the serial port. The initialization includes setting the WIFI mode, station name password, and enabling data transparent transmission, and simulating the initialization of the IC and the device startup protocol related to transmission. Among them, the AT command set is sent from the terminal device or data terminal device to the terminal adapter or data terminal device; A creation unit for creating each sensor task and monitoring task. The monitoring task is used to monitor whether the sensor has completed the measurement work in one cycle. If the sensor task is not completed, it will be reflected in the return value of the monitoring task; The processing unit is used to send a specified communication protocol to the WIFI and Bluetooth modules in an interrupt when all sensor tasks are completed, and the timer clock will be suspended to ensure that the monitoring task can be restarted again. When the sending is completed, a semaphore will be cleared, enter the low-power mode to save power and enable the RTC real-time clock interrupt.
Citation Information
Patent Citations
Automatic channel selection method based on channel order in dense wireless fidelity (WiFi)
CN102781115A
Dynamic distributed resource scheduling method under ultra-dense WiFi network scenario
CN106412992A