CN113434463A - Method for classifying files according to two-dimensional codes - Google Patents

Method for classifying files according to two-dimensional codes Download PDF

Info

Publication number
CN113434463A
CN113434463A CN202110665793.9A CN202110665793A CN113434463A CN 113434463 A CN113434463 A CN 113434463A CN 202110665793 A CN202110665793 A CN 202110665793A CN 113434463 A CN113434463 A CN 113434463A
Authority
CN
China
Prior art keywords
image
dimensional code
file
code image
target file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110665793.9A
Other languages
Chinese (zh)
Other versions
CN113434463B (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.)
Guangzhou Zhonghui Information Technology Co ltd
Original Assignee
Guangzhou Zhonghui Information 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 Guangzhou Zhonghui Information Technology Co ltd filed Critical Guangzhou Zhonghui Information Technology Co ltd
Priority to CN202110665793.9A priority Critical patent/CN113434463B/en
Publication of CN113434463A publication Critical patent/CN113434463A/en
Application granted granted Critical
Publication of CN113434463B publication Critical patent/CN113434463B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/93Document management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9554Retrieval from the web using information identifiers, e.g. uniform resource locators [URL] by using bar codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Geometry (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Human Computer Interaction (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for classifying files according to two-dimensional codes, which comprises the following steps: the method comprises the steps of establishing an incidence relation between a target file and a two-dimensional code image in advance; when the target file is uploaded again, the recognition system receives the target file which is uploaded again and the two-dimensional code image corresponding to the target file; the identification system identifies the two-dimensional code image to obtain an identification result, and when the identification result is determined to be successful, the unique identifier included in the two-dimensional code image and the appointed prefix carried by the unique identifier are obtained; searching in a database according to the unique identifier and the appointed prefix carried by the unique identifier, and determining the file information of the target file; and carrying out file classification and file sequencing on the target file according to the file information. The files can be classified in advance once before manual identification, so that the workload of manual identification is reduced, the identification speed and the identification efficiency are improved, and time and labor are saved.

Description

Method for classifying files according to two-dimensional codes
Technical Field
The invention relates to the technical field of file classification, in particular to a method for classifying files according to two-dimensional codes.
Background
After receiving the data files uploaded by the client, the current system can only carry out file identification and classification by the naked eyes of an auditor, thereby determining the file type and the file sequence. The mode can lead to the increase of the workload of auditors, and has the disadvantages of slow recognition speed, low efficiency, time and labor waste.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the art described above. Therefore, the invention aims to provide a method for classifying files according to two-dimensional codes, which can classify the files in advance once before manual identification, thereby reducing the workload of manual identification, improving the identification speed and the identification efficiency and saving time and labor.
In order to achieve the above object, an embodiment of the present invention provides a method for classifying files according to two-dimensional codes, including:
the method comprises the steps of establishing an incidence relation between a target file and a two-dimensional code image in advance;
when the target file is uploaded again, the recognition system receives the target file which is uploaded again and the two-dimensional code image corresponding to the target file;
the identification system identifies the two-dimensional code image to obtain an identification result, and when the identification result is determined to be successful, the unique identifier included in the two-dimensional code image and the appointed prefix carried by the unique identifier are obtained;
searching in a database according to the unique identifier and the appointed prefix carried by the unique identifier, and determining the file information of the target file;
and carrying out file classification and file sequencing on the target file according to the file information.
According to some embodiments of the present invention, the pre-establishing an association relationship between the target file and the two-dimensional code image includes:
determining the service type of the target file;
extracting the characteristics of the target file according to the service type, and abstracting the fixed content in the target file into a data template;
determining the detail data of the target file according to the data template; the detail data comprises a unique identifier and a prefix with a designation;
and generating a two-dimensional code image according to the unique identifier included in the detail data, positioning the two-dimensional code image on the target file, and establishing an association relationship between the target file and the two-dimensional code image.
According to some embodiments of the invention, the detail data comprises at least one of an attribute of the target file, a number of files, a file order, whether the target file is a key file, and a file name.
According to some embodiments of the invention, the recognition system recognizes the two-dimensional code image, including:
the identification system divides the two-dimensional code image into four quadrants; the upper right of the two-dimensional code image is a first quadrant, the upper left of the two-dimensional code image is a second quadrant, the lower left of the two-dimensional code image is a third quadrant, and the lower right of the two-dimensional code image is a fourth quadrant;
the identification system identifies based on the priority order of the second quadrant- > the first quadrant- > the third quadrant- > the fourth quadrant;
when the fourth quadrant is determined not to be successfully identified, the identification system divides the second quadrant into four quadrants again and identifies the quadrants based on the priority sequence;
and marking the two-dimensional code image as a machine unrecognizable image if the fourth quadrant is determined to be divided into four quadrants again and the identification is not successful after the identification is carried out based on the priority order.
According to some embodiments of the present invention, before the recognition system recognizes the two-dimensional code image, the method further includes:
acquiring a standard image corresponding to the two-dimensional code image;
carrying out scale space transformation on the two-dimensional code image to obtain a first image to be detected and a second image to be detected which correspond to different scale spaces;
carrying out scale space transformation on the standard image to obtain a third image and a fourth image corresponding to different scale spaces; the first image to be detected and the third image are in the same scale space; the second image to be detected and the fourth image are in the same scale space;
grading the first image to be detected based on a plurality of image quality evaluation indexes to obtain a first grading result;
calculating according to the first grading result and a preset evaluation weight value of a plurality of image quality evaluation indexes to obtain a first grade;
determining a first score according to the first score and a first standard score determined according to the third image;
grading the second image to be detected based on a plurality of image quality evaluation indexes to obtain a second grading result;
calculating according to the second grading result and a preset evaluation weight value of a plurality of image quality evaluation indexes to obtain a second grading;
determining a second score according to the second score and a second standard score determined according to the third image;
and inquiring a preset data table according to the first and second differences to determine the image quality score of the two-dimensional code image, and performing image enhancement processing on the two-dimensional code image when the image quality score is determined to be smaller than the preset image quality score.
According to some embodiments of the invention, the image enhancement processing on the two-dimensional code image includes:
extracting the characteristics of the two-dimensional code image to obtain a plurality of color component images;
adjusting the color proportion of the color component images based on a preset function;
the preset function is:
Figure BDA0003117337260000041
wherein S isiIs a preset function to the ith color component image; i isiIs the ith color component image; w is a1Is the weight in the first scale space; t is1,iThe reflection brightness of the ith color component image in the first scale space; w is a2A weight in a second scale space; t is2,iThe reflection brightness of the ith color component image in the second scale space.
According to some embodiments of the present invention, after the file classification and the file sorting are performed on the target file according to the file information, the method further includes:
obtaining a plurality of classification sets obtained after file classification;
selecting any file in any classification set and determining the file as a detection file;
calculating the intra-class distance between the detected file and other files in the classification set where the detected file is located, and determining the maximum intra-class distance;
calculating the inter-class distance between the detection file and other classification sets except the classification set where the detection file is located, and determining the minimum inter-class distance;
comparing the maximum intra-class distance with the minimum inter-class distance, and when the maximum intra-class distance is determined to be smaller than the minimum inter-class distance, indicating that the file classification is qualified; otherwise, the file classification is unqualified.
According to some embodiments of the present invention, the retrieving in the database according to the unique identifier and the specified prefix carried by the unique identifier to determine the file information of the target file includes:
and positioning in a database according to the appointed prefix carried by the unique identifier, acquiring the positioning identifier at the positioning position, calculating the matching degree of the unique identifier and the positioning identifier, and determining the file information corresponding to the positioning identifier as the file information of the target file when the matching degree is determined to be greater than the preset matching degree.
According to some embodiments of the present invention, after the association relationship between the target file and the two-dimensional code image is established in advance, the method further includes:
establishing a rectangular coordinate system for the two-dimensional code image, and determining a lower left corner coordinate and an upper right corner coordinate of the two-dimensional code image;
determining the area of the two-dimensional code image according to the lower left corner coordinate and the upper right corner coordinate, and dividing the two-dimensional code image into a grids with equal size;
optionally selecting a point (x) on the two-dimensional code imageb,yc) Determining the identification (b, c) of the grid where the optional point is located;
Figure BDA0003117337260000051
wherein, b is a column identifier; c is a row identifier; (x)1,y1) Is the coordinate of the lower left corner; (x)2,y2) Coordinates of the upper right corner;
and selecting a preset number of identification marks on the two-dimensional code image, determining the identification marks as marks to be encrypted, and encrypting the grids corresponding to the marks to be encrypted based on a hash function.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and drawings.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
fig. 1 is a flowchart of a method of classifying a document according to a two-dimensional code according to an embodiment of the present invention.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.
As shown in fig. 1, an embodiment of the present invention provides a method for classifying files according to two-dimensional codes, including steps S1-S5:
s1, pre-establishing an association relation between the target file and the two-dimensional code image;
s2, when the target file is uploaded again, the recognition system receives the target file which is uploaded again and the two-dimensional code image corresponding to the target file;
s3, the recognition system recognizes the two-dimensional code image to obtain a recognition result, and when the recognition result is determined to be successful, the unique identifier included in the two-dimensional code image and the appointed prefix carried by the unique identifier are obtained;
s4, retrieving in a database according to the unique identifier and the appointed prefix carried by the unique identifier, and determining the file information of the target file;
and S5, carrying out file classification and file sorting on the target files according to the file information.
The working principle of the technical scheme is as follows: the method comprises the steps that an incidence relation between a target file and a two-dimensional code image is established in advance, when the target file is uploaded again, an identification system receives the target file uploaded again and the two-dimensional code image identification system corresponding to the target file identifies the two-dimensional code image to obtain an identification result, and when the identification result is determined to be successful, a unique identifier and a specified prefix carried by the unique identifier in the two-dimensional code image are obtained; searching in a database according to the unique identifier and the appointed prefix carried by the unique identifier, and determining the file information of the target file; the database stores the incidence relation between the target file and the two-dimensional code image in advance, stores the unique identifier in the two-dimensional code image and the appointed prefix (which can be system setting) carried by the unique identifier, and performs file classification and file sequencing on the target file according to the file information.
The beneficial effects of the above technical scheme are that: the files can be classified in advance once before manual identification, so that the workload of manual identification is reduced, the identification speed and the identification efficiency are improved, and time and labor are saved. And when the identification result of the two-dimensional code image based on the identification system is unsuccessful, the two-dimensional code image can be identified only by manpower, and then the classification and sequencing work of the target file is completed.
According to some embodiments of the present invention, the pre-establishing an association relationship between the target file and the two-dimensional code image includes:
determining the service type of the target file;
extracting the characteristics of the target file according to the service type, and abstracting the fixed content in the target file into a data template;
determining the detail data of the target file according to the data template; the detail data comprises a unique identifier and a prefix with a designation;
and generating a two-dimensional code image according to the unique identifier included in the detail data, positioning the two-dimensional code image on the target file, and establishing an association relationship between the target file and the two-dimensional code image.
The working principle of the technical scheme is as follows: and determining the service type of the target file, wherein the system can maintain a plurality of sets of templates according to the service type, so that the multiplexing is facilitated. Extracting the characteristics of the target file according to the service type, and abstracting the fixed content in the target file into a data template; the content of the changes in the target file are abstracted as input parameters. The fixed contents include a header and the like. Determining the detail data of the target file according to the data template; the detail data comprises a unique identifier and a prefix with a designation; and generating a two-dimensional code image according to the unique identifier included in the detail data, positioning the two-dimensional code image on the target file (which can be arranged at the upper left corner or the upper right corner of the header of the target file), and establishing the association relationship between the target file and the two-dimensional code image.
The beneficial effects of the above technical scheme are that: corresponding feature extraction is carried out on the service type of the target file acquired for the first time, and then detailed data are determined according to the data template, so that a two-dimensional code image is generated and is subjected to positioning marking, and when subsequent calling and secondary uploading processing of the target file are facilitated, rapid recognition is facilitated, the recognition rate is improved, repeated manual recognition is avoided, the recognition rate is improved, and classification and sequencing of the target file are accelerated.
According to some embodiments of the invention, the detail data comprises at least one of an attribute of the target file, a number of files, a file order, whether the target file is a key file, and a file name. The attribute includes a type of the target file.
According to some embodiments of the invention, the recognition system recognizes the two-dimensional code image, including:
the identification system divides the two-dimensional code image into four quadrants; the upper right of the two-dimensional code image is a first quadrant, the upper left of the two-dimensional code image is a second quadrant, the lower left of the two-dimensional code image is a third quadrant, and the lower right of the two-dimensional code image is a fourth quadrant;
the identification system identifies based on the priority order of the second quadrant- > the first quadrant- > the third quadrant- > the fourth quadrant;
when the fourth quadrant is determined not to be successfully identified, the identification system divides the second quadrant into four quadrants again and identifies the quadrants based on the priority sequence;
and marking the two-dimensional code image as a machine unrecognizable image if the fourth quadrant is determined to be divided into four quadrants again and the identification is not successful after the identification is carried out based on the priority order.
The working principle and the beneficial effects of the technical scheme are as follows: the identification system divides the two-dimensional code image into four quadrants; the upper right of the two-dimensional code image is a first quadrant, the upper left of the two-dimensional code image is a second quadrant, the lower left of the two-dimensional code image is a third quadrant, and the lower right of the two-dimensional code image is a fourth quadrant;
the identification system identifies based on the priority order of the second quadrant- > the first quadrant- > the third quadrant- > the fourth quadrant; when the identification system determines that the second quadrant, the first quadrant, the third quadrant and the fourth quadrant are not successfully identified, the identification system divides the second quadrant into four quadrants again and identifies the quadrants based on the priority sequence; and marking the two-dimensional code image as a machine unrecognizable image after the identification of the four quadrants divided by the first quadrant, the third quadrant and the fourth quadrant is finished and the identification is not successful. The recognition accuracy of the machine for the two-dimensional code image is improved based on the recognition mode.
According to some embodiments of the present invention, before the recognition system recognizes the two-dimensional code image, the method further includes:
acquiring a standard image corresponding to the two-dimensional code image;
carrying out scale space transformation on the two-dimensional code image to obtain a first image to be detected and a second image to be detected which correspond to different scale spaces;
carrying out scale space transformation on the standard image to obtain a third image and a fourth image corresponding to different scale spaces; the first image to be detected and the third image are in the same scale space; the second image to be detected and the fourth image are in the same scale space;
grading the first image to be detected based on a plurality of image quality evaluation indexes to obtain a first grading result;
calculating according to the first grading result and a preset evaluation weight value of a plurality of image quality evaluation indexes to obtain a first grade;
determining a first score according to the first score and a first standard score determined according to the third image;
grading the second image to be detected based on a plurality of image quality evaluation indexes to obtain a second grading result;
calculating according to the second grading result and a preset evaluation weight value of a plurality of image quality evaluation indexes to obtain a second grading;
determining a second score according to the second score and a second standard score determined according to the third image;
and inquiring a preset data table according to the first and second differences to determine the image quality score of the two-dimensional code image, and performing image enhancement processing on the two-dimensional code image when the image quality score is determined to be smaller than the preset image quality score.
The working principle of the technical scheme is as follows: acquiring a standard image corresponding to the two-dimensional code image; the standard image is an image satisfying image quality requirements. Carrying out scale space transformation on the two-dimensional code image to obtain a first image to be detected and a second image to be detected which correspond to different scale spaces; the first image to be detected and the second image to be detected can be obtained through a wavelet decomposition algorithm or a filtering and down-sampling mode, which is the prior art and is not described herein again. Carrying out scale space transformation on the standard image to obtain a third image and a fourth image corresponding to different scale spaces; the first image to be detected and the third image are in the same scale space; the second image to be detected and the fourth image are in the same scale space; grading the first image to be detected based on a plurality of image quality evaluation indexes to obtain a first grading result; calculating according to the first grading result and a preset evaluation weight value of a plurality of image quality evaluation indexes to obtain a first grade; the image quality evaluation indexes comprise standard deviation, average gradient, information entropy, signal-to-noise ratio, peak signal-to-noise ratio and the like. The evaluation weights of the image quality evaluation indexes are manually set through multiple tests. Determining a first score according to the first score and a first standard score determined according to the third image; grading the second image to be detected based on a plurality of image quality evaluation indexes to obtain a second grading result; calculating according to the second grading result and a preset evaluation weight value of a plurality of image quality evaluation indexes to obtain a second grading; determining a second score according to the second score and a second standard score determined according to the third image; and inquiring a preset data table according to the first and second differences to determine the image quality score of the two-dimensional code image, and performing image enhancement processing on the two-dimensional code image when the image quality score is determined to be smaller than the preset image quality score. And presetting a corresponding relation table of the first difference and the second difference of the data epitope and the image quality score.
The beneficial effects of the above technical scheme are that: when the image quality score is smaller than the preset image quality score, the two-dimensional code image is subjected to image enhancement processing, so that the accurate identification of a subsequent identification system on the two-dimensional code image is facilitated, and the identification efficiency is improved.
According to some embodiments of the invention, the image enhancement processing on the two-dimensional code image includes:
extracting the characteristics of the two-dimensional code image to obtain a plurality of color component images;
adjusting the color proportion of the color component images based on a preset function;
the preset function is:
Figure BDA0003117337260000121
wherein S isiIs a preset function to the ith color component image; i isiIs the ith color component image; w is a1Is the weight in the first scale space; t is1,iThe reflection brightness of the ith color component image in the first scale space; w is a2The weight value in the second scale space; t is2,iThe reflection brightness of the ith color component image in the second scale space.
The working principle and the beneficial effects of the technical scheme are as follows: extracting the characteristics of the two-dimensional code image to obtain a plurality of color component images; and adjusting the color proportion of the color component images based on a preset function, removing smooth parts and low-frequency parts in the two-dimensional code image, reserving more high-frequency parts and performing highlighting, highlighting details in the two-dimensional code image and improving the image quality. The color component images are three images acquired based on RGB channels. When the image quality of the two-dimensional code image is evaluated, two scale spaces are involved, namely a first scale space and a second scale space. And accurately generating a preset function according to the ith color component image, the weight in the first scale space and other parameters, and further adjusting the color proportion of the corresponding color component image.
According to some embodiments of the present invention, after the file classification and the file sorting are performed on the target file according to the file information, the method further includes:
obtaining a plurality of classification sets obtained after file classification;
selecting any file in any classification set and determining the file as a detection file;
calculating the intra-class distance between the detected file and other files in the classification set where the detected file is located, and determining the maximum intra-class distance;
calculating the inter-class distance between the detection file and other classification sets except the classification set where the detection file is located, and determining the minimum inter-class distance;
comparing the maximum intra-class distance with the minimum inter-class distance, and when the maximum intra-class distance is determined to be smaller than the minimum inter-class distance, indicating that the file classification is qualified; otherwise, the file classification is unqualified.
The working principle and the beneficial effects of the technical scheme are as follows: obtaining a plurality of classification sets obtained after file classification; selecting any file in any classification set and determining the file as a detection file; calculating the intra-class distance between the detected file and other files in the classification set where the detected file is located, and determining the maximum intra-class distance; calculating the inter-class distance between the detection file and other classification sets except the classification set where the detection file is located, and determining the minimum inter-class distance; comparing the maximum intra-class distance with the minimum inter-class distance, and when the maximum intra-class distance is determined to be smaller than the minimum inter-class distance, indicating that the file classification is qualified; otherwise, the file classification is unqualified. The larger the number of randomly selected files is, the more accurate the determination of whether the determined file classification is qualified.
The beneficial effects of the above technical scheme are that: selecting a sampling inspection mode, selecting a detection file, comparing the detection file with other files in the same classification set and with different classification sets, determining the maximum intra-class distance and the minimum inter-class distance, and when the maximum intra-class distance is determined to be smaller than the minimum inter-class distance, indicating that the file classification is qualified; otherwise, the file classification is unqualified. And detecting the result of the file classification, and evaluating the accuracy of automatic classification based on a machine.
According to some embodiments of the present invention, the retrieving in the database according to the unique identifier and the specified prefix carried by the unique identifier to determine the file information of the target file includes:
and positioning in a database according to the appointed prefix carried by the unique identifier, acquiring the positioning identifier at the positioning position, calculating the matching degree of the unique identifier and the positioning identifier, and determining the file information corresponding to the positioning identifier as the file information of the target file when the matching degree is determined to be greater than the preset matching degree.
The beneficial effects of the above technical scheme are that: the file information of the target file can be conveniently and quickly and accurately inquired.
According to some embodiments of the present invention, after the association relationship between the target file and the two-dimensional code image is established in advance, the method further includes:
establishing a rectangular coordinate system for the two-dimensional code image, and determining a lower left corner coordinate and an upper right corner coordinate of the two-dimensional code image;
determining the area of the two-dimensional code image according to the lower left corner coordinate and the upper right corner coordinate, and dividing the two-dimensional code image into a grids with equal size;
optionally selecting a point (x) on the two-dimensional code imageb,yc) Determining the identification (b, c) of the grid where the optional point is located;
Figure BDA0003117337260000151
wherein, b is a column identifier; c is a row identifier; (x)1,y1) Is the lower left cornerCoordinates; (x)2,y2) Coordinates of the upper right corner;
and selecting a preset number of identification marks on the two-dimensional code image, determining the identification marks as marks to be encrypted, and encrypting the grids corresponding to the marks to be encrypted based on a hash function.
The working principle and the beneficial effects of the technical scheme are as follows: after the incidence relation between a target file and a two-dimensional code image is established in advance, a rectangular coordinate system is established for the two-dimensional code image, and the lower left corner coordinate and the upper right corner coordinate of the two-dimensional code image are determined; determining the area of the two-dimensional code image according to the lower left corner coordinate and the upper right corner coordinate, and dividing the two-dimensional code image into a grids with equal size; optionally selecting a point (x) on the two-dimensional code imageb,yc) And determining identification marks (b, c) of the grid where the optional point is located, selecting a preset number of identification marks on the two-dimensional code image, determining the identification marks as marks to be encrypted, and encrypting the grid corresponding to the marks to be encrypted based on a hash function. Each grid has a unique identification. When the incidence relation between the target file and the two-dimensional code image is established and stored, partial area on the two-dimensional code image is encrypted, so that the encryption rate is improved, and the system is prevented from wasting too much time and processing memory due to encryption processing. After partial area on the two-dimensional code image is encrypted, the problem that people can scan to obtain the file information of the target file is avoided, and the safety of the file information of the target file is improved. And accurately determining the identification mark of the grid where the optional point of the two-dimensional code image is located based on the formula. The preset number may be 1.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (9)

1. A method for classifying files according to two-dimensional codes is characterized by comprising the following steps:
the method comprises the steps of establishing an incidence relation between a target file and a two-dimensional code image in advance;
when the target file is uploaded again, the recognition system receives the target file which is uploaded again and the two-dimensional code image corresponding to the target file;
the identification system identifies the two-dimensional code image to obtain an identification result, and when the identification result is determined to be successful, the unique identifier included in the two-dimensional code image and the appointed prefix carried by the unique identifier are obtained;
searching in a database according to the unique identifier and the appointed prefix carried by the unique identifier, and determining the file information of the target file;
and carrying out file classification and file sequencing on the target file according to the file information.
2. The method for classifying files according to two-dimensional codes as claimed in claim 1, wherein said pre-establishing an association relationship between the target file and the two-dimensional code image comprises:
determining the service type of the target file;
extracting the characteristics of the target file according to the service type, and abstracting the fixed content in the target file into a data template;
determining the detail data of the target file according to the data template; the detail data comprises a unique identifier and a prefix with a designation;
and generating a two-dimensional code image according to the unique identifier included in the detail data, positioning the two-dimensional code image on the target file, and establishing an association relationship between the target file and the two-dimensional code image.
3. The method for classifying files according to two-dimensional codes as claimed in claim 2, wherein said detail data includes at least one of the attribute of the target file, the number of files, the file order, whether it is a key file, and the file name.
4. The method for classifying files according to two-dimensional codes as claimed in claim 1, wherein said recognition system recognizes said two-dimensional code image, comprising:
the identification system divides the two-dimensional code image into four quadrants; the upper right of the two-dimensional code image is a first quadrant, the upper left of the two-dimensional code image is a second quadrant, the lower left of the two-dimensional code image is a third quadrant, and the lower right of the two-dimensional code image is a fourth quadrant;
the identification system identifies based on the priority order of the second quadrant- > the first quadrant- > the third quadrant- > the fourth quadrant;
when the fourth quadrant is determined not to be successfully identified, the identification system divides the second quadrant into four quadrants again and identifies the quadrants based on the priority sequence;
and marking the two-dimensional code image as a machine unrecognizable image if the fourth quadrant is determined to be divided into four quadrants again and the identification is not successful after the identification is carried out based on the priority order.
5. The method for classifying files according to two-dimensional codes as claimed in claim 1, further comprising, before the recognition system recognizes the two-dimensional code image:
acquiring a standard image corresponding to the two-dimensional code image;
carrying out scale space transformation on the two-dimensional code image to obtain a first image to be detected and a second image to be detected which correspond to different scale spaces;
carrying out scale space transformation on the standard image to obtain a third image and a fourth image corresponding to different scale spaces; the first image to be detected and the third image are in the same scale space; the second image to be detected and the fourth image are in the same scale space;
grading the first image to be detected based on a plurality of image quality evaluation indexes to obtain a first grading result;
calculating according to the first grading result and a preset evaluation weight value of a plurality of image quality evaluation indexes to obtain a first grade;
determining a first score according to the first score and a first standard score determined according to the third image;
grading the second image to be detected based on a plurality of image quality evaluation indexes to obtain a second grading result;
calculating according to the second grading result and a preset evaluation weight value of a plurality of image quality evaluation indexes to obtain a second grading;
determining a second score according to the second score and a second standard score determined according to the third image;
and inquiring a preset data table according to the first and second differences to determine the image quality score of the two-dimensional code image, and performing image enhancement processing on the two-dimensional code image when the image quality score is determined to be smaller than the preset image quality score.
6. The method for classifying files according to two-dimensional codes as claimed in claim 5, wherein said performing image enhancement processing on said two-dimensional code image comprises:
extracting the characteristics of the two-dimensional code image to obtain a plurality of color component images;
adjusting the color proportion of the color component images based on a preset function;
the preset function is:
Figure FDA0003117337250000031
wherein S isiIs a preset function to the ith color component image; i isiIs the ith color component image; w is a1Is the weight in the first scale space; t is1,iThe reflection brightness of the ith color component image in the first scale space; w is a2A weight in a second scale space; t is2,iThe reflection brightness of the ith color component image in the second scale space.
7. The method for classifying files according to two-dimensional codes as claimed in claim 1, wherein after the file classification and the file sorting are performed on the target file according to the file information, further comprising:
obtaining a plurality of classification sets obtained after file classification;
selecting any file in any classification set and determining the file as a detection file;
calculating the intra-class distance between the detected file and other files in the classification set where the detected file is located, and determining the maximum intra-class distance;
calculating the inter-class distance between the detection file and other classification sets except the classification set where the detection file is located, and determining the minimum inter-class distance;
comparing the maximum intra-class distance with the minimum inter-class distance, and when the maximum intra-class distance is determined to be smaller than the minimum inter-class distance, indicating that the file classification is qualified; otherwise, the file classification is unqualified.
8. The method for classifying files according to two-dimensional codes as claimed in claim 1, wherein said searching in the database according to the unique identifier and the assigned prefix carried by the unique identifier to determine the file information of the target file comprises:
and positioning in a database according to the appointed prefix carried by the unique identifier, acquiring the positioning identifier at the positioning position, calculating the matching degree of the unique identifier and the positioning identifier, and determining the file information corresponding to the positioning identifier as the file information of the target file when the matching degree is determined to be greater than the preset matching degree.
9. The method for classifying files according to two-dimensional codes as claimed in claim 1, further comprising, after the association relationship between the target file and the two-dimensional code image is established in advance:
establishing a rectangular coordinate system for the two-dimensional code image, and determining a lower left corner coordinate and an upper right corner coordinate of the two-dimensional code image;
determining the area of the two-dimensional code image according to the lower left corner coordinate and the upper right corner coordinate, and dividing the two-dimensional code image into a grids with equal size;
optionally selecting a point (x) on the two-dimensional code imageb,yc) Determining the identification (b, c) of the grid where the optional point is located;
Figure FDA0003117337250000051
wherein, b is a column identifier; c is a row identifier; (x)1,y1) Is the coordinate of the lower left corner; (x)2,y2) Coordinates of the upper right corner;
and selecting a preset number of identification marks on the two-dimensional code image, determining the identification marks as marks to be encrypted, and encrypting the grids corresponding to the marks to be encrypted based on a hash function.
CN202110665793.9A 2021-06-16 2021-06-16 Method for classifying files according to two-dimension codes Active CN113434463B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110665793.9A CN113434463B (en) 2021-06-16 2021-06-16 Method for classifying files according to two-dimension codes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110665793.9A CN113434463B (en) 2021-06-16 2021-06-16 Method for classifying files according to two-dimension codes

Publications (2)

Publication Number Publication Date
CN113434463A true CN113434463A (en) 2021-09-24
CN113434463B CN113434463B (en) 2024-07-09

Family

ID=77756056

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110665793.9A Active CN113434463B (en) 2021-06-16 2021-06-16 Method for classifying files according to two-dimension codes

Country Status (1)

Country Link
CN (1) CN113434463B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114579524A (en) * 2022-05-06 2022-06-03 成都大学 Method and system for processing image data

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763384A (en) * 2008-12-25 2010-06-30 新奥特硅谷视频技术有限责任公司 Method and device for uploading scanned file
CN107577979A (en) * 2017-07-26 2018-01-12 中科创达软件股份有限公司 DataMatrix type Quick Response Codes method for quickly identifying, device and electronic equipment
CN110288069A (en) * 2019-06-26 2019-09-27 百度在线网络技术(北京)有限公司 Two dimensional code generates and method, apparatus, equipment and the readable storage medium storing program for executing of parsing
CN110738709A (en) * 2019-09-10 2020-01-31 北京中盾安全技术开发公司 video evaluation method based on two-dimensional code and video evaluation system thereof
KR102214748B1 (en) * 2020-04-29 2021-02-09 정지문 University Information Service System
CN112528179A (en) * 2020-12-11 2021-03-19 携程计算机技术(上海)有限公司 Two-dimensional code processing method and system, electronic device and storage medium
WO2021072885A1 (en) * 2019-10-18 2021-04-22 平安科技(深圳)有限公司 Method and apparatus for recognizing text, device and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763384A (en) * 2008-12-25 2010-06-30 新奥特硅谷视频技术有限责任公司 Method and device for uploading scanned file
CN107577979A (en) * 2017-07-26 2018-01-12 中科创达软件股份有限公司 DataMatrix type Quick Response Codes method for quickly identifying, device and electronic equipment
CN110288069A (en) * 2019-06-26 2019-09-27 百度在线网络技术(北京)有限公司 Two dimensional code generates and method, apparatus, equipment and the readable storage medium storing program for executing of parsing
CN110738709A (en) * 2019-09-10 2020-01-31 北京中盾安全技术开发公司 video evaluation method based on two-dimensional code and video evaluation system thereof
WO2021072885A1 (en) * 2019-10-18 2021-04-22 平安科技(深圳)有限公司 Method and apparatus for recognizing text, device and storage medium
KR102214748B1 (en) * 2020-04-29 2021-02-09 정지문 University Information Service System
CN112528179A (en) * 2020-12-11 2021-03-19 携程计算机技术(上海)有限公司 Two-dimensional code processing method and system, electronic device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114579524A (en) * 2022-05-06 2022-06-03 成都大学 Method and system for processing image data
CN114579524B (en) * 2022-05-06 2022-07-15 成都大学 Method and system for processing image data

Also Published As

Publication number Publication date
CN113434463B (en) 2024-07-09

Similar Documents

Publication Publication Date Title
CN105574063B (en) The image search method of view-based access control model conspicuousness
CN105046252B (en) A kind of RMB prefix code recognition methods
CN105608441B (en) Vehicle type recognition method and system
US20080273770A1 (en) Fast Fingerprint Identification And Verification By Minutiae Pair Indexing
CN104463141B (en) A kind of fingerprint template input method and device based on smart card
CN105069457B (en) Image recognition method and device
CN109583438B (en) The recognition methods of the text of electronic image and image processing apparatus
CN105184225B (en) A kind of multinational banknote image recognition methods and device
CN108921160B (en) Book identification method, electronic equipment and storage medium
US9715729B2 (en) Method and apparatus for processing block to be processed of urine sediment image
CN110826571B (en) Image traversal algorithm for rapid image identification and feature matching
CN111210402A (en) Face image quality scoring method and device, computer equipment and storage medium
CN109993042A (en) A kind of face identification method and its device
WO2015146113A1 (en) Identification dictionary learning system, identification dictionary learning method, and recording medium
CN105488486A (en) Face recognition method and device for preventing photo attack
CN113434463B (en) Method for classifying files according to two-dimension codes
Mohan et al. An intelligent recognition system for identification of wood species
CN108898597B (en) Method for identifying painting and calligraphy based on smart phone
CN116071348B (en) Workpiece surface detection method and related device based on visual detection
JP6012819B1 (en) Similar image acquisition apparatus, method, and program
CN111428064A (en) Small-area fingerprint image fast indexing method, device, equipment and storage medium
US20210149948A1 (en) Generation of object databases
CN111986155A (en) Universal scene character recognition method and device
CN113553980A (en) Method, system and device for generating trademark graphic element codes of pictures
CN108133210B (en) Image format identification method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant