A device channel configuration method, apparatus, device, medium and product
Patent Information
- Application Number
- CN202611213818.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-10-27
AI Technical Summary
当因终端设备固件不支持而被拒绝或长期无应答时,现有处理策略无法同时对NewChannelReq命令和LinkADRReq命令进行不可用信道的排除,存在跨命令冲突
本申请每个额外信道独立维护重试计数,单信道失败不影响其他信道的正常配置流程;同时,在重试计数超过预设阈值后才将额外信道的索引移入已停止信道索引集合,兼顾了收敛速度与误判容忍,避免因偶发丢包导致兼容信道被过早停止,为跨命令联动降级机制提供了准确的失败信道识别基础,进一步地,本申请通过将频率、最小数据速率、最大数据速率三元组的完全一致作为确认判定的依据,能够精准识别设备当前信道记录与目标配置之间的语义差异,进而提升重试计数结果的准确性,进一步地,本申请通过引入已停止信道索引集合,将其中记录的不可用信道同时从第一媒体访问控制命令对应的目标信道集合中删除,并在生成第二媒体访问控制命令对应的信道掩码时将对应信道设置为关闭,使不可用信道被两条MAC命令路径同时排除,消除跨命令冲突,避免终端设备在不可用信道上通信导致的数据丢失。
Smart Images

Figure CN122994801A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a device channel configuration method, apparatus, equipment, medium and product. Background Technology
[0002] In Long Range Wide Area Network (LoRaWAN), when configuring channels for terminal devices, the Network Server (NS) needs to dynamically manage the additional channels of the terminal devices through medium access control (MAC) commands to ensure that the terminal devices can reliably communicate using the frequencies and data rates supported by their hardware.
[0003] In existing technologies, network servers commonly use the NewChannelReq and LinkADRReq commands to configure device channels. NewChannelReq is used to create or modify a single channel, while LinkADRReq switches multiple channels on and off in batches using a channel mask. When a channel is rejected due to firmware incompatibility or remains unresponsive for an extended period, existing processing strategies cannot simultaneously exclude unavailable channels using both NewChannelReq and LinkADRReq commands, resulting in cross-command conflicts. Summary of the Invention
[0004] In view of this, this application provides a device channel configuration method, apparatus, device, medium and product that enables unavailable channels to be excluded by two media access control commands simultaneously, avoiding cross-command conflicts.
[0005] This application provides the following solution: Firstly, a device channel configuration method is provided, applied to a network server, wherein the network server is communicatively connected to a terminal device, the method comprising: For each additional channel to be configured in the terminal device, a retry count is maintained independently; When the retry count of any additional channel reaches a preset threshold, the index of that additional channel is added to the stopped channel index set. The update of the retry count is based on the confirmation determination of the uplink frame on the terminal device. The confirmation determination includes: comparing the frequency, minimum data rate, and maximum data rate in the current channel record of the additional channel with the target frequency, target minimum data rate, and target maximum data rate on the network server side; if they match, the confirmation is successful, and the retry count of the additional channel is cleared to zero; if they do not match, the confirmation fails, and the retry count of the additional channel is incremented by 1. When generating the target channel set corresponding to the first media access control command, the index in the stopped channel index set is deleted from the target channel set; When generating the channel mask corresponding to the second media access control command, the channel corresponding to the index in the stopped channel index set is set to be off in the channel mask, wherein the first media access control command and the second media access control command are used to configure the channels of the terminal device.
[0006] Optionally, the additional channel to be configured is the additional channel corresponding to the index in the target in-transit channel index set. The target in-transit channel index set contains the index of at least one additional channel in the in-transit state, wherein the in-transit state is an intermediate state in which the network server has sent the first media access control command to the terminal device and has not received a response from the terminal device.
[0007] Optionally, the process of constructing the target in-transit channel index set includes: In response to sending the first media access control command to the terminal device, the index of at least one additional channel corresponding to the first media access control command is obtained; Add the index of at least one additional channel corresponding to the first media access control command to the initial in-transit channel index set to obtain the target in-transit channel index set.
[0008] Optionally, after the determination and confirmation fail, the method further includes: The status of the additional channel is changed from in transit to retrying, whereby the retrying status indicates that the configuration of the additional channel has been confirmed to be inconsistent, but the retry count has not yet reached a preset threshold. After the retry count of any of the additional channels reaches a preset threshold, the method further includes: The state of the additional channel is transitioned from the retrying state to the stopped state, which indicates that the additional channel is unavailable.
[0009] Optionally, the confirmation determination is completed within the uplink opportunity window, wherein the uplink opportunity window starts at the time when the uplink frame sent by the terminal device arrives at the network server and ends at the time when the downlink processing corresponding to the uplink frame is completed.
[0010] Optionally, after setting the channel corresponding to the index in the set of stopped channel indices to be off in the channel mask, the method further includes: In response to the user's configuration operation for the target additional channel in the access network configuration interface, the stopped channel index set is cleared and the retry count is set to zero; For the target additional channel, the first media access control command is retried to complete the configuration of the target additional channel.
[0011] Secondly, a device channel configuration apparatus is provided, applied to a network server, the network server being communicatively connected to a terminal device, the apparatus comprising: A retry counting independent dimension unit is configured to independently maintain a retry count for each additional channel to be configured for the terminal device; The stopped channel index set determination unit is configured to add the index of any additional channel to the stopped channel index set when the retry count of any additional channel reaches a preset threshold. The update of the retry count is based on the confirmation determination of the uplink frame on the terminal device. The confirmation determination includes: comparing the frequency, minimum data rate, and maximum data rate in the current channel record of the additional channel with the target frequency, target minimum data rate, and target maximum data rate on the network server side; if they match, the confirmation is successful, and the retry count of the additional channel is cleared to zero; if they do not match, the confirmation fails, and the retry count of the additional channel is incremented by 1. The channel index deletion unit is configured to delete the index in the stopped channel index set from the target channel set when generating the target channel set corresponding to the first media access control command; The channel masking unit is configured to set the channel corresponding to the index in the stopped channel index set to be off in the channel mask when generating the channel mask corresponding to the second media access control command, wherein the first media access control command and the second media access control command are used to configure the channels of the terminal device.
[0012] Thirdly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any one of the first aspects above.
[0013] Fourthly, an electronic device is provided, comprising: One or more processors; and A memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the steps of the method described in any one of the first aspects above.
[0014] Fifthly, a computer program product includes a computer program that, when executed by a processor, implements the steps of the method described in any one of the first aspects.
[0015] According to the specific embodiments provided in this application, the following technical effects are disclosed: This application maintains an independent retry count for each additional channel, ensuring that a single channel failure does not affect the normal configuration process of other channels. Furthermore, the index of the additional channel is only moved into the stopped channel index set after the retry count exceeds a preset threshold, balancing convergence speed and tolerance for false positives. This prevents compatibility channels from being prematurely stopped due to occasional packet loss, providing an accurate basis for identifying failed channels in the cross-command linkage degradation mechanism. Further, by using the complete consistency of the frequency, minimum data rate, and maximum data rate triplets as the basis for confirmation, this application can accurately identify semantic differences between the device's current channel record and the target configuration, thereby improving the accuracy of the retry count results. Moreover, by introducing a stopped channel index set, this application simultaneously removes unavailable channels recorded in it from the target channel set corresponding to the first media access control command, and sets the corresponding channel to be off when generating the channel mask corresponding to the second media access control command. This ensures that unavailable channels are simultaneously excluded by both MAC command paths, eliminating cross-command conflicts and preventing data loss caused by terminal devices communicating on unavailable channels.
[0016] Of course, any product implementing this application does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a system architecture diagram applicable to the embodiments of this application.
[0019] Figure 2 This is a flowchart of a device channel configuration method provided in an embodiment of this application.
[0020] Figure 3 A flowchart for deduplication of uplink opportunities provided in the embodiments of this application.
[0021] Figure 4 A flowchart for determining the response provided in the embodiments of this application.
[0022] Figure 5 A flowchart illustrating cross-command linkage degradation provided in this application embodiment.
[0023] Figure 6 A flowchart illustrating a secondary attempt provided in an embodiment of this application.
[0024] Figure 7 This is a timing diagram illustrating the device channel configuration provided in an embodiment of this application.
[0025] Figure 8 This is a schematic diagram of the channel configuration of the pre-configured activation device provided in the embodiments of this application.
[0026] Figure 9 This is a schematic diagram illustrating the sharing of a set of stopped channel indexes deployed across multiple network server instances as provided in this embodiment of the application.
[0027] Figure 10 This is a schematic block diagram of a device channel configuration apparatus provided in an embodiment of this application.
[0028] Figure 11 A schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0030] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0031] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0032] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."
[0033] In existing technologies, network servers commonly use the NewChannelReq and LinkADRReq commands to configure device channels. NewChannelReq is used to create or modify a single channel, while LinkADRReq uses channel masks to switch multiple channels on and off in batches. These two commands are often processed independently during scheduling, each maintaining its own state and retry logic. When a NewChannelReq command configuration fails (e.g., due to the terminal device firmware not supporting a specific frequency, resulting in no response), a common practice is to stop further issuance of the command path based on a retry threshold to save downlink bandwidth. However, because the channel mask generation process for the LinkADRReq command is independent of the NewChannelReq command, its channel mask may still show the failed channel as enabled. This means that even if the NewChannelReq command has stopped, the failed channel may still be reopened via the LinkADRReq command. This inconsistency in state across command paths causes the device to perform uplink transmissions on frequencies it does not support, based on the channel mask, leading to continuous uplink data loss. Furthermore, the network server cannot detect this data loss through successfully issued LinkADRReq commands. Meanwhile, invalid retries in the downlink direction may continue to consume the gateway's downlink capacity.
[0034] Consequently, cross-command conflicts arise between the NewChannelReq and LinkADRReq commands due to the lack of shared failure information. This prevents the terminal device's channel state from converging to the expected closed state on the network side, resulting in uplink packet loss and wasted gateway downlink resources. Therefore, there is an urgent need for a device channel configuration method that can coordinate different MAC command paths to eliminate cross-command conflicts.
[0035] In view of this, this application provides a new approach. To facilitate understanding of this application, the system architecture on which this application is based will first be described. Figure 1 An exemplary system architecture that can be applied to embodiments of this application is shown, such as Figure 1 As shown, the system architecture may include: terminal devices and network servers.
[0036] Terminal devices can include, but are not limited to, smart mobile terminals, wearable devices, PCs (Personal Computers), and smart home devices. Smart mobile devices can include devices such as mobile phones, tablets, laptops, PDAs (Personal Digital Assistants), and connected car terminals. Wearable devices can include devices such as smartwatches, smart glasses, smart bracelets, VR (Virtual Reality) devices, AR (Augmented Reality) devices, and mixed reality devices (devices that support both virtual and augmented reality), etc.
[0037] A web server can be a single server, a server cluster consisting of multiple servers, or a cloud server. A cloud server, also known as a cloud computing server or cloud host, is a hosting product within the cloud computing service system, designed to address the shortcomings of traditional physical hosts and Virtual Private Servers (VPS) services, such as high management difficulty and weak service scalability.
[0038] The network server communicates with the terminal device. The terminal device can interact with the network server through the network; for example, the network server can send MAC commands to the terminal device through a gateway.
[0039] It should be understood that Figure 1 The number of terminal devices and network servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices and network servers can be used.
[0040] Figure 2 This application provides a flowchart of a device channel configuration method, which can be implemented by... Figure 1 The network server in the system shown executes this. For example... Figure 2 As shown, the method may include the following steps: Step 201: Maintain a retry count independently for each additional channel to be configured on the terminal device.
[0041] Step 202: When the retry count of any additional channel reaches a preset threshold, add the index of the additional channel to the stopped channel index set; wherein, the update of the retry count is based on the confirmation judgment of the uplink frame of the terminal device, and the confirmation judgment includes: comparing the frequency, minimum data rate and maximum data rate in the current channel record of the additional channel with the target frequency, target minimum data rate and target maximum data rate on the network server side; if they are consistent, the confirmation is successful and the retry count of the additional channel is cleared to zero; if they are inconsistent, the confirmation is failed and the retry count of the additional channel is incremented by 1.
[0042] Step 203: When generating the target channel set corresponding to the first media access control command, delete the index in the stopped channel index set from the target channel set.
[0043] Step 204: When generating the channel mask corresponding to the second media access control command, the channel corresponding to the index in the stopped channel index set is set to be off in the channel mask. The first media access control command and the second media access control command are used to configure the channel of the terminal device.
[0044] As can be seen from the above process, each additional channel in this application maintains a retry count independently, and the failure of a single channel does not affect the normal configuration process of other channels. At the same time, the index of the additional channel is moved into the stopped channel index set only after the retry count exceeds a preset threshold, which takes into account both convergence speed and tolerance for misjudgment, and avoids the premature termination of compatible channels due to occasional packet loss. This provides an accurate basis for identifying failed channels for cross-command linkage degradation mechanism. Furthermore, by using the complete consistency of the frequency, minimum data rate, and maximum data rate triplet as the basis for confirmation, this application can accurately identify the semantic differences between the current channel record of the device and the target configuration, thereby improving the accuracy of the retry count results. Furthermore, by introducing the stopped channel index set, this application deletes the unavailable channels recorded in it from the target channel set corresponding to the first media access control command, and sets the corresponding channel to be closed when generating the channel mask corresponding to the second media access control command, so that the unavailable channel is excluded by both MAC command paths at the same time, eliminating cross-command conflicts and avoiding data loss caused by the terminal device communicating on unavailable channels.
[0045] The following describes in detail each step of the above process and the effects that can be further produced, with reference to the embodiments. It should be noted that the terms "first" and "second" used in this disclosure do not have limitations in terms of size, order, or quantity, but are only used to distinguish them in name.
[0046] First, the above step 201, namely "maintaining a retry count independently for each additional channel to be configured for the terminal device", will be described in detail with reference to the embodiments.
[0047] The additional channels to be configured refer to the channels that the network server needs to configure for the terminal devices. For example, the additional channels to be configured may include additional channel C1 and additional channel C2, etc. Each additional channel can maintain a retry count independently, that is, it can realize retry counting at the single-channel granularity. For example, additional channels C1 and C2 can be counted separately, so that additional channel C1 has a corresponding retry count and additional channel C2 also has a corresponding retry count.
[0048] A retry count is a numerical value or status indicator used to represent the cumulative number of times a channel configuration has not been successfully acknowledged. For example, the retry count can be an integer value that increments the count of consecutive acknowledgments (ACKs) not received, a count value obtained by incrementing the count when an ACK failure is determined, or a zero count value after a reset operation.
[0049] As one possible approach, the additional channel to be configured can be an additional channel indexed in the target in-transit channel index set, which contains the index of at least one additional channel in the in-transit state. The in-transit state is an intermediate state in which the network server has sent a first media access control command to the terminal device but has not received a response from the terminal device.
[0050] The target in-transit channel index set refers to the set of indexes of channels for which the network server has issued channel configuration commands but has not yet received a response from the terminal device. It is used to mark additional channels that are in transit. The channel configuration command can be a first media access control command or other media access control commands, without specific limitations here.
[0051] The "in transit" state refers to the intermediate state where the network server has sent the first Media Access Control command for channel configuration to the terminal device but has not yet received a response or acknowledgment from the terminal device. The "in transit" state indicates that the channel configuration command has not yet been acknowledged by the terminal device, and it is necessary to continue tracking and retry counting.
[0052] The first media access control command can be NewChannelReq or another equivalent command, which can be used to create or modify a single additional channel, carrying frequency and data rate ranges. NewChannelReq is a sticky command, requiring a response from the terminal device.
[0053] Specifically, in response to sending a first media access control command to a terminal device, the index of at least one additional channel corresponding to the first media access control command can be obtained; the index of at least one additional channel corresponding to the first media access control command can be added to an initial in-transit channel index set to obtain a target in-transit channel index set.
[0054] The initial in-transit channel index set refers to the initial index set, which can be an empty set or contain the indexes of additional channels that are in transit and stored previously.
[0055] For example, the construction of the target in-transit channel index set is triggered by the sending of the first media access control command. For instance, the network server sends a NewChannelReq to the terminal device during a downlink event. The NewChannelReq involves the channel index set {Ci}. The indexes in the channel index set {Ci} can be added to the initial in-transit channel index set to obtain the target in-transit channel index set.
[0056] It should be noted that by obtaining the channel index involved in the command and constructing the in-transit channel index set in real time when sending the first media access control command, this application can ensure that the in-transit status tracking is strictly synchronized with the actual sending behavior, providing accurate basic data for subsequent judgment and retry counting, and avoiding channel status omission or erroneous tracking caused by untimely or incomplete construction of the in-transit channel index set.
[0057] The following describes step 202, namely, "When the retry count of any additional channel reaches a preset threshold, the index of the additional channel is added to the stopped channel index set; wherein, the update of the retry count is based on the confirmation determination of the uplink frame of the terminal device, and the confirmation determination includes: comparing the frequency, minimum data rate and maximum data rate in the current channel record of the additional channel with the target frequency, target minimum data rate and target maximum data rate on the network server side; if they are consistent, the confirmation is successful and the retry count of the additional channel is cleared to zero; if they are inconsistent, the confirmation is failed and the retry count of the additional channel is incremented by 1," in detail.
[0058] Here, the preset threshold refers to a pre-set judgment threshold. For example, the preset threshold can be 3 times. This value balances convergence speed and tolerance for false positives. If the preset threshold is too small (e.g., 1-2 times), false negative responses caused by occasional packet loss by the terminal device will prematurely misjudge the compatible channel as a failure. If the preset threshold is too large (e.g., more than 5 times), excessive downlink bandwidth will be wasted on retries for truly incompatible channels. In some embodiments, the preset threshold can also be dynamically adjusted according to the link quality of the terminal device to further improve the accuracy of the judgment.
[0059] The stopped channel index set refers to a collection of indexes used to maintain one or more channels in a stopped state. Its purpose is to exclude stopped channels during subsequent channel configuration based on this set. Stopped channels are those unusable by the terminal device, i.e., failed channels. For example, a failed channel might be one where the terminal device firmware does not support a certain frequency, causing configuration failure, or one where the terminal device has not responded to configuration commands for an extended period. It's important to note that marking unusable channels as stopped allows the network server to distinguish between configurable and unusable channels, enabling targeted exclusion of unusable channels and avoiding invalid retries and accidental activation of unusable channels.
[0060] In this embodiment, the retry count can be updated based on the acknowledgment of the uplink frame from the terminal device. The uplink frame refers to the data frame sent by the terminal device to the network server, which may carry the terminal device's current channel configuration information, i.e., the current channel record of the additional channel. The acknowledgment refers to the ACK determination, which includes the following steps: if the frequency, minimum data rate, and maximum data rate in the current channel record of the additional channel are completely consistent with the target frequency, target minimum data rate, and target maximum data rate on the network server side, then the acknowledgment is successful, and the retry count of the additional channel is reset to zero; otherwise, the acknowledgment is considered unsuccessful, and the retry count of the additional channel is incremented by 1.
[0061] The current channel record refers to information maintained by the network server reflecting the current channel configuration status of the terminal device. It is used to compare with the target configuration information to determine whether the channel has been correctly configured. For example, the current channel record may include, but is not limited to, frequency, minimum data rate, and maximum data rate. The target configuration information refers to the channel configuration information that the network server expects the terminal device to achieve. For example, the target configuration information may include, but is not limited to, target frequency, target minimum data rate, and target maximum data rate.
[0062] Upon successful confirmation, the retry count for the additional channel is cleared to zero, indicating that the terminal device has completed the channel parameter update according to the target configuration information. Consequently, the additional channel can be deleted from the target in-transit channel index set and will no longer occupy retry resources.
[0063] As one possible approach, the confirmation decision is made within the uplink opportunity window, which starts at the time when the uplink frame sent by the terminal device arrives at the network server and ends at the time when the downlink processing corresponding to the uplink frame is completed.
[0064] Downlink processing can include ACK determination and retry count updates. It's understood that completing the ACK determination within the uplink opportunity window—that is, determining the retry count for each additional channel within the uplink opportunity window—aligns the time base of the retry count with the actual response cycle of the terminal device, ensuring the count reflects the actual number of responses from the terminal device rather than the downlink scheduling count from the network server.
[0065] Understandably, in high-frequency scheduling scenarios, if frame-by-frame counting is used, a single failure will be repeatedly counted, potentially leading to an artificially high retry count and prematurely moving the channel into the stopped channel index set. This could cause an extra channel that could be functioning normally to be mistakenly judged as a failure and shut down. By using the uplink server as the counting benchmark, the retry count can be aligned with the actual number of responses from the terminal device, thereby preventing the channel from being mistakenly stopped prematurely and ensuring the accuracy of cross-command linkage degradation triggering.
[0066] In some embodiments, when the terminal device is in a periodic reception mode (such as Class B), the boundary of the uplink opportunity window is constrained by the periodic reception time slots and can fall between adjacent reception time slots; when the terminal device is in a continuous reception mode (such as Class C), the uplink opportunity window has a natural boundary with the arrival of consecutive uplink frames. This embodiment can adaptively determine the boundary of the uplink opportunity window according to different operating modes of the terminal device, so that the deduplication logic of retry counting can operate accurately in different operating modes, ensuring the consistency and applicability of the counting reference.
[0067] For example, Figure 3 A flowchart illustrating the uplink opportunity deduplication counting provided in the embodiments of this application. For example... Figure 3 As shown, downlink opportunity T1 can involve channels C1 and C2, and C1 and C2 are marked in the in-transit channel index set. It is determined whether C1 is sent again within the same uplink opportunity window. If so, C1 is only marked once in the in-transit channel index set; otherwise, it waits for uplink permission from the device and is ultimately counted according to uplink opportunities rather than downlink frames.
[0068] As one possible approach, after determining that the confirmation failed, the method further includes: changing the status of the additional channel from the in-transit status to the retrying status, where the retrying status indicates that the configuration inconsistency of the additional channel has been confirmed but the retry count has not yet reached a preset threshold; after the retry count of any additional channel reaches the preset threshold, the method further includes: changing the status of the additional channel from the retrying status to the stopped status, where the stopped status indicates that the additional channel is unusable.
[0069] In this context, "configuration inconsistency" refers to a discrepancy between the frequency, minimum data rate, and maximum data rate recorded in the current channel record of the additional channel and the target frequency, target minimum data rate, and target maximum data rate on the network server side.
[0070] It should be noted that, in addition to the in-transit and stopped states, the channel states in this application also include the retrying state. That is, each additional channel can independently maintain the three states of in-transit, retrying, and stopped, thereby realizing single-channel granularity failure awareness and avoiding the coarse-grained problem of overall retransmission or overall abandonment.
[0071] In this embodiment, the triplet may include frequency, minimum data rate, and maximum data rate, where the minimum and maximum data rates are the boundaries of the data rate range. Specifically, ACK determination can be based on a comparison of the frequency and data rate range triplet, raising the determination granularity from the channel index level to the channel parameter semantic level. This enables the detection of situations where the channel index exists but the parameter configuration is inconsistent, providing a determination basis for the closed-loop driving of data rate patching.
[0072] For example, Figure 4 A flowchart for determining the response provided in an embodiment of this application. For example... Figure 4 As shown, if any field in the triplet does not match, the status of the additional channel is changed from "in transit" to "retrying," and the retry count of the additional channel is incremented by 1. This ensures that differences in data rate ranges are not ignored. For example, when a terminal device joins the network, the channel pre-filled through the Channel Frequency List (CFList) applies the default data rate of the protocol on the terminal device side. If the ACK determination only checks whether the channel index exists or only checks whether the frequency is consistent, the default data rate record will be mistakenly judged as successfully configured, causing the data rate patch to never be driven, and the data rate of the terminal device's channel will remain permanently at the incorrect value. This application's embodiment embeds data rate consistency into the ACK determination, enabling the data rate patch to form a closed loop of "pre-filling default value → perceiving difference → driving correction → covering correct value." Driving correction refers to correcting the data rate through the data rate patch, thereby covering the correct value, i.e., correcting the data rate. After the retry count of the additional channel reaches 3 times, the status of the additional channel can be changed from "retrying" to "stopped," and the index of the additional channel can be added to the stopped channel index set. If the triples match perfectly, the channel's status is changed to acknowledged, the retry count is reset to zero, and the channel is removed from the in-transit channel index set. The following describes step 203, namely, "deleting the index from the stopped channel index set from the target channel set when generating the target channel set corresponding to the first media access control command," in detail with reference to an embodiment. The target channel set refers to the set of channel indexes expected to be configured when generating the first media access control command.
[0073] For example, after generating the target channel set corresponding to NewChannelReq, the index in the stopped channel index set can be deleted from the target channel set. This prevents the network server from issuing NewChannelReq to unusable channels, avoiding invalid retries and reducing downlink bandwidth waste. For instance, in high-frequency scheduling scenarios, if stopped channels are not deleted, a single incompatible terminal device may generate a large number of invalid downlink commands, and multiple incompatible terminal devices will significantly occupy the gateway's downlink capacity.
[0074] The following describes in detail step 204, namely, "when generating the channel mask corresponding to the second media access control command, the channel corresponding to the index in the stopped channel index set is set to be off in the channel mask, wherein the first media access control command and the second media access control command are used to configure the channel of the terminal device," with reference to the embodiments.
[0075] The second media access control command can be LinkADRReq or other equivalent commands, which can switch multiple channels on and off in batches using a channel mask (ChMask).
[0076] A channel mask is a data structure used in Second Media Access Control (MMAC) commands to indicate the on or off status of multiple channels. Each bit corresponds to an index of a channel; setting it to "on" indicates that the channel is available, while setting it to "off" prohibits terminal devices from communicating on that channel. The channel mask represents the on / off state of each channel through a bit mapping, enabling the network server to precisely control the enabling or disabling of each channel during the mask generation stage, providing fine-grained control over the targeted shutdown of channels that are already in a stopped state.
[0077] For example, when generating the channel mask for LinkADRReq, unusable channels are set to be off in the channel mask, so that unusable channels are not turned on, and the channel state of the terminal device converges from floating uncertainty to deterministic closure, eliminating cross-command type conflicts.
[0078] In this embodiment, the first media access control command and the second media access control command refer to two different types of MAC commands used to configure the channel of the terminal device. For example, the first media access control command can be the NewChannelReq command, and the second media access control command can be the LinkADRReq command, or other commands with equivalent functions.
[0079] For example, Figure 5 A flowchart illustrating cross-command linkage degradation provided in an embodiment of this application. For example... Figure 5As shown, when the retry count of channel C1 reaches a preset threshold, C1 can be moved into the stopped channel index set. The stopped channel index set can be applied to two paths: path 1 is NewChannelReq, and path 2 can be LinkADRReq. Path 1 removes C1 from the target channel set so that C1 will not be created again. In the channel mask of path 2, C1 is set to be off, thereby enabling both paths to exclude C1 simultaneously, so that the device state converges to deterministic shutdown.
[0080] In some embodiments, when channel indexes are reused—that is, when a user adds a channel using the index of an additional channel that is already in a stopped state—the frequency and data rate range can be used as a composite key. This composite key can then be used to distinguish between historical failure records and new configurations. For example, if the frequency or data rate range of the newly added channel differs from a historical failure record, it is considered a new configuration, and the index can be removed from the set of stopped channel indexes, allowing the retry process to resume. It is understood that using a composite key to distinguish between historical failures and new configurations avoids misclassifying new, legitimate channel configurations as historically failed channels due to index reuse, ensuring that new configurations receive a normal retry opportunity and improving the flexibility of channel index reuse.
[0081] As one possible approach, after setting the channel corresponding to the index in the stopped channel index set to be off in the channel mask, the method further includes: in response to the user's configuration operation on the target additional channel in the access network configuration interface, clearing the stopped channel index set and setting the retry count to zero; and re-triggering the first media access control command for the target additional channel to complete the configuration of the target additional channel.
[0082] The access network configuration interface refers to the user interface that allows modification and saving of channel configuration information for target additional channels. Channel configuration information may include frequency and data rate range. The target additional channel can be the additional channel that the user wants to modify or re-save.
[0083] For example, Figure 6 A flowchart illustrating a secondary attempt provided for an embodiment of this application. For example... Figure 6 As shown, if the additional channel with index C1 was previously identified as a failed channel, when the user modifies the channel configuration information of C1 in the access network configuration interface, they can clear the set of stopped channel indexes and set the retry count to zero, thereby re-triggering the NewChannelReq process for the additional channel with index C1. For example, the network server can send the NewChannelReq corresponding to C1 to the terminal device, thereby completing the configuration of the additional channel with index C1.
[0084] To facilitate understanding of the above methods, processes, and technical effects, several application examples are listed below: Figure 7 This is a timing diagram illustrating the device channel configuration provided in an embodiment of this application. Figure 7 As shown, the user can configure an additional channel F1. The network server sends a downlink NewChannelReq(F1) based on the user-configured additional channel F1. The gateway forwards NewChannelReq(F1), and the terminal device sends an uplink frame based on NewChannelReq(F1) (F1 firmware does not support this without ACK). When the uplink frame arrives at the network server, the network server determines that the triplet does not match and sets the retry count to 1. The network server sends the downlink NewChannelReq(F1) for the second time, the gateway forwards NewChannelReq(F1), and the terminal device sends an uplink frame. When the uplink frame arrives at the network server, the network server determines that the triplet does not match and sets the retry count to 2. The network server sends the downlink NewChannelReq(F1) for the third time, the gateway forwards NewChannelReq(F1), and the terminal device sends an uplink frame. When the uplink frame arrives at the network server, the network server determines that the triplet does not match and sets the retry count to 3. When the retry count reaches a preset threshold, F1 is moved into the stopped channel index set. Executing cross-command degradation: The network server determines and sends a downlink LinkADRReq (channel mask disabled for F1), the gateway forwards the LinkADRReq, and the terminal device sends an ACK to the network server (channel mask enabled). At this point, F1 is excluded by both paths simultaneously, and the device no longer uses F1 uplink. Furthermore, when the user re-saves the channel configuration, the set of stopped channel indices can be cleared and the retry count reset. A newChannelReq (F1) is reissued; firmware upgrades may support F1, enabling a successful ACK and giving the failed channel a second chance, avoiding permanent misjudgment.
[0085] Figure 8 This is a schematic diagram of the channel configuration for a pre-configured activation device provided in this application embodiment. For terminal devices using the pre-configuration activation (Activation By Personalization, ABP) method, since there is no network access procedure and channels are not pre-filled through the channel frequency list, all additional channels are issued via NewChannelReq from the moment the terminal device is first added. In this scenario, the per-channel tri-state tracking and cross-command degradation mechanism are consistent with the implementation methods of the above embodiments, except that in the stage of no network access pre-filling of default data rate, the ACK determination directly compares the data rate currently sent by the terminal device with the data rate previously sent by the terminal device.
[0086] In some embodiments, the set of stopped channel indexes can be maintained at the terminal device level, meaning each terminal device maintains its own independent set of stopped channel indexes, which are not shared between different terminal devices to avoid cross-contamination of failed channels from different terminal devices. In this way, a channel that a terminal device does not support due to firmware limitations will not affect the normal configuration process of other terminal devices for the same channel, ensuring the isolation and accuracy of failure handling.
[0087] In another embodiment, Figure 9 This is a schematic diagram illustrating the sharing of a set of stopped channel indexes deployed across multiple network server instances as provided in this embodiment of the application. Figure 9 As shown, network server instances 1, 2, and 3 can uniformly exclude failed channels and read / write data. Specifically, the stopped channel index set and retry count can be persisted to shared storage, enabling multiple network server instances to reach a consensus on the failed channel status of the same terminal device. After any instance moves a channel into the stopped channel index set, other instances will also exclude that channel when generating the channel mask for the second media access control command, thus avoiding the reopening of failed channels due to inconsistent states between instances. When multiple instances concurrently update the stopped channel index set of the same terminal device, optimistic locking or Compare-And-Swap (CAS) mechanisms can be used to ensure concurrent consistency. Optimistic locking records the version number during reading and verifies that the version has not changed during writing; otherwise, it retryes. Read operations on the stopped channel index set allow for slight lag based on eventual consistency, as the window temporarily opened due to failed channels heals itself upon the next retry convergence. Using optimistic locking or CAS mechanisms to handle concurrent writes can prevent multiple instances from overwriting each other when updating the stopped channel index set of the same terminal device at the same time, thus ensuring the integrity of the stopped set data in concurrent scenarios; at the same time, it allows for a slight delay in read operations, reducing the latency overhead of read operations while ensuring eventual consistency.
[0088] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0089] According to another embodiment, a device channel configuration apparatus is provided. Figure 10 A schematic block diagram of a device channel configuration apparatus according to one embodiment is shown, the apparatus being disposed in Figure 1 The network server in the illustrated architecture. For example... Figure 10As shown, the device 1000 includes: a retry counting independent dimension unit 1001, a stopped channel index set determination unit 1002, a channel index deletion unit 1003, and a channel mask shutdown unit 1004. The main functions of each component are as follows: The retry counting independent dimension unit 1001 is configured to independently maintain a retry count for each additional channel to be configured for the terminal device.
[0090] The stopped channel index set determination unit 1002 is configured to add the index of any additional channel to the stopped channel index set when the retry count of any additional channel reaches a preset threshold. The update of the retry count is based on the confirmation determination of the uplink frame on the terminal device. The confirmation determination includes: comparing the frequency, minimum data rate, and maximum data rate in the current channel record of the additional channel with the target frequency, target minimum data rate, and target maximum data rate on the network server side; if they match, the confirmation is successful, and the retry count of the additional channel is cleared to zero; if they do not match, the confirmation fails, and the retry count of the additional channel is incremented by 1.
[0091] The channel index deletion unit 1003 is configured to delete the index in the stopped channel index set from the target channel set when generating the target channel set corresponding to the first media access control command.
[0092] The channel masking unit 1004 is configured to set the channel corresponding to the index in the stopped channel index set to be closed in the channel mask when generating the channel mask corresponding to the second media access control command, wherein the first media access control command and the second media access control command are used to configure the channels of the terminal device.
[0093] As one possible implementation, the additional channel to be configured is an additional channel corresponding to an index in the target in-transit channel index set. The target in-transit channel index set contains the index of at least one additional channel in the in-transit state, wherein the in-transit state is an intermediate state in which the network server has sent the first media access control command to the terminal device and has not received a response from the terminal device.
[0094] As one possible implementation method, the process of constructing the target in-transit channel index set includes: In response to sending the first media access control command to the terminal device, the index of at least one additional channel corresponding to the first media access control command is obtained; Add the index of at least one additional channel corresponding to the first media access control command to the initial in-transit channel index set to obtain the target in-transit channel index set.
[0095] As one possible implementation, the device 1000 also includes: The first state transition unit is configured to change the state of the additional channel from the in-transit state to the retrying state, wherein the retrying state indicates that the configuration of the additional channel has been confirmed to be inconsistent, but the retry count has not yet reached a preset threshold. The second state transition unit is configured to transition the state of the additional channel from a retrying state to a stopped state, the stopped state indicating that the additional channel is unavailable.
[0096] As one possible implementation method, the confirmation determination is completed within the uplink opportunity window, wherein the uplink opportunity window starts at the time when the uplink frame sent by the terminal device arrives at the network server and ends at the time when the downlink processing corresponding to the uplink frame is completed.
[0097] As one possible implementation, the device 1000 also includes: The second attempt unit is configured to: in response to the user's configuration operation on the target additional channel in the access network configuration interface, clear the stopped channel index set and set the retry count to zero; and re-trigger the first media access control command for the target additional channel to complete the configuration of the target additional channel.
[0098] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or device embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the description of the method embodiments. The system and device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0099] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0100] In addition, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method described in any of the foregoing method embodiments.
[0101] And an electronic device, comprising: One or more processors; and A memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the steps of the method described in any of the foregoing method embodiments.
[0102] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in any of the foregoing method embodiments.
[0103] in, Figure 11 The architecture of an electronic device is illustrated, which may include a processor 1110, a video display adapter 1111, a disk drive 1112, an input / output interface 1113, a network interface 1114, and a memory 1120. The processor 1110, video display adapter 1111, disk drive 1112, input / output interface 1113, network interface 1114, and memory 1120 can communicate with each other via a communication bus 1130.
[0104] The processor 1110 can be implemented using a general-purpose CPU, microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits to execute relevant programs and implement the technical solution provided in this application.
[0105] The memory 1120 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1120 can store the operating system 1121 for controlling the operation of the electronic device 1100, and the basic input / output system (BIOS) 1122 for controlling the low-level operations of the electronic device 1100. Additionally, it can store a web browser 1123, a data storage management system 1124, and a device channel configuration device 1000, etc. The aforementioned device channel configuration device 1000 can be the application program that specifically implements the aforementioned steps in this embodiment. In summary, when the technical solution provided in this application is implemented through software or firmware, the relevant program code is stored in the memory 1120 and is called and executed by the processor 1110.
[0106] Input / output interface 1113 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touch screens, microphones, various sensors, etc., and output devices may include displays, speakers, vibrators, indicator lights, etc.
[0107] Network interface 1114 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0108] Bus 1130 includes a pathway for transmitting information between various components of the device, such as processor 1110, video display adapter 1111, disk drive 1112, input / output interface 1113, network interface 1114, and memory 1120.
[0109] It should be noted that although the above-described device only shows the processor 1110, video display adapter 1111, disk drive 1112, input / output interface 1113, network interface 1114, memory 1120, bus 1130, etc., in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the solution of this application, and does not necessarily include all the components shown in the figures.
[0110] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer program product. This computer program product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0111] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A device channel configuration method, characterized in that, Applied to a network server, wherein the network server is communicatively connected to a terminal device, the method includes: For each additional channel to be configured in the terminal device, a retry count is maintained independently; When the retry count of any additional channel reaches a preset threshold, the index of that additional channel is added to the stopped channel index set. The update of the retry count is based on the confirmation determination of the uplink frame on the terminal device. The confirmation determination includes: comparing the frequency, minimum data rate, and maximum data rate in the current channel record of the additional channel with the target frequency, target minimum data rate, and target maximum data rate on the network server side; if they match, the confirmation is successful, and the retry count of the additional channel is cleared to zero; if they do not match, the confirmation fails, and the retry count of the additional channel is incremented by 1. When generating the target channel set corresponding to the first media access control command, the index in the stopped channel index set is deleted from the target channel set; When generating the channel mask corresponding to the second media access control command, the channel corresponding to the index in the stopped channel index set is set to be off in the channel mask, wherein the first media access control command and the second media access control command are used to configure the channels of the terminal device.
2. The method according to claim 1, characterized in that, The additional channel to be configured is the additional channel corresponding to the index in the target in-transit channel index set. The target in-transit channel index set contains the index of at least one additional channel in the in-transit state. The in-transit state is an intermediate state in which the network server has sent the first media access control command to the terminal device and has not received a response from the terminal device.
3. The method according to claim 2, characterized in that, The process of constructing the target in-transit channel index set includes: In response to sending the first media access control command to the terminal device, the index of at least one additional channel corresponding to the first media access control command is obtained; Add the index of at least one additional channel corresponding to the first media access control command to the initial in-transit channel index set to obtain the target in-transit channel index set.
4. The method according to claim 2, characterized in that, After the determination and confirmation fail, the method further includes: The status of the additional channel is changed from in transit to retrying, whereby the retrying status indicates that the configuration of the additional channel has been confirmed to be inconsistent, but the retry count has not yet reached a preset threshold. After the retry count of any of the additional channels reaches a preset threshold, the method further includes: The state of the additional channel is transitioned from the retrying state to the stopped state, which indicates that the additional channel is unavailable.
5. The method according to claim 1, characterized in that, The confirmation determination is completed within the uplink opportunity window, wherein the uplink opportunity window starts at the time when the uplink frame sent by the terminal device arrives at the network server and ends at the time when the downlink processing corresponding to the uplink frame is completed.
6. The method according to claim 1, characterized in that, After setting the channel corresponding to the index in the set of stopped channel indices to be off in the channel mask, the method further includes: In response to the user's configuration operation for the target additional channel in the access network configuration interface, the stopped channel index set is cleared and the retry count is set to zero; For the target additional channel, the first media access control command is retried to complete the configuration of the target additional channel.
7. A device channel configuration apparatus, characterized in that, The device is applied to a network server, which is communicatively connected to a terminal device, and includes: A retry counting independent dimension unit is configured to independently maintain a retry count for each additional channel to be configured for the terminal device; The stopped channel index set determination unit is configured to add the index of any additional channel to the stopped channel index set when the retry count of any additional channel reaches a preset threshold. The update of the retry count is based on the confirmation determination of the uplink frame on the terminal device. The confirmation determination includes: comparing the frequency, minimum data rate, and maximum data rate in the current channel record of the additional channel with the target frequency, target minimum data rate, and target maximum data rate on the network server side; if they match, the confirmation is successful, and the retry count of the additional channel is cleared to zero; if they do not match, the confirmation fails, and the retry count of the additional channel is incremented by 1. The channel index deletion unit is configured to delete the index in the stopped channel index set from the target channel set when generating the target channel set corresponding to the first media access control command; The channel masking unit is configured to set the channel corresponding to the index in the stopped channel index set to be off in the channel mask when generating the channel mask corresponding to the second media access control command, wherein the first media access control command and the second media access control command are used to configure the channels of the terminal device.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 6.
9. An electronic device, characterized in that, include: One or more processors; as well as A memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 6.