CN115529357A - Updating abnormity matching method based on MES intercommunication interconnection production data - Google Patents
Updating abnormity matching method based on MES intercommunication interconnection production data Download PDFInfo
- Publication number
- CN115529357A CN115529357A CN202211482181.7A CN202211482181A CN115529357A CN 115529357 A CN115529357 A CN 115529357A CN 202211482181 A CN202211482181 A CN 202211482181A CN 115529357 A CN115529357 A CN 115529357A
- Authority
- CN
- China
- Prior art keywords
- chain code
- coding
- dimensional matrix
- optimal
- production data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/04—Protocols for data compression, e.g. ROHC
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/126—Character encoding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/151—Transformation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/70—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Artificial Intelligence (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computer Security & Cryptography (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
The invention relates to the technical field of data compression and transmission, in particular to an update exception matching method based on MES intercommunication interconnected production data, which comprises the following steps: encoding production data into a one-dimensional binary sequence and converting the one-dimensional binary sequence into a two-dimensional matrix, acquiring a foreground and a background according to the number of digits in the two-dimensional matrix, and further acquiring an eight-connected domain of the foreground; dividing all direction symbols of the eight-direction chain code into a plurality of categories; taking each pixel point in each eight-connected domain as a chain code wharf, and performing chain code coding on each eight-connected domain to obtain the optimal coding of each pixel point; and acquiring the optimal degree of each pixel point as a chain code wharf according to the optimal code of each pixel point and the category to which each direction symbol in the optimal code belongs, and acquiring a compression result according to the optimal degree. The invention has small data volume of compressed data and high compression efficiency, and ensures that the transmission speed of the data is high.
Description
Technical Field
The invention relates to the technical field of data compression and transmission, in particular to an update exception matching method based on MES intercommunication interconnected production data.
Background
The MES system is a production informatization management system facing a workshop execution layer of a manufacturing enterprise, and the MES needs to perform information interaction with a planning layer and a control layer, so that the enterprise information full integration is realized through continuous information flow of the enterprise. In the process of intercommunication and interconnection between the MES system and the planning layer and the control layer, a large amount of production data is generated anytime and anywhere, when the production data is transmitted and stored, the production data is generally required to be compressed for better and faster transmission and storage of more production data, and the compressed packets are analyzed to complete abnormal update matching of the production data.
There is usually redundancy in the data, so the degree of redundancy of the data determines the compression rate of the data. All data are compressed in the traditional compression, but the data containing information in the data is only part, and in order to facilitate data management and decompression, the variable length coding is usually required to be converted into the fixed length coding, and a large amount of data needs to be compensated in the conversion processHowever, when data compression is performed, all data is processed, which wastes a large amount of storage space.
Aiming at the situation, the invention provides an updating abnormity matching method based on MES intercommunication interconnected production data, which constructs a visual effect diagram by performing coding conversion on data to be compressed and stored, and performs data conversion in a self-adaptive manner through the distribution of the data in the visual effect diagram so as to simplify the data and achieve the purpose of increasing the compression ratio on the lossless basis.
Disclosure of Invention
The invention provides an updating abnormity matching method based on MES intercommunication interconnected production data, which aims to solve the existing problems.
The method for updating the exception matching based on the MES intercommunication interconnected production data adopts the following technical scheme:
one embodiment of the invention provides an updating exception matching method based on MES intercommunication interconnected production data, which comprises the following steps:
collecting production data, and encoding the production data into a one-dimensional binary sequence; converting the one-dimensional binary sequence into a two-dimensional matrix; converting the two-dimensional matrix into a visual effect graph;
acquiring a foreground and a background in the visual effect image according to the number of the numbers 0 and the number of the numbers 1 in the two-dimensional matrix; acquiring an eight-connected domain of a foreground in a visual effect graph;
classifying all direction symbols of the eight-direction chain codes to obtain a plurality of classes;
taking each pixel point in each eight-connected domain as a chain code wharf, and performing chain code coding on each eight-connected domain to obtain the optimal coding of each pixel point; acquiring the optimal degree of each pixel point as a chain code wharf according to the optimal code of each pixel point and the category of each direction symbol in the optimal code;
and taking all pixel points in the eight-connected domain as pixel points corresponding to the maximum optimization degree in the optimization degrees of the chain code wharfs as final chain code wharfs, and converting the optimal codes corresponding to the final chain code wharfs into binary systems as compression results.
Preferably, the collecting production data and encoding the production data into a one-dimensional binary sequence includes the following specific steps:
and carrying out fixed-length binary coding on the production data, and splicing all binary codes together to form a one-dimensional binary sequence.
Preferably, the converting the one-dimensional binary sequence into the two-dimensional matrix includes the following specific steps:
squaring the length of the one-dimensional binary sequence, and rounding the result upwards to obtain the length of the side lengthConstruction ofAnd (3) filling binary digits in the one-dimensional binary sequence into the two-dimensional matrix according to the sequence of the two-dimensional matrix with the large and small two-dimensional matrix, and performing 0 complementing operation on vacant positions of the two-dimensional matrix.
Preferably, the converting the two-dimensional matrix into the visual effect map includes the following specific steps:
and expressing the number 0 in the two-dimensional matrix by using a white pixel point, and expressing the number 1 in the two-dimensional matrix by using a black pixel point to obtain a visual effect graph.
Preferably, the obtaining of the foreground and the background in the visual effect map according to the number of the number 0 and the number of the number 1 in the two-dimensional matrix includes the following specific steps:
if the number of the numbers 0 in the two-dimensional matrix is larger than the number of the numbers 1, taking black pixel points in the visual effect image as a foreground and white pixel points as a background; if the number of the numbers 0 in the two-dimensional matrix is smaller than the number of the numbers 1, taking white pixel points in the visual effect image as a foreground and black pixel points as a background; and if the number of the numbers 0 in the two-dimensional matrix is the same as that of the numbers 1, randomly selecting the foreground and the background.
Preferably, the classifying all direction symbols of the eight-direction chain code to obtain a plurality of categories includes the following specific steps:
all direction symbols of the eight-direction chain code comprise 0,1, 2, 3, 4, 5, 6 and 7, wherein 0 and 1 are divided into a first category, 2 and 3 are divided into a second category, and 4, 5, 6 and 7 are divided into a third category.
Preferably, the method for encoding the link code of each eight-connected domain by using each pixel point in each eight-connected domain as the link code wharf to obtain the optimal encoding of each pixel point comprises the following specific steps:
and taking one pixel point in the eight connected domains as a chain code wharf, carrying out chain code coding on each eight connected domain to obtain a plurality of coding results, obtaining a coding result with the longest chain code length in the plurality of coding results as a candidate coding result, sequentially judging whether direction symbols at the same position of all the candidate coding results are the same, stopping judging when the direction symbols at the same position of all the candidate coding results are different, and taking a coding result with a small direction symbol as the optimal coding of the pixel point.
Preferably, the expression of the preference degree is:
whereinIs the first in eight connected domainsThe optimal degree of each pixel point as a chain code wharf;is the eighth communication intra-domainThe number of optimally coded chain codes of the pixel points;is the eighth communication intra-domainThe number of direction symbols in the optimal coding of each pixel point;is the eighth communication intra-domainThe number of direction symbols belonging to the first category in the optimal coding of each pixel point;is the eighth communication intra-domainThe number of direction symbols belonging to the third category in the optimal coding of each pixel point;is an exponential function with a natural constant as the base.
The technical scheme of the invention has the beneficial effects that: according to the invention, the one-dimensional binary sequence is converted into the two-dimensional matrix, so that the direct relevance of data and data in the one-dimensional binary sequence can be greatly increased, the probability of the same numbers in the two-dimensional matrix being together is increased, the chain code coding compression is carried out according to the number type with less occurrence times in the two-dimensional matrix, the chain code length can be reduced, the compressed data amount is reduced, and the compression ratio is increased. The optimal coding characteristics of each pixel point are combined to obtain the optimal degree of each pixel point as the chain code wharf, so that the optimal chain code coding result is selected according to the optimal degree, and the compression efficiency of each eight-connected domain is further maximized. The compressed data in the invention is the compression result of the digits with few times of occurrence in the two-dimensional matrix, and the digits with many times of occurrence in the two-dimensional matrix are abandoned by the compression method in the invention, so that the finally obtained compressed data has small data volume and high transmission speed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flowchart illustrating the steps of an MES interworking interconnection-based production data update exception matching method according to the present invention;
FIG. 2 is a schematic two-dimensional matrix diagram of an update exception matching method based on MES interworking production data according to the present invention;
FIG. 3 is a visual effect diagram of the method for matching update exceptions based on MES interworking production data of the present invention;
FIG. 4 is a schematic diagram of eight connected domains of the method for matching update exceptions based on MES interworking production data of the present invention;
FIG. 5 is a schematic diagram of a direction symbol of an eight-direction chain code of the method for matching update exceptions based on MES interworking production data according to the present invention;
FIG. 6 is a schematic diagram of chain code encoding of eight connected domains of the method for updating exception matching based on MES interworking production data of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention for achieving the predetermined purpose, the following detailed description, structure, features and effects of the method for matching update exceptions based on MES interworking production data according to the present invention will be provided with reference to the accompanying drawings and the preferred embodiments. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following describes a specific scheme of the update exception matching method based on MES interworking production data in detail with reference to the accompanying drawings.
Referring to fig. 1, a flowchart illustrating steps of a method for matching an update exception based on MES interworking interconnection production data according to an embodiment of the present invention is shown, where the method includes the following steps:
and S001, collecting production data, and coding the production data into a one-dimensional binary sequence.
It should be noted that the MES may provide management modules for the enterprise, including manufacturing data management, planning and scheduling management, production scheduling management, inventory management, quality management, human resource management, work center/equipment management, tool and tool management, procurement management, cost management, project board management, production process control, bottom layer data integration and analysis, and upper layer data integration and decomposition. Therefore, the production data in the MES system is various data, the production data is usually not binary, and the computer can only recognize binary data when processing the data. Therefore, before the compression processing is performed on the production data, different types of production data need to be each converted into binary data. ASCII encoding is commonly used for uniform representation.
In the embodiment, production data is obtained, the forms of the production data are often various, and for convenience of processing, various production data are converted into a uniform coding format, that is, production data of different formats are uniformly converted into a fixed-length binary coding form for representation. For example: converting the production data 'China' in the text format into fixed-length binary code as follows: wherein the ASCII code of each letter in "China" is respectively as follows: 67. 104, 105, 110, 97, the ASCII code is converted into an eight-bit binary code, and the two codes are: 01000011, 01101000, 01101001, 01101110, 01100001.
All binary codes are spliced together to form a one-dimensional binary sequence. For example, the one-dimensional binary sequence of "China" is 0100001101101000011010010110111001100001.
Thus, a one-dimensional binary sequence is obtained.
And S002, converting the one-dimensional binary sequence into a visual effect image to obtain an eight-connected domain of the foreground in the visual effect image.
It should be noted that each number in the one-dimensional binary sequence is only associated with two adjacent numbers, and in order to improve the subsequent compression efficiency, the association between the numbers in the one-dimensional binary sequence needs to be increased, and the one-dimensional binary sequence may be converted into a two-dimensional matrix, so that each number in the two-dimensional matrix is associated with all the numbers in its eight neighborhoods.
In this embodiment, the length of the one-dimensional binary sequence (i.e. the total number of 0 and 1 in the one-dimensional binary sequence) is obtained and usedAnd (4) showing. The length of the side of the two-dimensional matrix after the one-dimensional binary sequence is converted into the two-dimensional matrixComprises the following steps:
in the formulaThe side length of the two-dimensional matrix is represented,representing the length of a one-dimensional binary sequence;is rounding up the symbol.
Thus constructed in a size ofA two-dimensional matrix of sizes. Sequentially filling 0 and 1 digits in the one-dimensional binary sequence into the binary sequence with the size ofIf the two-dimensional matrix has vacant positions after all the 0 and 1 digits in the one-dimensional binary sequence are filled, 0 is supplemented, so that each position in the two-dimensional matrix has a digit of 0 or 1. A schematic of the two-dimensional matrix obtained is shown in fig. 2.
To this end, the two-dimensional matrix is obtained, it should be noted that in this embodiment, by converting the one-dimensional binary sequence into the two-dimensional matrix, the direct relevance between data in the one-dimensional binary sequence and the data can be greatly increased, and at this time, the probability that the same numbers in the two-dimensional matrix are together becomes higher, so that the chain code encoding compression is performed subsequently according to the number type with the small occurrence frequency in the two-dimensional matrix, the length of the chain code can be reduced, the amount of stored data is reduced, and the compression ratio is increased.
Visualizing the two-dimensional matrix: and (3) expressing the number 0 in the two-dimensional matrix by using a white pixel point, and expressing the number 1 in the two-dimensional matrix by using a black pixel point, wherein the two-dimensional matrix can be regarded as a visual effect graph. The corresponding visualization effect graph after the two-dimensional matrix visualization in fig. 2 is shown in fig. 3.
It should be noted that, as can be seen from fig. 3, the frequency of the number 1 in the two-dimensional matrix is much lower than the frequency of the number 0, and meanwhile, the number 1 (black pixel in the visualization effect graph) forms a plurality of connected domains. For the information contained in the two-dimensional matrix, the information contained in the two-dimensional matrix can be obtained as long as the size of the two-dimensional matrix is known and the distribution of 0 and 1 digits in the two-dimensional matrix is known. In storing information, it is desirable that the smaller the storage amount, the better. If only the distribution information of the number 1 in the two-dimensional matrix and the size of the two-dimensional matrix are used, all information contained in the two-dimensional matrix can be finally obtained without loss.
In this embodiment, the total number of digits in the two-dimensional matrix isCounting the number of the digits 0 and the number of the digits 1 in the two-dimensional matrix, and recording the number of the digits 0 in the two-dimensional matrix asNumber of the number 1 is noted. If it isThe number of the number 0 in the two-dimensional matrix is larger than the number of the number 1, and in order to record less number quantity in the subsequent compression process, 1 is used as a foreground (namely, black pixel points in the visual effect graph are used as the foreground), and 0 is used as a background (namely, white pixel points in the visual effect graph are used as the background); if it isThe number of the number 0 in the two-dimensional matrix is smaller than the number of the number 1, and in order to record less number quantity in the subsequent compression process, 0 is used as a foreground (namely, white pixel points in the visual effect image are used as the foreground), and 1 is used as a background (namely, black pixel points in the visual effect image are used as the background); if it isAnd randomly selecting the foreground and the background.
And acquiring the eight connected domains of the foreground in the visual effect diagram by adopting a region growing method, wherein the region growing method is the prior art and is not summarized in detail here. The foreground in fig. 3 is a black pixel, the eight connected domains of the foreground in fig. 3 are regions formed by black pixels, and the eight connected domains of the foreground in fig. 3 are schematically shown in fig. 4.
Thus, eight connected domains of the foreground in the visual effect graph are obtained.
And S003, acquiring the optimal code of each pixel point.
It should be noted that step S002 obtains a plurality of eight connected domains in the visualization effect graph, and since the eight connected domains are not necessarily all regular connected domains (e.g., eight connected domains 3 and eight connected domains 5 in fig. 4), and are difficult to represent by the conventional method, each eight connected domain can be represented by using a chain code. The eight-directional chain code defines 8 direction symbols for two adjacent pixel points according to the horizontal, vertical and two diagonal directions: 0. 1, 2, 3, 4, 5, 6, 7, the direction symbol diagram of the eight-direction chain code is shown in fig. 5. The chain code is a group of sequence composed of the starting point of the line segment and a plurality of direction symbols, for example, eight connected components 9 in fig. 4, the first pixel point from left to right from top to bottom is obtained as the chain code dock, and the chain code encoding of the connected components is performed, so that the chain code encoding corresponding to the eight connected components 9 is:= { (1,10), 0,0,0,0}, where (1,10) is the coordinates of the chain code terminal; 0,0,0,0 represents 4 direction symbols, and there are many direction symbols if there are many pixel points behind the chain code in the connected domain. It should be noted that, in the coordinate system in this embodiment, the upper left corner of the visualization effect graph is taken as the origin of coordinates, and the horizontal direction is taken as the horizontal directionAn axis in the vertical direction ofAnd (4) establishing a plane rectangular coordinate system by using the axes.
It should be further noted that, when the eight-connected domain is encoded by using the chain code, the selected code terminal is different, and the obtained code terminal is also different. For example, eight connected domains 2 in FIG. 4,if the first pixel point of the sequence number from left to right from top to bottom is taken as a chain code wharf for the coding of the chain code of the connected domain, the corresponding chain code is as follows:= { (4,1), 0,6}; if the first pixel point of the sequence number from right to left from top to bottom is taken as a chain code wharf for the coding of the chain code of the connected domain, the corresponding chain code is as follows:= { (5,1), 4: (5,1), 6}; if the first pixel point of the sequence number from right to left and from bottom to top is used as a chain code wharf to carry out connected domain chain code coding, the corresponding chain code is as follows:= { (5,2), 2,4}. WhereinComprises two chain codes { (5,1), 4}, { (5,1), 6},and withOnly one chain code is included. On the basis of only containing one chain code, the length of the chain code corresponding to different chain code wharfs is the same, but the binary codes of the chain codes corresponding to different chain code wharfs are different. For example: chain codeThe binary code of = { (4,1), 0,6} is {100,1,0,110}, like chain codeThe binary encoding of = { (5,2), 2,4} is {101,10,10,100}. Chain codeBit occupied by binary code ofNumber 8 bits, chain codeThe bit number occupied by the binary code is 10 bits, therefore, different chain code wharfs are adopted for the same eight-connected domain to carry out chain code coding, and the bit numbers occupied by the finally obtained binary codes are also different. Therefore, in order to ensure the compression rate of the production data, the optimization degree of each pixel point in the eight connected domain as the chain code dock is calculated, and a plurality of chain code encoding results may be obtained by using one pixel point in the eight connected domain as the chain code dock, as shown in fig. 6, the eight connected domain composed of the black pixel points in fig. 6 (a) is subjected to chain code encoding, the first pixel point in the sequence from left to right and from bottom to top is used as the chain code dock, and two chain code encoding results { (1,3), 0,0,7,0,0,2,2,2,4,4,4,6} and { (1,3) and 0,0,2,2,0,0,0,6,6,6,4,4} are obtained and are respectively marked as、. WhereinIn correspondence with figure 6 (b),corresponding to fig. 6 (c). Therefore, before calculating the optimal degree of each pixel point in the eight connected domain as the chain code wharf, the optimal chain code when each pixel point in the eight connected domain is used as the chain code wharf needs to be obtained first, and the optimal chain code when each pixel point in the eight connected domain is used as the chain code wharf is recorded as the optimal code of each pixel point.
In this embodiment, the optimal encoding obtaining method for each pixel point is as follows:
taking one pixel point in the eight connected domains as a chain code wharf, carrying out chain code coding on each eight connected domain, and selecting the coding result with the longest chain code length as the pixel when a plurality of coding results existAnd in the process of optimal coding of the point, if the chain code lengths of a plurality of coding results are longest and equal, the coding results are used as candidate coding results, whether direction symbols at the same position of all the candidate coding results are the same or not is sequentially judged, when the direction symbols at the same position of all the candidate coding results are different, the judgment is stopped, and the coding result with the small direction symbol is used as the final optimal coding of the pixel point. For example, the eight connected domains formed by the black pixels in fig. 6 (a) are chain-coded, the first pixel counted from left to right and from bottom to top is taken as a chain code dock, and two chain-coded results are obtainedAndare the same in length, butAndif the 3 rd direction symbol is 7 and 2, respectively, the chain code encoding result corresponding to the smaller direction symbol 2 is selectedAnd the optimal code is used as the optimal code of the pixel point (1,3).
Thus, the optimal code of each pixel point in each eight-connected domain is obtained.
And S004, acquiring the optimal degree of each pixel point as a chain code wharf.
It should be noted that the number of chain codes in the optimal codes corresponding to different chain code terminals may be different, and since each more chain code may cause the coordinates of the chain code terminal to be represented once in the optimal code, the storage amount is inevitably increased, and therefore, it is desirable that the number of chain codes is as small as possible. The bits occupied by the conversion of different direction symbols into binary numbers are different, direction symbols 0 and 1 into binary numbers occupy 1 bit, direction symbols 2 and 3 into binary numbers occupy 2 bits, and direction symbols 4, 5, 6 and 7 into binary numbers occupy 3 bits. To ensure the compression effect, it is desirable that the smaller the occupation ratio of the direction symbols in the optimal coding, the better.
In this embodiment, all the different direction indicators 0,1, 2, 3, 4, 5, 6, 7 are first classified into three categories, 0 and 1 are classified into a first category, 2 and 3 are classified into a second category, and 4, 5, 6, 7 are classified into a third category.
For the second of eight connected domainsEach pixel point respectively acquires the number of direction symbols belonging to each category in the optimal code of the pixel point and respectively records the number as the direction symbols. Recording the number of all direction symbols in the optimal coding of the pixel point as. Recording the number of chain code bars in the optimal coding of the pixel point as. Then with an eighth connectivity domainThe optimal degree of each pixel point as a chain code wharfComprises the following steps:
whereinIs the eighth communication intra-domainThe optimal degree of each pixel point as a chain code wharf;is the eighth communication intra-domainThe number of the optimally coded chain codes of the pixel points;is the first in eight connected domainsThe number of direction symbols in the optimal coding of each pixel point;is the first in eight connected domainsThe number of direction symbols belonging to the first category in the optimal coding of each pixel point;is the eighth communication intra-domainThe number of direction symbols belonging to the third category in the optimal coding of each pixel point;is an exponential function with a natural constant as a base;is the eighth communication intra-domainThe ratio of direction symbols belonging to the first category in the optimal encoding of each pixel point is added with 0.00001 purpose is to preventIs 0 results in Is 0; when it comes toThe less the number of chain codes in the optimal coding of each pixel point, the more the number of direction symbols belonging to the first category is, and the less the number of direction symbols belonging to the third category is, the less the number of bits occupied by the optimal coding of the current pixel point converted into binary coding is, and the greater the optimal degree of the current pixel point as a chain code wharf at this time is.
And in the same way, acquiring the optimal degree of each pixel point in each eight-connected domain as the chain code wharf. It should be noted that, in this embodiment, the optimal encoding characteristic of each pixel point is combined to obtain the optimal degree of each pixel point as the chain code wharf, so that the optimal chain code encoding result is selected according to the optimal degree in the subsequent process, and further the compression efficiency of each eight-connected domain is maximized.
And S005, acquiring compressed data.
And taking all pixel points in the eight connected domains as pixel points corresponding to the maximum optimization degree in the optimization degrees of the chain code wharfs as final chain code wharfs, and taking the optimal codes corresponding to the final chain code wharfs as optimal chain code coding results. And converting the optimal chain code coding result into binary coding as a compression result of the corresponding eight-connected domain. For example, the optimal chain code encoding result of the octal-connected domain 2 in FIG. 4 is= { (4,1), 0,6}, and the compression result is {100,1,0,110}.
And taking the compression results of all the eight connected domains as compressed data.
At this point, compressed data is obtained. For compressed data, length of one-dimensional binary sequenceAnd the side length of the two-dimensional matrixFor storage or transmission. In addition, since the foreground is compressed by the compressed data, the number corresponding to the foreground needs to be stored or transmitted, for example, a number 1 is stored or transmitted when the foreground is the number 1, and a number 0 is stored or transmitted when the foreground is the number 0.
It should be noted that the compressed data in this embodiment is a compressed result of a number with a small number of occurrences in the two-dimensional matrix, and a large amount of data in the two-dimensional matrix is discarded (i.e., a number with a large number of occurrences is discarded) by the compression method in this embodiment, so that the finally obtained compressed data has a small data size and a high transmission speed.
And S006, performing production data abnormity analysis according to the compressed data of the adjacent time periods.
The method for decompressing the compressed data comprises the following steps:
firstly, a dimension of the two-dimensional matrix is constructed according to the side length of the two-dimensional matrixAnd establishing a corresponding plane rectangular coordinate system. And converting the binary codes in the compression results into decimal codes to obtain a plurality of chain code coding results. And filling the number corresponding to the foreground at the coordinate position of the chain code wharf of each chain code coding result in the two-dimensional matrix according to the number corresponding to the foreground, and filling the number corresponding to the foreground at the corresponding position sequentially according to the direction symbol in the chain code coding result. And filling complementary numbers of the numbers corresponding to the foreground in the vacant positions of the two-dimensional matrix after filling the corresponding positions of all the chain code coding results in the two-dimensional matrix. If the number corresponding to the foreground is 1, the complementary number is 0, and if the number corresponding to the foreground is 0, the complementary number is 1. Thus, a two-dimensional matrix is obtained.
According to the length of one-dimensional binary sequenceAnd converting the two-dimensional matrix into a one-dimensional binary sequence, and performing inverse transformation operated in the step S001 on the one-dimensional binary sequence to obtain original production data.
It should be noted that the production data in this embodiment is data collected by the control layer in the production process in real time, the production data in a period of time is compressed by using the method in this embodiment according to the initially set data transmission frequency, a control layer production data compression packet in the current period of time is formed, and the production data compression packet is transmitted to the MES system and is analyzed and processed by the MES system. Because the data acquisition period in the production process is not too long, for example, when the data transmission frequency is 10 minutes, each production data compression packet contains data in the production process for 10 minutes, the data sizes in the adjacent production data compression packets are basically consistent under normal conditions, when the data sizes in the adjacent production data compression packets are deviated, the data are abnormal, at the moment, the MES system performs emphasis analysis on the production data compression packets, transmits the analysis result to the control layer, and regulates and controls the corresponding production process.
Through the steps, the compression transmission and the decompression of the production data are completed.
According to the embodiment of the invention, the one-dimensional binary sequence is converted into the two-dimensional matrix, so that the direct relevance of data and data in the one-dimensional binary sequence can be greatly increased, the probability of the same numbers in the two-dimensional matrix being together is increased, and the chain code length can be reduced by performing chain code coding compression according to the number type with less occurrence times in the two-dimensional matrix, so that the data compression amount is reduced, and the compression ratio is increased. According to the embodiment of the invention, the optimal coding characteristic of each pixel point is combined to obtain the optimal degree of each pixel point as the chain code wharf, so that the optimal chain code coding result is selected according to the optimal degree subsequently, and the compression efficiency of each eight-connected domain is further maximized. The compressed data in the embodiment of the invention is the compression result of the digits with few occurrence times in the two-dimensional matrix, and the digits with many occurrence times in the two-dimensional matrix are abandoned by the compression method in the embodiment of the invention, so that the finally obtained compressed data has small data volume and high transmission speed.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the scope of the present invention, which is intended to cover any modifications, equivalents, improvements, etc. within the spirit and scope of the present invention.
Claims (8)
1. An updating exception matching method based on MES intercommunication interconnection production data is characterized by comprising the following steps:
collecting production data, and coding the production data into a one-dimensional binary sequence; converting the one-dimensional binary sequence into a two-dimensional matrix; converting the two-dimensional matrix into a visual effect diagram;
acquiring a foreground and a background in the visual effect image according to the number of the numbers 0 and the number of the numbers 1 in the two-dimensional matrix; acquiring an eight-connected domain of a foreground in a visual effect graph;
classifying all direction symbols of the eight-direction chain codes to obtain a plurality of classes;
taking each pixel point in each eight-connected domain as a chain code wharf, and performing chain code coding on each eight-connected domain to obtain the optimal coding of each pixel point; acquiring the optimal degree of each pixel point as a chain code wharf according to the optimal code of each pixel point and the category of each direction symbol in the optimal code;
and taking all pixel points in the eight-connected domain as pixel points corresponding to the maximum optimization degree in the optimization degrees of the chain code wharfs as final chain code wharfs, and converting the optimal codes corresponding to the final chain code wharfs into binary systems as compression results.
2. The method for matching update exceptions based on MES interworking interconnection production data of claim 1 wherein the collecting production data and encoding production data into one-dimensional binary sequences comprises the steps of:
and carrying out fixed-length binary coding on the production data, and splicing all binary codes together to form a one-dimensional binary sequence.
3. The method for matching update exceptions based on MES interworking interconnection production data of claim 1 wherein the converting the one-dimensional binary sequence into a two-dimensional matrix comprises the specific steps of:
squaring the length of the one-dimensional binary sequence, and rounding the obtained result upwards to obtain the length of the side lengthConstruction ofAnd (3) filling binary digits in the one-dimensional binary sequence into the two-dimensional matrix according to the sequence of the two-dimensional matrix with the large and small two-dimensional matrix, and performing 0 complementing operation on vacant positions of the two-dimensional matrix.
4. The method for updating exception matching based on MES interworking interconnection production data according to claim 1, wherein said converting the two-dimensional matrix into the visualization effect graph comprises the following steps:
and (3) representing the number 0 in the two-dimensional matrix by using white pixel points, and representing the number 1 in the two-dimensional matrix by using black pixel points to obtain a visual effect graph.
5. The method for updating exception matching based on MES interworking interconnection production data according to claim 1, wherein the obtaining the foreground and the background in the visualization effect chart according to the number of the number 0 and the number of the number 1 in the two-dimensional matrix comprises the following specific steps:
if the number of the numbers 0 in the two-dimensional matrix is larger than the number of the numbers 1, taking black pixel points in the visual effect image as a foreground and white pixel points as a background; if the number of the numbers 0 in the two-dimensional matrix is smaller than the number of the numbers 1, taking white pixel points in the visual effect image as a foreground and black pixel points as a background; and if the number of the digits 0 in the two-dimensional matrix is the same as that of the digits 1, randomly selecting the foreground and the background.
6. The method as claimed in claim 1, wherein the step of classifying all the direction symbols of the eight-direction chain code to obtain a plurality of classes comprises the following steps:
all direction symbols of the eight-direction chain code comprise 0,1, 2, 3, 4, 5, 6 and 7, wherein 0 and 1 are divided into a first category, 2 and 3 are divided into a second category, and 4, 5, 6 and 7 are divided into a third category.
7. The method for updating exception matching based on MES interworking interconnection production data according to claim 1, wherein said step of performing chain code coding on each eight-connected domain by using each pixel point in each eight-connected domain as a chain code dock to obtain the optimal code of each pixel point comprises the following specific steps:
and taking one pixel point in the eight connected domains as a chain code wharf, carrying out chain code coding on each eight connected domain to obtain a plurality of coding results, obtaining a coding result with the longest chain code length in the plurality of coding results as a candidate coding result, sequentially judging whether direction symbols at the same position of all the candidate coding results are the same, stopping judging when the direction symbols at the same position of all the candidate coding results are different, and taking a coding result with a small direction symbol as the optimal coding of the pixel point.
8. The method for matching update exception based on MES interworking interconnection production data as claimed in claim 1, wherein the expression of the preference degree is:
whereinIs the eighth communication intra-domainTaking the pixel points as the optimal degree of the chain code wharf;is the first in eight connected domainsThe number of the optimally coded chain codes of the pixel points;is the first in eight connected domainsThe number of direction symbols in the optimal coding of each pixel point;is the eighth communication intra-domainThe number of direction symbols belonging to the first category in the optimal codes of the pixel points;is the first in eight connected domainsThe number of direction symbols belonging to the third category in the optimal coding of each pixel point;is an exponential function with a natural constant as the base.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211482181.7A CN115529357B (en) | 2022-11-24 | 2022-11-24 | Updating abnormity matching method based on MES intercommunication interconnection production data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211482181.7A CN115529357B (en) | 2022-11-24 | 2022-11-24 | Updating abnormity matching method based on MES intercommunication interconnection production data |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115529357A true CN115529357A (en) | 2022-12-27 |
CN115529357B CN115529357B (en) | 2023-03-03 |
Family
ID=84704711
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211482181.7A Active CN115529357B (en) | 2022-11-24 | 2022-11-24 | Updating abnormity matching method based on MES intercommunication interconnection production data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115529357B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115815939A (en) * | 2023-02-20 | 2023-03-21 | 国网山东省电力公司东营供电公司 | Auxiliary positioning method for capacitor installation |
CN116612437A (en) * | 2023-07-20 | 2023-08-18 | 华洋通信科技股份有限公司 | Large-block coal transportation data processing system based on recognition result |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102255873A (en) * | 2010-05-21 | 2011-11-23 | 南京师范大学 | Method for high efficient transmission of vector data on the basis of pixel non-destructive compression of ordered point set |
CN113727105A (en) * | 2021-09-08 | 2021-11-30 | 北京医百科技有限公司 | Depth map compression method, device, system and storage medium |
CN113868206A (en) * | 2021-10-08 | 2021-12-31 | 八十一赞科技发展(重庆)有限公司 | Data compression method, decompression method, device and storage medium |
CN114726926A (en) * | 2022-03-30 | 2022-07-08 | 电子科技大学 | Self-adaptive variable length coding method for Laplace information source |
-
2022
- 2022-11-24 CN CN202211482181.7A patent/CN115529357B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102255873A (en) * | 2010-05-21 | 2011-11-23 | 南京师范大学 | Method for high efficient transmission of vector data on the basis of pixel non-destructive compression of ordered point set |
CN113727105A (en) * | 2021-09-08 | 2021-11-30 | 北京医百科技有限公司 | Depth map compression method, device, system and storage medium |
CN113868206A (en) * | 2021-10-08 | 2021-12-31 | 八十一赞科技发展(重庆)有限公司 | Data compression method, decompression method, device and storage medium |
CN114726926A (en) * | 2022-03-30 | 2022-07-08 | 电子科技大学 | Self-adaptive variable length coding method for Laplace information source |
Non-Patent Citations (2)
Title |
---|
杨胜天等: "一组整数的几个实用编码方案", 《通信学报》 * |
韩涛等: "基于块匹配和校验格编码的大嵌入率图像隐藏方法", 《计算机辅助设计与图形学学报》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115815939A (en) * | 2023-02-20 | 2023-03-21 | 国网山东省电力公司东营供电公司 | Auxiliary positioning method for capacitor installation |
CN115815939B (en) * | 2023-02-20 | 2023-05-16 | 国网山东省电力公司东营供电公司 | Auxiliary positioning method for capacitor installation |
CN116612437A (en) * | 2023-07-20 | 2023-08-18 | 华洋通信科技股份有限公司 | Large-block coal transportation data processing system based on recognition result |
CN116612437B (en) * | 2023-07-20 | 2023-10-03 | 华洋通信科技股份有限公司 | Large-block coal transportation data processing system based on recognition result |
Also Published As
Publication number | Publication date |
---|---|
CN115529357B (en) | 2023-03-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115529357B (en) | Updating abnormity matching method based on MES intercommunication interconnection production data | |
CN110602491B (en) | Intra-frame chroma prediction method, device and equipment and video coding and decoding system | |
US8977066B2 (en) | Image compression using sub-resolution images | |
CN104853209B (en) | Image coding and decoding method and device | |
CN111699696A (en) | Method and apparatus for encoding and decoding a byte stream | |
CN113473127B (en) | Point cloud geometric coding method, point cloud geometric decoding method, point cloud geometric coding equipment and point cloud geometric decoding equipment | |
CN116681036B (en) | Industrial data storage method based on digital twinning | |
CN105100814B (en) | Image coding and decoding method and device | |
CN104838653A (en) | Lossless image compression using differential transfer | |
CN112003625A (en) | Huffman coding method, system and equipment | |
CN103702133B (en) | A kind of compression of images methods of exhibiting and its device | |
JPH06334870A (en) | Coder | |
CN116506073A (en) | Industrial computer platform data rapid transmission method and system | |
CN103632179B (en) | Code And Decode method and the device of Three-Dimensional Bar Code | |
CN112016270B (en) | Logistics information coding method, device and equipment of Chinese-character codes | |
CN115632661B (en) | Efficient compression transmission method for network security information | |
CN111711819B (en) | Image data processing method of multi-component hybrid system | |
CN117156069B (en) | Software image data encryption transmission method | |
CN102298782A (en) | System, method, and computer program product for parameter estimation for lossless video compression | |
JP2526783B2 (en) | Region shape encoding / decoding method | |
CN115412713B (en) | Prediction coding and decoding method and device for point cloud depth information | |
US11907329B2 (en) | Convolution calculation apparatus and method | |
CN117155408B (en) | Efficient transmission method for production data | |
CN114554175B (en) | Classification rearrangement-based lossless compression method for two-dimensional point cloud distance images | |
CN109409460A (en) | A method of list data is transmitted using two dimensional code |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |