Configuration data delivery method and device, computer device, and storage medium
By selecting active segments in the configuration distribution queue and dynamically adjusting the distribution time, the problem of excessive reconnection pressure on configuration terminals in big data scenarios is solved, achieving resource saving and smooth configuration distribution.
Patent Information
- Application Number
- CN202411644664.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2044-11-18
AI Technical Summary
In big data scenarios, when the number of configured terminals is large, resource components are easily overwhelmed by the pressure of instantaneous reconnection. Existing technologies need to be upgraded and modified to prevent all configured terminals from initiating reconnection at the same time, which would lead to excessive resource consumption.
By acquiring configuration update data and terminal configuration information, the configuration terminal address is added to the configuration distribution queue. Based on the configuration requirement data, an active segment is selected, and configuration update data is distributed at a determined time interval. The range of active segments is dynamically adjusted to avoid all configured terminals initiating reconnection at the same time.
It can reduce resource pressure, prevent reconnection impact, save resource consumption, and ensure that configuration distribution tasks are completed at different time periods without modifying the terminal configuration.
Smart Images

Figure CN119520272B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of big data technology, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for configuring data distribution. Background Technology
[0002] Currently, in configuration distribution scenarios, the time it takes for configuration files to be distributed to various configuration terminals is generally similar. However, in big data scenarios, the number of configuration terminals is large. When a new configuration requires a configuration terminal to reconnect to resource components, it can easily cause an excessive number of instantaneous reconnections. This excessive instantaneous pressure on resource components can easily overwhelm them.
[0003] To avoid this situation, related technologies incorporate a fallback principle into the configuration terminals to prevent all configuration terminals from initiating reconnection at the same time, thus reducing the instantaneous pressure on resource components. However, this solution requires upgrading and modifying the configuration terminals, which are typically deployed on the user side. Modifying a large number of configuration terminals requires significant resource consumption. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for distributing configuration data to the number of configuration terminals that does not require modification of the configuration terminal, can save a lot of resources, and prevent all configuration terminals from initiating reconnection at the same time, in order to address the above-mentioned technical problems.
[0005] Firstly, this application provides a method for distributing configuration data, including:
[0006] Obtain configuration update data and terminal configuration information of at least one target configuration terminal; wherein, the terminal configuration information includes configuration terminal address and configuration requirement data;
[0007] Add the configuration terminal addresses of all the target configuration terminals to the configuration distribution queue, and select a portion of the configuration distribution queue as active segments based on the configuration requirement data.
[0008] Obtain the distribution time interval and determine the configuration distribution time based on the distribution time interval;
[0009] Upon reaching the configuration distribution time, the configuration update data is distributed to the target configuration terminal in the active segment according to the configuration terminal address, and the active segment is updated before the next configuration distribution time.
[0010] In one embodiment, the configuration requirement data includes distribution probability data; the step of selecting a portion of the configuration distribution queue as active segments based on the configuration requirement data includes:
[0011] The active segment range is determined based on the distribution probability data and the number of target configuration terminals in the configuration distribution queue;
[0012] Select a continuous segment from the configuration distribution queue as the active segment based on the active segment range;
[0013] Correspondingly, updating the active segment before the next configuration issuance time includes:
[0014] Before the next configuration issuance time is reached, the next segment that is continuous with the current active segment is selected as the new active segment according to the active segment range.
[0015] In one embodiment, the configuration requirement data further includes a delay time threshold; the step of selecting the next segment continuous with the current active segment as the new active segment according to the active segment range before reaching the next configuration issuance time includes:
[0016] Before reaching the next configuration distribution time, the interval movement distance is calculated based on the delay time threshold and the distribution time interval;
[0017] The starting point of the next segment that is continuous with the current active segment is determined based on the distance traveled in the interval, and a new active segment is determined based on the range of the active segment and the starting point.
[0018] In one embodiment, determining the active segment range based on the distribution probability data and the number of target configuration terminals in the configuration distribution queue includes:
[0019] The initial segment range is calculated based on the distribution probability data and the number of target configuration terminals in the configuration distribution queue;
[0020] The initial segment range is rounded down to obtain an integer segment range;
[0021] If the integer range is not 0, the integer range is taken as the active range; if the integer range is 0, the active range is set to 1.
[0022] In one embodiment, the configuration distribution queue is a circular queue; the method further includes:
[0023] Based on the order of the configured terminal addresses in the circular queue, the step of sending the configuration update data to the target configured terminal in the active segment is continuously and repeatedly executed.
[0024] In one embodiment, the method further includes:
[0025] In response to a configuration terminal change command, obtain the new configuration requirement data for the target configuration terminal;
[0026] The active segment is updated based on the new configuration requirement data.
[0027] Secondly, this application also provides a configuration data distribution device, comprising:
[0028] The information acquisition module is used to acquire configuration update data and terminal configuration information of at least one target configuration terminal; wherein, the terminal configuration information includes configuration terminal address and configuration requirement data;
[0029] The segment processing module is used to add the configuration terminal addresses of all the target configuration terminals to the configuration distribution queue, and select a portion of the segments in the configuration distribution queue as active segments according to the configuration requirement data.
[0030] The time determination module is used to obtain the distribution time interval and determine the configuration distribution time based on the distribution time interval;
[0031] The configuration delivery module is used to, upon reaching the configuration delivery time, deliver the configuration update data to the target configuration terminal in the active segment according to the configuration terminal address, and update the active segment before reaching the next configuration delivery time.
[0032] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0033] Obtain configuration update data and terminal configuration information of at least one target configuration terminal; wherein, the terminal configuration information includes configuration terminal address and configuration requirement data;
[0034] Add the configuration terminal addresses of all the target configuration terminals to the configuration distribution queue, and select a portion of the configuration distribution queue as active segments based on the configuration requirement data.
[0035] Obtain the distribution time interval and determine the configuration distribution time based on the distribution time interval;
[0036] Upon reaching the configuration distribution time, the configuration update data is distributed to the target configuration terminal in the active segment according to the configuration terminal address, and the active segment is updated before the next configuration distribution time.
[0037] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0038] Obtain configuration update data and terminal configuration information of at least one target configuration terminal; wherein, the terminal configuration information includes configuration terminal address and configuration requirement data;
[0039] Add the configuration terminal addresses of all the target configuration terminals to the configuration distribution queue, and select a portion of the configuration distribution queue as active segments based on the configuration requirement data.
[0040] Obtain the distribution time interval and determine the configuration distribution time based on the distribution time interval;
[0041] Upon reaching the configuration distribution time, the configuration update data is distributed to the target configuration terminal in the active segment according to the configuration terminal address, and the active segment is updated before the next configuration distribution time.
[0042] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0043] Obtain configuration update data and terminal configuration information of at least one target configuration terminal; wherein, the terminal configuration information includes configuration terminal address and configuration requirement data;
[0044] Add the configuration terminal addresses of all the target configuration terminals to the configuration distribution queue, and select a portion of the configuration distribution queue as active segments based on the configuration requirement data.
[0045] Obtain the distribution time interval and determine the configuration distribution time based on the distribution time interval;
[0046] Upon reaching the configuration distribution time, the configuration update data is distributed to the target configuration terminal in the active segment according to the configuration terminal address, and the active segment is updated before the next configuration distribution time.
[0047] The aforementioned configuration data distribution method, apparatus, computer equipment, storage medium, and computer program product obtain configuration update data and terminal configuration information of at least one target configuration terminal to acquire the configuration terminal address and configuration requirement data of each target configuration terminal. All target configuration terminal addresses are added to a configuration distribution queue. Based on the configuration requirement data, a portion of the configuration distribution queue is selected as an active segment. The distribution time interval is obtained, and the configuration distribution time is determined based on the distribution time interval. The configuration terminal addresses in the active segment are used as the addresses where the configuration distribution task needs to be executed when the next configuration distribution time arrives. When the configuration distribution time arrives, configuration update data is distributed to the target configuration terminals in the active segment based on the configuration terminal addresses. Before the next configuration distribution time arrives, the active segment is updated. This allows each segment address in the configuration distribution queue to complete the configuration distribution task at different times without requiring modifications to the configuration terminals on the user side, saving significant resources and preventing all configuration terminals from initiating reconnection at the same time. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the drawings used in the description of the embodiments or related technologies 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.
[0049] Figure 1 This is an application environment diagram of a configuration data distribution method in one embodiment.
[0050] Figure 2 This is a flowchart illustrating a configuration data distribution method in one embodiment;
[0051] Figure 3 This is a schematic diagram illustrating the arrangement of the distribution queue in one embodiment;
[0052] Figure 4 This is a schematic diagram of the active segment of the distribution queue configured in one embodiment;
[0053] Figure 5 This is a schematic diagram illustrating the changes in active segments in one embodiment;
[0054] Figure 6 This is a flowchart illustrating step S204 of a configuration data distribution method in one embodiment;
[0055] Figure 7 This is a structural block diagram of a configuration data distribution device in one embodiment;
[0056] Figure 8This is an internal structural diagram of a computer device in one embodiment;
[0057] Figure 9 This is a diagram of the internal structure of a computer device in another embodiment. Detailed Implementation
[0058] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0059] The configuration data distribution method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located on a cloud or other network server. The data storage system can be used to store configuration update data to be distributed, as well as the configuration terminal addresses and configuration requirements corresponding to each target configuration terminal. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0060] In one exemplary embodiment, such as Figure 2 As shown, a method for distributing configuration data is provided, which can be applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps S202 to S208. Wherein:
[0061] Step S202: Obtain configuration update data and terminal configuration information of at least one target configuration terminal.
[0062] The terminal configuration information includes the terminal address and configuration requirements data.
[0063] For example, server 104 can periodically acquire new configuration data as configuration update data, store the configuration update data in the data storage system, and wait for the configuration to be issued. For the target configuration terminal currently being processed, server 104 can receive the configuration terminal address reported by the target configuration terminal, sort and store all configuration terminal addresses according to certain rules to ensure that the position of the configuration terminal address in the storage is fixed, and simultaneously receive the configuration requirements reported by the target configuration terminal, thereby generating configuration requirement data accordingly. The configuration requirement data may include the maximum delay time for the target configuration terminal to receive configuration update data, etc.
[0064] Step S204: Add the configuration terminal addresses of all target configuration terminals to the configuration distribution queue, and select a portion of the configuration distribution queue as active segments based on the configuration requirement data.
[0065] For example, such as Figure 3 As shown, server 104 can set the configuration distribution queue as a circular queue, and use the configuration terminal addresses of all target configuration terminals as elements in the circular queue, i.e., ipn-ip5 in the figure. Server 104 can arrange these elements randomly or in a specific order. For example, the order of these elements can be according to the reporting time or according to the priority order represented by the configuration requirement data, etc.
[0066] Next, as Figure 4 As shown, server 104 can select a portion of the configuration distribution queue as the active segment based on the configuration requirement data, namely ip2 and ip3 in the figure. Furthermore, server 104 can also respond to the configuration terminal change command, obtain the configuration requirement data of the new target configuration terminal, and update the active segment according to the new configuration requirement data.
[0067] Step S206: Obtain the distribution time interval and determine the configuration distribution time based on the distribution time interval.
[0068] For example, server 104 can calculate the next configuration distribution time based on a preset distribution time interval and the current time. Furthermore, server 104 can also dynamically adjust the distribution time interval based on the number of current target configuration terminals.
[0069] Step S208: When the configuration distribution time is reached, configuration update data is distributed to the target configuration terminal in the active segment according to the configuration terminal address, and the active segment is updated before the next configuration distribution time is reached.
[0070] For example, server 104 can determine the configuration terminal addresses contained in the active segment upon reaching the configuration distribution time, and then distribute configuration update data to the target configuration terminal in the active segment. Furthermore, server 104 can begin reselecting the active segment at the start or end of this configuration distribution, and update the active segment before reaching the next configuration distribution time.
[0071] Furthermore, such as Figure 5 As shown, server 104 can also continuously and cyclically execute the step of sending configuration update data to target configuration terminals in the active segment according to the order of the configuration terminal addresses in the circular queue. Furthermore, server 104 can also calculate the distance the active segment moves each time based on the configuration requirement data and the sending time interval, for example... Figure 5 The active segment is moved from the IP2-IP3 segment to the IP4-IP5 segment, with the same distance moved each time, so that the above configuration distribution steps can be executed in a cyclical and orderly manner in the configuration distribution queue.
[0072] When a target configuration terminal requests to retrieve configuration data, server 104 determines whether the requested address belongs to the currently active address range. If it does, the latest configuration file is returned; otherwise, it is not. This process repeats, with the configuration terminal initiating a configuration retrieval request at regular intervals. Server 104 maintains a constantly changing list of active address ranges and determines whether to return a new configuration file based on the requested address. As time progresses, the active address ranges continuously shift, and configuration update data is continuously sent to the active address ranges.
[0073] In the above configuration data distribution method, by obtaining configuration update data and terminal configuration information of at least one target configuration terminal, the configuration terminal address and configuration requirement data of each target configuration terminal are obtained. The configuration terminal addresses of all target configuration terminals are added to the configuration distribution queue. Based on the configuration requirement data, a portion of the configuration distribution queue is selected as the active segment. The distribution time interval is obtained, and the configuration distribution time is determined based on the distribution time interval. The configuration terminal addresses in the active segment are used as the addresses where the configuration distribution task needs to be executed when the next configuration distribution time arrives. When the configuration distribution time arrives, configuration update data is distributed to the target configuration terminals in the active segment based on the configuration terminal addresses. Before the next configuration distribution time arrives, the active segment is updated. This allows the addresses of each segment in the configuration distribution queue to complete the configuration distribution task at different times without modifying the configuration terminal on the user side, and more conveniently prevents the problem of all configuration terminals initiating reconnection at the same time.
[0074] In one exemplary embodiment, such as Figure 6As shown, step S204 includes steps S302 to S304. Wherein:
[0075] Step S302: Determine the active segment range based on the distribution probability data and the number of target configuration terminals in the configuration distribution queue.
[0076] For example, when a new configuration file appears, server 104 can, given the probability data P of successfully fetching the new configuration, the time interval S for fetching the configuration, and the latency threshold T for all target configuration terminals to fetch the new configuration. For example, server 104 can select a range from the circular configuration distribution queue based on the distribution probability data P and the number of target configuration terminals in the configuration distribution queue. It is worth noting that the active area range needs to be rounded and the range cannot be empty. If the range is empty, it means that the probability is 0 and the configuration cannot be distributed. Therefore, the minimum value of this range is 1 unit.
[0077] For example, server 104 can calculate the initial segment range based on the distribution probability data and the number of target configuration terminals in the configuration distribution queue, round the initial segment range to obtain an integer segment range, take the integer segment range as the active segment range when the integer segment range is not 0, and set the active segment range to 1 when the integer segment range is 0.
[0078] Step S304: Select a continuous segment from the configuration distribution queue as the active segment based on the active segment range.
[0079] For example, server 104 can select an active segment by using any point on the active segment as the starting point of the segment, or it can select the starting point of the active segment based on the priority information represented by the configuration requirement data.
[0080] Correspondingly, step S208, which involves updating the active segment before the next configuration issuance time, may include:
[0081] Step S306: Before the next configuration distribution time is reached, select the next segment that is continuous with the current active segment as the new active segment according to the active segment range.
[0082] The configuration requirements data may also include a delay time threshold.
[0083] For example, server 104 can calculate the interval movement distance based on the delay time threshold and the transmission time interval before the next configuration transmission time arrives; determine the starting point of the next segment that is continuous with the current active segment based on the interval movement distance; and determine a new active segment based on the active segment range and the starting point. The interval movement distance is used to characterize the distance between the starting point of the current active segment and the starting point of the next active segment.
[0084] For example, server 104 can calculate the movement unit m based on the time interval S and the maximum time T, where m = S / T (it needs to be rounded down and cannot be 0; if it is 0, it means no movement, and it cannot be guaranteed to be sent to all configured terminals, so the minimum value is 1). In the next time interval, the active address segment moves m units along the ring.
[0085] In the above embodiment, the active segments corresponding to the two configuration distribution times are continuous, which can ensure that all configuration terminals can be updated with the data. By setting a delay time threshold, when the maximum time T is reached, the active state address segment will have moved one full circle along the ring, and all addresses will experience the active state, ensuring that the new configuration can be distributed to all configuration terminals.
[0086] In an exemplary embodiment, there are 100 target configuration terminals. The time interval for pulling configurations is S = 1 minute, and the maximum time for all configuration terminals to pull the new configuration is T = 20 minutes, with a pull probability of 20%. Server 104 maintains the address information reported by the 100 configuration terminals, thus forming a 100-unit IP address ring [1, 100]. When a new configuration file appears, server 104 selects a range of 20 units from the address ring with a specified probability of 20%, and sets the addresses in this range to an active state. Assuming the selected range is (20, 40], the active address range is (IP20, IP40).
[0087] At this time, 100 configuration terminals initiate configuration retrieval requests. Server 104 only returns the new configuration to 20 configuration terminals with addresses (IP20, IP40]. These 20 configuration terminals respond to the new configuration and reconnect to the resource components. The remaining 80 configuration terminals do not retrieve the new configuration, are judged to have no configuration change, maintain the status quo, and will not respond to the new configuration or reconnect to the resource components. In the next time interval, server 104 calculates the movement unit m = 1 / 20, selects a range of 1 / 20 of the movement ring, that is, moves 100 * 1 / 20 = 5 units. At this time, the selected range becomes (25, 45], and the active state address range is (IP25, IP45). At this time, 100 configuration terminals initiate configuration retrieval requests, and server 104 only returns the new configuration to 20 configuration terminals with addresses (IP20, IP40]. The 20 configuration terminals [P25, IP45] received new configurations. Of these, 15 configuration terminals [(IP25, IP40]] had already retrieved the new configuration in the previous request and, judging that the configuration hadn't changed, wouldn't respond to the new configuration. Only the 5 configuration terminals [(IP40, IP45]] responded to the new configuration and reconnected to the resource component. The remaining 80 configuration terminals didn't retrieve the new configuration, judged that the configuration hadn't changed, and wouldn't respond to the new configuration. This process repeated itself, and as time progressed, reaching the maximum time of 20 minutes, the selection range shifted 20 times, that is, shifted 5 * 20 = 100 units, becoming (20, 40], overlapping with the range of the previous steps. All addresses experienced an active state once, therefore there was no situation where any configuration terminal failed to retrieve the new configuration.
[0088] In another exemplary embodiment, there are only 5 configuration terminals. The time interval S for server 104 to pull configuration is 1 minute, and the maximum time T for all configuration terminals to pull the new configuration is 10 minutes, with a pull probability of 1%. Server 104 maintains the address information reported by the 5 configuration terminals, thus there is an address ring [1,5] of 5 units. When a new configuration file appears, server 104 calculates the range with a specified probability of 1%, rounding it to 0, but the range cannot be empty, so it is set to the minimum value of 1. Assume the selected range is (0,1], and the active state address range is (IP0,IP1). At this time, the 5 configuration terminals initiate a configuration pull request. Server 104 only returns the new configuration to the 1 configuration terminal with the address (IP0,IP1]. This configuration terminal responds to the new configuration and reconnects to the resource component. The remaining 4 configuration terminals do not pull the new configuration, are judged to have no configuration change, maintain the status quo, will not respond to the new configuration, and will not reconnect to the resource component.
[0089] In the next time interval, based on the calculated movement unit m = 1 / 10, the selected range is moved by 1 / 10 of the ring, which is 5 * 1 / 10 = 0.5 units, rounded down to 1 unit. At this point, the selected range becomes (1, 2], and the active IP address range is (IP1, IP2). At this time, 5 configuration terminals initiate configuration pull requests, but server 104 only sends the new configuration to the one configuration terminal with the address (IP1, IP2]. The remaining 4 configuration terminals do not pull the new configuration, and since the configuration has not changed, they do not respond to the new configuration. This process repeats, and as time progresses, the selected range moves 5 times, that is, 5 * 1 = 5 units, and the selected range becomes (0, 1], overlapping with the range in step 2. All addresses have experienced an active state once. Although the time has not yet reached the maximum time T = 10 minutes for all configuration terminals to pull the new configuration, all configuration terminals have pulled the latest configuration, and there is no situation where a configuration terminal never pulls the new configuration.
[0090] In the second embodiment above, due to the small number of configuration terminals, the actual probability of pulling configurations deviates from the specified probability. In an extreme case, when there is only one configuration terminal, the actual probability of pulling configurations will become 100%. However, to prevent the situation where a configuration terminal fails to pull new configurations, and because the number of configuration terminals is small, responding to new configurations at the same time will not put pressure on resource components, which meets the requirements.
[0091] Therefore, when there are a large number of configured terminals, the above method, by controlling the probability of issuing new configurations, can avoid all configured terminals reconnecting to resource components at the same time, and also avoid the problem of configuration files not taking effect on all configured terminals. Furthermore, the configuration terminal retrieval logic does not need to be modified. When there are a small number of configured terminals, although the accuracy of the configuration probability is somewhat reduced, the configuration issuance function still exists, and there will be no situation where new configuration issuance overwhelms resource components.
[0092] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0093] Based on the same inventive concept, this application also provides a configuration data distribution device for implementing the configuration data distribution method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more configuration data distribution device embodiments provided below can be found in the limitations of the configuration data distribution method described above, and will not be repeated here.
[0094] In one exemplary embodiment, such as Figure 7 As shown, a configuration data distribution device is provided, including: an information acquisition module 402, a segment processing module 404, a time determination module 406, and a configuration distribution module 408, wherein:
[0095] The information acquisition module 402 is used to acquire configuration update data and terminal configuration information of at least one target configuration terminal; wherein, the terminal configuration information includes the configuration terminal address and configuration requirement data;
[0096] The segment processing module 404 is used to add the configuration terminal addresses of all target configuration terminals to the configuration distribution queue, and select some segments in the configuration distribution queue as active segments according to the configuration requirement data.
[0097] The time determination module 406 is used to obtain the distribution time interval and determine the configuration distribution time based on the distribution time interval;
[0098] The configuration distribution module 408 is used to distribute configuration update data to the target configuration terminal in the active segment according to the configuration terminal address when the configuration distribution time arrives, and to update the active segment before the next configuration distribution time arrives.
[0099] In one embodiment, the configuration requirement data includes distribution probability data; the segment processing module 404 includes:
[0100] The range determination unit is used to determine the active segment range based on the distribution probability data and the number of target configuration terminals in the configuration distribution queue;
[0101] The segment determination unit is used to select a continuous segment in the configuration distribution queue as the active segment based on the active segment range;
[0102] Correspondingly, the configuration distribution module 408 includes:
[0103] The segment update unit is used to select the next segment that is contiguous with the current active segment as the new active segment before the next configuration issuance time.
[0104] In one embodiment, the configuration requirement data also includes a delay time threshold; the segment update unit is specifically used to: calculate the segment movement distance based on the delay time threshold and the transmission time interval before the next configuration transmission time is reached; determine the starting point of the next segment that is continuous with the current active segment based on the segment movement distance; and determine the new active segment based on the active segment range and the starting point.
[0105] In one embodiment, the range determination unit is specifically used to: calculate an initial segment range based on the distribution probability data and the number of target configuration terminals in the configuration distribution queue; round the initial segment range to obtain an integer segment range; if the integer segment range is not 0, use the integer segment range as the active segment range, and if the integer segment range is 0, set the active segment range to 1.
[0106] In one embodiment, the configuration delivery queue is a circular queue; the apparatus is further configured to: continuously and cyclically execute the step of delivering configuration update data to the target configuration terminal in the active segment according to the order of the configuration terminal addresses in the circular queue.
[0107] In one embodiment, the device further includes:
[0108] The data update module is used to respond to configuration terminal change commands, obtain the configuration requirement data of the new target configuration terminal, and update the active segment according to the new configuration requirement data.
[0109] Each module in the aforementioned configuration data distribution device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0110] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores configuration update data to be distributed, as well as the configuration terminal addresses and configuration requirements for each target configuration terminal. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a configuration data distribution method.
[0111] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 9 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a configuration data distribution method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0112] Those skilled in the art will understand that Figure 9The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0113] In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: acquiring configuration update data and terminal configuration information of at least one target configuration terminal; wherein the terminal configuration information includes configuration terminal address and configuration requirement data; adding the configuration terminal addresses of all target configuration terminals to a configuration delivery queue, and selecting a portion of the configuration delivery queue as an active segment according to the configuration requirement data; acquiring a delivery time interval, and determining a configuration delivery time based on the delivery time interval; when the configuration delivery time is reached, delivering configuration update data to the target configuration terminals in the active segment according to the configuration terminal address, and updating the active segment before the next configuration delivery time is reached.
[0114] In one embodiment, when the processor executes the computer program, it further implements the following steps: determining the active segment range based on the distribution probability data and the number of target configuration terminals in the configuration distribution queue; selecting a continuous segment in the configuration distribution queue as an active segment based on the active segment range; and before reaching the next configuration distribution time, selecting the next segment that is continuous with the current active segment as a new active segment based on the active segment range.
[0115] In one embodiment, when the processor executes the computer program, it further performs the following steps: before reaching the next configuration distribution time, calculating the interval movement distance based on the delay time threshold and the distribution time interval; determining the starting point of the next segment that is continuous with the current active segment based on the interval movement distance, and determining a new active segment based on the active segment range and the starting point.
[0116] In one embodiment, when the processor executes the computer program, it further implements the following steps: calculating an initial segment range based on the distribution probability data and the number of target configuration terminals in the configuration distribution queue; rounding the initial segment range to obtain an integer segment range; if the integer segment range is not 0, using the integer segment range as the active segment range, and if the integer segment range is 0, setting the active segment range to 1.
[0117] In one embodiment, when the processor executes the computer program, it also performs the following steps: continuously and cyclically executing the step of sending configuration update data to the target configuration terminal in the active segment according to the order of the configuration terminal addresses in the circular queue.
[0118] In one embodiment, when the processor executes the computer program, it further performs the following steps: in response to a configuration terminal change instruction, it obtains configuration requirement data for a new target configuration terminal; and updates the active segment based on the new configuration requirement data.
[0119] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When executed by a processor, the computer program performs the following steps: acquiring configuration update data and terminal configuration information of at least one target configuration terminal; wherein the terminal configuration information includes configuration terminal address and configuration requirement data; adding the configuration terminal addresses of all target configuration terminals to a configuration delivery queue, and selecting a portion of the configuration delivery queue as an active segment according to the configuration requirement data; acquiring a delivery time interval, and determining a configuration delivery time based on the delivery time interval; and, upon reaching the configuration delivery time, delivering configuration update data to the target configuration terminals in the active segment according to the configuration terminal address, and updating the active segment before reaching the next configuration delivery time.
[0120] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: determining the active segment range based on the distribution probability data and the number of target configuration terminals in the configuration distribution queue; selecting a continuous segment in the configuration distribution queue as the active segment based on the active segment range; and before reaching the next configuration distribution time, selecting the next segment that is continuous with the current active segment as the new active segment based on the active segment range.
[0121] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: before reaching the next configuration distribution time, calculating the interval movement distance based on the delay time threshold and the distribution time interval; determining the starting point of the next segment that is continuous with the current active segment based on the interval movement distance, and determining a new active segment based on the active segment range and the starting point.
[0122] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: calculating an initial segment range based on the distribution probability data and the number of target configuration terminals in the configuration distribution queue; rounding the initial segment range to obtain an integer segment range; if the integer segment range is not 0, using the integer segment range as the active segment range, and if the integer segment range is 0, setting the active segment range to 1.
[0123] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: continuously and cyclically executing the step of sending configuration update data to the target configuration terminal in the active segment according to the order of the configuration terminal addresses in the circular queue.
[0124] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: in response to a configuration terminal change instruction, obtaining configuration requirement data for the new target configuration terminal; and updating the active segment based on the new configuration requirement data.
[0125] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps: acquiring configuration update data and terminal configuration information of at least one target configuration terminal; wherein the terminal configuration information includes configuration terminal address and configuration requirement data; adding the configuration terminal addresses of all target configuration terminals to a configuration delivery queue, and selecting a portion of the configuration delivery queue as an active segment based on the configuration requirement data; acquiring a delivery time interval, and determining a configuration delivery time based on the delivery time interval; and, upon reaching the configuration delivery time, delivering configuration update data to the target configuration terminals in the active segment based on the configuration terminal address, and updating the active segment before reaching the next configuration delivery time.
[0126] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: determining the active segment range based on the distribution probability data and the number of target configuration terminals in the configuration distribution queue; selecting a continuous segment in the configuration distribution queue as the active segment based on the active segment range; and before reaching the next configuration distribution time, selecting the next segment that is continuous with the current active segment as the new active segment based on the active segment range.
[0127] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: before reaching the next configuration distribution time, calculating the interval movement distance based on the delay time threshold and the distribution time interval; determining the starting point of the next segment that is continuous with the current active segment based on the interval movement distance, and determining a new active segment based on the active segment range and the starting point.
[0128] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: calculating an initial segment range based on the distribution probability data and the number of target configuration terminals in the configuration distribution queue; rounding the initial segment range to obtain an integer segment range; if the integer segment range is not 0, using the integer segment range as the active segment range, and if the integer segment range is 0, setting the active segment range to 1.
[0129] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: continuously and cyclically executing the step of sending configuration update data to the target configuration terminal in the active segment according to the order of the configuration terminal addresses in the circular queue.
[0130] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: in response to a configuration terminal change instruction, obtaining configuration requirement data for the new target configuration terminal; and updating the active segment based on the new configuration requirement data.
[0131] 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, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0132] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0133] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0134] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for distributing configuration data, characterized in that, The method includes: Obtain configuration update data and terminal configuration information of at least one target configuration terminal; wherein, the terminal configuration information includes configuration terminal address and configuration requirement data; Add the configuration terminal addresses of all the target configuration terminals to the configuration distribution queue, and select a portion of the configuration distribution queue as active segments based on the configuration requirement data. Obtain the distribution time interval and determine the configuration distribution time based on the distribution time interval; Upon reaching the configuration distribution time, the configuration update data is distributed to the target configuration terminal in the active segment according to the configuration terminal address, and the active segment is updated before the next configuration distribution time.
2. The method according to claim 1, characterized in that, The configuration requirement data includes distribution probability data; the step of selecting a portion of the configuration distribution queue as active segments based on the configuration requirement data includes: The active segment range is determined based on the distribution probability data and the number of target configuration terminals in the configuration distribution queue; Select a continuous segment from the configuration distribution queue as the active segment based on the active segment range; Correspondingly, updating the active segment before the next configuration issuance time includes: Before the next configuration issuance time is reached, the next segment that is continuous with the current active segment is selected as the new active segment according to the active segment range.
3. The method according to claim 2, characterized in that, The configuration requirement data also includes a delay time threshold; the step of selecting the next segment continuous with the current active segment as the new active segment before reaching the next configuration issuance time includes: Before reaching the next configuration distribution time, the interval movement distance is calculated based on the delay time threshold and the distribution time interval; The starting point of the next segment that is continuous with the current active segment is determined based on the distance traveled in the interval, and a new active segment is determined based on the range of the active segment and the starting point.
4. The method according to claim 2, characterized in that, The step of determining the active segment range based on the distribution probability data and the number of target configuration terminals in the configuration distribution queue includes: The initial segment range is calculated based on the distribution probability data and the number of target configuration terminals in the configuration distribution queue; The initial segment range is rounded down to obtain an integer segment range; If the integer range is not 0, the integer range is taken as the active range; if the integer range is 0, the active range is set to 1.
5. The method according to any one of claims 1 to 4, characterized in that, The configuration distribution queue is a circular queue; the method further includes: Based on the order of the configured terminal addresses in the circular queue, the step of sending the configuration update data to the target configured terminal in the active segment is continuously and repeatedly executed.
6. The method according to claim 5, characterized in that, The method further includes: In response to a configuration terminal change command, obtain the new configuration requirement data for the target configuration terminal; The active segment is updated based on the new configuration requirement data.
7. A configuration data distribution device, characterized in that, The device includes: The information acquisition module is used to acquire configuration update data and terminal configuration information of at least one target configuration terminal; wherein, the terminal configuration information includes configuration terminal address and configuration requirement data; The segment processing module is used to add the configuration terminal addresses of all the target configuration terminals to the configuration distribution queue, and select a portion of the segments in the configuration distribution queue as active segments according to the configuration requirement data. The time determination module is used to obtain the distribution time interval and determine the configuration distribution time based on the distribution time interval; The configuration delivery module is used to, upon reaching the configuration delivery time, deliver the configuration update data to the target configuration terminal in the active segment according to the configuration terminal address, and update the active segment before reaching the next configuration delivery time.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements 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 the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Distributed method for predicting active IPv6 address and related equipment
CN114297941A
Cache queue limit value configuration method and device, storage medium and electronic equipment
CN118802674A