Temperature and humidity price tag application control instruction scheduling method and system
By combining the micro-streaming K-means algorithm and the minimal state machine model, the problems of task response lag and resource waste in electronic price tag systems in edge computing environments are solved, enabling efficient and real-time price tag updates in temperature and humidity sensitive scenarios, and improving the system's sensitivity and stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 广东志慧芯屏科技有限公司
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-21
AI Technical Summary
In smart retail scenarios, existing edge computing-based electronic shelf label systems struggle to adapt to dynamic and complex product information updates and temperature and humidity fluctuations, resulting in delayed task response, resource waste, and system latency. They also lack lightweight local collaboration mechanisms and adaptive cluster scheduling, failing to meet the real-time and resource-efficient utilization requirements of temperature and humidity-sensitive scenarios.
A miniature streaming K-means algorithm is used for task clustering to construct a simplified state machine model. Collaborative decision-making is based on a decentralized consensus mechanism. Lightweight collaborative sorting is performed through execution window suggestions and cost evaluation values within task clusters. The clustering granularity is dynamically adjusted to adapt to resource changes and achieve local optimal scheduling.
It significantly improves the efficiency and real-time response of edge task processing, reduces the processing load of the instruction generation module, enhances the sensitivity and stability of the system, is suitable for resource-constrained environments, prevents latency caused by the spread of local hotspots, and improves the accuracy of instruction issuance and the scalability of the system.
Smart Images

Figure CN121900897A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of edge computing and electronic price tag collaborative control technology, and in particular to a method and system for scheduling control commands for temperature and humidity price tags. Background Technology
[0002] With the rapid development of smart retail and intelligent IoT applications, edge computing-based electronic shelf label systems are widely deployed in large supermarkets, warehouse-style supermarkets, and new digital stores. This system rapidly generates and distributes shelf label control commands locally at edge nodes, enabling dynamic upgrades of intelligent product label content and environmentally adaptive display. Current mainstream technologies employ methods such as layered scheduling (e.g., establishing a global cloud management node and a local edge scheduler), distributed batch task distribution, or cross-node command migration to improve the high concurrency of control command distribution and system response speed. However, the existing technology still has the following shortcomings: In smart retail scenarios, edge computing-based electronic shelf label systems need to simultaneously respond to product information updates and environmental events such as temperature and humidity fluctuations. Current mainstream scheduling solutions mostly adopt static sharding, global queues, or hierarchical management modes, which are difficult to adapt to dynamic and complex application requirements. On the one hand, existing solutions ignore the environmental correlation and urgency differences between tasks, and the resource scheduling granularity is coarse. When high-density tasks are concurrent, lock contention and instruction generation delays are likely to occur, especially in temperature and humidity sensitive product areas, where high dynamic update requirements can easily lead to some tasks responding late. On the other hand, they lack lightweight local collaboration mechanisms, rely on global scheduling or cross-node migration, increase communication and computing load, and cannot dynamically adjust task grouping according to environmental changes and resource status, making them unsuitable for scenarios with limited edge device resources. Furthermore, traditional solutions lack adaptive clustering and collaborative decision-making mechanisms for environment-driven tasks. When task density exceeds a threshold, it becomes difficult to reduce collaborative complexity through fine-grained decomposition, making it challenging to achieve local optimum scheduling. Simultaneously, the lack of a closed-loop feedback mechanism from execution status to scheduling strategy, coupled with fixed clustering and scheduling parameters, makes it unable to cope with fluctuations in task traffic and resource consumption. This further exacerbates system response latency and resource waste, making it difficult to meet the real-time, stable, and resource-efficient utilization requirements for price tag updates in temperature and humidity-sensitive scenarios. Summary of the Invention
[0003] In order to solve the above-mentioned technical problems, the present invention provides a method for scheduling control commands for temperature and humidity price tags.
[0004] The technical solution of this invention is implemented as follows: a method for scheduling control commands for temperature and humidity price tags, comprising: S1: Obtain update requests for multiple electronic price tags. The update requests include target price tag identifier, associated product type, deployment location information, and environmental sensitivity level. The environmental sensitivity level is pre-calibrated based on the product's response characteristics to changes in temperature and humidity, and serves as the basic input parameter for subsequent task clustering and collaborative decision-making. S2: Based on the deployment location information and environmental sensitivity level of associated product types in each update request, extract the spatiotemporal feature vector of the task. The spatiotemporal feature vector includes the communication subnet ID, shelf number, regional temperature and humidity trend change rate and update priority label, which are used to characterize the spatial distribution attributes and environmental driving intensity of the task in the edge computing environment. S3: The spatiotemporal feature vectors are dynamically clustered using a micro-streaming K-means algorithm to generate multiple task clusters. Each task cluster corresponds to a set of price tag control tasks with similar environmental driving factors and response time requirements, in order to reduce cross-domain interference and improve local collaborative efficiency. S4: For each generated task cluster, construct a simplified state machine model. The simplified state machine model is designed based on a decentralized consensus mechanism. Its operation depends on the execution window suggestions and cost evaluation values broadcast by each task in the cluster. The cost evaluation value is calculated by weighting the local remaining computing power and real-time communication quality, and serves as the basis for determining the state transition. S5: Within each task cluster, a state machine-driven lightweight collaborative decision-making process is executed. By sequentially transitioning between the three core states of pending, negotiation, and locking, the instruction generation and execution order of each task within the cluster is determined, and an ordered task sequence is output. This ordered task sequence reflects the locally optimal scheduling result achieved under resource-constrained conditions. S6: Determine whether the number of tasks in any task cluster exceeds a preset threshold. If it does, perform a sub-cluster split operation on the original task cluster based on the regional temperature and humidity gradient difference to generate two or more subdivided task clusters, and restart the simplified state machine model for each new cluster to keep the computational load of a single collaborative unit within a manageable range. S7: According to the ordered task sequence output by each task cluster, the instruction generation engine is called in sequence to generate the corresponding price tag control instruction. The instruction includes the target address, display content, and refresh timing control parameters. The generated instruction is injected into the execution queue of the edge device to wait for it to be sent out, forming an executable control output stream. S8: Monitor the response latency and resource occupancy status of the instruction execution queue. If a continuous influx of high-density tasks causes queue backlog, adjust the clustering granularity parameters of the micro-streaming K-means algorithm to dynamically optimize the task cluster partitioning strategy, thereby adapting to the changing conditions of edge computing resources in a closed loop.
[0005] The present invention also provides a temperature and humidity price tag application control command scheduling system, which uses the above-mentioned temperature and humidity price tag application control command scheduling method to schedule temperature and humidity price tag application control commands.
[0006] The present invention provides a method and system for scheduling control commands for temperature and humidity price tags, which has the following beneficial effects: (1) This invention significantly improves the task processing efficiency and real-time response of the edge by reconstructing the instruction generation process based on the inherent environment and spatial characteristics of the task. It constructs a multi-dimensional feature vector based on the environmental association attributes of the task (such as regional temperature and humidity change trends, commodity type sensitivity level, update priority) and spatial location information (shelf number, communication subnet ID), and uses a lightweight online clustering algorithm to realize dynamic grouping of tasks, so that tasks with similar environmental driving factors and time constraints are automatically aggregated into the same collaborative cluster. This mechanism effectively removes the interference between heterogeneous tasks and forms a fine-grained control context for local environmental states, thereby avoiding centralized competition for the resources of the entire system, greatly reducing the processing load of the instruction generation module, enabling edge devices to run efficiently even without AI coprocessors or containerized isolation support, significantly advancing the instruction issuance time, and improving the overall system response sensitivity and stability. (2) This invention introduces a simplified three-state machine model (pending, negotiating, locking) as a decentralized consensus mechanism within the cluster. Combined with execution window suggestion broadcasting and local cost evaluation value exchange, it realizes lightweight collaborative sorting without the need for global scheduling intervention, effectively overcoming the computational redundancy and single-point bottleneck problems caused by traditional DAG modeling and centralized scheduling. Each task cluster independently maintains its state machine. Without the need for a complete task dependency graph or cloud decision-making, it completes the consistency negotiation of the internal execution order through a limited number of rounds of state transitions. This process requires only minimal message interaction and storage overhead, is suitable for resource-constrained edge computing environments, and has good scalability. When the task density in any cluster exceeds a preset threshold, the system automatically triggers a sub-cluster splitting mechanism based on temperature and humidity gradient differences, finely splitting the original control domain according to the inconsistency of environmental changes, ensuring that each collaborative unit always maintains a low-complexity operating state. This adaptive clustering granularity adjustment strategy not only enhances the system's resilience to sudden high-concurrency requests, but also ensures the independence and accuracy of instruction execution between different temperature control zones, effectively preventing the chain reaction of delays caused by the spread of local hotspots. It is significantly better than traditional solutions with fixed partitions or static priority queues. Attached Figure Description
[0007] Figure 1 This is a flowchart of a temperature and humidity price tag application control command scheduling method according to the present invention; Figure 2 This is a sub-flowchart of a temperature and humidity price tag application control command scheduling method according to the present invention; Figure 3 This is another sub-flowchart of the temperature and humidity price tag application control command scheduling method of the present invention. Detailed Implementation
[0008] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0009] The following disclosure provides many different embodiments or examples for implementing different structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.
[0010] like Figure 1 As shown, the present invention provides a method for scheduling control commands for temperature and humidity price tags, specifically including: S1: Obtain update requests for multiple electronic price tags. The update requests include target price tag identifier, associated product type, deployment location information, and environmental sensitivity level. The environmental sensitivity level is pre-calibrated based on the product's response characteristics to changes in temperature and humidity, and serves as the basic input parameter for subsequent task clustering and collaborative decision-making. S2: Based on the deployment location information and environmental sensitivity level of associated product types in each update request, extract the spatiotemporal feature vector of the task. The spatiotemporal feature vector includes the communication subnet ID, shelf number, regional temperature and humidity trend change rate and update priority label, which are used to characterize the spatial distribution attributes and environmental driving intensity of the task in the edge computing environment. S3: The spatiotemporal feature vectors are dynamically clustered using a micro-streaming K-means algorithm to generate multiple task clusters. Each task cluster corresponds to a set of price tag control tasks with similar environmental driving factors and response time requirements, in order to reduce cross-domain interference and improve local collaborative efficiency. S4: For each generated task cluster, construct a simplified state machine model. The simplified state machine model is designed based on a decentralized consensus mechanism. Its operation depends on the execution window suggestions and cost evaluation values broadcast by each task in the cluster. The cost evaluation value is calculated by weighting the local remaining computing power and real-time communication quality, and serves as the basis for determining the state transition. S5: Within each task cluster, a state machine-driven lightweight collaborative decision-making process is executed. By sequentially transitioning between the three core states of pending, negotiation, and locking, the instruction generation and execution order of each task within the cluster is determined, and an ordered task sequence is output. This ordered task sequence reflects the locally optimal scheduling result achieved under resource-constrained conditions. S6: Determine whether the number of tasks in any task cluster exceeds a preset threshold. If it does, perform a sub-cluster split operation on the original task cluster based on the regional temperature and humidity gradient difference to generate two or more subdivided task clusters, and restart the simplified state machine model for each new cluster to keep the computational load of a single collaborative unit within a manageable range. S7: According to the ordered task sequence output by each task cluster, the instruction generation engine is called in sequence to generate the corresponding price tag control instruction. The instruction includes the target address, display content, and refresh timing control parameters. The generated instruction is injected into the execution queue of the edge device to wait for it to be sent out, forming an executable control output stream. S8: Monitor the response latency and resource occupancy status of the instruction execution queue. If a continuous influx of high-density tasks causes queue backlog, adjust the clustering granularity parameters of the micro-streaming K-means algorithm to dynamically optimize the task cluster partitioning strategy, thereby adapting to the changing conditions of edge computing resources in a closed loop.
[0011] Step S1: Obtain update requests for multiple electronic price tags. Each update request includes the target price tag identifier, associated product type, deployment location information, and environmental sensitivity level. The environmental sensitivity level is pre-calibrated based on the product's response characteristics to temperature and humidity changes, serving as the basic input parameter for subsequent task clustering and collaborative decision-making. Specifically, this includes: S1.1: Based on the operational requirements of the electronic shelf label system in temperature and humidity sensitive scenarios, multiple electronic shelf label update requests are obtained from the management platform or local triggers. Each update request serves as the initial processing object of the instruction generation module, initiating the multi-shelf label collaborative logic generation process. Based on the operational requirements of electronic price tag systems in temperature and humidity sensitive scenarios, a multi-source instruction acquisition method (parameters: management platform interface ID, local trigger event code) is adopted to synchronously acquire update requests from the management platform and local triggers, ensuring that the edge instruction generation module receives a complete set of tasks during the multi-price tag collaborative logic startup phase. Furthermore, by using a dual-channel access method (parameters: TCP / IP long connection channel and low-power wireless event channel), timestamp alignment of update requests from different communication paths is achieved, and fused request time series data is obtained. Furthermore, an event filtering algorithm (parameters: effective event category set, noise attenuation threshold) is used to remove invalid or duplicate update requests from the original time series and generate a set of effective events after noise reduction. Furthermore, by using a request priority determination method (parameters: product type sensitivity matrix, business strategy configuration table), the effective event set is initially screened according to temperature and humidity sensitivity and business strategy, and a priority task list is generated. By encapsulating and processing the task input, the above priority task list is transformed into an initialization task object that can be recognized by the instruction generation module, thereby realizing the automated start conditions for the multi-price tag collaborative logic generation process. For example, in a retail cold chain display scenario, the management platform pushes three high-sensitivity product price tag update requests (interface ID: PLT_UPD_01) via an HTTPS interface, and the local temperature and humidity trigger sends two medium-sensitivity product update events (event code: TRG_ENV_02) via a LoRa channel. After the system executes the multi-source instruction acquisition method, it obtains the three requests pushed by the management platform through the TCP / IP channel, with timestamps of 1623445601, 1623445610, and 1623445615 respectively; and obtains the local trigger event timestamps of 1623445608 and 1623445612 through the LoRa channel. After timestamp alignment using the dual-channel access method, the fusion result is arranged in ascending order as: [1623445601, 1623445608, 1623445610, 1623445612, 1623445615]. An event filtering algorithm was used to remove duplicate events caused by sensor malfunctions, reducing the set to [1623445601, 1623445608, 1623445610, 1623445615]. A request priority determination method was used to query the product category sensitivity matrix to obtain the weights of highly sensitive products. Medium-sensitivity product weighting Based on the business strategy configuration table, two tasks corresponding to high-sensitivity products and one task corresponding to medium-sensitivity products are selected and added to the priority task list. Finally, the task input encapsulation processing method packages these three tasks into task objects containing price tag ID, product type, deployment location, and environmental sensitivity level, which are then entered into the instruction generation module to trigger the multi-price tag collaborative logic generation process, significantly improving the real-time response capability and resource allocation efficiency of edge instruction generation. S1.2: Parse the fields of each update request and extract three basic attributes: target price tag identifier, associated product type, and deployment location information. These will be used as the original input parameters for subsequent environmental correlation analysis and spatial distribution modeling to ensure that the task context information is complete and traceable. S1.3: Based on the preset product-environment response characteristic mapping table, query the response characteristics of the products corresponding to the associated product types in each update request to changes in temperature and humidity, and perform a calibration operation based on the response characteristics to generate the corresponding environmental sensitivity level. The environmental sensitivity level is output in the form of a quantitative label (such as high / medium / low or a value of 1-5) to characterize the dependence of the price tag task on environmental driving factors. Perform pattern matching on the associated product type field and use a hash mapping retrieval algorithm (parameters: product type string, hash table size M) to quickly locate the index position of the product type in the preset product-environment response characteristic mapping table; Furthermore, by accessing the mapping table records through the associated index positions, the temperature and humidity response coefficient dataset corresponding to this product type is obtained, and the response coefficients are split into two independent numerical vectors, temperature coefficient and humidity coefficient, to support subsequent multi-factor calibration calculations. Furthermore, a weighted sensitivity synthesis algorithm (parameter: temperature coefficient) is adopted. Humidity coefficient Weighted parameters and The formula for calculating the comprehensive environmental response value of a single product type is as follows:
[0012] in, The comprehensive environmental response value, and These are the weighting factors for temperature and humidity, respectively. Furthermore, a piecewise function based on a grade threshold is used. (Parameters: response value S, set of level thresholds) ), to determine and output the environmental sensitivity level, when ≥ Output "high" when ≤ < Output "Medium" if the condition is met, otherwise output "Low" and convert the level label into a quantized value (e.g., High = 1.0, Medium = 0.6, Low = 0.3). By quantifying the sensitivity levels, the comprehensive response data from the previous step is transformed into a unified numerical label, thereby achieving a standardized description of the sensitivity intensity of commodities under temperature and humidity conditions. This provides basic feature inputs that can be directly involved in mathematical calculations for subsequent task clustering and collaborative decision-making processes. For example, in an electronic shelf label system deployed in a retail environment, for the "fresh milk" product type, the mapping table records a temperature response coefficient of 0.85 and a humidity response coefficient of 0.65. The system is configured with weight parameters... =0.7, =0.3, substituting into the formula, we obtain the comprehensive environmental response value: =0.785. The set of level thresholds is set to... =0.8, =0.5, =0.0, then S=0.785 satisfies ≤ < Output a "Medium" level and quantize it to 0.6. In the same scenario, for "refrigerated seafood" products, if the temperature response coefficient is 0.92 and the humidity response coefficient is 0.88, substitute... =0.7, =0.3, therefore S=0.884, satisfying S≥ The output is "high" and quantized to 1.0. The execution results show that the quantized label of the calibrated environmental sensitivity level can be directly used in subsequent spatiotemporal feature vector construction and clustering operations, which significantly improves the consistency and computability of task feature expression, while maintaining the low load on edge computing resources in the calibration process; S1.4: The extracted basic attributes are structurally bound to the calibrated environmental sensitivity levels to construct a unified format of task metadata records. Each record encapsulates the complete semantic information of the tag update task, forming a task input set to be processed, which serves as the input condition for the next stage of spatiotemporal feature vector extraction. S1.5: Perform integrity verification and anomaly filtering on the generated task input set, detect missing or out-of-bounds values based on predefined field constraint rules, remove invalid request entries, and output a cleaned set of valid update requests to ensure that the data received by subsequent modules has consistency and timeliness.
[0013] Step S2: Based on the deployment location information and environmental sensitivity level of associated product types in each update request, extract the spatiotemporal feature vector of the task. The spatiotemporal feature vector includes the communication subnet ID, shelf number, regional temperature and humidity trend change rate, and update priority label, used to characterize the spatial distribution attributes and environmental driving intensity of the task in the edge computing environment. Specifically, this includes: S2.1: Obtain update requests from multiple electronic shelf labels. The update requests are used as input conditions and include the target shelf label identifier, associated product type, deployment location information, and environmental sensitivity level. Based on the physical installation coordinates and network topology attributes in the deployment location information, extract the corresponding communication subnet ID and shelf number to form the spatial positioning parameters of the task, so as to characterize the logical domain of the task in the distributed edge system. Obtain a dataset of update requests from multiple electronic shelf labels. The data includes fields such as target shelf label identifier, associated product type, deployment location information, and environmental sensitivity level, forming the processing input conditions for this sub-step. The coordinate analysis method (parameters: physical installation coordinate format and coordinate system type in deployment location information) is used to convert the physical installation coordinates into a numerical representation in a unified three-dimensional or two-dimensional coordinate system, which serves as the basis for subsequent network topology mapping. Furthermore, through a network topology mapping algorithm (parameters: node identifier list, communication link list, subnet partitioning rules), the mapping of coordinate data to communication nodes is realized, and each physical location is mapped to its corresponding communication subnet ID to obtain the network domain attribute of the task. Furthermore, a shelf number extraction method is adopted (parameters: shelf location code in deployment location information, storage mapping table) to realize the association resolution between physical installation coordinates and shelf numbers, ensuring that the extraction of shelf numbers accurately reflects the spatial belonging area of the task; Furthermore, through spatial positioning parameter binding processing, the communication subnet ID and shelf number are jointly encapsulated into a spatial positioning parameter record for the task, forming a logical home domain data structure for the task in the distributed edge system; By using coordinate analysis and network topology mapping, the cleaned update request data from the previous step is transformed into complete spatial positioning parameters, achieving accurate embedding of multi-dimensional spatial attributes into the task object. For example, in a hybrid retail warehousing scenario, assuming the deployment location information of electronic shelf labels uses a Cartesian coordinate system (unit: meters), for instance, the original coordinates of a shelf label are (X=12.4, Y=8.6). The system first parses this into two-dimensional floating-point coordinates. Combining this with the subnetting table in the network topology, the location corresponds to the communication subnet ID "SUBNET_03", with an average communication link latency of 3ms. In the shelf location mapping table, this location belongs to shelf number "H-SHELF-15", with a shelf height level of 2. The resulting spatial positioning parameters are recorded as {communication subnet ID=SUBNET_03, shelf number=H-SHELF-15}. Applied to subsequent clustering inputs, this ensures that tasks within the same communication subnet and adjacent shelf areas are partitioned into the same logical domain, improving the spatial consistency of clustering. Running the micro-streaming K-means algorithm under this configuration significantly reduces the average distance between tasks within a cluster, and the response latency of collaborative control is reduced to approximately two-thirds of its original value, achieving rapid scheduling in resource contention scenarios. S2.2: Semantically analyze the environmental sensitivity levels corresponding to the associated product types, and map unstructured level labels (such as 'high', 'medium', 'low') to calculable weight values (e.g., 1.0, 0.6, 0.3) to generate environmental response weighting factors; these environmental response weighting factors serve as the basic input parameters for subsequent trend sensitivity assessment, and are used to quantify the intensity of different products' control needs for environmental fluctuations. Based on the spatial positioning parameters extracted in step S2.1 and the environmental sensitivity level labels output in step S1.3, a level mapping parsing method (parameters: label set = {high, medium, low}, mapping weight set = {1.0, 0.6, 0.3}) is adopted to convert unstructured semantic labels into environmental response weighting factors in a calculable numerical form. Furthermore, by performing key-value mapping operations between tags and weights, a hash table mapping product types to weighting factors is established in memory to achieve fast querying and scalar output, ensuring that the access latency during subsequent trend sensitivity assessment calls is negligible. Furthermore, based on the quantitative weight values of environmental sensitivity levels, a weight normalization method (parameter: normalization interval = [0.0, 1.0]) is adopted to achieve comparability of different commodities on the same numerical scale and generate a normalized environmental response weighting factor set; Furthermore, using a weighted factor verification mechanism, boundary condition detection is performed on the normalized weighted value. Mathematical logic is used to determine whether it is within a preset closed interval. If the detection fails, the exception handling module is called to correct it to the interval endpoint value to ensure calculation stability. By quantifying and normalizing the grade labels, the environmental sensitivity label results from the previous step are transformed into environmental response weighted factor data, thereby achieving a quantitative characterization of the environmental fluctuation adaptability of different commodity categories and supporting the accuracy and consistency of the trend change rate calculation and spatiotemporal feature vector generation chain. For example, in a temperature and humidity sensitive electronic shelf label system, the input update request includes the product type = "fresh dairy products" and its environmental sensitivity level label is "high". The level mapping resolution method finds a weight of 1.0 and generates an environmental response weighting factor. =1.0. (Regarding...) Execute normalization mapping function ( Implement interval mapping:
[0014] in These are the original weighted values. =0.3, =1.0. The normalization factor is calculated. =1.0. The normalization factor passes boundary checks and satisfies the interval condition of [0.0, 1.0], requiring no correction. Final output. =1.0 is used as the environmental response weighting factor for this task and input into the weight fusion function of S2.4. In the same region, another product type = "room temperature beverage", with a sensitivity label of "low", has an initial weight of 0.3, which is calculated after normalization. A value of 0.0 indicates that the task has extremely low requirements for environmental fluctuation control, thus significantly reducing its priority ranking during clustering and scheduling. The above processing achieves the quantification, standardization, and comparability of environmental sensitivity, providing accurate input parameters for trend sensitivity scoring and multi-dimensional feature vector construction. S2.3: Based on the historical temperature and humidity sensor data stream of the deployment area, the sliding time window difference algorithm is used to calculate the trend change rate of temperature and humidity in the area; specifically, a linear regression model is constructed using the average temperature and humidity values in the preceding N sampling periods, and the absolute value of the output slope is used as the trend change rate index; this trend change rate reflects the dynamic intensity of the current environmental disturbance and serves as an external driving feature input for the urgency of the task. S2.4: Combining spatial positioning parameters, environmental response weighting factors, and regional temperature and humidity trend change rates, and integrating update priority tags configured in the business layer (such as priority for promotional products, priority for new product launches, etc.), a multi-dimensional spatiotemporal feature vector is generated through a preset weight fusion function; this multi-dimensional spatiotemporal feature vector serves as the core representation of the task participating in cluster analysis at the edge, possessing dual discriminative capabilities of spatial proximity and environmentally driven consistency. S2.5: Normalize the generated multidimensional spatiotemporal feature vectors and use the Min-Max normalization method to map the feature values of each dimension to the [0,1] interval to eliminate the influence of dimensional differences on subsequent clustering algorithms; output the normalized spatiotemporal feature vectors as direct input data for the micro-streaming K-means algorithm to ensure that the clustering process is carried out on a uniform scale and improve the consistency and convergence speed of task grouping.
[0015] like Figure 2 As shown, step S3 involves using a micro-streaming K-means algorithm to dynamically cluster the spatiotemporal feature vectors, generating multiple task clusters. Each task cluster corresponds to a set of price tag control tasks with similar environmental driving factors and response time requirements, thereby reducing cross-domain interference and improving local collaborative efficiency. Specifically, this includes: S3.1: Obtain the set of spatiotemporal feature vectors output by S2. The spatiotemporal feature vectors include communication subnet ID, shelf number, regional temperature and humidity trend change rate, and update priority label. Construct an initial feature space based on the multidimensional attributes, and perform normalization processing on the data of each dimension to eliminate the influence of the difference in units on the distance measurement, and obtain a standardized set of spatiotemporal feature vectors as input for the clustering algorithm. Based on the standardized spatiotemporal feature vector set output by step S2, the communication subnet ID, shelf number, regional temperature and humidity trend change rate and update priority label are selected as the input parameter set to construct an initial feature space with spatial attributes and environment-driven features, realizing the vectorized expression of the task before clustering. The feature matrix mapping method (parameter: four-dimensional feature vector) is adopted to load the multi-dimensional attributes of different row tasks into the matrix row vector, so as to realize the carrying of a unified data structure and ensure that the distance metric in the clustering process can be executed in the same feature space. Furthermore, a normalization algorithm (parameter: Min-Max normalization range [0,1]) is used to proportionally map each dimension of the initial feature space, eliminating differences in the dimensions of different features and ensuring the comparability of the contributions of each dimension when calculating the Euclidean distance. The normalization process is performed according to the following formula:
[0016] in, For the current eigenvalue, This is the minimum value of this feature in the task set. The maximum value is mapped to a dimensionless value within the interval [0,1]. Furthermore, a vector consistency detection method (parameter: threshold ε) is employed to perform consistency checks on the normalized feature vectors, eliminating task vectors corresponding to abnormal or missing data, thus forming a standardized feature vector set with stability and integrity. The verification logic is implemented according to the following formula:
[0017] in, Let be the normalized feature vector of the i-th task. A preset minimum modulus threshold is used to filter out vector samples with insufficient feature information; By using normalization and consistency verification, the initial feature space is transformed into a standardized set of feature vectors that can be directly input into the micro-streaming K-means model, thus achieving the expected technical effect of unifying the structure and improving the quality of clustering input data. For example, for a temperature and humidity sensitive shelf area, the feature parameters of 5 tasks are obtained: communication subnet ID ranges from 100 to 104, shelf number ranges from 1 to 3, temperature and humidity trend change rate ranges from 0.02 to 0.15, and update priority label values range from 1 to 3. A 5×4 dimensional initial feature matrix is formed through matrix mapping, where the minimum value of the temperature and humidity change rate column is 0.02 and the maximum value is 0.15. Using the standardized formula described above, the change rate of 0.08 is mapped to... The normalized result was approximately 0.46. During the validation process, ε=0.05 was set, and samples with a normalized vector L2 norm of 0.98 were retained, while samples with L2 norms below 0.05 were discarded. Finally, a standardized feature set of 5 valid samples was formed and input into a mini-streaming K-means dataset to achieve efficient clustering under resource-constrained conditions. The results show that the iterative stability of the cluster centers is significantly improved, and the environmental consistency of task clustering is enhanced. S3.2: Initialize the core parameters of the micro-streaming K-means algorithm, including the preset initial cluster size K, the decay factor α for weighting historical cluster centers, and the sliding window size W for caching recently arrived task vectors; the micro-streaming K-means algorithm adopts an incremental update strategy, maintaining only a lightweight cluster center queue without storing complete historical data, in order to adapt to the memory-constrained conditions of edge devices; Based on the standardized spatiotemporal feature vector set output from S3.1, a micro-stream K-means algorithm parameter initialization mechanism (input parameters: standardized feature vector set, multidimensional feature number M) is adopted to realize the initial setting of the core control quantity of clustering; Furthermore, by setting the cluster number parameter (parameter: K value), the initial cluster number K is determined based on the historical task distribution density and the upper limit of edge device computing power, and an index matrix for the initial cluster center distribution is generated to ensure the rationality of the spatial coverage of the initial cluster allocation; Furthermore, an attenuation factor setting method (parameter: α value) is adopted. Based on the arrival rate of the task feature vector and the stability of environmental changes, the attenuation factor α is initialized as a floating-point number between 0 and 1. This attenuation factor is used for the fusion calculation of weighted historical cluster centers and new input task vectors, as shown in the following formula:
[0018] in, The feature vector of the updated new cluster centers, The feature vector of the old cluster centers. For the current task vector, It is the attenuation factor; Furthermore, by using a sliding window caching configuration method (parameter: window size W), and combining the instantaneous task arrival rate and average response latency, W is set to a capacity value that can simultaneously accommodate multiple task vectors; this sliding window is used to cache the most recently accessed task vector streams and provide the latest sample set support for the incremental update strategy; Furthermore, a lightweight cluster center queue construction method is adopted, which maintains a cluster center queue of length K. It does not store complete historical task data, but only retains the current cluster center vector and its update timestamp, thereby realizing the establishment of an online clustering environment with low memory consumption. By using this parameter initialization and storage optimization processing method, the feature input of the previous step is transformed into clustering operation parameters that are adapted to the memory conditions of edge devices, thereby realizing the stable operation and fast convergence of the micro-streaming K-means algorithm in resource-constrained scenarios. For example, in a temperature and humidity sensitive retail warehouse area, the edge device has 32MB of available memory, and the single task vector dimension M is 4 (communication subnet ID, shelf number, temperature and humidity trend change rate, update priority label). The cluster number parameter K is set to 8 based on the task distribution, and the attenuation factor α is set to... To increase the impact weight of new data, the sliding window size W is set to 20, allowing the system to buffer the most recent 20 task vector streams. The cluster center queue is maintained as an array, recording the 4-dimensional center vector and timestamp of each cluster. When a new task vector arrives, it is processed according to the formula... Update the center vector of the corresponding cluster. Verification shows that in a high-concurrency scenario with 50 tasks per second, the system maintains memory usage below 28MB, significantly reduces clustering response latency, and achieves efficient clustering control for electronic price tag tasks in temperature and humidity sensitive areas. S3.3: Input the standardized spatiotemporal feature vectors sequentially into the micro-streaming K-means algorithm model; assign the current task vector to the nearest neighbor cluster based on the Euclidean distance metric and the similarity between the current task vector and each existing cluster center; then update the corresponding cluster centers using a weighted recursive formula: new cluster center = (1 α) × old cluster center + α × current task vector, to achieve online tracking and adaptive adjustment of dynamic task distribution; S3.4: After each cluster center update, determine whether the cluster structure stability detection mechanism is triggered: if N consecutive task assignments do not cause a significant shift in the cluster centers (i.e., the displacement amplitude is less than the set threshold δ), then the current cluster structure is determined to be stable; otherwise, maintain the dynamic adjustment state to ensure that the task cluster division can respond to the time-varying characteristics of environmental driving factors. S3.5: Output the final multiple task clusters and their corresponding cluster centers, wherein each task cluster encapsulates a set of tasks with similar communication subnet IDs, shelf space proximity, consistent temperature and humidity trend response strength, and similar update priorities; use the task clusters as input units for the next stage of the simplified state machine model to support the establishment of a decentralized collaborative decision-making context; The input conditions are the stability test results output by step S3.4 and the cluster center queue maintained by the current micro-streaming K-means algorithm. The cluster center vector data includes four normalized dimensions: communication subnet ID, shelf number, regional temperature and humidity trend change rate, and update priority label. The feature vector decoding method (parameter: attribute encoding rules corresponding to each vector dimension) is used to reverse-parse the numerical data stored in the cluster center queue and restore it to the semantic attribute combination of the task. Furthermore, by using an intra-cluster attribute cross-comparison algorithm (parameters: cluster label, communication subnet ID matching matrix, shelf number spatial proximity scoring function), the internal consistency verification of the task set within the same cluster is achieved, and the task attribute consistency index within each cluster is obtained. Furthermore, using the environmental driver consistency measurement algorithm (parameters: temperature and humidity trend change rate difference threshold, update priority label matching ratio), the distribution of environmental response intensity of all tasks within the cluster is tested, and environmental driver consistency score data is generated. Furthermore, by encapsulating and processing clustering results (parameters: cluster ID, task list within the cluster, cluster center coordinate vector), the current clustering output is reconstructed into task cluster data record units, and an input format that can be directly called by the subsequent simplified state machine model is generated. By transforming the output of micro-stream K-means clustering results, the cluster centers and task sets within the clusters from the previous step are transformed into task cluster technical indicators with communication subnet proximity, shelf space proximity, temperature and humidity trend consistency, and update priority consistency, thereby achieving the expected technical effect of supporting the establishment of a decentralized collaborative decision-making context. For example, in a temperature and humidity sensitive product display area, the input feature vector set contains 10 task samples. Each sample's four-dimensional features are: communication subnet ID (normalized value 0.2~0.8), shelf number (normalized value 0.1~0.9), regional temperature and humidity trend change rate (normalized value 0.05~0.95), and update priority label (normalized value 0.3~0.7). The parameters of the micro-streaming K-means algorithm are set as follows: initial cluster size K=3, decay factor... = Sliding window size W= After incremental cluster allocation and cluster center updates, three cluster centers were ultimately formed: C1=(0.25,0.22,0.15,0.35), C2=(0.62,0.65,0.60,0.55), and C3=(0.80,0.82,0.83,0.65). Using an intra-cluster consistency verification algorithm, the communication subnet matching ratio of tasks in cluster C1 achieved high consistency, the shelf number spatial proximity score was close to the maximum value, the temperature and humidity trend consistency score was 0.88, and the update priority label matching ratio was 0.92, indicating good intra-cluster consistency. After encapsulation, the output task cluster data record unit contains the cluster ID, task list, and cluster center coordinate vector. For example, the record unit for cluster C1 is {cluster ID:1, task list:[T1,T3,T7], cluster center:(0.25,0.22,0.15,0.35)}. The output is directly used as the input unit of the simplified state machine model, and it has been verified that it can significantly improve the response speed and resource consumption controllability of intra-cluster task scheduling in subsequent collaborative decision-making processes.
[0019] like Figure 3 As shown, step S4 involves constructing a simplified state machine model for each generated task cluster. This simplified state machine model is designed based on a decentralized consensus mechanism, and its operation depends on the execution window suggestions and cost evaluation values broadcast by each task within the cluster. The cost evaluation value is calculated by weighting local remaining computing power and real-time communication quality, and serves as the basis for determining state transitions. Specifically, this includes: S4.1: Based on the set of price tag update requests in each task cluster output by the previous step S3, obtain the local running context parameters of each task, including the remaining computing power resources of the current edge node, the real-time channel quality of the communication subnet to which it belongs, and the environmental sensitivity level of the target price tag, as the initial input conditions for building a simplified state machine model, so as to ensure that the subsequent state transition logic has a data foundation that reflects the actual execution capability. Based on the set of price tag update requests in each task cluster output by step S3, the cluster traversal method (parameters: task cluster identifier set, list of cluster member task IDs) is used to load the runtime context data cache of the tasks within the cluster in turn, thereby realizing batch access scheduling of each task context. Furthermore, through the edge node resource monitoring interface (parameters: CPU utilization sampling window, memory usage rate sampling interval), the remaining computing power resources of the current node are obtained, the remaining computing power value is output as a numerical running parameter, and bound to the context field of the corresponding task ID to form a resource parameter mapping table; Furthermore, a communication subnet status query method (parameters: communication subnet ID, real-time channel quality sampling period) is adopted to access the link quality monitoring module of the subnet management unit, generate a real-time channel quality index value, and associate and bind the index with the communication subnet ID to which the task belongs, so as to reflect the network transmission performance impact that the task may be affected by. Furthermore, based on the product type identifier associated with the task ID, the environmental sensitivity level calibration function is called (parameters: product type to sensitivity level mapping table, change tolerance threshold setting) to retrieve the environmental sensitivity level label of the task, and the label is stored in the task context in a standardized format (high, medium and low corresponding numerical weights); Through the above chain-like acquisition process, the remaining computing power resource parameters, real-time channel quality parameters and environmental sensitivity level labels of each task in the task cluster are merged and encapsulated into a local running context record in a unified format, so as to achieve the integrity of the initial data input required for state machine construction. For example, in a task cluster containing 10 price tag update tasks, the cluster member task IDs are T001 to T010. The resource monitoring interface sets the CPU utilization sampling window to 5 seconds and the memory usage sampling interval to 2 seconds, resulting in a remaining node computing power of 2400 MFLOPS. The communication subnet quality query period is 3 seconds, and the sampled real-time channel quality index for subnet ID SN05 is 0.82, while the real-time index for SN06 is 0.76. Using the environmental sensitivity calibration function, the mapping table retrieves that T001 corresponds to the product type "cold chain fresh meat," with a high sensitivity level and a corresponding weight value. T005 corresponds to the product type of room temperature beverages, with a sensitivity level of low, and a corresponding weight value. The computing power value of 2400 MFLOPS, the channel quality value of 0.82 or 0.76, and the sensitivity weight value are encapsulated together into a runtime context record set in the form of [{T001:(2400,0.82,1.0)},...{T005:(2400,0.76,0.3)}]. This record set is used as the initial input to the simplified state machine construction process, ensuring that the state transition criteria accurately reflect the actual computing power and communication conditions, thereby significantly improving the accuracy of task execution feasibility determination in the subsequent cost evaluation in S4.2. S4.2: Based on the above local running context parameters, calculate the cost evaluation value of each task, and use a weighted fusion method to linearly combine the remaining computing power weight factor and the communication quality attenuation coefficient to generate a standardized local execution cost index. This index serves as the core criterion for negotiating priority between tasks in the state machine and is used to quantify the relative execution feasibility of different tasks under the current resource conditions. Based on the local runtime context parameters output by S4.1, a resource-weighted fusion calculation method (parameters: remaining computing power weight factor, communication quality attenuation coefficient) is adopted to achieve a quantitative representation of the execution cost of a single task. Furthermore, through the normalization mapping algorithm (parameter: minimum value) Maximum value This process transforms the original value of the remaining computing power into a dimensionless weight factor, and yields the computing power contribution parameter matrix. Furthermore, by using an exponential decay model (parameters: real-time communication quality value q, attenuation sensitivity coefficient β), nonlinear scaling of the communication quality input value is achieved, and a communication quality attenuation coefficient matrix is generated. Furthermore, the local execution cost index is calculated using a linear weighted combination formula. The following expression is used:
[0020] in, For weighting coefficients, The remaining computing power weighting factor, This is the communication quality attenuation factor; By using a local standardization algorithm (parameters: number of tasks in the cluster N, mean μ, variance σ²), the above local execution cost indicators are transformed into standardized costs that can be compared between tasks, enabling the direct application of cost in cluster priority determination. Through this weighted fusion and standardization process, the runtime context parameters of the previous step are transformed into local execution cost indicators with unified dimensions, thereby achieving a quantitative assessment of the feasibility of task execution. For example, in a temperature and humidity sensitive scenario in a retail warehouse, the remaining computing power of the edge node is 40 GFLOPS. The minimum computing power is set to 10 GFLOPS and the maximum to 60 GFLOPS, which is then normalized to obtain... = ; The real-time communication quality measurement value is 0.85. The communication quality attenuation coefficient is calculated using the exponential attenuation model (β=0.5). = ≈ ; Set the weight w=0.7, and substitute the data into the weighted combination formula to obtain... = ; With 5 tasks within the cluster, the cost metrics for all tasks are calculated as mean μ = 0.712 and variance σ² = 0.0021. The standardized cost of the current task is... ≈ This indicates that the task is highly feasible under the current resource constraints and is suitable for execution at the top of the negotiation priority ranking. This calculation result demonstrates a significant improvement in the consistency of local decisions and response speed in actual batch testing. S4.3: Based on the execution window suggested time range and corresponding cost evaluation value of each task broadcast, a decentralized consensus negotiation space is constructed. A lightweight distributed consensus protocol is used to match and analyze the proposals of all participating tasks, and a task response matrix containing potential conflicts and compatibility relationships is generated as the driving input for the state machine to enter the negotiation state, ensuring that the state transition process has verifiable collaborative basis. Based on the suggested execution window time range and corresponding cost evaluation value of each task broadcast, a time slot mapping parsing method (parameters: execution window start and end timestamps, communication subnet time slot table) is used to model the time feasible domain of all tasks. Furthermore, by using a cost normalization calculation method (parameters: local execution cost, maximum cost within the cluster, minimum cost within the cluster), the cost index is standardized, and comparable normalized cost matrix data is obtained. Furthermore, a lightweight distributed consensus matching algorithm (parameters: task ID, standardized execution window, normalized cost) is adopted to perform a two-dimensional matching analysis on all task proposals within the cluster and generate a matching priority matrix. The values of the matrix elements are determined based on the formulas for calculating the temporal overlap and cost difference between tasks: ,in For time overlap weight, The overlap ratio in the time domain. This represents the normalized cost difference value. Furthermore, a conflict detection algorithm (parameters: matching priority matrix, conflict threshold) is used to extract potential conflict relationships between task pairs and generate a conflict relationship matrix. The values of the matrix elements are calculated using the formula: ,in This represents the difference between the task's time domain boundaries. Furthermore, a compatibility analysis algorithm (parameters: matching priority matrix, compatibility weight coefficients) is used to identify parallelizable task pairs and generate a compatibility relationship matrix. The values of the matrix elements are calculated using the formula: ; By using the above-mentioned distributed consensus matching and conflict and compatibility relationship matrix construction processing method, the task proposal information in the previous step is transformed into a verifiable task response matrix, thereby achieving the expected technical effect of driving data input for the state machine to enter the negotiation state. For example, in a task cluster containing 8 price tag update tasks, the suggested execution window for each task broadcast is a start-end timestamp difference of 15 to 40 seconds, with a local execution cost between 0.2 and 0.9. A timeslot mapping resolution method is used to map timestamps to a shared 0-60 second timeslot table in the communication subnet, forming a unified time domain model. Using a cost normalization calculation method, 0.2 is mapped to 0.0, 0.9 to 1.0, and other values are linearly mapped proportionally. A lightweight distributed consensus matching algorithm is used to calculate the matching priority matrix. For example, if the time domain overlap ratio of tasks T1 and T3 is 0.5 and the cost difference is 0.4, the time overlap weight is... Under the condition that the elements of the matching priority matrix are The calculated value is In the conflict relation matrix, the time domain boundary difference between T2 and T5 Seconds, overlap ratio is 0.8, conflict value is Output If the value exceeds the set threshold of 0.35, it is considered a potential conflict. In the compatibility matrix, the cost difference between T4 and T6 is 0.1, and the compatibility value is calculated as follows: Output The value is above the compatibility threshold of 0.8, indicating high compatibility. The resulting task response matrix fully covers the conflict and compatibility relationships, driving the state machine to smoothly enter the negotiation state and significantly improving the reliability of task sequence consistency determination. S4.4: Deploy a simplified state machine instance within each task cluster. This state machine contains three core states: pending, negotiation, and locked. It executes state transition logic based on the task response matrix: when it receives the task broadcast from all members, it transitions from the pending state to the negotiation state and triggers the priority arbitration mechanism based on the cost evaluation value sorting result to select the current optimal execution sequence candidate set. S4.5: After the consensus confirmation of the candidate execution sequence is completed in the negotiation state, each task locks the final execution order synchronously through the loop feedback mechanism. The state machine then transitions to the locked state and outputs a deterministic ordered task sequence. This sequence represents the result of achieving local optimal scheduling under the current resource constraints and provides a timing control basis for subsequent instruction generation.
[0021] Step S5: Within each task cluster, a state machine-driven lightweight collaborative decision-making process is executed. Through the sequential transitions between the three core states of pending, negotiation, and locking, the instruction generation and execution order of each task within the cluster is determined, outputting an ordered task sequence. This ordered task sequence reflects the locally optimal scheduling result achieved under resource-constrained conditions. Specifically, this includes: S5.1: Based on the simplified state machine model built in S4, the state of all price tag update requests in each task cluster is initialized to 'pending', and the execution window suggestion and cost evaluation value of each task are used as initial input parameters. The execution window suggestion is determined by the temperature and humidity change tolerance period of the target price tag area, and the cost evaluation value is calculated by weighting the local remaining computing power and real-time communication quality to generate an initial state set as the starting basis for state transition. S5.2: Perform broadcast synchronization operation on the set of tasks in the 'pending' state, use low-power communication subnets such as Zigbee or LoRa to exchange execution window suggestions and cost evaluation values in a decentralized manner, obtain the collaborative context information of all tasks in the cluster, and generate a globally visible task attribute snapshot to support priority determination and conflict detection in the subsequent negotiation process; For a set of tasks in a 'pending' state, a low-power wireless communication subnet broadcast method is used (parameters: communication protocol type = Zigbee or LoRa, broadcast interval = 200ms, maximum number of retries = 3) to achieve decentralized exchange of execution window suggestions and cost evaluation values; Further, through the broadcast frame encapsulation algorithm (parameters: data segment encoding method = JSON structured, field order = task ID - execution window - cost value - timestamp), the key attributes of the pending tasks are packaged, and a set of data frames that can be uniformly parsed within the cluster is obtained; Further, the receiving node cache and deduplication algorithm (parameters: cache window length = 5 seconds, deduplication basis = combination key of task ID and timestamp) is adopted to eliminate redundancy of the received data frames and generate a cluster-wide task broadcast data set with uniqueness guarantee; Further, through the field parsing and attribute mapping method (parameters: environmental sensitivity level mapping table = preset 3-level numerical label table), the recommended time period of the execution window, cost evaluation value, and task space positioning parameters are extracted from the broadcast data set, and a structured attribute record table is generated; Further, the global attribute snapshot generation algorithm (parameters: snapshot field set = task ID, recommended execution window, cost value, environmental sensitivity level, spatial location, sorting basis = ascending order of task ID) is adopted to summarize the structured attribute record table into a one-time global task attribute snapshot file, and the complete mapping data of the cluster collaboration context is obtained; Through the low-power wireless broadcast and deduplication cache processing method, the pending task status information initialized in the previous step is converted into a global task attribute snapshot that can be shared among all members of the task cluster, providing input data with consistency and integrity guarantees for priority determination and conflict detection in the subsequent negotiation process; Exemplarily, in a task cluster deployed in a temperature and humidity sensitive storage area, assume that there are 10 price tag update tasks in a pending state within the cluster. The recommended execution window is determined by the temperature and humidity change tolerance period of the area where each price tag is located. The cost evaluation value is calculated by weighting the remaining computing power of the local CPU and the channel quality, assuming the weights are 0.7 and 0.3 respectively. Zigbee protocol is used for broadcasting, the broadcast interval is set to 200 milliseconds, and the maximum number of retries is 3 times. When each task node encapsulates the data frame, the field order is fixed as task ID - execution window - cost evaluation value - timestamp, and it is encoded in JSON format. The receiving end maintains a 5-second cache window and eliminates duplicate frames based on the combination of task ID and timestamp as the deduplication key. In a complete broadcast round, 10 task nodes all receive the unique attribute data of other nodes and perform numerical mapping on the environmental sensitivity level. For example, map "high" to 、"medium" to 、"low" to Finally, each node integrates the task ID, execution window suggestion, cost assessment value, environmental sensitivity level, and spatial location into a global task attribute snapshot in ascending order of task ID. The output is a JSON file that has passed consistency verification and is used for priority determination and conflict detection in the next step, so that the task sorting criteria in the subsequent negotiation stage have global visibility and real-time accuracy. S5.3: Based on task attribute snapshots, execute lightweight consensus judgment logic: If the cost evaluation value of a task is lower than the cluster average and its execution window suggestion does not overlap with other tasks, then its state is transitioned to 'locked'; otherwise, it remains in the 'negotiation' state and triggers a round of competition mechanism based on time slots. Tasks that do not reach the locked state within a preset number of rounds will be marked as high-conflict tasks, and a negotiation result list will be output to form an intermediate decision state that can distinguish priorities. Based on the task attribute snapshots output by S5.2, the cost mean determination method (parameter: set of cost evaluation values within the cluster, the mean is calculated as an arithmetic mean) is used to quantify the difference between the cost evaluation value of each task and the mean within the cluster. Furthermore, by executing a window conflict detection algorithm (parameters: start and end times of each task execution window, with the time format uniformly set to timestamps), the algorithm determines whether there is an intersection between the execution window suggestions and generates a conflict marker matrix. A value of 0 in the matrix indicates no intersection, and a value of 1 indicates an intersection. Furthermore, the cost mean determination result and the conflict marker matrix are logically synthesized, and the condition satisfaction determination formula is adopted:
[0022] in, This is the cost evaluation value for a single task. The mean within the cluster. Mark the conflict; if condition C is true, then transition the task state to locked. Furthermore, for tasks where condition C is not met, a time-slot-based contention scheduling algorithm (parameters: preset time slot length L, number of contention rounds R) is adopted to place these tasks in a negotiation state, and a time slot number is randomly assigned to each task. The iterative execution of the contention rounds is achieved through the time slot resource occupation conflict detection function. Furthermore, during the iterative process of the competition mechanism, the number of successful and unsuccessful attempts for each task is counted, and a high-conflict flag formula is used:
[0023] in, For conflict rate, The number of times the competition failed. For the total number of competitions; if If the conflict rate exceeds the preset threshold, the task will be marked as a high-conflict task. By combining the above-mentioned cost mean determination, execution window conflict detection and time slot contention scheduling, the task attribute snapshot result of the previous step is transformed into a negotiation result list, realizing the output of intermediate decision state for task priority. For example, in a retail display environment with limited edge device resources, a task cluster contains 5 electronic shelf label update tasks, with cost assessment values of 0.25, 0.40, 0.35, 0.50, and 0.20 for each task, and the average cost within the cluster is... The execution windows are [1000, 1200], [1100, 1300], [1400, 1500], [1000, 1150], and [1600, 1700] (unit: seconds). The conflict detection algorithm outputs a conflict marker matrix showing that task 1 has overlapping windows with tasks 2 and 4, while the remaining tasks have no conflicts. According to the conditional formula, task 5 meets the criteria of having a cost lower than the average and no conflicts, and is directly migrated to the locked state; tasks 1, 2, 3, and 4 enter the negotiation state, and in the time slot competition mechanism, L=10 seconds and R=3 rounds are set. It is found that tasks 2 and 4 both failed twice in 3 rounds, and the conflict rate is calculated. Tasks exceeding the threshold of 0.5 are marked as high-conflict tasks. The final output negotiation result list is: locked task [task 5], negotiated tasks [task 1, task 3], high-conflict tasks [task 2, task 4], providing clear input data for S5.4 priority optimization and sorting; S5.4: Tasks that have entered the 'locked' state are sorted in ascending order according to their cost evaluation value to generate the first-tier ordered task subsequence. At the same time, high-conflict tasks that are still in the 'negotiation' state are submitted to the dynamic arbitration module. Their comprehensive priority is recalculated using the compensation weight factor based on the temperature and humidity gradient difference, the sorting position is optimized, and the second-tier ordered task subsequence is output to ensure that tasks with high environmental sensitivity receive priority response. In the set of tasks in a "locked" state, an ascending sorting algorithm (parameter: sort key is the cost evaluation value) is used to directly sort the execution priorities of each task. Furthermore, a task priority array mapping method (parameter: index mapping table) is used to generate the first-tier ordered task subsequences and obtain the execution order data results within these subsequences. Furthermore, for the set of tasks that are still in the "negotiation" state and marked as high-conflict, a dynamic arbitration module invocation mechanism (parameter: arbitration trigger flag is 1) is adopted to realize the unified queuing processing of task arbitration requests and obtain the arbitration input queue; Furthermore, in the dynamic arbitration module, a compensation weight calculation method based on regional temperature and humidity gradient differences is invoked (parameter: historical temperature and humidity sequence window length is M) to construct the comprehensive weight factor. This compensation weight factor... The calculation formula is as follows:
[0024] in, Basic priority weighting coefficient, This represents the temperature and humidity gradient difference. This is an adjustment factor for environmental sensitivity. This is a sensitivity level factor for product type; Furthermore, by using a comprehensive weight factor mapping algorithm (parameter: mapping domain is the interval [0,1]), the comprehensive priority of high-conflict tasks is recalculated, and a reordered task list is generated. By using a priority optimization sorting method (parameter: sorting stability protection threshold is Δ), the result of the previous step is transformed into a second-tier ordered task subsequence, thereby achieving a priority response effect for tasks with high environmental sensitivity. For example, within a temperature and humidity sensitive area, 6 tasks are in a "locked" state, with their cost evaluation value array being [0.25, 0.35, 0.4, 0.42, 0.5, 0.55]. After sorting in ascending order, the first tier of ordered task subsequences is T1-T2-T3-T4-T5-T6. 4 tasks are still in a "negotiation" state, among which the temperature and humidity gradient difference array for high-conflict tasks is [0.8, 0.6, 0.7, 0.9], and the commodity type sensitivity level factor array is [0.9, 0.7, 0.85, 0.95]. Based on the compensation weight factor calculation formula:
[0025] After applying G and S values for each task to the formula, the compensation weight array is obtained as [0.85, 0.65, 0.775, 0.925]. By mapping to the [0,1] interval and performing sorting, the second-tier ordered task subsequence is generated as T10-T8-T9-T7. After merging the task sequences of the first and second tiers, the final output hierarchical ordered task sequence can effectively improve the timely responsiveness of highly sensitive tasks in arbitration verification. In system stress testing, it shows a significant reduction in instruction generation latency and resource utilization remains stably within a controllable range. S5.5: Merge the ordered task subsequences of the first and second tiers to generate a complete ordered task sequence. This sequence reflects the optimal execution order of all tag control tasks within the cluster under the current resource constraints. This sequence is used as the scheduling input of the instruction generation engine to complete the technical transformation from state transition logic to actual instruction arrangement, supporting the subsequent sequential generation of control instructions in S7.
[0026] Step S6: Determine whether the number of tasks within any task cluster exceeds a preset threshold. If it does, perform a sub-cluster split operation on the original task cluster based on the regional temperature and humidity gradient differences, generating two or more subdivided task clusters. Restart the simplified state machine model for each new cluster to maintain the computational load of a single collaborative unit within a manageable range. Specifically, this includes: S6.1: Obtain the task quantity statistics of each task cluster. The task quantity statistics are based on the task cluster output results generated in S3 and are summarized and calculated in combination with the cluster labels to which each update request belongs after clustering, so as to quantitatively characterize the load scale of each task cluster and serve as the input condition for subsequent split determination. S6.2: Based on the task quantity statistics, determine whether the number of tasks in any task cluster exceeds a preset threshold. The preset threshold is pre-calibrated based on the available computing resources of the edge device and the maximum concurrent processing capability of the simplified state machine model. If it does not exceed the threshold, the original task cluster structure remains unchanged; if it exceeds the threshold, a trigger signal is generated to start the sub-cluster splitting process and form a splitting decision output. S6.3: After receiving the split trigger signal, extract the spatial location and associated environmental perception data of all price tags in the task cluster, including the real-time temperature and humidity sampling values and historical trend sequences of each deployment point, and calculate the regional temperature and humidity gradient difference between adjacent price tags based on these data. Use the gradient difference to construct a spatial heterogeneity measurement matrix as the input for sub-cluster division. S6.4: Based on the spatial heterogeneity metric matrix, the spectral clustering algorithm is executed to divide the task nodes in the original task cluster into two or more sub-task clusters with lower internal temperature and humidity differences. This ensures that each newly generated sub-cluster covers a geographical area with more consistent temperature and humidity change characteristics. The sub-cluster division results are output to reduce the environmental uncertainty interference of local collaborative control. S6.5: Reinitialize the simplified state machine model for each newly generated sub-task cluster. The simplified state machine model inherits the state transition logic and consensus mechanism defined in S4. Based on the new task set, broadcast execution window suggestions and calculate cost evaluation values to complete the reconstruction of the decentralized collaborative decision-making environment and ensure that each sub-cluster after splitting has independent and closed-loop instruction scheduling capabilities.
[0027] Step S7: According to the ordered task sequence output by each task cluster, the instruction generation engine is sequentially invoked to generate corresponding price tag control instructions. These instructions include the target address, display content, and refresh timing control parameters. The generated instructions are then injected into the execution queue of the edge device to await issuance, forming an executable control output stream. Specifically, this includes: S7.1: Based on the ordered task sequence output by each task cluster after lightweight collaborative decision-making, obtain the task item to be processed. The task item includes the target price tag identifier, update priority tag and local collaborative context information of the task cluster to which it belongs, which serves as the input basis for instruction generation. S7.2: According to the task execution order in the ordered task sequence, the instruction generation engine is triggered sequentially to construct control instructions for the current task item. The instruction generation engine performs instruction field mapping operation based on predefined instruction templates and communication protocol specifications to generate structured control messages. S7.3: During the instruction generation process, the refresh timing control parameters are calculated and embedded by combining the deployment location information associated with the task item and the environmental sensitivity level. The refresh timing control parameters are derived by weighting the regional temperature and humidity trend change rate and the commodity type sensitivity level, and are used to dynamically adjust the update rhythm of the price tag display content. S7.4: Encapsulate the generated structured control message into an instruction unit that conforms to the edge device communication interface standard. The instruction unit includes a target address, a display content data segment, a refresh timing control parameter field, and a check code, forming a price tag control instruction with complete execution semantics. S7.5: Inject the encapsulated price tag control instructions into the real-time execution queue of the edge device, perform priority sorting and conflict detection processing based on the queue scheduling strategy to ensure that the instructions are reliably issued in order, and generate an executable control output stream for subsequent wireless communication modules to broadcast to the corresponding electronic price tag terminal; For the encapsulated price tag control instructions, a queue insertion method (parameters: target address, display content data segment, refresh timing control parameters, check code) is used to inject the instruction unit into the real-time execution queue of the edge device. Furthermore, a priority-based queue scheduling algorithm (parameters: update priority label weight, environment sensitivity weight, and remaining execution window time) is used to sort the tasks in the queue by priority and obtain the sorted execution index data. Furthermore, a conflict detection method (parameters: target address conflict threshold, refresh timing overlap tolerance) is adopted to perform conflict detection on adjacent instructions in the sorting results and generate a conflict marker list; Furthermore, through a conflict resolution algorithm (parameters: delay backoff duration, cost evaluation adjustment coefficient), the temporal order of instructions in the conflict flag list is rearranged, and the updated safe execution queue structure is output. By using a broadcast scheduling process, the instructions in the rearranged queue are sequentially triggered to broadcast the output of the wireless communication module, generating an executable control output stream, thereby achieving the technical effect of reliable and sequential delivery of price tag control instructions. For example, in a temperature and humidity sensitive product area, the edge device executes a real-time queue of 50 bytes. The currently injected control instruction unit contains a target address of A12, a display content data segment length of 256 bytes, and refresh timing control parameters calculated by weighting the temperature and humidity change rate (1.8) and sensitivity level (0.9). = Seconds, checksum is CRC16. The queue scheduling algorithm sets the update priority label weight to 0.6 and the environmental sensitivity weight to 0.4, and calculates the comprehensive priority value during the sorting phase. ,in For priority label values, The environmental sensitivity weights are used, and the tags are sorted in descending order of these values. During the conflict detection phase, the target address conflict threshold is set to ≥2 occurrences of the same address, and the refresh timing overlap tolerance is 0.3 seconds. If the refresh interval between A12 and A14 is less than 0.3 seconds, a conflict flag is triggered. During the conflict resolution phase, conflict commands are delayed by 0.5 seconds and the execution positions are reallocated using a cost evaluation adjustment coefficient of 0.85, ensuring that the final queue has no overlapping timing risks. The wireless communication module issues commands according to this optimized queue order. Testing shows that all price tags complete the display update within the refresh tolerance period, significantly improving system response speed and effectively mitigating resource contention.
[0028] Step S8: Monitor the response latency and resource occupancy status of the instruction execution queue. If continuous high-density task inflows cause queue backlog, adjust the clustering granularity parameters of the micro-streaming K-means algorithm to dynamically optimize the task clustering strategy, thereby achieving closed-loop adaptation to changing edge computing resource conditions. Specifically, this includes: S8.1: Obtain the running status data of the instruction execution queue. The running status data includes the current queue length, average response latency, number of new tasks per unit time, and CPU and memory usage of edge devices. These data serve as input conditions for evaluating system load intensity and scheduling performance, in order to quantitatively determine whether there is resource pressure caused by the continuous influx of high-density tasks. S8.2: Based on the running status data, calculate the queue backlog index, use the sliding time window to count the ratio of task enqueue rate to dequeue rate per unit time, and combine it with the coefficient of variation of response delay for weighted fusion to generate a normalized load assessment index, which is used to identify continuous high load conditions. Its output result serves as the basis for determining whether to trigger the clustering granularity adjustment mechanism. S8.3: Determine whether the queue backlog index continuously exceeds the preset dynamic threshold. If the condition is met, generate a clustering granularity adjustment trigger signal and start the feedback control process to avoid over-adjustment or under-adjustment caused by static parameter settings, and ensure that the adjustment of the task cluster partitioning strategy is timely and conditionally relevant. S8.4: Based on the trigger signal, dynamically adjust the clustering quantity parameter k and the feature vector weight coefficient in the micro-streaming K-means algorithm. By increasing the value of k, the subdivision of task clusters is improved, and the proportion of the regional temperature and humidity trend change rate in the distance metric is enhanced, so that the newly generated task clusters are more focused on the consistency of the local environment, thereby reducing the control domain range of each collaborative unit and reducing the probability of resource competition within a single cluster. S8.5: The adjusted clustering parameters are injected into the task dynamic clustering process of the next cycle, forming a closed-loop control link from execution feedback to scheduling decision, so that the task cluster partitioning strategy can adapt to the real-time changes of edge computing resources and improve the scalability and response robustness of the system in high-concurrency scenarios.
[0029] The present invention also provides a temperature and humidity price tag application control command scheduling system, which uses the above-mentioned temperature and humidity price tag application control command scheduling method to schedule temperature and humidity price tag application control commands.
[0030] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.
[0031] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and rules of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for scheduling control commands for temperature and humidity price tags, characterized in that, Includes the following steps: S1: Obtain update requests for multiple electronic price tags, wherein the update requests include target price tag identifier, associated product type, deployment location information, and environmental sensitivity level; S2: Extract the spatiotemporal feature vector of the task based on the deployment location information and the environmental sensitivity level of the associated product type in each update request; S3: Use the micro-streaming K-means algorithm to dynamically cluster the spatiotemporal feature vectors to generate multiple task clusters; S4: For each generated task cluster, construct a simplified state machine model. The simplified state machine model is designed based on a decentralized consensus mechanism, and its operation depends on the execution window suggestions and cost evaluation values broadcast by each task within the cluster. S5: Within each task cluster, a state machine-driven collaborative decision-making process is executed. By sequentially transitioning between the three core states of pending, negotiation, and locking, the instruction generation and execution order of each task within the cluster is determined, and an ordered task sequence is output. S6: Determine whether the number of tasks in any task cluster exceeds a preset threshold. If it does, perform a sub-cluster split operation on the original task cluster based on the regional temperature and humidity gradient difference to generate two or more subdivided task clusters, and restart the simplified state machine model for each new cluster. S7: According to the ordered task sequence output by each task cluster, the instruction generation engine is called in sequence to generate the corresponding price tag control instructions, and the generated instructions are injected into the execution queue of the edge device to wait for delivery.
2. The method for scheduling control commands for temperature and humidity price tags according to claim 1, characterized in that, Following step S7, the following is also included: S8: Monitor the response latency and resource usage status of the instruction execution queue. If a continuous influx of high-density tasks causes queue backlog, adjust the clustering granularity parameter of the micro-streaming K-means algorithm accordingly.
3. The method for scheduling control commands for temperature and humidity price tags according to claim 1, characterized in that, Step S1 specifically includes: Based on the operational requirements of the electronic shelf label system in temperature and humidity sensitive scenarios, multiple electronic shelf label update requests are obtained. Each update request serves as the initial processing object of the instruction generation module, initiating the multi-shelf label collaborative logic generation process. For each update request, the fields are parsed to extract three basic attributes: target price tag identifier, associated product type, and deployment location information, which are used as raw input parameters. Based on the preset product-environment response characteristic mapping table, query the response characteristics of the products corresponding to the associated product types in each update request to changes in temperature and humidity, and perform calibration operations based on the response characteristics to generate the corresponding environmental sensitivity level. The basic attributes are structurally bound to the environmental sensitivity level to construct a unified format of task metadata records. Each record encapsulates the complete semantic information of a tag update task, forming a set of task inputs to be processed. The task input set is subjected to integrity verification and anomaly filtering. Based on predefined field constraint rules, missing or out-of-bounds values are detected, invalid request entries are removed, and a cleaned set of valid update requests is output.
4. The method for scheduling control commands for temperature and humidity price tags according to claim 3, characterized in that, The process of obtaining multiple electronic price tag update requests adopts multi-source instruction acquisition, supports synchronous access from management platform interface and local trigger events, uses dual-channel communication path to align and merge timestamps, uses event filtering algorithm to remove invalid requests, and then generates a priority task list based on sensitivity and business strategy.
5. The method for scheduling control commands for temperature and humidity price tags according to claim 1, characterized in that, Step S2 specifically includes: The update requests from multiple electronic shelf labels are obtained. These update requests serve as input conditions and include the target shelf label identifier, associated product type, deployment location information, and environmental sensitivity level. Based on the physical installation coordinates and network topology attributes in the deployment location information, the corresponding communication subnet ID and shelf number are extracted to form the spatial positioning parameters of the task. Semantic parsing is performed on the environmental sensitivity levels corresponding to the associated product types, and unstructured level labels are mapped into computable weight values to generate environmental response weighting factors. Based on the historical temperature and humidity sensor data stream of the deployment area, the rate of change of regional temperature and humidity trend is calculated. A linear regression model is constructed using the average temperature and humidity values in the preceding N sampling periods, and the absolute value of the slope is output as the trend change rate index. By combining the spatial positioning parameters, the environmental response weighting factor, and the regional temperature and humidity trend change rate, and in conjunction with the update priority label configured in the business layer, a multi-dimensional spatiotemporal feature vector is generated through a preset weight fusion function. Normalization is performed on the multidimensional spatiotemporal feature vector, and the Min-Max standardization method is used to map the feature values of each dimension to a unified interval, and the standardized spatiotemporal feature vector is output.
6. The method for scheduling control commands for temperature and humidity price tags according to claim 1, characterized in that, In the generation of multiple task clusters, each task cluster corresponds to a set of price tag control tasks with similar environmental driving factors and response time requirements.
7. The method for scheduling control commands for temperature and humidity price tags according to claim 1, characterized in that, Step S4 specifically includes: Based on the set of price tag update requests in each task cluster, obtain the local runtime context parameters for each task; Based on the local runtime context parameters, the cost assessment value of each task is calculated, and a weighted fusion method is used to linearly combine the remaining computing power weight factor and the communication quality attenuation coefficient to generate a standardized local execution cost index. Based on the execution window suggested time range of each task broadcast and its corresponding cost evaluation value, a decentralized consensus negotiation space is constructed. A distributed consensus protocol is used to match and analyze the proposals of all participating tasks, generating a task response matrix that includes potential conflicts and compatibility relationships. Within each task cluster, a simplified state machine instance is deployed. The state transition logic is executed based on the task response matrix. When the task broadcast from all members is received, the process transitions from the pending state to the negotiation state. The priority arbitration mechanism is triggered based on the cost evaluation value ranking result to select the current optimal execution sequence candidate set. After the consensus of the candidate execution sequence is confirmed in the negotiation state, each task locks the final execution order synchronously through the loop feedback mechanism, and the state machine then transitions to the locked state, outputting a deterministic ordered task sequence.
8. The method for scheduling control commands for temperature and humidity price tags according to claim 7, characterized in that, The local runtime context parameters include the remaining computing resources of the current edge node, the real-time channel quality of the communication subnet to which it belongs, and the environmental sensitivity level of the target price tag.
9. The method for scheduling control commands for temperature and humidity price tags according to claim 1, characterized in that, Step S5 specifically includes: Based on the constructed minimal state machine model, the state of all price tag update requests in each task cluster is initialized to 'pending', and the execution window suggestion and cost evaluation value of each task are used as initial input parameters. The execution window suggestion is determined by the temperature and humidity change tolerance period of the target price tag area, and the cost evaluation value is calculated by weighting the local remaining computing power and real-time communication quality to generate an initial state set. Perform broadcast synchronization operations on the set of tasks in the 'pending' state, use the low-power communication subnet to perform decentralized exchange of execution window suggestions and cost evaluation values, obtain the cooperative context information of all tasks in the cluster, and generate a globally visible snapshot of task attributes; Based on the task attribute snapshot, consensus judgment logic is executed. If the cost evaluation value of a task is lower than the cluster average and its execution window suggestion does not overlap with other tasks, its state is transitioned to 'locked'. Otherwise, it remains in the 'negotiation' state and triggers a round of competition mechanism based on time slots. Tasks that do not reach the locked state within a preset number of rounds will be marked as high-conflict tasks, and a negotiation result list will be output to form an intermediate decision state that can distinguish priorities. Tasks that have entered the 'locked' state are sorted in ascending order according to their cost evaluation value to generate the first-tier ordered task subsequence. At the same time, high-conflict tasks that are still in the 'negotiation' state are submitted to the dynamic arbitration module. Their comprehensive priority is recalculated using the compensation weight factor based on the temperature and humidity gradient difference, the sorting position is optimized, and the second-tier ordered task subsequence is output. Merge the first echelon ordered task subsequence with the second echelon ordered task subsequence to generate a complete ordered task sequence.
10. A temperature and humidity price tag application control command scheduling system, characterized in that: The scheduling method for temperature and humidity price tag application control commands is adopted according to any one of claims 1-9.