[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN115529357B - 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
CN115529357B
CN115529357B CN202211482181.7A CN202211482181A CN115529357B CN 115529357 B CN115529357 B CN 115529357B CN 202211482181 A CN202211482181 A CN 202211482181A CN 115529357 B CN115529357 B CN 115529357B
Authority
CN
China
Prior art keywords
chain code
production data
dimensional matrix
optimal
coding
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.)
Active
Application number
CN202211482181.7A
Other languages
Chinese (zh)
Other versions
CN115529357A (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)
  • 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 the production data into a one-dimensional binary sequence and converting the one-dimensional binary sequence into a two-dimensional matrix, and acquiring a foreground and a background according to the number of the digits in the two-dimensional matrix to further obtain 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. The MES system generates a large amount of production data all the time in the process of communicating and interconnecting with the planning layer and the control layer, and when the production data are transmitted and stored, the production data are generally required to be compressed for better and faster transmission and storage of more production data, and the update exception matching of the production data can be completed by analyzing a compressed packet.
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 usually only a part, and meanwhile, 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 exception matching method based on MES intercommunication interconnection 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 eight connected domains of the foreground in the visual effect image;
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 domains as pixel points corresponding to the maximum optimization degree in the optimization degrees of the chain code wharf as a final chain code wharf, and converting the optimal code corresponding to the final chain code wharf into a binary system as a compression result.
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 obtained 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, 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 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 coding 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
Taking the pixel points as the optimal degree of the chain code wharf;
Figure 772817DEST_PATH_IMAGE007
is the first in eight connected domains
Figure 72080DEST_PATH_IMAGE006
The number of the optimally coded chain codes of the pixel points;
Figure 344929DEST_PATH_IMAGE008
is the first in eight connected domains
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 first in eight connected domains
Figure 936710DEST_PATH_IMAGE006
The number of direction symbols belonging to the third category in the optimal codes of the pixel points;
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 description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating the steps of an update exception matching method based on MES interworking production data according to the present invention;
FIG. 2 is a schematic diagram of a two-dimensional matrix of the update exception matching method based on MES interworking interconnection production data of the present invention;
FIG. 3 is a visual effect diagram of the update exception matching method 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 updating exception matching based on MES interworking interconnection 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, the different references to "one embodiment" or "another embodiment" do not necessarily refer to 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, purchasing management, cost management, project bulletin 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 acquired, the production data is often in various forms, and for convenience of processing, various production data are converted into a uniform coding format, that is, production data in 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 a fixed-length binary code as follows: wherein the ASCII code of each letter in "China" is respectively as follows: 67. 104, 105, 110, 97, then the ASCII code is converted to eight-bit binary code: 01000011, 01101000, 01101001, 01101101110 and 01100001.
All binary codes are spliced together to form a one-dimensional binary sequence. For example, the one-dimensional binary sequence of "China" is 0100001101000011010110010110111001100001.
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 thereof, and in order to improve 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 numbers in the eight neighborhoods thereof.
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 side length 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 diagram of the two-dimensional matrix obtained is shown in fig. 2.
Therefore, a two-dimensional matrix is obtained, and 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 the probability that the same numbers are in the two-dimensional matrix becomes higher, so that the subsequent chain code encoding compression is performed according to the number type with fewer occurrences 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 number 0 and the number of the number 1 in the two-dimensional matrix, and dividing by twoThe number of digits 0 in the dimension matrix is noted
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 components of the foreground in fig. 3 are regions formed by black pixels, and the schematic diagram of the eight connected components in fig. 3 is 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 map, 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), it is difficult to tabulate the table by the conventional methodThus, each eight-connected domain can be represented 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, and 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}, wherein (1, 10) is coordinates of a chain code terminal; 0,0 represents 4 direction symbols, and there are some direction symbols if there are some pixel points behind the chain code wharf 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, in fig. 4, for an eight-connected component 2, if the first pixel point counted from left to right from top to bottom is used as a chain code terminal to perform connected component chain code encoding, the corresponding chain code is:
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 from right to left and from bottom to topThe first pixel point of the sequence number is used as a chain code wharf to carry out connected domain chain code coding, and then 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
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}, a homologus chain code
Figure 32676DEST_PATH_IMAGE026
The binary coding of { (5, 2), 2,4} is {101,10, 100}. Chain code
Figure 922003DEST_PATH_IMAGE024
The number of bits occupied by the binary code of (2) is 8 bits, and the 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 optimal degree of each pixel point in the eight-connected domain as the chain code wharf needs to be 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 wharf, as shown in fig. 6, for each pixel point in the eight-connected domain, the method for generating the chain code wharf is applied to the eight-connected domain<xnotran> 6 (a) , , { (1,3), 0,0,7,0,0,2,2,2,4,4,4,6} { (1,3), 0,0,2,2,0,0,0,6,6,6,4,4}, </xnotran>
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:
and in the process, if the chain code lengths of the plurality of coding results are the 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, and 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 domain composed of black pixels in fig. 6 (a) is chain-coded, and the first pixel counted from left to right and from bottom to top is the chain-coded dock, so as to obtain two chain-coded results
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, 2, then select the chain code coding result corresponding to the smaller direction symbol 2
Figure 649406DEST_PATH_IMAGE028
And the optimal code of the pixel point (1, 3) is obtained.
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 multiple 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 smaller as well as better. 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 first in eight connected domains
Figure 815071DEST_PATH_IMAGE006
Taking the pixel points as the optimal degree of the chain code wharf;
Figure 558905DEST_PATH_IMAGE007
is the first in eight connected domains
Figure 498042DEST_PATH_IMAGE006
The number of the optimally coded chain codes of the pixel points;
Figure 352734DEST_PATH_IMAGE008
is in eight connected domainsFirst, the
Figure 945914DEST_PATH_IMAGE006
The number of direction symbols in the optimal coding of each pixel point;
Figure 611382DEST_PATH_IMAGE009
is the eighth communication intra-domain
Figure 552662DEST_PATH_IMAGE006
The number of direction symbols belonging to the first category in the optimal codes of the pixel points;
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 is added to 0.00001 to prevent the occurrence of false errors
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 more the number of direction symbols belonging to the third category isWhen the number of bits occupied by the optimal codes of the current pixel points converted into the binary codes is small, the preference degree of the current pixel points as the chain code wharf is large.
And in the same way, acquiring the optimal degree of each pixel point in each eight-connected domain as a 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 subsequently, and the compression efficiency of each eight-connected domain is further 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 compressed data is used to compress the foreground, the data corresponding to the foreground needs to be stored or transmitted, for example, if the number 1 is the foreground, the number 1 is stored or transmitted, and if the number 0 is the foreground, the number 0 is stored or transmitted.
It should be noted that the compressed data in this embodiment is a compressed result of a number with a small occurrence number 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 occurrence number 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 numbers 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 10 minutes of data in the production process, 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 represented to be 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, compression transmission and decompression of 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 is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (8)

1. An updating exception matching method based on MES intercommunication interconnected production data is characterized by comprising 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 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 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; 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;
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 wharf as a final chain code wharf, and converting the optimal code corresponding to the final chain code wharf into a binary system as a compression result;
and transmitting the compression result to an MES system, decompressing the compression result through the MES system to obtain decompressed production data, matching the decompressed production data between adjacent sampling frequencies, and if the decompressed production data between the adjacent sampling frequencies have deviation, determining that the corresponding decompressed production data have abnormity.
2. The method as claimed in claim 1, wherein the step of collecting the production data and encoding the production data into a one-dimensional binary sequence comprises the following 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.
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 result upwards to obtain the length of the side length
Figure DEST_PATH_IMAGE001
Construction of
Figure DEST_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, 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 as claimed in claim 1, wherein said converting the two-dimensional matrix into the visual effect graph comprises the following 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.
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 numbers 0 in the two-dimensional matrix is the same as that of the numbers 1, randomly selecting the foreground and the background.
6. The method for matching update exception of MES interworking interconnection production data according to claim 1, wherein said classifying all 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 as claimed in claim 1, wherein the expression of the preference degree is:
Figure DEST_PATH_IMAGE003
wherein
Figure DEST_PATH_IMAGE004
Is the first in eight connected domains
Figure DEST_PATH_IMAGE005
Taking the pixel points as the optimal degree of the chain code wharf;
Figure DEST_PATH_IMAGE006
is the first in eight connected domains
Figure 744534DEST_PATH_IMAGE005
The number of the optimally coded chain codes of the pixel points;
Figure DEST_PATH_IMAGE007
is the eighth communication intra-domain
Figure 396095DEST_PATH_IMAGE005
The number of direction symbols in the optimal coding of each pixel point;
Figure DEST_PATH_IMAGE008
is the first in eight connected domains
Figure 582357DEST_PATH_IMAGE005
The number of direction symbols belonging to the first category in the optimal codes of the pixel points;
Figure DEST_PATH_IMAGE009
is the first in eight connected domains
Figure 774304DEST_PATH_IMAGE005
The number of direction symbols belonging to the third category in the optimal coding of each pixel point;
Figure DEST_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 CN115529357A (en) 2022-12-27
CN115529357B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115815939B (en) * 2023-02-20 2023-05-16 国网山东省电力公司东营供电公司 Auxiliary positioning method for capacitor installation
CN116612437B (en) * 2023-07-20 2023-10-03 华洋通信科技股份有限公司 Large-block coal transportation data processing system based on recognition result

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102255873B (en) * 2010-05-21 2014-01-01 南京师范大学 Method for transmission of vector data on the basis of pixel non-destructive compression of ordered point set
CN113727105B (en) * 2021-09-08 2022-04-26 北京医百科技有限公司 Depth map compression method, device, system and storage medium
CN114726926B (en) * 2022-03-30 2023-03-31 电子科技大学 Self-adaptive variable length coding method for Laplace information source

Also Published As

Publication number Publication date
CN115529357A (en) 2022-12-27

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
CN104853209B (en) Image coding and decoding method and device
CN116506073B (en) Industrial computer platform data rapid transmission method and system
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
US20090016453A1 (en) Combinatorial coding/decoding for electrical computers and digital data processing systems
CN105100814B (en) Image coding and decoding method and device
CN112003625A (en) Huffman coding method, system and equipment
CN104838653A (en) Lossless image compression using differential transfer
CN103632179B (en) Code And Decode method and the device of Three-Dimensional Bar Code
CN115208414B (en) Data compression method, data compression device, computer device and storage medium
US20220005229A1 (en) Point cloud attribute encoding method and device, and point cloud attribute decoding method and devcie
CN115955513A (en) Internet of things data optimized transmission method
CN112016270B (en) Logistics information coding method, device and equipment of Chinese-character codes
CN115632661B (en) Efficient compression transmission method for network security information
CN102298782B (en) System and method for parameter estimation for lossless video compression
CN116030114A (en) Manufacturing method, device, equipment and medium of bioelectrical homologous electronic impression
CN117156069B (en) Software image data encryption transmission method
CN112200301B (en) Convolution computing device and method
JP2526783B2 (en) Region shape encoding / decoding method
CN109409460A (en) A method of list data is transmitted using two dimensional code
CN118399976B (en) Remote monitoring method and system for equipment operation data
CN117544177A (en) Radar data lossless compression method, computer equipment and medium
CN116094694A (en) Point cloud geometric coding method, decoding method, coding device and decoding 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