Automobile production line data management method and system
By removing incomplete periodic segments and encoding using unit intervals with deviation values, the method enhances data compression efficiency and reduces storage requirements for automobile production line data.
Patent Information
- Application Number
- CN202411310834.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-09-20
AI Technical Summary
Existing data compression methods for automobile production line data, such as Huffman coding, result in inefficient encoding due to the diversity and periodic nature of the data, leading to larger code lengths and increased storage requirements.
A method that removes incomplete periodic segments, performs cluster analysis to define unit intervals, and uses Huffman coding based on these intervals, along with encoding deviation values to manage production line data efficiently.
This approach reduces data diversity, decreases encoding length, and saves storage space by accurately reflecting cyclic characteristics, thereby improving encoding efficiency and reducing storage needs.
Smart Images

Figure CN118838292B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a data management method and system for an automobile production line. Background Art
[0002] The current automobile production efficiency is high, and basically one car can be rolled off the production line in 1 minute, so the data on the production line is updated quickly. The production line generates a large amount of data every day, and the data on the production line needs to be stored for subsequent quality tracking. Since the amount of data generated by the production line is large, if it is directly stored, a large amount of storage space is required, so the production line data needs to be compressed before storage.
[0003] Huffman coding is a commonly used compression method, which is often used for data compression. This method sets different codes for data of different frequencies according to the frequency of data occurrence, where the larger the frequency, the shorter the code, and the smaller the frequency, the longer the code. The action of producing cars on the production line is repeated and cyclical, so the data generated by the production line is approximately periodic data. At the same time, since the actual production data is not theoretical data, there will be certain deviations in the actual data. For example, the design size of a part in the production process is 15mm, but the actual size produced is generally between 15±0.1mm. Due to the diversity of data, the frequency of data belonging to the 15±0.1mm interval is higher, while the frequency of a certain data in the interval is lower. Therefore, based on the frequency of a single data, the Huffman coding algorithm is used to encode the production line data, which will result in a larger Huffman tree depth due to the diversity of the data, resulting in a larger code length. At the same time, due to the diversity of data, the possibility of the newly collected data having a similar sorting rule with the previous data is small. Therefore, when the newly collected data is compressed and encoded, the previous data needs to be decoded, and the new data is added and then the frequency is re-counted for encoding, resulting in low coding efficiency.
[0004] Publication No. CN117375631B discloses a fast encoding method based on Huffman coding, which is to first divide data with different regularities into multiple data segments, and then perform statistical coding on each data segment. In this method, each data segment needs to be encoded separately, so the Huffman tree corresponding to each data segment needs to be stored, which will undoubtedly increase the storage capacity. At the same time, the production line data has an approximate cyclic feature, and the data repeatability is relatively high. The larger the data volume, the higher the data repeatability. Dividing the data into data segments will reduce the frequency information of the data and increase the data storage capacity. Therefore, this method is not suitable for production line data compression storage. Summary of the invention
[0005] In order to solve the problem of how to increase the compression amount of production line data while achieving efficient encoding, the present invention provides an automobile production line data management method and system.
[0006] In a first aspect, the present invention provides a method for managing automobile production line data, which adopts the following technical solution:
[0007] A method for managing automobile production line data, comprising the steps of:
[0008] Get production line data sequence;
[0009] The incomplete periodic segments in the production line data sequence are removed to obtain a compressed analysis sequence;
[0010] Perform cluster analysis on all production line data in the compression analysis sequence to obtain several categories, and use the interval formed by the minimum and maximum values of all production line data in the category as a unit interval; count the number of production line data belonging to the unit interval in the compression analysis sequence as the frequency of the unit interval, and use the Huffman coding algorithm to encode the unit interval based on the frequency of the unit interval to obtain the code of the unit interval;
[0011] The average of the maximum value and the minimum value of the unit interval is recorded as the central data of the unit interval, and the difference between the production line data and the central data of the corresponding unit interval is converted into a binary number and recorded as the deviation value of the production line data;
[0012] The deviation value of the production line data is concatenated with the code of the corresponding unit interval to obtain the final code of the production line data, so as to realize the storage management of the production line data.
[0013] Before encoding the data in the production line data sequence, the present invention removes the incomplete cycle segments and only retains the complete cycles in the production line data sequence, so that the statistical information obtained by using the complete cycle data can better reflect the cycle characteristics, thereby ensuring that when the newly collected production line data sequence is encoded, the data statistical information changes less, and the encoding efficiency of the newly collected production line data is effectively improved. Furthermore, when encoding the compressed analysis sequence, the compressed analysis sequence is encoded by using the unit interval as the compression unit, which effectively reduces the data diversity and reduces the encoding length. Furthermore, when encoding the compressed analysis sequence, the difference data between the mean of the upper and lower limits of each data and the unit interval is analyzed as the encoding data, which effectively reduces the data value range, thereby reducing the encoding length of the data, increasing the data compression amount, and saving storage space.
[0014] Preferably, the method for obtaining the compression analysis sequence includes:
[0015] Obtain a preset reference data segment, and slide the reference data segment rightward one data segment along the production line data sequence in sequence until it reaches the end of the production line data sequence;
[0016] After each slide, the possibility of the slide position being a cycle starting point is calculated; in response to the possibility of the cycle starting point being greater than a preset first threshold, the slide position is used as a candidate cycle starting point; and the abnormal points among the candidate cycle starting points are eliminated to obtain the cycle starting point;
[0017] The data segment consisting of data after the starting point of the last cycle is taken as the data segment to be determined, and the complete cycle possibility of the data segment to be determined is calculated; in response to the complete cycle possibility being less than a preset second threshold, the data segment to be determined in the production line data sequence is removed to obtain a compressed analysis sequence.
[0018] The present invention divides out data segments that may be incomplete cycles by accurately screening out the starting points of the cycles, thereby preventing the inaccurate removal of incomplete cycle segments due to inaccurate cycle segmentation, and providing a basis for subsequent improvement of data encoding efficiency; further, based on the complete cycle of the data segment to be determined, it is accurately determined whether the data segment to be determined is a complete cycle segment, thereby accurately screening out the incomplete cycle parts in the production line data sequence, and providing a basis for subsequent efficient data encoding.
[0019] Preferably, the calculating of the possibility that the sliding position is the starting point of the cycle includes:
[0020] ;
[0021] Wherein, when the sliding position is reached, the dtw distance between the data segment aligned with the reference data segment in the production line data sequence and the reference data segment is recorded as the matching distance of the sliding position, represents the matching distance of the sliding position, Indicates the preset anti-zero coefficient. represents the number of sliding positions whose matching distance is smaller than the matching distance of the previous sliding position among the preset first number of sliding positions before the sliding position, represents the number of sliding positions whose matching distance is smaller than the matching distance of the next sliding position among the preset first number of sliding positions after the sliding position, represents the linear normalization method, Indicates the possibility that the sliding position is the starting point of the cycle.
[0022] The present invention accurately reflects the situation in which each data point in the production line data sequence meets the characteristics of the cycle starting point by analyzing the matching relationship between the reference data segment and each area in the production line data sequence and the change in the matching relationship between each area and the adjacent area, thereby providing a basis for the subsequent removal of incomplete cycle parts.
[0023] Preferably, the calculating of the complete cycle probability of the data segment to be determined includes:
[0024] The data segment between the starting points of every two adjacent cycles is taken as a cycle segment, and the data corresponding to the data segment to be determined is selected in any cycle segment and recorded as the corresponding matching data; the preset window is slid along the cycle segment, and the ratio of the number of corresponding matching data in the window after each sliding to the window length is obtained and recorded as the first ratio of the window after each sliding, and the first ratios of the windows after all sliding times are clustered into two categories, and the mean of all first ratios in each category is calculated, and the mean of the window positions corresponding to all first ratios in the category with a smaller first ratio mean is multiplied by the difference between the means of all first ratios in the two categories, and then the inverse is taken to obtain the complete cycle possibility of the data segment to be determined.
[0025] The present invention accurately determines whether the data segment to be determined is a complete cycle by analyzing the distribution of corresponding data in the data segment to be determined in the cycle segment, thereby providing a basis for accurately removing incomplete cycle data.
[0026] Preferably, the selecting data corresponding to the data segment to be determined in any periodic segment and recording it as corresponding matching data includes:
[0027] The length of the data segment to be determined is recorded as the comparison length, and data of the comparison length are selected in the periodic segment according to any combination method. The data selected under this combination method is matched with the data segment to be determined by KM matching to obtain the matching result under this combination method. The selected data of the combination method corresponding to the maximum matching value among all the combination methods is obtained as the corresponding matching data.
[0028] The present invention accurately obtains the matching relationship between the data in the data segment to be determined and the data in the periodic segment through matching analysis, and provides a basis for accurately analyzing the distribution of the corresponding data in the data segment to be determined in the periodic segment.
[0029] Preferably, the step of excluding abnormal points from candidate cycle starting points to obtain a cycle starting point includes:
[0030] Calculate the distance between the starting point of the cycle and the starting point of the previous cycle and record it as the adjacent distance of the starting point of the cycle, use the box plot method to exclude abnormal data in the adjacent distances of all cycle starting points, and use the mean of the remaining adjacent distances as the benchmark cycle length;
[0031] A candidate cycle starting point closest to a point corresponding to N times the basic cycle length is obtained as the cycle starting point, where N represents a preset variable.
[0032] The present invention eliminates abnormal points in candidate period starting points to prevent these abnormal points from interfering with the segmentation of non-periodic data segments, thereby effectively improving the removal accuracy of non-periodic data segments.
[0033] Preferably, the obtaining of a preset reference data segment includes:
[0034] A data segment consisting of a preset first number of data in the production line data sequence is recorded as a reference data segment.
[0035] Preferably, the sliding position is the alignment position of the left end data of the reference data segment in the production line data sequence after each sliding.
[0036] In a second aspect, the present invention provides an automobile production line data management system, which adopts the following technical solution:
[0037] An automobile production line data management system includes: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned automobile production line data management method is implemented.
[0038] By adopting the above technical solution, the above-mentioned automobile production line data management method is generated into a computer program and stored in a memory so as to be loaded and executed by a processor, thereby making a terminal device based on the memory and the processor for easy use.
[0039] The present invention has the following technical effects:
[0040] Before encoding the data in the production line data sequence, the present invention removes the incomplete cycle segments and only retains the complete cycles in the production line data sequence, so that the statistical information obtained by using the complete cycle data can better reflect the cycle characteristics, thereby ensuring that when the newly collected production line data sequence is encoded, the data statistical information changes less, effectively improving the encoding efficiency of the newly collected production line data.
[0041] Furthermore, when encoding the compressed analysis sequence, the compressed analysis sequence is encoded by using the unit interval as the compression unit, which effectively reduces data diversity and reduces the encoding length.
[0042] Furthermore, when encoding the compressed analysis sequence, the difference data between each data and the mean of the upper and lower limits of the unit interval is analyzed as the encoded data, which effectively reduces the data value range, thereby reducing the encoding length of the data, increasing the data compression amount, and saving storage space. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-restrictive manner, and the same or corresponding reference numerals represent the same or corresponding parts.
[0044] Figure 1 It is a flow chart of a method in a method for managing automobile production line data in an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0046] It should be understood that when the terms "first", "second", etc. are used in the claims, descriptions, and drawings of the present invention, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the description and claims of the present invention indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their collections.
[0047] The embodiment of the present invention discloses a method for managing automobile production line data, referring to Figure 1 , comprising steps S1 to S5:
[0048] S1: Get production line data sequence.
[0049] Specifically, several types of data of the operating procedures of each workstation at each moment on the production line are obtained, and all types of data of the operating procedures of each workstation at each moment are arranged in a predetermined type order to obtain a subsequence of the operating procedures of each workstation at each moment, and the subsequences of the operating procedures of all workstations at each moment are arranged in the workstation order to obtain a production line subsequence at each moment, and the production line subsequences of all moments are arranged in time sequence to obtain a production line sequence. The data types of each operating procedure include but are not limited to the following aspects: actual operation time, size of installed parts, and error rate of installed parts. In this embodiment, the preset type order is: actual operation time, size of installed parts, and error rate of installed parts. Other embodiments can set other orders, and this embodiment does not make specific restrictions.
[0050] It should be noted that under normal circumstances, the production line data can retain two decimal places to achieve data accuracy, so some decimal places need to be discarded to reduce unnecessary data storage waste. At the same time, decimal data will increase the storage capacity of data, so decimal data in decimals needs to be removed through shift processing.
[0051] After shifting each bit of the production line data in the production line data sequence right by two places, the decimal places are discarded to obtain the shifted production line data sequence. For the convenience of description, the shifted production line data sequence is still referred to as the production line data sequence.
[0052] S2: Remove the incomplete periodic segments in the production line data sequence to obtain a compressed analysis sequence.
[0053] It should be noted that since production line data is generally repeated in cycles, only the arrangement order of the production line data of a complete cycle can describe the periodic information characteristics. Since the subsequent data has this periodic feature, its arrangement order should be similar to it, so when encoding the newly collected data, the amount of code adjusted is relatively small. First, the incomplete cycle data of the production line data sequence must be removed to obtain the complete cycle data.
[0054] Optionally, as an example, the incomplete periodic segments in the production line data sequence are removed to obtain a compressed analysis sequence, including:
[0055] The production line data sequence is evenly divided into data segments of length Q, where Q represents a length variable and Q ranges from a preset first number to All integers between Indicates the length of the production line data sequence. This embodiment is described by taking the preset first number of 50 as an example, and other embodiments may take other values, which are not specifically limited in this embodiment.
[0056] It should be noted that, when the segment length of the data at the latter position of the production line data sequence does not meet the length requirement, it only needs to be divided into data segments that are as long as possible within the segment length range.
[0057] Each value of Q corresponds to a segmentation result. The cosine similarity is calculated for every two data segments in all data segments in a segmentation result. The average cosine similarity calculated for all combinations of all data segments in the segmentation result is recorded as the similarity of the segmentation result.
[0058] The segmentation result with the maximum similarity value is taken as the best segmentation result. If the length of the last data segment in the best segmentation result is smaller than the lengths of other data segments, the last data segment is removed and the sequence composed of all the remaining data segments is taken as the compression analysis sequence.
[0059] It can be understood that, due to the high similarity between periodic segments, when the data segment is equal to the periodic segment, the similarity between the data segments is high, and thus the data segment division is performed based on this theory. Incomplete periodic segments generally exist at the end of the production line data sequence, and it is only necessary to determine whether the last data segment is a complete periodic segment. Therefore, it is possible to determine whether the last data segment is a complete periodic segment by determining whether the last data segment is less than the length of other data segments, thereby removing incomplete periodic segments from the production line data sequence.
[0060] It should be noted that in real life, data is approximately periodic, not completely periodic as in theory. In other words, the length of each period segment may not be exactly the same. Directly dividing the production line data sequence into the same length is contrary to reality. The segmentation result is not accurate, which leads to low accuracy in removing incomplete cycles.
[0061] Preferably, as an example, removing the incomplete periodic segments in the production line data sequence to obtain a compressed analysis sequence includes:
[0062] Obtain a preset reference data segment, align the left end of the reference data segment with the left end of the production line data sequence, and slide the reference data segment to the right along the production line data sequence by one data point until it reaches the end of the production line data sequence;
[0063] After each slide, the alignment position of the left end data of the reference data segment in the production line data sequence is used as the slide position after each slide; after each slide, the possibility of the slide position being the cycle starting point is calculated; in response to the possibility of the cycle starting point being greater than a preset first threshold, the slide position is used as a candidate cycle starting point; and the abnormal points in the candidate cycle starting points are eliminated to obtain the cycle starting point;
[0064] The data segment consisting of data after the starting point of the last cycle is taken as the data segment to be determined, and the complete cycle possibility of the data segment to be determined is calculated; in response to the complete cycle possibility being less than a preset second threshold, the data segment to be determined in the production line data sequence is removed to obtain a compressed analysis sequence.
[0065] In this embodiment, the first threshold is preset to be 0.7 and the second threshold is preset to be 0.85 as an example for description. Other embodiments may take other values, and this embodiment does not make any specific limitation.
[0066] It is understandable that in order to prevent the setting of fixed-length data segments for period segment division from resulting in inaccurate period segment division results, the production line data sequence is not segmented directly. Instead, the period segmentation points are obtained through the characteristics of the period segments to achieve accurate period segment division, thereby accurately removing incomplete period data from the production line data sequence.
[0067] The above embodiments involve the possibility that the sliding position is the cycle starting point, and the possibility that the cycle starting point and the data segment to be determined are complete cycles. The following describes the method for determining the possibility that the sliding position is the cycle starting point, and the possibility that the cycle starting point and the data segment to be determined are complete cycles.
[0068] S20: Calculate the possibility of the sliding position being the cycle starting point.
[0069] It should be noted that the reference data segment is a data segment consisting of partial data selected from the production line data sequence that is smaller than the length of the cycle segment. Since the similarity between the data between the cycle segments is high. When the reference data segment slides to the corresponding data segment position in each cycle segment on the production line data sequence, the similarity between the reference data segment and the alignment data segment should be large. At the same time, when the reference data segment slides to the corresponding data segment position in each cycle segment, the similarity between the reference data segment and the corresponding data segment should gradually increase. When it slides away from the corresponding data segment position in each cycle segment, the similarity between the reference data segment and the corresponding data segment should gradually decrease. Therefore, based on this feature, the corresponding data segment of the reference data segment at each stage of the production line data sequence can be obtained.
[0070] Preferably, as an example, calculating the possibility of the sliding position being the cycle starting point includes:
[0071] ;
[0072] Wherein, when the sliding position is reached, the dtw distance between the data segment aligned with the reference data segment in the production line data sequence and the reference data segment is recorded as the matching distance of the sliding position, Indicates the matching distance of the sliding position. This value reflects the difference between the reference data segment and the alignment data segment at the sliding position. The larger the value, the smaller the similarity between the reference data segment and the alignment data segment. Represents the preset anti-zero coefficient, which is used to prevent the denominator from being zero. 0.01 is taken as an example for description, and other embodiments may take other values, which are not specifically limited in this embodiment; It indicates the number of sliding positions whose matching distance is less than the matching distance of the previous sliding position in the preset first number of sliding positions before the sliding position. The value reflects the change in the difference between the reference data segment and the alignment data segment in the process of the reference data segment sliding to the sliding position. The larger the value, the greater the degree of monotonically decreasing difference between the reference data segment and the alignment data segment in the process of the reference data segment sliding to the sliding position. Therefore, the alignment data segment at the sliding position is more likely to be the corresponding data segment of the reference data segment in other periodic segments. It indicates the number of sliding positions whose matching distance is less than the matching distance of the next sliding position among the preset first number of sliding positions after the sliding position. The value reflects the change in the difference between the reference data segment and the alignment data segment in the process of the reference data segment sliding away from the sliding position. The larger the value, the greater the degree of monotonically increasing difference between the reference data segment and the alignment data segment in the process of the reference data segment sliding away from the sliding position. Therefore, the alignment data segment at the sliding position is more likely to be the corresponding data segment of the reference data segment in other periodic segments. represents the linear normalization method, Indicates the possibility that the sliding position is the starting point of the cycle.
[0073] S21: Eliminate abnormal points among candidate cycle starting points to obtain a cycle starting point.
[0074] It should be noted that, since the cycle starting point is screened out by a threshold value, when the threshold value is not set accurately, some interference points will be screened out, and the interference points need to be removed below.
[0075] It should be further explained that in real life, there may be length differences between cycle segments, but the difference will not be particularly large. Therefore, the cycle length can be used as a reference to exclude abnormal points.
[0076] Preferably, as an example, excluding abnormal points in candidate cycle starting points to obtain a cycle starting point includes:
[0077] The number of data between the starting point of the cycle and the starting point of the previous cycle is recorded as the adjacent distance of the starting point of the cycle, and the abnormal data in the adjacent distances of all the starting points of the cycle are eliminated by using the box plot method, and the mean of the remaining adjacent distances is taken as the reference cycle length;
[0078] The nearest candidate cycle starting point corresponding to the point of N times the basic cycle length is obtained as the cycle starting point, where N represents a preset variable and N ranges from 1 to All integers in the interval, Indicates the length of the production line data sequence, Indicates the length of the base period.
[0079] S22: Calculate the complete cycle probability of the data segment to be determined.
[0080] It should be noted that in order to determine whether the data segment to be determined (the last data segment) is a complete cycle, it is necessary to compare the known cycle segment with the data segment to be determined. When the data segment to be determined only contains part of the data of a cycle, it means that the data segment to be determined is not a complete cycle. When the data segment to be determined contains all the data of a cycle, it means that the data segment to be determined is a complete cycle. When the data segment to be determined contains part of the data of a cycle, the corresponding data of the data segment to be determined in the cycle segment will be distributed in a local area of the cycle segment; when the data segment to be determined contains the data of the entire cycle, the corresponding data of the data segment to be determined in the cycle segment will be distributed in the entire area of the cycle segment; therefore, the possibility of a complete cycle of the data segment to be determined can be determined based on this.
[0081] Preferably, as an example, calculating the complete cycle possibility of the data segment to be determined includes:
[0082] The data segment between the starting points of every two adjacent cycles is taken as a cycle segment, and the data corresponding to the data segment to be determined is selected in any cycle segment and recorded as the corresponding matching data; the preset window is slid along the cycle segment, and the ratio of the number of corresponding matching data in the window after each sliding to the window length is obtained and recorded as the first ratio of the window after each sliding, and the first ratios of the windows after all sliding times are clustered into two categories, and the mean of all first ratios in each category is calculated, and the mean of the window positions corresponding to all first ratios in the category with a smaller first ratio mean is multiplied by the difference between the means of all first ratios in the two categories, and then the inverse is taken to obtain the complete cycle possibility of the data segment to be determined.
[0083] It can be understood that the corresponding matching data is the data in the cycle segment that matches the data in the data segment to be determined. When the corresponding matching data is distributed in the entire cycle segment, it means that the possibility that the data segment to be determined is a complete cycle is greater; when the corresponding matching data is only distributed in the first half of the cycle segment, it means that the possibility that the data segment to be determined is a complete cycle is greater.
[0084] The above embodiments involve corresponding matching data, and a method for obtaining the corresponding matching data will be described below.
[0085] Preferably, as an example, the method for obtaining the corresponding matching data includes:
[0086] The length of the data segment to be determined is recorded as the comparison length. According to any combination method, data of the comparison length are selected in the periodic segment. The best perfect matching of the bipartite graph (Kuhn and Munkres), referred to as the KM algorithm, is used to perform KM matching between the data selected under this combination method and the data segment to be determined to obtain the matching result under this combination method. Among all the combination methods, the selected data corresponding to the combination method with the maximum matching value is obtained as the corresponding matching data.
[0087] It can be understood that the data in the periodic segment that has the best matching relationship with the data segment to be determined is used as the corresponding data of the data segment to be determined in the periodic segment. This method can obtain more accurate corresponding data.
[0088] S3: Perform cluster analysis on all production line data in the compression analysis sequence to obtain several categories, and take the interval formed by the minimum and maximum values of all production line data in the category as a unit interval; count the number of production line data belonging to the unit interval in the compression analysis sequence as the frequency of the unit interval, and based on the frequency of the unit interval, use the Huffman coding algorithm to encode the unit interval to obtain the code of the unit interval.
[0089] It should be noted that the production line data is real data, not design data. The production line data is not a fixed theoretical value, but a number of values that fluctuate around the theoretical value, and its value will be distributed in a range centered on a fixed value. Therefore, this fluctuation feature will increase the diversity of production line data. The diversity of production line data will lead to a larger tree depth of the Huffman coding algorithm, which will lead to a larger code length of the Huffman coding algorithm and reduce the compression amount. For example, the design size of a part is 10, and the actual size of the processed part is generally distributed between 10±0.1. For example, the processed parts can be 9.9, 9.91, 9.92, 9.93, 9.94, 9.95, 9.96, 9.97, 9.98, 9.99, 10, 10.01, 10.02, 10.03, 10.04, 10.05, 10.06, 10.07, 10.08, 10.09, 10.1, any one of the data. When there are 50 such parts on the car, and the sizes of these 50 parts have 8 values out of 21, the size of this part will cause the tree depth of Huffman coding to increase by 8. Moreover, there are many parts on a car, which causes the increase in the tree body of the Huffman tree to increase exponentially. If a part size is represented by an interval, it only needs to use one interval to accommodate all the size data of the part. Therefore, it is necessary to divide the intervals according to the data distribution and perform Huffman coding based on the intervals.
[0090] S30: Perform cluster analysis on all production line data in the compression analysis sequence to obtain several categories, and use the interval formed by the minimum and maximum values of all production line data in the category as a unit interval.
[0091] It should be noted that the actual data fluctuating around a theoretical value should be densely distributed, so cluster analysis can be used to obtain the data interval.
[0092] Preferably, as an example, cluster analysis is performed on all production line data in the compression analysis sequence to obtain several categories, and the interval formed by the minimum and maximum values of all production line data in the category is used as a unit interval, including:
[0093] The DBSCAN clustering method is used to cluster all the production line data in the compression analysis sequence into several categories, and the interval formed by the data between the minimum and maximum values of all the production line data in the category is recorded as a unit interval.
[0094] S31: The number of production line data belonging to the unit interval in the statistical compression analysis sequence is recorded as the frequency of the unit interval, and based on the frequency of the unit interval, the unit interval is encoded using a Huffman coding algorithm to obtain the code of the unit interval.
[0095] Preferably, as an example, the number of production line data belonging to the unit interval in the statistical compression analysis sequence is recorded as the frequency of the unit interval, and based on the frequency of the unit interval, the unit interval is encoded using the Huffman coding algorithm to obtain the code of the unit interval, including:
[0096] The number of production line data belonging to the unit interval in the statistical compression analysis sequence is recorded as the frequency of the unit interval. Based on the frequency of the unit interval, all unit intervals are encoded using the Huffman coding algorithm to obtain the code of the unit interval.
[0097] It should be noted that by dividing the small-range fluctuation data into intervals and encoding the intervals, the diversity of the small-range fluctuation data is effectively reduced, the depth of the Huffman tree is reduced, and the length of the encoded data is effectively reduced.
[0098] S4: Record the average of the maximum value and the minimum value of the unit interval as the central data of the unit interval, and convert the difference between the production line data and the central data of the corresponding unit interval into a binary number and record it as the deviation value of the production line data.
[0099] It should be noted that, since the above Huffman coding can only store interval information, and the specific difference information of each data is not reflected, the difference information of each data is encoded below.
[0100] It should be further explained that, since the difference between the data in the interval is small, the difference between the data in the interval and the central data is also small. Therefore, the number of bits for storing the difference between the data in the interval and the central data should be small.
[0101] Preferably, as an example, the mean of the maximum value and the minimum value of the unit interval is recorded as the central data of the unit interval, and the difference between the production line data and the central data of the unit interval to which it belongs is converted into a binary number and recorded as the deviation value of the production line data, including:
[0102] The mean of the maximum and minimum values of the unit interval is recorded as the central data of the unit interval; the unit interval to which the production line data belongs in the production line data sequence is obtained, and the binary number of the difference between the production line data and the central data is used as the deviation value of the production line data.
[0103] It should be noted that, since the difference between the production line data and the center data is small, the encoding length of the difference between the production line data and the center data is small, which effectively reduces the data encoding length.
[0104] S5: concatenating the deviation value of the production line data with the code of the corresponding unit interval to obtain the final code of the production line data, so as to realize storage management of the production line data.
[0105] Preferably, as an example, the deviation value of the production line data is concatenated with the code of the corresponding unit interval to obtain the final code of the production line data, so as to realize the storage management of the production line data, including:
[0106] The deviation value of the production line data is concatenated with the code of the unit interval to obtain the final code of the production line data, and the final code is stored.
[0107] Collect a new production line data sequence, remove the incomplete periodic segments in the newly collected production line data sequence according to the method in step S2, obtain the unit interval to which each data in the newly collected production line data sequence after removing the incomplete periodic segments belongs, and obtain the frequency of the unit interval of the newly collected production line data sequence after removing the incomplete periodic segments. Encode the unit interval of the newly collected production line data sequence after removing the incomplete periodic segments according to the correspondence between each data in the production line data sequence and the encoding and the frequency of the unit interval of the newly collected production line data sequence after removing the incomplete periodic segments. Then calculate the deviation value between each data in the newly collected production line data sequence after removing the incomplete periodic segments and the corresponding central data of the unit interval, and splice the deviation value with the encoding of the unit interval to obtain the final encoding of each data in the newly collected production line data sequence after removing the incomplete periodic segments. Store the final encoding of each data in the newly collected production line data sequence after removing the incomplete periodic segments.
[0108] It should be noted that encoding the unit interval of the newly collected production line data sequence after removing the incomplete periodic segment by the correspondence between each data in the newly collected production line data sequence and the coding and the frequency of the unit interval of the newly collected production line data sequence after removing the incomplete periodic segment is a prior art, which will not be described in detail here. At the same time, the incomplete periodic segment in the newly collected production line data sequence is incorporated into the production line data sequence collected next time for compressed storage.
[0109] It should be noted that the above encoding method can not only effectively reduce the encoding length, but also effectively improve the encoding efficiency of the newly collected production line data. The reason for improving the encoding efficiency of the newly collected production line data is that the production links of each vehicle on the production line are repeated, and the production links of one vehicle are the same as the production links of other vehicles. Therefore, the production data of each production link of the vehicle is similar to the production data of the corresponding production links of other vehicles. The difference between the production data of each production link of the vehicle and the corresponding production link of other vehicles is mainly reflected in the actual error amount, and the actual error amount can be attributed to one interval. The same production link of different vehicles has the same data interval, so the number of all production links on the production line is equal to the number of data intervals, so the interval type of the newly collected production line data is the same as that of the historical production line data. According to the encoding rules of the Huffman coding algorithm, the encoding correspondence between the newly collected production line data and the historical production line data should be similar. At the same time, since the production links on different vehicles are the same, the number of data belonging to each data interval should be the same. For example, if a vehicle needs 50 screws of a certain type, the size of all screws of this type on the vehicle will exist in a data interval. Other vehicles also need 50 screws of this type, and all screws of this type on other vehicles should also belong to this data interval. Therefore, the number of data belonging to each data interval in the newly collected production line data should be the same as the number of data belonging to the data in the historical production line data. Therefore, the arrangement order of the data interval of the newly collected production line should be the same as the arrangement order of the data interval of the historical production line data. According to the encoding rules of the Huffman coding algorithm, the encoding correspondence between the newly collected production line data and the historically collected production line data should be similar. Therefore, when encoding the newly collected production line, the amount of coding that needs to be adjusted is small, which effectively improves the coding efficiency.
[0110] An embodiment of the present invention further discloses an automobile production line data management system, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, an automobile production line data management method according to the present invention is implemented.
[0111] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.
[0112] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory, a dynamic random access memory, a static random access memory, an enhanced dynamic random access memory, a high bandwidth memory, a hybrid storage cube, etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of the device or accessible or connectable to the device.
[0113] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.
[0114] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A data management method for an automobile production line, characterized in that: Includes steps: Get production line data sequence; The incomplete periodic segments in the production line data sequence are removed to obtain a compressed analysis sequence; Perform cluster analysis on all production line data in the compression analysis sequence to obtain several categories, and use the interval formed by the minimum and maximum values of all production line data in the category as a unit interval; count the number of production line data belonging to the unit interval in the compression analysis sequence as the frequency of the unit interval, and use the Huffman coding algorithm to encode the unit interval based on the frequency of the unit interval to obtain the code of the unit interval; The average of the maximum value and the minimum value of the unit interval is recorded as the central data of the unit interval, and the difference between the production line data and the central data of the corresponding unit interval is converted into a binary number and recorded as the deviation value of the production line data; The deviation value of the production line data is concatenated with the code of the corresponding unit interval to obtain the final code of the production line data, so as to realize the storage management of the production line data.
2. The method for managing automobile production line data according to claim 1, characterized in that: The method for obtaining the compression analysis sequence comprises: Obtain a preset reference data segment, and slide the reference data segment rightward one data segment along the production line data sequence in sequence until it reaches the end of the production line data sequence; After each slide, the possibility of the slide position being a cycle starting point is calculated; in response to the possibility of the cycle starting point being greater than a preset first threshold, the slide position is used as a candidate cycle starting point; and the abnormal points among the candidate cycle starting points are eliminated to obtain the cycle starting point; The data segment consisting of data after the starting point of the last cycle is taken as the data segment to be determined, and the complete cycle possibility of the data segment to be determined is calculated; in response to the complete cycle possibility being less than a preset second threshold, the data segment to be determined in the production line data sequence is removed to obtain a compressed analysis sequence.
3. The method for managing automobile production line data according to claim 2, characterized in that: The calculating the possibility of the sliding position being the starting point of the cycle includes: ; Wherein, when the sliding position is reached, the dtw distance between the data segment aligned with the reference data segment in the production line data sequence and the reference data segment is recorded as the matching distance of the sliding position, represents the matching distance of the sliding position, Indicates the preset anti-zero coefficient. represents the number of sliding positions whose matching distance is smaller than the matching distance of the previous sliding position among the preset first number of sliding positions before the sliding position, represents the number of sliding positions whose matching distance is smaller than the matching distance of the next sliding position among the preset first number of sliding positions after the sliding position, represents the linear normalization method, Indicates the possibility that the sliding position is the starting point of the cycle.
4. The method for managing automobile production line data according to claim 2, characterized in that: The calculating of the complete cycle possibility of the data segment to be determined comprises: The data segment between the starting points of every two adjacent cycles is taken as a cycle segment, and the data corresponding to the data segment to be determined is selected in any cycle segment and recorded as the corresponding matching data; the preset window is slid along the cycle segment, and the ratio of the number of corresponding matching data in the window after each sliding to the window length is obtained and recorded as the first ratio of the window after each sliding, and the first ratios of the windows after all sliding times are clustered into two categories, and the mean of all first ratios in each category is calculated, and the mean of the window positions corresponding to all first ratios in the category with a smaller first ratio mean is multiplied by the difference between the means of all first ratios in the two categories, and then the inverse is taken to obtain the complete cycle possibility of the data segment to be determined.
5. The method for managing automobile production line data according to claim 4, characterized in that: The step of selecting data corresponding to the data segment to be determined in any period segment as corresponding matching data includes: The length of the data segment to be determined is recorded as the comparison length, and data of the comparison length are selected in the periodic segment according to any combination method. The data selected under this combination method is matched with the data segment to be determined by KM matching to obtain the matching result under this combination method. The selected data of the combination method corresponding to the maximum matching value among all the combination methods is obtained as the corresponding matching data.
6. The method for managing automobile production line data according to claim 2, characterized in that: The step of eliminating abnormal points from candidate cycle starting points to obtain a cycle starting point includes: Calculate the distance between the starting point of the cycle and the starting point of the previous cycle and record it as the adjacent distance of the starting point of the cycle, use the box plot method to exclude abnormal data in the adjacent distances of all cycle starting points, and use the mean of the remaining adjacent distances as the benchmark cycle length; A candidate cycle starting point closest to a point corresponding to N times the basic cycle length is obtained as the cycle starting point, where N represents a preset variable.
7. The method for managing automobile production line data according to claim 2, characterized in that: The step of obtaining a preset reference data segment includes: A data segment consisting of a preset first number of data in the production line data sequence is recorded as a reference data segment.
8. The method for managing automobile production line data according to claim 2, characterized in that: The sliding position is the alignment position of the left end data of the reference data segment in the production line data sequence after each sliding.
9. An automobile production line data management system, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, an automobile production line data management method according to any one of claims 1 to 8 is implemented.
