CN-121995740-A - Two-dimensional code equipment self-adaptive control method, system, equipment and medium based on Internet of things
Abstract
The invention discloses a two-dimensional code equipment self-adaptive control method, a system, equipment and a medium based on the Internet of things, and relates to the technical field of two-dimensional code monitoring, comprising the steps of determining overlapping proportion of two-dimensional codes and adjacent two-dimensional codes on an equipment state time axis based on a cumulative contribution equal division method, forming a first sharing proportion array, converting the first sharing proportion array into an equipment state time period, and generating a plurality of groups of second sharing proportion arrays through continuous displacement disturbance; the method comprises the steps of establishing a corresponding relation between a sharing proportion, a state sampling initial offset and a coverage span, mapping a second sharing proportion array into a self-adaptive control object to control two-dimensional code monitoring, based on monitoring results under different sharing proportion arrays, accumulating and updating training self-adaptive control rewards through state feedback, compressing the second sharing proportion array into an integral sharing characterization value, and combining rewards to screen an optimal scheme, thereby solving the problems of insufficient two-dimensional code monitoring precision and continuity caused by state splitting or abnormal dilution in the existing method.
Inventors
- WANG HEXIANG
Assignees
- 苏州义联工业科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260409
Claims (10)
- 1. The two-dimensional code equipment self-adaptive control method based on the Internet of things is characterized by comprising the following steps of: Determining overlapping proportion of each two-dimensional code and the adjacent two-dimensional code on an equipment state time axis based on accumulated contribution equal division, obtaining equipment state sharing proportion of the adjacent code scanning product, and summarizing to form a first sharing proportion array; Converting the first sharing proportion array into starting and stopping positions of equipment state time periods corresponding to the two-dimensional codes, continuously shifting and disturbing the starting and stopping positions to generate a plurality of groups of corresponding equipment state time periods, and reversely converting to obtain a plurality of groups of second sharing proportion arrays; Establishing a corresponding relation between the sharing proportion, the state sampling initial offset and the state sampling coverage span, and realizing the conversion from the sharing proportion array to the self-adaptive control object; converting each second sharing proportion array into a corresponding self-adaptive control object and respectively controlling two-dimensional code monitoring; training corresponding self-adaptive control rewards according to the monitoring results under the control of different second sharing proportion arrays by combining the state feedback accumulation updating process; And compressing the second sharing proportion array into an integral sharing characterization value, screening the optimal second sharing proportion array by combining the self-adaptive control rewarding score, and controlling the monitoring of the two-dimensional code product state.
- 2. The two-dimensional code equipment self-adaptive control method based on the internet of things according to claim 1, wherein the overlapping proportion of each two-dimensional code and the adjacent two-dimensional code on the equipment state time axis is determined based on accumulated contribution equal division, the adjacent code scanning product equipment state sharing proportion is obtained, and a first sharing proportion array is formed by summarizing, specifically: Collecting a two-dimensional code scanning time sequence of a product in an Internet of things environment and a device state sampling time sequence corresponding to a code scanning node, and arranging device state sampling points according to the time sequence; Taking the code scanning time of two adjacent two-dimensional codes as a time boundary, and dividing the equipment state sampling points between the two-dimensional code scanning time and the time boundary into a continuous state sampling interval; Accumulating corresponding state change amplitudes of the equipment state sampling points in the state sampling interval according to time sequence to obtain a state change accumulation sequence in the interval; The final accumulated value of the state change accumulated sequence is used as the total state change contribution of the code scanning time interval, and the total state change contribution is divided into a plurality of continuous contribution segments in an equal division mode; positioning boundary positions of adjacent contribution sections along a state change accumulation sequence forwards and backwards respectively by taking corresponding two-dimensional code scanning time as a reference point, and determining a forward boundary and a backward boundary of the two-dimensional code on a device state time axis; Taking the equipment state time interval between the forward boundary and the backward boundary as the equipment state attribution interval of the two-dimensional code; Performing time axis alignment on equipment state attribution intervals of adjacent two-dimensional codes, counting the time length of overlapping between attribution intervals, and determining the sharing proportion of the equipment states of the adjacent code scanning products according to the ratio of the overlapping time length to the time length of the attribution interval of the corresponding two-dimensional codes; And repeating the step of determining the state sharing proportion of the adjacent code scanning product equipment for all the two-dimensional codes, and summarizing the state sharing proportion of the adjacent code scanning product equipment corresponding to each two-dimensional code to form a first sharing proportion array.
- 3. The two-dimensional code device adaptive control method based on the internet of things according to claim 2, wherein the converting the first sharing proportion array into the start-stop positions of the device state time periods corresponding to the two-dimensional codes, and performing continuous displacement disturbance on the start-stop positions to generate a plurality of groups of corresponding device state time periods, and reversely converting to obtain a plurality of groups of second sharing proportion arrays comprises: reading the sharing proportion of the adjacent scanning code product equipment states corresponding to the two-dimension codes in the first sharing proportion array, and synchronously reading the attribution interval of the two-dimension code equipment states; Representing each device state attribution interval as a device state time period defined by a starting time point and an ending time point, and recording the position of the time period on a device state time axis; determining the corresponding overlapping time length and the exclusive time length of the current time period according to the overlapping relation between the equipment state time period and the adjacent two-dimensional code equipment state time period; taking a starting time point and an ending time point of the equipment state time period as displacement references, carrying out synchronous or reverse continuous displacement on the starting time point and the ending time point along an equipment state time axis, and generating a plurality of groups of candidate equipment state time periods with different degrees of expansion or translation; for each group of candidate equipment state time periods, keeping the state time periods of the adjacent two-dimensional code equipment unchanged, and redefining the corresponding overlapping time length and the exclusive time length; Obtaining corresponding candidate adjacent code scanning product equipment state sharing proportion according to the proportional relation between the overlapping time length of the candidate equipment state time period and the self time length; And summarizing sharing proportion corresponding to the candidate equipment state time period around the same two-dimensional code to form a plurality of groups of second sharing proportion arrays corresponding to the first sharing proportion arrays one by one.
- 4. The two-dimensional code device self-adaptive control method based on the internet of things according to claim 3, wherein the establishing of the correspondence between the sharing proportion, the state sampling initial offset and the state sampling coverage span realizes the conversion from the sharing proportion array to the self-adaptive control object, specifically comprises: Reading the corresponding candidate equipment state time period for each group of second sharing proportion arrays, and acquiring the starting time point and the ending time point of the time period on the equipment state time axis; The method comprises the steps of taking a code scanning trigger moment corresponding to a two-dimensional code as a time reference point, and determining a starting offset of state sampling after code scanning trigger according to the position relation of a candidate equipment state time period starting time point relative to the code scanning trigger moment on a time axis; Determining the coverage span of state sampling after code scanning triggering according to the interval range of the starting time point and the ending time point of the candidate equipment state time period on a time axis; Through the joint setting of the initial offset of the state sampling and the coverage span of the state sampling, the state sampling time period after the code scanning triggering forms a time overlapping relation consistent with the second sharing proportion array with the state time period corresponding to the adjacent two-dimensional code on the equipment state time axis; Combining the state sampling initial offset corresponding to each two-dimensional code with the state sampling coverage span to form a self-adaptive control object set corresponding to the second sharing proportion array one by one; And according to the self-adaptive control object set, the reverse conversion from the second shared proportion array to the code scanning triggering state sampling initial offset and the state sampling coverage span is realized.
- 5. The two-dimensional code device self-adaptive control method based on the internet of things according to claim 4, wherein the converting each second sharing proportion array into a corresponding self-adaptive control object and controlling two-dimensional code monitoring respectively specifically comprises: reading state sampling initial offset and state sampling coverage span corresponding to the second sharing proportion arrays one by one aiming at each group of the second sharing proportion arrays; when a two-dimensional code product enters a target process and triggers a code scanning operation, recording a corresponding code scanning trigger time stamp, and taking the time stamp as a sampling reference time of the two-dimensional code in the current process; Determining an actual starting time point of state sampling along a device state time axis after the code scanning trigger time stamp according to the state sampling starting offset; Determining an actual end time point of the state sampling along an equipment state time axis after the actual start time point according to the state sampling coverage span, so as to form an equipment state sampling time period of the two-dimensional code under the current working procedure; Extracting a corresponding device state data subsequence from the device-side continuously acquired device state time sequence data of the Internet of things according to a time interval defined by the actual starting time point and the actual ending time point; binding the device state data subsequence with the two-dimensional code triggering the sampling process to form a two-dimensional code device state monitoring result under the condition of a second shared proportion array; and respectively executing the processes on the state sampling initial offset and the state sampling coverage span corresponding to all the second sharing proportion arrays to obtain a plurality of groups of two-dimensional code equipment state monitoring results under different sharing proportion conditions.
- 6. The two-dimensional code device self-adaptive control method based on the internet of things according to claim 5, wherein the self-adaptive control rewards corresponding to the monitoring results based on the control of the different second sharing proportion arrays are trained by combining the state feedback accumulation updating process, and specifically comprises the following steps: Reading a two-dimensional code equipment state sampling result formed in the two-dimensional code monitoring process aiming at each group of second sharing proportion arrays, and arranging according to the two-dimensional code scanning time sequence to obtain a two-dimensional code sequence corresponding to the second sharing proportion arrays; Sequentially selecting two adjacent two-dimensional codes along the two-dimensional code sequence, reading the corresponding equipment state sampling time periods of the two-dimensional codes, and determining the overlapping time interval of the two-dimensional codes on the equipment state time axis; In the overlapping time interval, a state difference value sequence is formed for the equipment state sampling points of the adjacent two-dimensional codes at the same time position one by one, and the number of sampling points with the state difference value larger than a preset state difference value threshold is counted and used as a first characteristic value of the adjacent two-dimensional code pair; respectively determining the maximum state value and the minimum state value of each equipment state sampling point for non-overlapping parts in the equipment state sampling time periods of the adjacent two-dimensional codes, and taking the overlapping length of the numerical value intervals of the maximum state value and the minimum state value as a second characteristic value of the adjacent two-dimensional code pair; Performing normalization mapping on the first characteristic value according to a preset upper limit value to obtain a first normalization characteristic value with a value range limited in (0, 1); performing normalization mapping on the second characteristic value according to the preset state interval width to obtain a second normalization characteristic value with the value range limited in (0, 1); Linearly combining the first normalized characteristic value and the second normalized characteristic value according to preset weight to obtain a sharing deduction value corresponding to the adjacent two-dimensional code pair; Accumulating and summarizing the shared deduction values of all adjacent two-dimensional code pairs along the two-dimensional code sequence to obtain a total deduction corresponding to a second shared proportion array; and taking a preset reference reward value as an initial value, subtracting a corresponding total deduction amount by the reference reward value, and outputting a single continuous scalar as an adaptive control reward point corresponding to the second sharing proportion array.
- 7. The two-dimensional code device self-adaptive control method based on the internet of things according to claim 6, wherein the compressing the second sharing proportion array into the integral sharing characterization value, combining the self-adaptive control rewards to screen the best second sharing proportion array, and controlling the two-dimensional code product state monitoring specifically comprises: Reading all second sharing proportion arrays, respectively reading adaptive control rewards corresponding to each second sharing proportion array one by one, and constructing a corresponding set of the second sharing proportion arrays and the adaptive control rewards; For each group of second sharing proportion arrays, reading the sharing proportion of the state of each adjacent code scanning product device in the arrays along the two-dimensional code sequence, and taking the sharing proportion as an array element to form a sharing proportion sequence corresponding to the second sharing proportion arrays; Square processing is carried out on each sharing proportion value in the sharing proportion sequence, and accumulated summation is carried out on square results to obtain square sum representation values corresponding to a second sharing proportion array; the square sum representation value is subjected to normalization mapping according to a preset normalization range, and the integral sharing representation value with the value range limited at (0, 1) is output; The integral shared characterization value is taken as an independent variable, and the self-adaptive control rewarding point corresponding to the integral shared characterization value is taken as a dependent variable, so that a two-dimensional discrete point set of the integral shared characterization value-self-adaptive control rewarding point is constructed; sorting the two-dimensional discrete point sets according to the order of the overall shared characterization values, and sequentially connecting adjacent points along the sorting direction to form a curve relation of self-adaptive control rewarding points along with the variation of the overall shared characterization values; In the curve, screening the integral sharing characterization value corresponding to the self-adaptive control rewarding score reaching the maximum value, and determining a second sharing proportion array corresponding to the integral sharing characterization value one by one as an optimal second sharing proportion array; And remapping the optimal second sharing proportion array into a self-adaptive control object corresponding to the state sampling initial offset and the state sampling coverage span, and controlling a follow-up two-dimensional code monitoring process based on the Internet of things based on the self-adaptive control object.
- 8. A system using the two-dimensional code equipment self-adaptive control method based on the internet of things according to any one of claims 1-7, which is characterized by comprising a sharing proportion generation module, a sharing proportion disturbance generation module, a sharing proportion control mapping module, a multi-proportion state control module, a self-adaptive control rewarding training module and a self-adaptive control module; The sharing proportion generation module is used for determining the overlapping proportion of each two-dimensional code and the adjacent two-dimensional code on the equipment state time axis based on accumulated contribution equal division, obtaining the equipment state sharing proportion of the adjacent code scanning product, and summarizing to form a first sharing proportion array; the sharing proportion disturbance generation module is used for converting the first sharing proportion array into starting and stopping positions of equipment state time periods corresponding to the two-dimensional codes, continuously shifting and disturbing the starting and stopping positions to generate a plurality of groups of corresponding equipment state time periods, and reversely converting to obtain a plurality of groups of second sharing proportion arrays; The sharing proportion control mapping module is used for establishing a corresponding relation between the sharing proportion, the state sampling initial offset and the state sampling coverage span and realizing the conversion from the sharing proportion array to the self-adaptive control object; The multi-proportion state control module is used for converting each second shared proportion array into a corresponding self-adaptive control object and respectively controlling two-dimensional code monitoring; The self-adaptive control rewards training module is used for training corresponding self-adaptive control rewards according to the monitoring results under the control of the different second sharing proportion arrays and combining the state feedback accumulation updating process; and the self-adaptive control module is used for compressing the second sharing proportion array into an integral sharing characterization value, screening the optimal second sharing proportion array by combining self-adaptive control rewards, and controlling the two-dimensional code product state monitoring.
- 9. An electronic device, the electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; Wherein the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the two-dimensional code device adaptive control method based on the internet of things as set forth in any one of claims 1 to 7.
- 10. A computer-readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the two-dimensional code device adaptive control method based on the internet of things according to any one of claims 1 to 7.
Description
Two-dimensional code equipment self-adaptive control method, system, equipment and medium based on Internet of things Technical Field The invention relates to the technical field of two-dimension code monitoring, in particular to a two-dimension code equipment self-adaptive control method, a system, equipment and a medium based on the Internet of things. Background In manufacturing and logistics production processes, the two-dimensional code equipment monitoring technology based on the Internet of things is widely applied to product tracking, process quality tracing and equipment running state correlation analysis. In the prior art, generally, when a product enters or leaves a certain processing procedure, a two-dimensional code of the product is read through a code scanning device, and the code scanning time is used as a procedure boundary mark and used for intercepting the equipment running state of a corresponding time interval from the state data of the Internet of things continuously collected at the equipment side. The running state of the equipment is usually derived from sensor nodes deployed on processing equipment, equipment working condition parameters including current, rotating speed, vibration, power fluctuation and the like are collected, and the equipment working condition parameters are cached and stored in time sequence, so that the binding of the two-dimensional code and the equipment state interval is realized. In the actual continuous processing or line production scene, the adjacent code scanning products always finish processing continuously on the same equipment, and the corresponding equipment state time intervals have natural continuity or even overlap partially on the time axis. Therefore, in the two-dimensional code equipment monitoring based on the Internet of things, the problem of whether the same section of equipment state data is commonly referred to by adjacent two-dimensional code products or not and how much is inevitably involved, namely the problem of sharing proportion of the adjacent code scanning product equipment states. The sharing proportion directly determines whether a section of equipment state is strictly divided into a single two-dimensional code on a time axis or is allowed to be partially or wholly shared among a plurality of adjacent two-dimensional codes, and is key technical content in a two-dimensional code state attribution mechanism. The value of the state sharing proportion of adjacent code scanning product equipment has direct and obvious influence on the monitoring result of the two-dimensional code equipment based on the Internet of things. The setting of the sharing proportion not only affects the equipment state time span reflected by a single two-dimensional code, but also affects the continuity, consistency and distinguishing degree of state information between adjacent two-dimensional codes. When the sharing proportion is unreasonable, conflict is easy to generate between the continuity of the equipment state and the granularity of the two-dimension code product, so that the technical value of the two-dimension code in state monitoring, anomaly tracing and quality analysis is weakened. When the sharing proportion of the equipment states of adjacent code scanning products is low, the state cutting mode strictly taking code scanning time as a boundary is generally adopted in the prior art, so that each two-dimensional code is only associated with the equipment state data in a very short time range. Under a continuous processing scene, the mode is easy to cause the cracking of the equipment state on the two-dimension code layer, the change of the upstream equipment state cannot be continuously reflected in the downstream two-dimension code, and the state difference between the adjacent two-dimension codes is caused to be suddenly jumped. Therefore, the apparent frequency of state fluctuation is increased, misjudgment on the running stability of the equipment is easily caused, and the abnormal evolution process of the equipment is difficult to effectively trace back through the two-dimensional code sequence. When the sharing proportion of the equipment states of the adjacent code scanning products is higher, the same piece of equipment state data can be distributed to a plurality of two-dimensional code products in a large range, so that the equipment state time window corresponding to a single two-dimensional code is obviously prolonged. In this case, key state information such as short-time abnormality, local fluctuation, etc. of the device is easily masked by a large number of normal states, resulting in a state reflected by the two-dimensional code tending to average and historize. Meanwhile, the high sharing proportion can blur the corresponding relation between equipment abnormality and specific code scanning nodes, so that responsibility positioning and process-level state analysis become difficult, and the real-time performance and accura