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 PDF

Info

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
Application number
CN202211482181.7A
Other languages
Chinese (zh)
Other versions
CN115529357B (en
Inventor
王红兵
吴芳林
肖萧
何家平
张勇
付凯
杨招
马兴玉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei Huiqiang New Energy Material Technology Co ltd
Henan Huiqiang New Energy Material Technology Co ltd
Xiangyang Huiqiang New Energy Material Technology Co ltd
Huiqiang Wuhan New Energy Material Technology Co ltd
Original Assignee
Hefei Huiqiang New Energy Material Technology Co ltd
Henan Huiqiang New Energy Material Technology Co ltd
Xiangyang Huiqiang New Energy Material Technology Co ltd
Huiqiang Wuhan New Energy Material Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hefei Huiqiang New Energy Material Technology Co ltd, Henan Huiqiang New Energy Material Technology Co ltd, Xiangyang Huiqiang New Energy Material Technology Co ltd, Huiqiang Wuhan New Energy Material Technology Co ltd filed Critical Hefei Huiqiang New Energy Material Technology Co ltd
Priority to CN202211482181.7A priority Critical patent/CN115529357B/en
Publication of CN115529357A publication Critical patent/CN115529357A/en
Application granted granted Critical
Publication of CN115529357B publication Critical patent/CN115529357B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/126Character encoding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods 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
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (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

Updating abnormity matching method based on MES intercommunication interconnection production data
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 process
Figure 310032DEST_PATH_IMAGE001
However, 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 length
Figure 985733DEST_PATH_IMAGE002
Construction of
Figure 394849DEST_PATH_IMAGE003
And (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:
Figure 574026DEST_PATH_IMAGE004
wherein
Figure 394083DEST_PATH_IMAGE005
Is the first in eight connected domains
Figure 307813DEST_PATH_IMAGE006
The optimal degree of each pixel point as a chain code wharf;
Figure 772817DEST_PATH_IMAGE007
is the eighth communication intra-domain
Figure 72080DEST_PATH_IMAGE006
The number of optimally coded chain codes of the pixel points;
Figure 344929DEST_PATH_IMAGE008
is the eighth communication intra-domain
Figure 198485DEST_PATH_IMAGE006
The number of direction symbols in the optimal coding of each pixel point;
Figure 729829DEST_PATH_IMAGE009
is the eighth communication intra-domain
Figure 368752DEST_PATH_IMAGE006
The number of direction symbols belonging to the first category in the optimal coding of each pixel point;
Figure 799121DEST_PATH_IMAGE010
is the eighth communication intra-domain
Figure 936710DEST_PATH_IMAGE006
The number of direction symbols belonging to the third category in the optimal coding of each pixel point;
Figure 225740DEST_PATH_IMAGE011
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 used
Figure 499595DEST_PATH_IMAGE012
And (4) showing. The length of the side of the two-dimensional matrix after the one-dimensional binary sequence is converted into the two-dimensional matrix
Figure 97936DEST_PATH_IMAGE002
Comprises the following steps:
Figure 207974DEST_PATH_IMAGE013
in the formula
Figure 552892DEST_PATH_IMAGE002
The side length of the two-dimensional matrix is represented,
Figure 946834DEST_PATH_IMAGE012
representing the length of a one-dimensional binary sequence;
Figure 466808DEST_PATH_IMAGE014
is rounding up the symbol.
Thus constructed in a size of
Figure 313410DEST_PATH_IMAGE003
A two-dimensional matrix of sizes. Sequentially filling 0 and 1 digits in the one-dimensional binary sequence into the binary sequence with the size of
Figure 193510DEST_PATH_IMAGE003
If 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 is
Figure 192690DEST_PATH_IMAGE015
Counting 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 as
Figure 881902DEST_PATH_IMAGE016
Number of the number 1 is noted
Figure 215801DEST_PATH_IMAGE017
. If it is
Figure 634012DEST_PATH_IMAGE018
The 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 is
Figure 940229DEST_PATH_IMAGE019
The 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 is
Figure 802006DEST_PATH_IMAGE020
And 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:
Figure 829392DEST_PATH_IMAGE021
= { (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 direction
Figure 254557DEST_PATH_IMAGE022
An axis in the vertical direction of
Figure 946438DEST_PATH_IMAGE023
And (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:
Figure 228384DEST_PATH_IMAGE024
= { (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:
Figure 743067DEST_PATH_IMAGE025
= { (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:
Figure 768660DEST_PATH_IMAGE026
= { (5,2), 2,4}. Wherein
Figure 315048DEST_PATH_IMAGE025
Comprises two chain codes { (5,1), 4}, { (5,1), 6},
Figure 784207DEST_PATH_IMAGE024
and with
Figure 48835DEST_PATH_IMAGE026
Only 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 code
Figure 615470DEST_PATH_IMAGE024
The binary code of = { (4,1), 0,6} is {100,1,0,110}, like chain code
Figure 32676DEST_PATH_IMAGE026
The binary encoding of = { (5,2), 2,4} is {101,10,10,100}. Chain code
Figure 922003DEST_PATH_IMAGE024
Bit occupied by binary code ofNumber 8 bits, chain code
Figure 939507DEST_PATH_IMAGE026
The 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
Figure 57636DEST_PATH_IMAGE027
Figure 578616DEST_PATH_IMAGE028
. Wherein
Figure 364476DEST_PATH_IMAGE027
In correspondence with figure 6 (b),
Figure 869276DEST_PATH_IMAGE028
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 obtained
Figure 56674DEST_PATH_IMAGE027
And
Figure 697740DEST_PATH_IMAGE028
are the same in length, but
Figure 663291DEST_PATH_IMAGE027
And
Figure 671698DEST_PATH_IMAGE028
if the 3 rd direction symbol is 7 and 2, respectively, the chain code encoding result corresponding to the smaller direction symbol 2 is selected
Figure 649406DEST_PATH_IMAGE028
And 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 domains
Figure 426869DEST_PATH_IMAGE006
Each 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
Figure 828901DEST_PATH_IMAGE029
. Recording the number of all direction symbols in the optimal coding of the pixel point as
Figure 59025DEST_PATH_IMAGE008
. Recording the number of chain code bars in the optimal coding of the pixel point as
Figure 571915DEST_PATH_IMAGE007
. Then with an eighth connectivity domain
Figure 453152DEST_PATH_IMAGE006
The optimal degree of each pixel point as a chain code wharf
Figure 307975DEST_PATH_IMAGE005
Comprises the following steps:
Figure 12014DEST_PATH_IMAGE004
wherein
Figure 79327DEST_PATH_IMAGE005
Is the eighth communication intra-domain
Figure 815071DEST_PATH_IMAGE006
The optimal degree of each pixel point as a chain code wharf;
Figure 558905DEST_PATH_IMAGE007
is the eighth communication intra-domain
Figure 498042DEST_PATH_IMAGE006
The number of the optimally coded chain codes of the pixel points;
Figure 352734DEST_PATH_IMAGE008
is the first in eight connected domains
Figure 945914DEST_PATH_IMAGE006
The number of direction symbols in the optimal coding of each pixel point;
Figure 611382DEST_PATH_IMAGE009
is the first in eight connected domains
Figure 552662DEST_PATH_IMAGE006
The number of direction symbols belonging to the first category in the optimal coding of each pixel point;
Figure 961777DEST_PATH_IMAGE010
is the eighth communication intra-domain
Figure 140955DEST_PATH_IMAGE006
The number of direction symbols belonging to the third category in the optimal coding of each pixel point;
Figure 226591DEST_PATH_IMAGE011
is an exponential function with a natural constant as a base;
Figure 140321DEST_PATH_IMAGE030
is the eighth communication intra-domain
Figure 85885DEST_PATH_IMAGE006
The 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 prevent
Figure 916307DEST_PATH_IMAGE030
Is 0 results in
Figure 923577DEST_PATH_IMAGE005
Is 0; when it comes to
Figure 573870DEST_PATH_IMAGE006
The 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
Figure 308477DEST_PATH_IMAGE024
= { (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 sequence
Figure 478558DEST_PATH_IMAGE012
And the side length of the two-dimensional matrix
Figure 174506DEST_PATH_IMAGE031
For 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 matrix
Figure 46516DEST_PATH_IMAGE003
And 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 sequence
Figure 335546DEST_PATH_IMAGE012
And 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 length
Figure 323635DEST_PATH_IMAGE001
Construction of
Figure 203866DEST_PATH_IMAGE002
And (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:
Figure DEST_PATH_IMAGE003
wherein
Figure 750123DEST_PATH_IMAGE004
Is the eighth communication intra-domain
Figure 108423DEST_PATH_IMAGE005
Taking the pixel points as the optimal degree of the chain code wharf;
Figure 493575DEST_PATH_IMAGE006
is the first in eight connected domains
Figure 544708DEST_PATH_IMAGE005
The number of the optimally coded chain codes of the pixel points;
Figure 922468DEST_PATH_IMAGE007
is the first in eight connected domains
Figure 818880DEST_PATH_IMAGE005
The number of direction symbols in the optimal coding of each pixel point;
Figure 67328DEST_PATH_IMAGE008
is the eighth communication intra-domain
Figure 289362DEST_PATH_IMAGE005
The number of direction symbols belonging to the first category in the optimal codes of the pixel points;
Figure 888839DEST_PATH_IMAGE009
is the first in eight connected domains
Figure 854521DEST_PATH_IMAGE005
The number of direction symbols belonging to the third category in the optimal coding of each pixel point;
Figure 225984DEST_PATH_IMAGE010
is an exponential function with a natural constant as the base.
CN202211482181.7A 2022-11-24 2022-11-24 Updating abnormity matching method based on MES intercommunication interconnection production data Active CN115529357B (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Title
杨胜天等: "一组整数的几个实用编码方案", 《通信学报》 *
韩涛等: "基于块匹配和校验格编码的大嵌入率图像隐藏方法", 《计算机辅助设计与图形学学报》 *

Cited By (4)

* Cited by examiner, † Cited by third party
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
US8977066B2 (en) Image compression using sub-resolution images
CN110602491B (en) Intra-frame chroma prediction method, device and equipment and video coding and decoding system
CN116506073B (en) Industrial computer platform data rapid transmission method and system
CN113473127B (en) Point cloud geometric coding method, point cloud geometric decoding method, point cloud geometric coding equipment and point cloud geometric decoding equipment
CN105100814B (en) Image coding and decoding method and device
CN104838653A (en) Lossless image compression using differential transfer
CN103702133B (en) A kind of compression of images methods of exhibiting and its device
CN116681036B (en) Industrial data storage method based on digital twinning
JPH06334870A (en) Coder
CN112003625A (en) Huffman coding method, system and equipment
CN112152634B (en) Block compression encoding method, device, computer equipment and readable storage medium
CN115632661B (en) Efficient compression transmission method for network security information
CN116796785A (en) Electronic price tag display method and device, electronic equipment and readable storage medium
CN112016270B (en) Logistics information coding method, device and equipment of Chinese-character codes
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
CN109409460A (en) A method of list data is transmitted using two dimensional code
CN113473150B (en) Image processing method and device and computer readable storage device
US11907329B2 (en) Convolution calculation apparatus and method
CN114554175B (en) Classification rearrangement-based lossless compression method for two-dimensional point cloud distance images
CN117155408B (en) Efficient transmission method for production data
WO2019191904A1 (en) Data processing method and device

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