CN117195006B - Veterinary drug residue data management system for chicken - Google Patents

Veterinary drug residue data management system for chicken Download PDF

Info

Publication number
CN117195006B
CN117195006B CN202311464230.9A CN202311464230A CN117195006B CN 117195006 B CN117195006 B CN 117195006B CN 202311464230 A CN202311464230 A CN 202311464230A CN 117195006 B CN117195006 B CN 117195006B
Authority
CN
China
Prior art keywords
character
sequence
distance
characters
target
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
CN202311464230.9A
Other languages
Chinese (zh)
Other versions
CN117195006A (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.)
NANTONG SHUANGHE FOOD CO Ltd
Original Assignee
NANTONG SHUANGHE FOOD 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 NANTONG SHUANGHE FOOD CO Ltd filed Critical NANTONG SHUANGHE FOOD CO Ltd
Priority to CN202311464230.9A priority Critical patent/CN117195006B/en
Publication of CN117195006A publication Critical patent/CN117195006A/en
Application granted granted Critical
Publication of CN117195006B publication Critical patent/CN117195006B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Character Input (AREA)

Abstract

The invention relates to the technical field of digital data processing, in particular to a veterinary drug residue data management system for chicken, which comprises the following components: the system comprises a monitoring data acquisition module, a matching value acquisition module, a target text segment acquisition module and a monitoring data processing module; obtaining an adjacency according to the frequency of the occurrence of the characters in the character combination; obtaining a matching value by the adjacent relation; according to the target character and the matching value, the alternative merging degree is obtained; obtaining a marked character according to the alternative merging degree; obtaining a marked character combination according to the marked characters, and clustering according to the marked character combination to obtain a cluster with the maximum density; obtaining each text segment according to the cluster with the maximum density; threshold screening is carried out on the text segments according to the text segment lengths to obtain each target text segment; and carrying out data processing based on the marked character combination according to the target text segment. The data compression rate can be adaptively improved for different scenes.

Description

Veterinary drug residue data management system for chicken
Technical Field
The invention relates to the technical field of data processing, in particular to a veterinary drug residue data management system for chicken.
Background
In poultry farming, in order to ensure the edible safety of chicken, farmers can prevent and treat diseases by using veterinary drugs for chickens, but because each chicken has different metabolism conditions of veterinary drugs, the concentration of veterinary drugs remained in each chicken is different, and if the concentration of veterinary drugs remained in part of chicken is too high, the veterinary drugs may be harmful to human bodies. Therefore, each link of chicken production needs to be monitored in real time, and a large amount of monitoring data is collected to carry out intelligent analysis on veterinary drug residues for chicken; in order to facilitate the user to know veterinary drug residue, the detection result and the processing process of each chicken sample can be checked, so that tracking and tracing are facilitated, and a large amount of monitoring data is required to be compressed and stored efficiently.
Although the conventional huffman coding can achieve a higher compression rate, the compression rate cannot be further improved for a specific scene because the huffman tree is constructed only according to the frequency of the data. Therefore, the invention provides the veterinary drug residue data management system for chicken, which is used for analyzing the veterinary drug residue data acquired by the sensor, adaptively acquiring the preference degree of the character combination by acquiring the association degree among characters, adaptively segmenting the data according to the density degree of the distribution of the preference character combination, combining the characters into the character combination, constructing a Huffman tree and carrying out high-efficiency lossless compression on the data.
Disclosure of Invention
The invention provides a veterinary drug residue data management system for chicken, which aims to solve the existing problems.
The veterinary drug residue data management system for chicken adopts the following technical scheme:
an embodiment of the invention provides a veterinary drug residue data management system for chicken, which comprises the following modules:
the monitoring data acquisition module is used for acquiring monitoring data of chicken;
the matching value acquisition module is used for acquiring a character distance sequence of each character according to the distance when the characters in the monitoring data are adjacent to each other; marking the combination of any two characters as character combinations, and obtaining the adjacent relation of each character combination according to the frequency and the distance of the occurrence of the characters in the character combinations; obtaining a matching value of each character combination according to the adjacent relation of each character combination and the relation between the character distances of each serial number in the corresponding character distance sequence;
the target text segment acquisition module is used for acquiring the candidate merging degree of each character and each target character according to the target characters and the matching values; threshold screening is carried out on each character according to the alternative merging degree to obtain a plurality of marked character combinations of each target character, and clustering is carried out according to the marked character combinations to obtain a cluster with the maximum density; dividing the region according to the cluster with the maximum density to obtain each text segment; threshold screening is carried out on the text segments according to the text segment lengths to obtain each target text segment;
and monitoring data processing, and performing data processing based on the marked character combination according to the target text segment.
Preferably, the method for obtaining the character distance sequence of each character according to the distance between adjacent characters in the monitored data includes the following specific steps:
for any character, the distance between the corresponding characters when the same kind of characters occur in adjacent times is recorded as the character distance, a character distance sequence formed by a plurality of character distances is obtained, and the character distance sequence is recorded as the character distance sequence of each character.
Preferably, the obtaining the adjacency relation of each character combination according to the frequency and the distance of the occurrence of the characters in the character combination includes the following specific methods:
for any two characters, if the frequency of occurrence of the two characters is the same and the numerical values of the character distances of all corresponding serial numbers in the character distance sequences of the two characters are consistent, the adjacency relationship of the character combination formed by the two characters is full adjacency;
if the frequency of occurrence of the two characters is the same and the numerical values of the character distances of the partial corresponding serial numbers in the character distance sequences of the two characters are consistent, the adjacency relationship of the character combination formed by the two characters is partial adjacency; if the frequency of occurrence of the two characters is different, the adjacency relationship of the character combination composed of the two characters is partial adjacency.
Preferably, the matching value of each character combination is obtained according to the adjacent relation of each character combination and the relation between the character distances of each serial number in the corresponding character distance sequence, and the specific method comprises the following steps:
recording the length of a character distance sequence corresponding to any one character in the character combination with the adjacency relation being full adjacency as a matching value of the character combination with the adjacency relation being full adjacency;
the method for acquiring the matching value of the character combination with any adjacent relation being the partial adjacent relation comprises the following steps:
for the character distance of any sequence number in the two character distance sequences corresponding to the two characters;
if the character distance values of the sequence numbers in the character distance sequences of the two characters are the same, eliminating the character distances of the sequence numbers in the character distance sequences of the two characters, accumulating 1 for the matching values, and matching the next sequence number in the target matching sequence;
if the numerical values of the character distances of the serial numbers in the character distance sequences of the two characters are different: the character distance sequence with smaller character distance value of the sequence number is marked as an accumulated matching sequence, and the character distance sequence with larger character distance value of the sequence number is marked as a target matching sequence; in the accumulation matching sequence, starting from the first sequence number, traversing all sequence numbers in the accumulation matching sequence with the step length of 1, traversing one sequence number each time, and marking the accumulation sum of the character distances of all sequence numbers before traversing the sequence numbers as the combined character distance of the traversing sequence numbers, wherein the combined character distance of the traversing sequence numbers comprises the character distance of the traversing sequence numbers; and in the accumulated matching sequence, judging the size relation between the combined character distance of the traversal sequence and the character distance of the sequence number in the target matching sequence, and obtaining a matching value of the character combination with the adjacent relation being partial adjacent.
Preferably, the adjacency relation is a matching value of a character combination of partial adjacency, and the specific method comprises the following steps:
s1: if the combined character distance of the traversal sequence in the accumulated matching sequence is equal to the character distance of the sequence number in the target matching sequence, eliminating the character distance of each sequence number contained in the combined character distance of the traversal sequence in the accumulated matching sequence and the character distance of the sequence number in the target matching sequence, accumulating the matching value by 1, and matching the next sequence number in the target matching sequence;
s2: if the combined character distance of the traversing sequence number in the accumulated matching sequence is smaller than the character distance of the sequence number in the target matching sequence, continuing to traverse the next sequence number in the accumulated matching sequence, and continuing to judge the relationship between the combined character distance of the next sequence number in the accumulated matching sequence and the character distance of the sequence number in the target matching sequence;
s3: if the combined character distance of the traversal sequence in the accumulated matching sequence is greater than the character distance of the sequence in the target matching sequence, the fact that the character distance of the sequence in the target matching sequence cannot be matched with the combined character distance of the traversal sequence in the accumulated matching sequence is explained, the sum of the character distance of the sequence in the target matching sequence and the character distance of the next sequence after the sequence in the target matching sequence is accumulated and recorded as the character distance of the next sequence after the sequence in the target matching sequence, and the judgment of the relation between the combined character distance of the traversal sequence in the accumulated matching sequence and the character distance of the next sequence in the target matching sequence is carried out;
and repeatedly accumulating the judgment of the relation between the combined character distance of the traversal sequence number in the matching sequence and the character distance of the sequence number in the target matching sequence until the character distance in any one character distance sequence is completely removed, and stopping iteration.
Preferably, the method for obtaining the alternative merging degree of each character and each target character according to the target character and the matching value includes the following specific steps:
constructing a Huffman tree according to the frequency of each character in the monitoring data, traversing from the character corresponding to the leaf node at the shallowest layer in the Huffman tree, and taking the character corresponding to each leaf node in the Huffman tree as a target character in sequence;
obtaining the alternative merging degree of other characters and the target characters according to each target character:
for any one of the target characters, the character, in the formula,representing the alternative merging degree of the ith character and the target character; />Representing a matching value of a character combination formed by the ith character and the target character; m1 represents the number of times the target character appears; />Representing the number of layers of the ith character in the Huffman tree; h1 represents the number of layers of the target character in the Huffman tree; h2 represents the depth of the huffman tree; exp []An exponential function based on a natural constant is represented.
Preferably, the method for obtaining each text segment by area division according to the cluster with the largest density includes the following specific steps:
dividing a corresponding region of two adjacent marker character combinations in the cluster with the maximum density in the monitoring data into a text segment; the corresponding regions are all characters between adjacent combinations of marker characters.
Preferably, the threshold value screening is performed on the text segments according to the text segment lengths to obtain each target text segment, and the specific method includes:
presetting a text segment length threshold for any text segment; if the text segment length is smaller than the text segment length threshold, eliminating the text segment;
if the text segment length is greater than or equal to the text segment length threshold, the text segment is marked as a target text segment;
if any two target text segments correspond to the characters in the monitored data and have coincident serial numbers, merging the two target text segments into a new target text segment until any two target text segments correspond to the characters in the monitored data and have no coincident serial numbers.
The technical scheme of the invention has the beneficial effects that: the method comprises the steps of obtaining the candidate merging degree of the character combination in a self-adaptive mode through obtaining the matching value of the character combination, obtaining a target text segment according to the candidate merging degree of the character combination, carrying out self-adaptive segmentation processing on data according to the target text segment, merging the characters into the character combination, constructing a Huffman tree, carrying out high-efficiency lossless compression on the data, and compared with the prior art, taking the character combination as a whole, constructing the Huffman tree not only through a single character, wherein the data compression rate can be improved in a self-adaptive mode for different scenes.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a block diagram of a veterinary drug residue data management system for chicken according to the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following detailed description refers to the specific implementation, structure, characteristics and effects of the veterinary drug residue data management system for chicken according to the invention with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
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 specifically describes a specific scheme of the veterinary drug residue data management system for chicken provided by the invention with reference to the accompanying drawings.
Referring to fig. 1, a block diagram of a veterinary drug residue data management system for chicken according to an embodiment of the invention is shown, the system includes the following modules:
monitoring data acquisition module 101: and collecting chicken monitoring data.
It should be noted that, although the conventional huffman coding can achieve a higher compression rate, the compression rate cannot be further improved for a specific scene due to the huffman tree being constructed only according to the frequency of the data. According to the veterinary drug residue data management system for chicken, veterinary drug residue data acquired by a sensor is analyzed, the preference degree of character combinations is obtained in a self-adaptive mode through obtaining the association degree among characters, the data is subjected to self-adaptive segmentation processing according to the density degree of the distribution of the preference character combinations, characters are combined into character combinations, a Huffman tree is constructed, and efficient lossless compression is performed on the data.
Specifically, in order to implement the veterinary drug residue data management system for chicken provided in this embodiment, monitoring data needs to be collected first, and the specific process is as follows:
the method comprises the steps of collecting monitoring data of 50 chicken samples through a biosensor, wherein each chicken sample corresponds to one monitoring data, the monitoring data comprises parameters of different items such as drug concentration, drug residual enzyme activity and the like, the parameters of each item correspond to one character string, and each character string can be combined into one long character string through the monitoring data.
So far, a plurality of chicken monitoring data are obtained through the method.
Matching value acquisition module 102: constructing a Huffman tree for the monitored data to obtain a character distance sequence of the character; obtaining the adjacency relation of the character combination according to the character distance sequence; and obtaining the matching value of the character combination according to the adjacent relation.
It should be noted that, when the conventional huffman coding performs data conversion on the monitored data, the frequency of occurrence of a single character in the monitored data is counted, and a huffman tree is constructed according to the frequency of the single character; but since there are a large number of similar data of character combinations in the monitored data, for example, the year combinations in the time stamp: in 2002 and 2008, two characters of "2" and "0" exist in 2002 and 2008, and a character combination of "200" exists in 2008, so 2002 and 2008 are similar data; the individual characters can be combined into character combinations in a certain order, thereby further enhancing the compression rate of the monitored data; however, when the individual characters are combined, since there is a difference between the position and the occurrence frequency of each character in the monitored data, the number of character types to be counted for the character combination after the individual character combination increases, for example: in the data "abdambwabab", if ab is combined into character data and denoted by 1, the data becomes: "1d1cac1b", the original data type is changed from 4 types of original "a", "b", "c", "d" to 5 types of "a", "b", "c", "d", "1"; the character combination formed by combining two characters with high frequency of occurrence of the characters is not necessarily the optimal combination, and the effect after combination is better only if the frequency of occurrence of the two characters is high and the frequency of combination of the two characters is higher, so that the distance between the same kind of characters can be counted, the adjacent relation between different kinds of characters can be obtained according to the distance between the same kind of characters, further, the alternative combination degree of the character combination is calculated and obtained, and the self-adaptive segmentation processing is carried out on the monitoring data according to the alternative combination degree of the character combination.
It should be further noted that, when performing the adjacency relationship between different kinds of characters, if two kinds of characters belong to the adjacency relationship, the corresponding distances between the characters are the same, where there are two cases of adjacency relationships: if the adjacent relation is the full adjacent relation, the frequency of occurrence of the two characters is the same, the distance between the occurrence positions of the two characters is consistent, and the matching degree of the two characters is a percentage; if the adjacency relation is a partial adjacency, the frequency of occurrence of the two characters is different or the partial distances between the occurrence positions of the two characters are consistent, and the matching degree of the two characters is not a percentage.
Furthermore, in the actual process, the adjacent relation between two characters is mostly partially adjacent, and the matching degree of the two corresponding characters is not a percentage, so that in order to combine similar characters to the greatest extent, the matching of the similarity is required for the distance between the characters.
Specifically, in this embodiment, any character is taken as an example to describe, the distance between corresponding characters when the number of adjacent times of the character appears is recorded as a character distance, a character distance sequence formed by a plurality of character distances is obtained, and the character distance sequence is recorded as the character distance sequence of the character, for example: in the data abcdefauja, the character a appears 3 times and corresponds to two character distances respectively, wherein the first character distance is 6, and the second character distance is 3;
acquiring a character distance sequence of each character;
further, combining any two characters to obtain a plurality of character combinations, in this embodiment, describing two characters in any one character combination as an example, if the frequency of occurrence of the two characters is the same, and the values of the character distances of all corresponding serial numbers in the character distance sequences of the two characters are consistent, then the adjacency relationship of the character combinations is full adjacency; if the frequency of occurrence of the two characters is the same and the numerical values of the character distances of the partial corresponding serial numbers in the character distance sequences of the two characters are consistent, the adjacency relationship of the character combination is partial adjacency; if the frequency of occurrence of the two characters is different, the adjacency of the character combination is a partial adjacency.
Acquiring the adjacency relation of other character combinations; the adjacency of all character combinations is obtained.
Further, in this embodiment, the character distance of any sequence number in the two character distance sequences corresponding to two characters in the character combination with any adjacent relation as the partial adjacent relation is described as an example:
if the character distance values of the serial numbers in the character distance sequences of the two characters are the same, eliminating the character distance of the serial numbers in the character distance sequences of the two characters, accumulating the matching values by 1, and matching the next serial number in the target matching sequence;
if the values of the character distances of the serial numbers in the character distance sequences of the two characters are different: the character distance sequence with smaller serial number character distance value is marked as an accumulated matching sequence, and the character distance sequence with larger serial number character distance value is marked as a target matching sequence; in the accumulation matching sequence, starting from the first sequence number, traversing all sequence numbers in the accumulation matching sequence with the step length of 1, traversing one sequence number each time, and recording the accumulation sum of the character distances of all sequence numbers before the current traversing sequence number as the combined character distance of the current traversing sequence number, wherein the combined character distance of the current traversing sequence number comprises the character distance of the current traversing sequence number; the judging of the relation between the combined character distance of the current traversal sequence number in the accumulated matching sequence and the character distance of the sequence number in the target matching sequence is carried out, and the judging comprises the following steps:
1. if the combined character distance of the current traversal sequence in the accumulated matching sequence is equal to the character distance of the sequence in the target matching sequence, the character distance of the sequence in the target matching sequence and the combined character distance of the current traversal sequence in the accumulated matching sequence are indicated to be matched, each sequence number character distance contained in the combined character distance of the current traversal sequence in the accumulated matching sequence and the character distance of the sequence in the target matching sequence are removed, the matching value is accumulated by 1, and matching of the next sequence number in the target matching sequence is carried out;
2. if the combined character distance of the current traversal sequence number in the accumulation matching sequence is smaller than the character distance of the sequence number in the target matching sequence, the next sequence number in the accumulation matching sequence is traversed continuously, and judgment of the relation between the combined character distance of the next sequence number in the accumulation matching sequence and the character distance of the sequence number in the target matching sequence is carried out continuously;
3. if the combined character distance of the current traversal sequence in the accumulated matching sequence is greater than the character distance of the sequence in the target matching sequence, the fact that the character distance of the sequence in the target matching sequence cannot be matched with the combined character distance of the current traversal sequence in the accumulated matching sequence is explained, the sum of the character distance of the sequence in the target matching sequence and the character distance of the next sequence after the sequence in the target matching sequence is accumulated and recorded as the character distance of the next sequence after the sequence in the target matching sequence, and the judgment of the relation of the combined character distance of the current traversal sequence in the accumulated matching sequence and the character distance of the next sequence in the target matching sequence is carried out;
in addition, all the traversal processes are performed until all the character distances in any one character distance sequence are removed. And recording the length of the character distance sequence corresponding to any character in the character combination with the adjacent relation being fully adjacent as the matching value of the character combination with the adjacent relation being fully adjacent.
Obtaining matching values of other character combinations; and obtaining the matching values of all the character combinations.
To this end, the matching values of all character combinations.
Target text segment acquisition module 103: obtaining the alternative merging degree of the character and the target character according to the matching value of the character combination and the Huffman tree; marking the characters according to the alternative merging degree to obtain marked characters; obtaining a marked character combination according to the marked characters; clustering according to the distance of the same marked character combination to obtain a character range; and dividing the region according to the character range to obtain a target text segment.
It should be noted that, in the huffman tree, if the frequency of occurrence of the same kind of character is higher, the same kind of character is located at the upper layer of the huffman tree; if the frequency of the same kind of character is lower, the character is positioned at the lower layer of the Huffman tree; the alternative merging degree of any two characters can be obtained according to the relationship between the upper layer and the lower layer of the Huffman tree.
It should be further noted that, the number of the obtained character combinations is more, and the distribution of the character combinations is random, if the character combinations with dense distribution are subjected to coding compression processing, the compression rate can be better improved, so that the monitored data is subjected to segmentation processing according to the distribution of the characters, the distance between the matchable character combinations can be obtained after accumulation matching calculation, the more uniform the distance between the matchable character combinations is, the denser the distribution is, the higher the rule degree of the character strings corresponding to the monitored data is, the better the compression effect is when the character strings are compressed, and therefore, the character combinations in the marked character types can be clustered, and the clustered dense region is obtained.
Specifically, a huffman tree is constructed for each character frequency in the monitored data, wherein the huffman tree is a known technique, and the embodiment is not specifically described; traversing from characters corresponding to the leaf nodes at the shallowest layer in the Huffman tree, and sequentially taking the characters corresponding to each leaf node in the Huffman tree as target characters; and obtaining the alternative merging degree of other characters and the target characters according to each target character. In this embodiment, any one of the target characters is taken as an example for description, where the calculation formula of the alternative merging degree of the other characters and the target character is as follows:
in the method, in the process of the invention,representing the alternative merging degree of the ith character and the target character; />Representing a matching value of a character combination formed by the ith character and the target character; m1 represents the number of occurrences of the target character; />Representing the number of layers of the ith character in the Huffman tree; h1 represents the number of layers of the target character in the Huffman tree; h2 represents a Huffman treeThe larger the maximum layer number, the more the character is at the root node position in the Huffman tree and the larger the matching value of the character combination, the larger the merging degree value; exp []Representing an exponential function based on a natural constant, the present embodiment employs exp [ ]]The functions are presented with inverse proportion relation and normalization processing, and an implementer can select the inverse proportion function and the normalization function according to actual conditions.
And obtaining the alternative merging degree of all the target characters and other characters.
Further, a merging degree threshold T1 is preset, where the embodiment is described by taking t1=0.45 as an example, and the embodiment is not specifically limited, where T1 may be determined according to the specific implementation situation; if the alternative combination degree of the ith character and the target character is greater than or equal to the experience value T1, the character combination formed by the ith character and the target character is marked as a marked character combination of the target character, wherein the first character in the marked character combination of the target character is the target character, and the second character is the ith character.
All the marker character combinations of all the target characters are acquired.
Further, in this embodiment, an arbitrary one of the marker character combinations is taken as an example, the marker character combination appearing in the monitored data is regarded as a data point respectively, and a DBSCAN cluster with a preset neighborhood radius T2 and a preset minimum sample number T3 is performed on all the data points to obtain a plurality of cluster clusters of the marker character combination; each cluster contains a plurality of mark character combinations; obtaining a cluster with the maximum density; in this embodiment, t2=50 and t3=40 are taken as examples, and the present embodiment is not limited to the specific case, where T2 and T3 may be determined according to the specific implementation, and the DBSCAN clustering algorithm is a density-based clustering algorithm, which is a known technology and is not described in this embodiment.
Further, according to the marked character combination in the cluster with the maximum density, the character data segment division is carried out on the corresponding area in the monitoring data, so that the corresponding character range is obtained; and dividing the corresponding area of the adjacent two marker character combinations in the cluster with the maximum density in the monitoring data into a text segment.
And (3) judging the length of the text segment:
presetting a text segment length threshold T4, wherein the embodiment is described by taking t4=100 as an example, and the embodiment is not particularly limited, wherein T4 can be determined according to specific implementation cases; if the text segment length is smaller than the text segment length threshold T4, rejecting the text segment; if the text segment length is greater than or equal to the text segment length threshold T4, the text segment is marked as a target text segment.
And merging and judging the target text segment: if any two target text segments correspond to the character with coincident sequence numbers in the monitored data, combining the two target text segments into a new target text segment.
And merging and judging all the target text segments until any two target text segments correspond to sequence numbers with characters which are not overlapped in the monitored data.
And acquiring all target text segments.
So far, all the target text segments are obtained through the method.
The monitoring data processing module 104: and carrying out data processing based on the marked character combination according to the target text segment.
Specifically, a new Huffman tree is built for each target text segment based on the marked character combination, compressed data is obtained and stored in a database, and then decompression is performed in a computer software system according to the corresponding Huffman tree.
This embodiment is completed.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.

Claims (5)

1. A veterinary drug residue data management system for chicken, which is characterized by comprising the following modules:
the monitoring data acquisition module is used for acquiring monitoring data of chicken;
the matching value acquisition module is used for acquiring a character distance sequence of each character according to the distance when the characters in the monitoring data are adjacent to each other; marking the combination of any two characters as character combinations, and obtaining the adjacent relation of each character combination according to the frequency and the distance of the occurrence of the characters in the character combinations; obtaining a matching value of each character combination according to the adjacent relation of each character combination and the relation between the character distances of each serial number in the corresponding character distance sequence;
the target text segment acquisition module is used for acquiring the candidate merging degree of each character and each target character according to the target characters and the matching values; threshold screening is carried out on each character according to the alternative merging degree to obtain a plurality of marked character combinations of each target character, and clustering is carried out according to the marked character combinations to obtain a cluster with the maximum density; dividing the region according to the cluster with the maximum density to obtain each text segment; threshold screening is carried out on the text segments according to the text segment lengths to obtain each target text segment;
monitoring data processing, and performing data processing based on marked character combination according to the target text segment;
the matching value of each character combination is obtained according to the adjacent relation of each character combination and the relation between the character distances of each serial number in the corresponding character distance sequence, and the specific method comprises the following steps:
recording the length of a character distance sequence corresponding to any one character in the character combination with the adjacency relation being full adjacency as a matching value of the character combination with the adjacency relation being full adjacency;
the method for acquiring the matching value of the character combination with any adjacent relation being the partial adjacent relation comprises the following steps:
for the character distance of any sequence number in the two character distance sequences corresponding to the two characters;
if the character distance values of the sequence numbers in the character distance sequences of the two characters are the same, eliminating the character distances of the sequence numbers in the character distance sequences of the two characters, accumulating 1 for the matching values, and matching the next sequence number in the target matching sequence;
if the numerical values of the character distances of the serial numbers in the character distance sequences of the two characters are different: the character distance sequence with smaller character distance value of the sequence number is marked as an accumulated matching sequence, and the character distance sequence with larger character distance value of the sequence number is marked as a target matching sequence; in the accumulation matching sequence, starting from the first sequence number, traversing all sequence numbers in the accumulation matching sequence with the step length of 1, traversing one sequence number each time, and marking the accumulation sum of the character distances of all sequence numbers before traversing the sequence numbers as the combined character distance of the traversing sequence numbers, wherein the combined character distance of the traversing sequence numbers comprises the character distance of the traversing sequence numbers; judging the relation between the combined character distance of the traversal sequence and the character distance of the sequence number in the target matching sequence in the accumulated matching sequence to obtain a matching value of the character combination with the adjacency relation being partial adjacency;
the adjacency relation is a matching value of a character combination of partial adjacency, and the specific method comprises the following steps:
s1: if the combined character distance of the traversal sequence in the accumulated matching sequence is equal to the character distance of the sequence number in the target matching sequence, eliminating the character distance of each sequence number contained in the combined character distance of the traversal sequence in the accumulated matching sequence and the character distance of the sequence number in the target matching sequence, accumulating the matching value by 1, and matching the next sequence number in the target matching sequence;
s2: if the combined character distance of the traversing sequence number in the accumulated matching sequence is smaller than the character distance of the sequence number in the target matching sequence, continuing to traverse the next sequence number in the accumulated matching sequence, and continuing to judge the relationship between the combined character distance of the next sequence number in the accumulated matching sequence and the character distance of the sequence number in the target matching sequence;
s3: if the combined character distance of the traversal sequence in the accumulated matching sequence is greater than the character distance of the sequence in the target matching sequence, the fact that the character distance of the sequence in the target matching sequence cannot be matched with the combined character distance of the traversal sequence in the accumulated matching sequence is explained, the sum of the character distance of the sequence in the target matching sequence and the character distance of the next sequence after the sequence in the target matching sequence is accumulated and recorded as the character distance of the next sequence after the sequence in the target matching sequence, and the judgment of the relation between the combined character distance of the traversal sequence in the accumulated matching sequence and the character distance of the next sequence in the target matching sequence is carried out;
repeatedly accumulating the judgment of the relation between the combined character distance of the traversal sequence number in the matching sequence and the character distance of the sequence number in the target matching sequence until all the character distances in any one character distance sequence are removed, and stopping iteration;
the method comprises the following specific steps of:
constructing a Huffman tree according to the frequency of each character in the monitoring data, traversing from the character corresponding to the leaf node at the shallowest layer in the Huffman tree, and taking the character corresponding to each leaf node in the Huffman tree as a target character in sequence;
obtaining the alternative merging degree of other characters and the target characters according to each target character:
for any one of the target characters, the character, in the formula,representing the alternative merging degree of the ith character and the target character; />Representing a matching value of a character combination formed by the ith character and the target character; m1 represents the number of times the target character appears; />Representing the number of layers of the ith character in the Huffman tree; h1 represents the number of layers of the target character in the Huffman tree; h2 represents the depth of the huffman tree; exp []An exponential function based on a natural constant is represented.
2. The veterinary drug residue data management system for chicken according to claim 1, wherein the character distance sequence of each character is obtained according to the distance when the characters in the monitored data are adjacent to each other, comprising the following specific steps:
for any character, the distance between the corresponding characters when the same kind of characters occur in adjacent times is recorded as the character distance, a character distance sequence formed by a plurality of character distances is obtained, and the character distance sequence is recorded as the character distance sequence of each character.
3. The veterinary drug residue data management system for chicken according to claim 1, wherein the obtaining the adjacency relation of each character combination according to the frequency and the distance of the occurrence of the characters in the character combination comprises the following specific steps:
for any two characters, if the frequency of occurrence of the two characters is the same and the numerical values of the character distances of all corresponding serial numbers in the character distance sequences of the two characters are consistent, the adjacency relationship of the character combination formed by the two characters is full adjacency;
if the frequency of occurrence of the two characters is the same and the numerical values of the character distances of the partial corresponding serial numbers in the character distance sequences of the two characters are consistent, the adjacency relationship of the character combination formed by the two characters is partial adjacency; if the frequency of occurrence of the two characters is different, the adjacency relationship of the character combination composed of the two characters is partial adjacency.
4. The veterinary drug residue data management system for chicken according to claim 1, wherein the method for obtaining each text segment by dividing the region according to the cluster with the largest density comprises the following specific steps:
dividing a corresponding region of two adjacent marker character combinations in the cluster with the maximum density in the monitoring data into a text segment; the corresponding regions are all characters between adjacent combinations of marker characters.
5. The veterinary drug residue data management system for chicken according to claim 1, wherein the threshold value screening is performed on the text segments according to the text segment lengths to obtain each target text segment, and the specific method comprises the following steps:
presetting a text segment length threshold for any text segment; if the text segment length is smaller than the text segment length threshold, eliminating the text segment;
if the text segment length is greater than or equal to the text segment length threshold, the text segment is marked as a target text segment;
if any two target text segments correspond to the characters in the monitored data and have coincident serial numbers, merging the two target text segments into a new target text segment until any two target text segments correspond to the characters in the monitored data and have no coincident serial numbers.
CN202311464230.9A 2023-11-06 2023-11-06 Veterinary drug residue data management system for chicken Active CN117195006B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311464230.9A CN117195006B (en) 2023-11-06 2023-11-06 Veterinary drug residue data management system for chicken

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311464230.9A CN117195006B (en) 2023-11-06 2023-11-06 Veterinary drug residue data management system for chicken

Publications (2)

Publication Number Publication Date
CN117195006A CN117195006A (en) 2023-12-08
CN117195006B true CN117195006B (en) 2024-03-05

Family

ID=89005637

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311464230.9A Active CN117195006B (en) 2023-11-06 2023-11-06 Veterinary drug residue data management system for chicken

Country Status (1)

Country Link
CN (1) CN117195006B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117579080B (en) * 2024-01-19 2024-03-26 天津医科大学第二医院 Medical care remote monitoring system based on 5G communication

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116055008A (en) * 2023-03-31 2023-05-02 深圳市网联天下科技有限公司 Router data processing method for cloud server connection
CN116346289A (en) * 2023-05-30 2023-06-27 泰山学院 Data processing method for computer network center
CN116681036A (en) * 2023-08-02 2023-09-01 天津轻工职业技术学院 Industrial data storage method based on digital twinning
CN116722876A (en) * 2023-08-08 2023-09-08 北京点聚信息技术有限公司 Intelligent storage method for user data for format light reading
CN116723337A (en) * 2023-08-10 2023-09-08 深圳市君兰电子有限公司 HDMI high definition data optimized transmission method and system
CN116738492A (en) * 2023-08-15 2023-09-12 青岛精锐机械制造有限公司 Valve sales data safety management system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116055008A (en) * 2023-03-31 2023-05-02 深圳市网联天下科技有限公司 Router data processing method for cloud server connection
CN116346289A (en) * 2023-05-30 2023-06-27 泰山学院 Data processing method for computer network center
CN116681036A (en) * 2023-08-02 2023-09-01 天津轻工职业技术学院 Industrial data storage method based on digital twinning
CN116722876A (en) * 2023-08-08 2023-09-08 北京点聚信息技术有限公司 Intelligent storage method for user data for format light reading
CN116723337A (en) * 2023-08-10 2023-09-08 深圳市君兰电子有限公司 HDMI high definition data optimized transmission method and system
CN116738492A (en) * 2023-08-15 2023-09-12 青岛精锐机械制造有限公司 Valve sales data safety management system

Also Published As

Publication number Publication date
CN117195006A (en) 2023-12-08

Similar Documents

Publication Publication Date Title
CN117195006B (en) Veterinary drug residue data management system for chicken
TWI435234B (en) Plant disease identification method, system and record media
CN109410238B (en) Wolfberry identification and counting method based on PointNet + + network
CN116011894B (en) Aluminum alloy rod production data management system
CN113065474B (en) Behavior recognition method and device and computer equipment
CN108830162B (en) Time sequence pattern sequence extraction method and storage method in radio frequency spectrum monitoring data
CN105320705A (en) Retrieval method and device for similar vehicle
CN110910991B (en) Medical automatic image processing system
CN117473351B (en) Power supply information remote transmission system based on Internet of things
CN106874421A (en) Image search method based on self adaptation rectangular window
CN110751191A (en) Image classification method and system
CN114627406A (en) Method, system, equipment and medium for identifying rapid crowd gathering behaviors
CN114359632A (en) Point cloud target classification method based on improved PointNet + + neural network
CN107609105A (en) The construction method of big data accelerating structure
CN115952067A (en) Database operation abnormal behavior detection method and readable storage medium
CN113268370A (en) Root cause alarm analysis method, system, equipment and storage medium
CN115438239A (en) Abnormity detection method and device for automatic abnormal sample screening
CN112687402A (en) Intelligent medical internet big data processing method based on artificial intelligence and intelligent cloud service platform
CN116796894A (en) Construction method of efficient deep learning weather prediction model
CN116863390A (en) Method and system for identifying harmful weeds under complex background of forage grass
CN113210264B (en) Tobacco sundry removing method and device
CN113159363B (en) Event trend prediction method based on historical news reports
CN114090659A (en) Data analysis method fusing numerology rule
CN113869355A (en) XGboost-based personnel risk assessment method
CN112968865A (en) Network protocol grammatical feature rapid extraction method based on association rule mining

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