A template matching-based industrial production cycle real-time determination method

CN115587740BActive Publication Date: 2026-10-23HEFEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211385724.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-07
Publication Date
2026-10-23
Estimated Expiration
2042-11-07

AI Technical Summary

Technical Problem

现有的工业生产周期实时确定方法实现复杂、计算量较大,无法满足现代工业对生产周期确定方法可靠性和实时性的要求

Benefits of technology

[0035]1)本发明充分利用工业生产过程中的历史生产数据提供的特征信息,进而构建模板特征向量,并根据在线采样的数据创建实时特征向量,通过模板匹配方法,准确确定出生产过程的周期开始时间和周期时长。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115587740B_ABST
    Figure CN115587740B_ABST
Patent Text Reader

Abstract

The application discloses a kind of industrial production cycle real-time determination method based on template matching, its steps include:1, obtains and analyzes the historical production data in industrial production process, extracts the production data with maximum change rate therein;2, with the sampling time of the production data with maximum change rate extracted as reference time, template feature vector is generated using the production data obtained;3, create real-time feature vector according to the production data of online sampling;4, match analysis is carried out on real-time feature vector and template feature vector, to determine the cycle start time and cycle length of industrial production.The present application can determine the industrial production cycle in real time, and provides strong support for the field of industrial signal processing technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of industrial signal processing technology, specifically a method for real-time determination of industrial production cycles based on template matching. Background Technology

[0002] In the field of industrial control, designers often incorporate the periodic characteristics of production processes into their control strategy design. Therefore, ensuring the reliability and real-time nature of the provided periodic information is crucial for designing excellent control strategies. Existing methods for real-time determination of industrial production cycles are complex to implement and computationally intensive, failing to meet the reliability and real-time requirements of modern industry for production cycle determination methods. Summary of the Invention

[0003] To address the aforementioned technical problems, this invention proposes a real-time method for determining industrial production cycles based on template matching, aiming to reduce implementation complexity and simplify computation, thereby meeting the requirements of modern industry for the reliability and real-time performance of production cycle determination methods.

[0004] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:

[0005] The present invention provides a method for real-time determination of industrial production cycles based on template matching, characterized by the following steps:

[0006] S1: Collect historical production data during the industrial production process at sampling step size τ, denoted as j0,j1,…,j i-1 ,j i ,…,j M ; where j i Let M represent the production data at the i-th sampling time, and M represent the total number of time intervals; i = 0, 1, 2, ..., M;

[0007] Let △j i =j i -j i-1 Let j represent the difference in the i-th production data. When i = 0, let j i-1 =j i Thus, the historical production data difference sequence △j0,…,△j is obtained. i ,…,△j M ;

[0008] Let Δj be the production data difference corresponding to the largest absolute value in the historical production data difference sequence. max Thus, the production data with the largest rate of change in the historical production data is obtained as the production data j at the max-th sampling time. max max belongs to [0, M];

[0009] S2: Generate template feature vectors using historical production data:

[0010] S21: Using the production data j with the largest rate of change from historical production data. max The sampling time is taken as the reference time. From the historical production data, P production data points j before the reference time are selected. max-P j max-P+1 ..., j max-1 and the Q production data j after the reference time. max+1 j max+2 ..., j max+Q and with production data j max Together they form a template data sequence j max-P ,…,j max ,…,j max+Q ;

[0011] Define an N+1 dimensional template to produce a vector H, and let the k-th component h of vector H be... k =j k+max-P Where N = P + Q, k = 0, 1, 2, ..., N; thus, the template production vector H = [h0, ..., h k-1 ,h k ,h k+1 ,…,h N ] T ;

[0012] S22: Calculate the 2-norm NORM of the template production vector H according to equation (1). H :

[0013]

[0014] Let h be the feature data of the k-th template. k '=h k / NORM H k = 0, 1, 2, ..., N; thus, the template feature vector H' = [h0', ..., h k-1 ',h k ′,h k+1 ',…h N '] T ;

[0015] S3: Create real-time feature vectors based on online sampled production data:

[0016] S31: Define an N+1 dimensional real-time production vector R = [r0,…,r k-1 ,r k ,r k+1 ,…r N ] T Time vector T = [t0, ..., t k-1 ,t k,t k+1 ,…t N ] T And initialize R and T as zero vectors; where r k Let t represent the k-th real-time production data. k Indicates r k The corresponding sampling time;

[0017] S32: Define variables Tail, Sum, and Flag1, and initialize Tail = 0, Sum = 0, and Flag1 = false; define the period start time variable as t. s The period end time variable is t. e The time index pointer is set to Index, the second flag is set to Flag2, and t is initialized. s =0, t e =0, Index=0, Flag2=false;

[0018] S33: Set the timing time to τ and start timing, and store the timing start time in the variable st, and store the production data sampled at the timing start time in the variable sd;

[0019] S34: Perform assignment operations sequentially: Tail ← Tail % (N+1), Sum ← Sum -r Tail 2 r Tail ←sd、t Tail ←st、Sum←Sum+r Tail 2 ,Tail←Tail+1, where ← represents assignment and % represents modulo; and perform the following judgment:

[0020] If Flag1 = true, then proceed to step S35.

[0021] If Flag1 = false, and Tail = N+1 is true, then Flag1 = true and proceed to step S35; otherwise, proceed to step S42.

[0022] S35: Let the k-th real-time feature data... k = 0, 1, 2, ..., N; thus, we obtain the N+1 dimensional real-time feature vector R' = [r0', ..., r k-1 ',r k ',r k+1 ',…,r N '] T ;

[0023] S4: Matching analysis of real-time feature vector R' and template feature vector H' to determine the cycle start time and cycle duration of industrial production:

[0024] S41: Define a pre-set threshold as TH', and calculate the matching metric d' between the real-time feature vector R' and the template feature vector H' according to equation (2):

[0025] d'=(r Tail%(N+1) '-h0') 2 +…+(r (Tail+N)%(N+1) '-h N ') 2 (2)

[0026] When d'>TH', proceed to step S42.

[0027] When d'≤TH', if Flag2=true, then the assignment operation is performed: Index←(Tail+P)%(N+1), t e ←t Index And obtain the start time of the industrial production cycle CS = t s Period duration CL = t e -t s The loop ends immediately after the conclusion is reached; otherwise, the assignment operation is performed: Index ← (Tail + P) % (N + 1), t s ←t Index 1. Flag2 ← true, and proceed to step S42 for execution;

[0028] S42: If the timeout period expires, return to step S33 to execute; otherwise, continue executing step S42.

[0029] The present invention provides a method for real-time determination of industrial production cycle based on template matching, wherein the template feature vector H' in step S22 is obtained from the template production vector H, i.e., template feature vector H' = H, and the real-time feature vector R' in step S35 is obtained from the real-time production vector R, i.e., real-time feature vector R' = R.

[0030] The matching metric d' in step S41 is calculated according to equation (3), and the preset threshold is set to TH. *

[0031]

[0032] The present invention provides an electronic device, including a memory and a processor, characterized in that the memory is used to store a program that supports the processor in executing the real-time determination method for industrial production cycles, and the processor is configured to execute the program stored in the memory.

[0033] The present invention provides a computer-readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, performs the steps of any of the aforementioned industrial production cycle real-time determination methods.

[0034] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0035] 1) This invention makes full use of the feature information provided by historical production data in the industrial production process, and then constructs a template feature vector. Based on the online sampled data, a real-time feature vector is created. Through the template matching method, the cycle start time and cycle duration of the production process are accurately determined.

[0036] 2) By introducing the variable Tail, this invention effectively avoids data movement during the creation of real-time production vectors, improves the time efficiency of the template matching method, and can meet the real-time requirements of modern industry for production cycle determination methods. Attached Figure Description

[0037] Figure 1 This is a flowchart of the method for real-time determination of industrial production cycle according to the present invention. Detailed Implementation

[0038] In this embodiment, a method for real-time determination of industrial production cycles based on template matching requires that the collected production data reflect the cycle information of industrial production; that is, the collected production data sequence is a periodic sequence or pseudo-periodic sequence with periodic characteristics. Specifically, such as... Figure 1 As shown, this method for real-time determination of industrial production cycles is carried out according to the following steps:

[0039] Step S1: Collect historical production data during the industrial production process at sampling step size τ, denoted as j0, j1, ..., j i-1 ,,j i ,…,j M ; where j i Let M represent the production data at the i-th sampling time, and M represent the total number of time intervals; i = 0, 1, 2, ..., M;

[0040] Let △j i =j i -j i-1 Let j represent the difference in the i-th production data. When i = 0, let j i-1 =j i Thus, the historical production data difference sequence △j0,…,△j is obtained. i ,…,△j M ;

[0041] Let Δj be the production data difference corresponding to the largest absolute value in the historical production data difference sequence. maxThus, the production data with the largest rate of change in the historical production data is obtained as the production data j at the max-th sampling time. max max belongs to [0, M];

[0042] Step S2: Create template feature vectors:

[0043] Step S21: Use the production data j with the highest rate of change obtained. max Using the sampling time as the reference time and the sampling step size τ as the time interval, P production data points j prior to the reference time are selected from the collected historical production data. max-P j max-P+1 ..., j max-1 Q production data j after the reference time max+1 j max+2 ..., j max+Q , with production data j max Together they form the template production vector H = [h0, ..., h k-1 ,h k ,h k+1 ,…,h N ] T ;

[0044] Step S22: Normalize the template production vector H using the L2 norm normalization method to obtain the template feature vector H'. The specific process is as follows:

[0045] Calculate the 2-norm of the template production vector H according to equation (1):

[0046]

[0047] Let h be the feature data of the k-th template. k '=h k / NORM H k = 0, 1, 2, ..., N; thus, the template feature vector H' = [h0', ..., h k-1 ',h k ′,h k+1 ',…h N '] T ;

[0048] Step S3: Prepare real-time feature vectors:

[0049] Step S31: Define an N+1 dimensional real-time production vector R = [r0,…,r k-1 ,r k ,r k+1 ,…r N ] T Time vector T = [t0, ..., t k-1 ,t k ,tk+1 ,…t N ] T And initialize R and T as zero vectors; where r k Let t represent the k-th real-time production data. k Indicates r k The corresponding sampling time;

[0050] Step S32: Define variables Tail, Sum, and Flag1, and initialize Tail = 0, Sum = 0, and Flag1 = false; define the period start time variable as t. s The period end time variable is t. e The time index pointer is set to Index, the second flag is set to Flag2, and t is initialized. s =0, t e =0, Index=0, Flag2=false;

[0051] Step S33: Set the timing time to τ and start timing, and store the timing start time in the variable st, and store the production data sampled at the timing start time in the variable sd;

[0052] Step S34: Perform assignment operations in sequence: Tail ← Tail % (N+1), Sum ← Sum - r Tail 2 r Tail ←sd、t Tail ←st、Sum←Sum+r Tail 2 ,Tail←Tail+1, where ← represents assignment and % represents modulo; and perform the following judgment:

[0053] If Flag1 = true, then proceed to step S35.

[0054] If Flag1 = false, and Tail = N+1 is true, then Flag1 = true and proceed to step S35; otherwise, proceed to step S42.

[0055] Step S35: Let the k-th real-time feature data k = 0, 1, 2, ..., N; thus, we obtain the N+1 dimensional real-time feature vector R' = [r0', ..., r k-1 ',r k ',r k+1 ',…,r N '] T ;

[0056] Step S4: Use the Euclidean distance metric to perform matching analysis between the real-time feature vector R' and the template feature vector H' to determine the start time and duration of the industrial production cycle.

[0057] Step S41: Set the distance threshold according to the selected vector matching method and denote it as TH'. Calculate the matching metric d' between the real-time feature vector R' and the template feature vector H' according to equation (2), and make the following judgment:

[0058] d'=(r Tail%(N+1) '-h0') 2 +…+(r (Tail+N)%(N+1) '-h N ') 2 (2)

[0059] When d'>TH', proceed to step S42.

[0060] When d'≤TH', if Flag2=true, then the assignment operation is performed: Index←(Tail+P)%(N+1), t e ←t Index And obtain the start time of the industrial production cycle CS = t s Period duration CL = t e -t s The loop ends immediately after the conclusion is reached; otherwise, the assignment operation is performed: Index ← (Tail + P) % (N + 1), t s ←t Index 1. Flag2 ← true, and proceed to step S42 for execution;

[0061] Step S42: If the timer expires, return to step S33 to execute; otherwise, continue executing step S42.

[0062] In this embodiment, an electronic device includes a memory and a processor. The memory is used to store a program that supports the processor in executing the above-described method for real-time determination of industrial production cycles. The processor is configured to execute the program stored in the memory.

[0063] In this embodiment, a computer-readable storage medium stores a computer program, which, when run by a processor, executes the steps of the above-described method for real-time determination of industrial production cycles.

Claims

1. A method for real-time determination of industrial production cycles based on template matching, characterized in that, Includes the following steps: S1: Historical production data from the industrial production process is collected at time intervals of sampling step size τ, denoted as S1. , ;in, This represents the production data at the i-th sampling time. Indicates the total number of time intervals; ; make This represents the difference in the i-th production data, when... season Thus, the difference sequence of historical production data is obtained. ; Let the production data difference corresponding to the largest absolute value in the historical production data difference sequence be denoted as . Thus, the production data with the largest rate of change in the historical production data is obtained as the production data at the max-th sampling time. , ; S2: Generate template feature vectors using historical production data: S21: Production data with the highest rate of change in historical production data. The sampling time is the reference time. From the historical production data, data prior to the reference time are selected. Production data , … and after the reference time Production data , … and production data Together they form a template data sequence ; Define an N+1 dimensional template production vector And let the k-th component of vector H ,in, , Thus, the template production vector is obtained. ; S22: Calculate the 2-norm of the template production vector H according to equation (1). : (1) Let the k-th template feature data , Thus, the template feature vector is obtained. ; S3: Create real-time feature vectors based on online sampled production data: S31: Definition Real-time production vector Time vector , and initialize R and T as zero vectors; where, This represents the k-th real-time production data. express The corresponding sampling time; S32: Define variables Variable Sum, First Flag and initialize Define the period start time variable as: The cycle end time variable is The time index pointer is Index, and the second flag is... and initialize ; S33: Set the timing time to τ and start timing, and store the timing start time in the variable st, and store the production data sampled at the timing start time in the variable sd; S34: Perform assignment operations sequentially: , , , , ,in, This indicates assignment. Indicate modulo operation; and perform the following judgment: when If the time is right, proceed to step S35. when At that time, if If established, then set If the above is not true, proceed to step S35; otherwise, proceed to step S42. S35: Let the k-th real-time feature data... , ; thereby obtaining 3D real-time feature vector ; S4: For real-time feature vectors With template feature vector Perform matching analysis to determine the start time and duration of the industrial production cycle: S41: Define a pre-set threshold as Calculate the real-time feature vector according to equation (2). With template feature vector Matching metrics between : (2) when If the time is right, proceed to step S42. when At that time, if If true, then perform the assignment operation: And obtain the start time of the industrial production cycle. Cycle duration The loop ends immediately after reaching the conclusion; otherwise, the assignment operation is performed. , Then proceed to step S42 for execution; S42: If the timeout period expires, return to step S33 to execute; otherwise, continue executing step S42.

2. The method for real-time determination of industrial production cycle based on template matching according to claim 1, characterized in that, The template feature vector in step S22 It is obtained from the template production vector H, i.e., the template feature vector. And the real-time feature vector in step S35 It is obtained from the real-time production vector R, i.e., the real-time feature vector. .

3. The method for real-time determination of industrial production cycle based on template matching according to claim 1, characterized in that, The matching metric in step S41 Calculate according to formula (3), and set the preset threshold as follows: : (3)。 4. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store a program that supports the processor in executing the real-time determination method for industrial production cycles according to any one of claims 1-3, and the processor is configured to execute the program stored in the memory.

5. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is run by the processor, it executes the steps of the real-time determination method for industrial production cycle according to any one of claims 1-3.

Citation Information

Patent Citations

  • Data separation method and system

    CN114780812A

  • Industrial intermittent energy data dynamic prediction method combining information features and production plans

    CN114862021A