CN111506751A - Method and device for searching mechanical drawing - Google Patents

Method and device for searching mechanical drawing Download PDF

Info

Publication number
CN111506751A
CN111506751A CN202010310066.6A CN202010310066A CN111506751A CN 111506751 A CN111506751 A CN 111506751A CN 202010310066 A CN202010310066 A CN 202010310066A CN 111506751 A CN111506751 A CN 111506751A
Authority
CN
China
Prior art keywords
mechanical drawing
mechanical
eigenvector
iteration
full
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.)
Pending
Application number
CN202010310066.6A
Other languages
Chinese (zh)
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.)
Chuangjing Future Beijing Technology Co ltd
Original Assignee
Chuangjing Future Beijing 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 Chuangjing Future Beijing Technology Co ltd filed Critical Chuangjing Future Beijing Technology Co ltd
Priority to CN202010310066.6A priority Critical patent/CN111506751A/en
Publication of CN111506751A publication Critical patent/CN111506751A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/42Document-oriented image-based pattern recognition based on the type of document
    • G06V30/422Technical drawings; Geographical maps

Abstract

The invention discloses a method and a device for searching a mechanical drawing, wherein the method comprises the following steps: acquiring a reference diagram for retrieving the mechanical drawing; extracting a full feature vector of the reference map; and performing M rounds of iterative operation based on the full feature vector of the reference graph and the M feature vectors with different dimensions of each mechanical drawing in the mechanical drawing database to obtain a mechanical drawing retrieval result set aiming at the reference graph, and outputting the mechanical drawing retrieval result set. The method can gradually narrow the feature search range, only needs to calculate the similarity value of the feature vector with high dimensionality for a small part of the mechanical drawing, reduces the calculated amount in the mechanical drawing search process, reduces the time required by retrieving the mechanical drawing, can obtain accurate and reliable retrieval results, and is simple and convenient to use.

Description

Method and device for searching mechanical drawing
Technical Field
The embodiment of the invention relates to the technical field of information processing, in particular to a method and a device for searching mechanical drawings.
Background
The mechanical drawing is widely existed in the industrial fields at home and abroad, has very important significance for guiding mechanical die sinking, data reference, service purchase and the like, and is particularly important for heavy industrial enterprises such as automobiles, aviation, metallurgy and the like. The method aims at searching the mechanical drawing, can reduce repeated drawing of a user, shortens the design period, and is beneficial to business purchase and weight checking and data analysis, so the searching of the mechanical drawing becomes a hot point of research in recent years. The existing drawing retrieval technologies comprise the following technologies: (1) the method utilizes specific software retrieval such as CAD, soildworks, Pro/E and the like, the retrieval range of the retrieval mode is source databases of respective software, the sharing and migration cost of data is higher, and the difficulty of the retrieval process is too high for non-professionals; (2) the natural picture is retrieved by utilizing a natural picture retrieval technology and based on the methods of a gray level co-occurrence matrix, a local binary system, a principal component analysis and the like of the picture, but because mechanical drawing has sparse characteristics, the retrieval effect of the retrieval mode is not good, and the probability of false retrieval is very high; (3) the method comprises the steps of searching for structural information based on mechanical drawing, such as name, description, number, size and the like of a drawing, and the searching mode needs to enter the relationship between structural data and the drawing in advance, so that a large amount of manpower is needed to participate in data preprocessing, key information needs to be accurately given during data searching, and if the key information used during searching is improper, a searching result cannot meet the requirements of a user.
In summary, the existing mechanical drawing retrieval method has many problems in the aspects of convenience in use, retrieval accuracy and the like, and how to retrieve the mechanical drawing conveniently and accurately becomes a problem which needs to be solved urgently.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a method and a device for searching a mechanical drawing.
The invention provides a method for searching a mechanical drawing, which comprises the following steps:
step S101, acquiring a reference diagram for retrieving a mechanical drawing;
step S102, extracting a full feature vector of the reference image;
step S103, matching in a mechanical map database based on the full feature vector of the reference map; m eigenvectors are correspondingly stored in the mechanical drawing database for each mechanical drawing, wherein the (i + 1) th eigenvector Vi+1Is greater than the ith eigenvector ViMth feature vector VMIs the full eigenvector of the mechanical drawing, M is an integer greater than or equal to 2, i =1, … M-1; the full feature vector V based on the reference mapAMatching is carried out in a mechanical mapping database, and the method specifically comprises the following steps: for j =1, … M-1, the following procedure is iteratively performed: calculating the sum of the reference mapFeature vector VAComparing j th eigenvector V of each mechanical drawing in the mechanical drawing candidate set with j th iterationjCharacteristic vector similarity value S ofjBased on the eigenvector similarity value SjObtaining a j +1 th iteration comparison mechanical drawing candidate set Cj+1Calculating a full eigenvector V of the reference map for the Mth iterationAComparing the Mth eigenvector V of each mechanical drawing in the mechanical drawing candidate set with the Mth iterationMCharacteristic vector similarity value S ofMBased on the eigenvector similarity value SMObtaining a mechanical drawing retrieval result set aiming at the reference drawing, and performing iteration comparison on the 1 st round to obtain a mechanical drawing candidate set C1Constructed based on the mechanical mapping database;
and S104, outputting the mechanical drawing retrieval result set.
The present invention provides an apparatus for searching a mechanical drawing, the apparatus comprising:
a storage unit for storing a mechanical drawing database in which M eigenvectors are stored for each mechanical drawing, wherein the (i + 1) th eigenvector Vi+1Is greater than the ith eigenvector ViMth feature vector VMIs the full eigenvector of the mechanical drawing, M is an integer greater than or equal to 2, i =1, … M-1;
an acquisition unit that acquires a reference map used for retrieving a mechanical drawing;
an extraction unit that extracts a full feature vector of the reference map;
the matching unit is used for matching in the mechanical mapping database based on the full feature vector of the reference map, and specifically, for j =1 and … M-1, the following processes are executed in an iterative manner: calculating a full eigenvector V of the reference mapAComparing j th eigenvector V of each mechanical drawing in the mechanical drawing candidate set with j th iterationjCharacteristic vector similarity value S ofjBased on the eigenvector similarity value SjObtaining a j +1 th iteration comparison mechanical drawing candidate set Cj+1Calculating the full feature direction of the reference map for the Mth iterationQuantity VAComparing the Mth eigenvector V of each mechanical drawing in the mechanical drawing candidate set with the Mth iterationMCharacteristic vector similarity value S ofMBased on the eigenvector similarity value SMObtaining a mechanical drawing retrieval result set aiming at the reference drawing, and performing the 1 st iteration comparison on the mechanical drawing candidate set C1Constructed based on the mechanical mapping database;
and the output unit is used for outputting the mechanical drawing retrieval result set.
The invention also provides a computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program is executable on a processor, and when executed implements the method as described above.
The invention also provides an apparatus for searching mechanical drawings, comprising a processor and a memory, the memory having stored therein a computer program executable on the processor, the computer program implementing the method as described above when executed by the processor.
By the method and the device, the characteristic vectors with different dimensionalities are extracted aiming at each mechanical drawing in the mechanical drawing database, so that the dimensionality of the (i + 1) th characteristic vector is larger than that of the (i) th characteristic vector, the similarity is calculated in an iterative mode from the 1 st characteristic vector, the characteristic search range can be gradually reduced, the similarity value of the characteristic vectors with high dimensionalities only needs to be calculated for a small part of mechanical drawings, the calculated amount in the mechanical drawing search process is reduced, the time needed for retrieving the mechanical drawings is shortened, accurate and reliable retrieval results can be obtained, and the method and the device are simple and convenient to use.
Furthermore, by the method and the device, the similarity of the three views is comprehensively considered in each iteration process, so that the similarity value of the feature vector obtained by calculation is more accurate, and a more accurate retrieval result is provided.
Furthermore, by the method and the device, the characteristic vector and the contour vector are comprehensively considered in each iteration, so that the characteristics of the mechanical drawing can be comprehensively characterized, and the accuracy of the retrieval result is further improved.
Furthermore, by the method and the device, the newly added mechanical drawing can be automatically put in a warehouse, so that a user can obtain a comprehensive retrieval result based on a comprehensive mechanical drawing database during subsequent mechanical drawing retrieval.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a method of searching a mechanical drawing in one embodiment of the invention.
Fig. 2 is an apparatus for searching a mechanical drawing in one embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings. The embodiments and specific features of the embodiments of the present invention are detailed descriptions of technical solutions of the embodiments of the present invention, and are not limited to technical solutions of the present invention, and the technical features of the embodiments and the embodiments of the present invention may be combined with each other without conflict.
The invention provides a method for searching mechanical drawings, which comprises the following steps of:
s101, acquiring a reference map for searching the mechanical drawing.
Preferably, the step S101 further includes checking the quality of the reference graph, determining whether the quality of the reference graph meets the retrieval requirement, if so, executing the step S102, otherwise, prompting the user to upload the reference graph again, and repeatedly executing the step S101;
preferably, the step S101 further includes preprocessing the reference map, including converting the reference map into a picture format, extracting a key information portion in the converted reference map, for example, removing content such as a frame, a margin, and template information of the reference map, and performing denoising, image enhancement, binarization, and other preprocessing on the key information portion.
And S102, extracting the full feature vector of the reference image.
Preferably, the full feature vector V of the reference map is extractedAThe full feature vector of the key information part is extracted.
S103, matching in a mechanical map database based on the full feature vector of the reference map; m eigenvectors are correspondingly stored in the mechanical drawing database for each mechanical drawing, wherein the (i + 1) th eigenvector Vi+1Is greater than the ith eigenvector ViMth feature vector VMIs the full eigenvector of the mechanical drawing, M is an integer greater than or equal to 2, i =1, … M-1; the full feature vector V based on the reference mapAMatching is carried out in a mechanical mapping database, and the method specifically comprises the following steps: for j =1, … M-1, the following procedure is iteratively performed: calculating a full eigenvector V of the reference mapAComparing j th eigenvector V of each mechanical drawing in the mechanical drawing candidate set with j th iterationjCharacteristic vector similarity value S ofjBased on the eigenvector similarity value SjObtaining a j +1 th iteration comparison mechanical drawing candidate set Cj+1Calculating a full eigenvector V of the reference map for the Mth iterationAComparing the Mth eigenvector V of each mechanical drawing in the mechanical drawing candidate set with the Mth iterationMCharacteristic vector similarity value S ofMBased on the eigenvector similarity value SMObtaining a mechanical drawing retrieval result set aiming at the reference drawing, and performing iteration comparison on the 1 st round to obtain a mechanical drawing candidate set C1And constructing based on the mechanical drawing database.
That is, after each iteration is finished, the value of j is added by 1, and then the next iteration is executed, so that,in the 1 st iteration, the 1 st iteration is used for comparing the mechanical drawing candidate set C1After the 1 st iteration is finished, obtaining a 2 nd iteration comparison mechanical drawing candidate set C after the 1 st iteration is finished2In the 2 nd iteration, the 2 nd iteration is used for comparing the mechanical drawing candidate set C2After the 2 nd iteration is finished, obtaining a 3 rd iteration comparison mechanical drawing candidate set C after the 2 nd iteration is finished3And repeating the steps, and obtaining a mechanical drawing retrieval result set of the reference diagram after the last iteration, namely the Mth iteration.
Preferably, the full feature vector V of the reference mapAIs equal to the number of all elements of the reference map.
Preferably, the feature vector and the full feature vector are topology vectors. Before the step S101, for each mechanical drawing in the mechanical drawing database, a topological graph is generated according to the topological relation of some or all elements in the mechanical drawing, the topological graph is converted into an adjacency matrix, eigenvalues of the adjacency matrix are calculated, and the eigenvalues are sorted to obtain M eigenvectors of the mechanical drawing. Wherein the ith eigenvector V of a mechanical drawingiIs equal to the number of elements included in the topology graph generating the feature vector, generates the ith feature vector ViIs to generate the (i + 1) th feature vector Vi+1Is included in the topology graph of (a) a proper subset of a set of elements included in the topology graph of (b). The Mth feature vector VMIs equal to the number of all elements of the mechanical drawing. Ith eigenvector V of different mechanical drawingsiMay be the same or different.
In step S102, extracting the full feature vector of the reference map specifically includes: and generating a topological graph according to the topological relation of all elements in the reference graph, converting the topological graph into an adjacency matrix, calculating the characteristic value of the adjacency matrix, and sequencing the characteristic value to obtain the full characteristic vector of the reference graph.
Preferably, the similarity value S is based on the feature vectorjObtaining a candidate set of the mechanical drawing in the (j + 1) th iteration comparisonAnd Cj+1Based on the eigenvector similarity value SMObtaining a mechanical drawing retrieval result set aiming at the reference diagram, specifically, selecting a eigenvector similarity value S larger than a first preset threshold valuejOr SMThe corresponding mechanical drawing forms a j +1 th iteration comparison mechanical drawing candidate set Cj+1Or a mechanical drawing retrieval result set, wherein a first preset threshold corresponding to the j +1 th iteration is larger than a first preset threshold corresponding to the j th iteration, or a feature vector similarity value S obtained for each mechanical drawing in the iteration is obtainedjOr SMSorting from big to small, and selecting the top N according to the sorting resultjOr NMThe mechanical drawing corresponding to the eigenvector similarity value forms a j +1 th iteration comparison mechanical drawing candidate set Cj+1Or a set of results from a mechanical mapping search, wherein NM<Nj,Nj+1<Nj
And S104, outputting the mechanical drawing retrieval result set.
By the method, the characteristic vectors with different dimensionalities are extracted aiming at each mechanical drawing in the mechanical drawing database, so that the dimensionality of the (i + 1) th characteristic vector is larger than that of the ith characteristic vector, the similarity is iteratively calculated from the 1 st characteristic vector, the characteristic search range can be gradually reduced, the similarity value of the characteristic vectors with high dimensionalities is only required to be calculated for a small part of mechanical drawings, the calculated amount in the mechanical drawing search process is reduced, the time required by retrieving the mechanical drawings is reduced, an accurate and reliable retrieval result is obtained, and the method is simple and convenient to use.
Preferably, the 1 st round of iterative comparison mechanical mapping candidate set C1The mechanical drawing database is constructed based on the mechanical drawing database, and specifically comprises the following steps: 1 st iteration comparison mechanical drawing candidate set C1All mechanical drawings in the mechanical drawing database are included.
Preferably, the mechanical drawing database also stores the structured data of each mechanical drawing. The step S101 further includes: obtaining structural data for retrieval, and performing 1 st iteration comparison on a mechanical drawing candidate set C1The mechanical drawing database is constructed based on the mechanical drawing database, and specifically comprises the following steps: obtaining a mechanical drawing which accords with the structured data in the mechanical drawing database, and constructing the 1 st iteration comparison mechanical drawing candidate set C based on the mechanical drawing1. The structured data is used to characterize the name, description, number, dimensions, etc. of the mechanical drawing.
Preferably, the reference map includes a front view, a top view and a left view. In the step 102, the full feature vector of the reference map is extracted, specifically, the full feature vector of the front view, the full feature vector of the top view, and the full feature vector of the left view of the reference map are extracted.
Preferably, the mechanical drawing in the mechanical drawing database comprises a front view, a top view and a left view. Each view for each mechanical drawing in the mechanical drawing database has M feature vectors each.
Preferably, the full feature vector V based on the reference map in step S103AMatching is carried out in a mechanical mapping database, and the method specifically comprises the following steps: for j =1, … M-1, the following procedure is iteratively performed: calculating a full feature vector V of the main view in the reference mapAComparing j th characteristic vector V of the main view of each mechanical drawing in the mechanical drawing candidate set with j th iterationjCharacteristic vector similarity value S ofjFCalculating a full eigenvector V of the top view in the reference mapAComparing the jth eigenvector V of the top view of each mechanical drawing in the mechanical drawing candidate set with the jth iterationjCharacteristic vector similarity value S ofjTCalculating a full feature vector V of the left view in the reference mapAComparing j th characteristic vector V of left view of each mechanical drawing in the mechanical drawing candidate set with j th iterationjCharacteristic vector similarity value S ofjLFor the similarity value S of the feature vector obtained based on the main viewjFFeature vector similarity value S obtained based on top viewjTAnd a feature vector similarity value S obtained based on the left viewjLWeighting to obtain the eigenvector similarity value S of each mechanical drawingjBased on the eigenvector similarity value SjObtaining a j +1 th iteration comparison mechanical drawing candidate set Cj+1Calculating a full eigenvector V of the main view in the reference map for the Mth iterationAComparing the Mth characteristic vector V of the main view of each mechanical drawing in the mechanical drawing candidate set with the Mth iterationMCharacteristic vector similarity value S ofMFCalculating a full eigenvector V of the top view in the reference mapAComparing the Mth characteristic vector V of the top view of each mechanical drawing in the mechanical drawing candidate set with the Mth iterationMCharacteristic vector similarity value S ofMTCalculating a full feature vector V of the left view in the reference mapAComparing the Mth characteristic vector V of the left view of each mechanical drawing in the mechanical drawing candidate set with the Mth iterationMCharacteristic vector similarity value S ofMLFor the similarity value S of the feature vector obtained based on the main viewMFFeature vector similarity value S obtained based on top viewMTAnd a feature vector similarity value S obtained based on the left viewMLWeighting to obtain the eigenvector similarity value S of each mechanical drawingMBased on the eigenvector similarity value SMObtaining a mechanical drawing retrieval result set aiming at the reference drawing, and performing the 1 st iteration comparison on the mechanical drawing candidate set C1And constructing based on the mechanical drawing database.
By the method, the similarity of the three views is comprehensively considered in each iteration process, so that the similarity value of the feature vector obtained by calculation is more accurate, and a more accurate retrieval result can be provided.
Preferably, the step S102 further includes extracting contour vectors of each element in the reference map.
Preferably, the contour vector of each element in the reference map is extracted as the contour vector V of each element in the key information partg
In S103, the full feature vector V based on the reference mapAMatching is carried out in a mechanical mapping database, and the method specifically comprises the following steps: mechanically mapping data based on the full feature vector of the reference map and the contour vector of each elementMatching in the library; the mechanical drawing database also correspondingly stores contour vectors of all elements included in each mechanical drawing, and stores elements included in a topological graph for generating any one feature vector of the mechanical drawing, namely the elements corresponding to the feature vector, so that the contour vectors of the elements corresponding to the feature vector can be obtained; the full feature vector based on the reference map and the contour vector of each element are matched in a mechanical mapping database, and the matching method specifically comprises the following steps: for j =1, … M-1, the following procedure is iteratively performed: calculating a full eigenvector V of the reference mapAComparing j th eigenvector V of each mechanical drawing in the mechanical drawing candidate set with j th iterationjCharacteristic vector similarity value S ofjOr a full eigenvector V based on the reference mapAComparing j th characteristic vector V of three views of each mechanical drawing in the mechanical drawing candidate set with j th iterationjCalculating a eigenvector similarity value Sj(ii) a Calculating the contour vector of each element in the reference map and the jth characteristic vector V of each mechanical drawing in the jth iteration comparison mechanical drawing candidate setjContour vector similarity T of contour vectors of corresponding elementsjBased on the eigenvector similarity value SjSimilarity to contour vector TjObtaining a j +1 th iteration comparison mechanical drawing candidate set Cj+1Calculating a full eigenvector V of the reference map for the Mth iterationAComparing the Mth eigenvector V of each mechanical drawing in the mechanical drawing candidate M with the Mth iterationMCharacteristic vector similarity value S ofMOr a full eigenvector V based on the reference mapAComparing the Mth eigenvector V of three views of each mechanical drawing in the mechanical drawing candidate set with the Mth iterationMCalculating a eigenvector similarity value SM(ii) a Calculating the contour vector of each element in the reference map and the Mth characteristic vector V of each mechanical drawing in the M-th iteration comparison mechanical drawing candidate setMContour vector similarity T of contour vectors of corresponding elementsMBased on the eigenvector similarity value SMAnd contour vector phaseSimilarity TMAnd obtaining a mechanical drawing retrieval result set aiming at the reference drawing.
Preferably, the similarity value S is based on the feature vectorjSimilarity to contour vector TjObtaining a j +1 th iteration comparison mechanical drawing candidate set Cj+1Or, based on the eigenvector similarity value SMSimilarity to contour vector TMObtaining a mechanical drawing retrieval result set aiming at the reference diagram, specifically, based on the eigenvector similarity value SjSimilarity to contour vector TjCalculating to obtain comprehensive similarity RjOr, based on the eigenvector similarity value SMSimilarity to contour vector TMCalculating to obtain comprehensive similarity RMSelecting the eigenvector similarity value R larger than a second preset threshold in the iterationjOr RMThe corresponding mechanical drawing forms a j +1 th iteration comparison mechanical drawing candidate set Cj+1Or a mechanical drawing retrieval result set, wherein a second preset threshold corresponding to the j +1 th iteration is larger than a second preset threshold corresponding to the j th iteration, or a feature vector similarity value R obtained for each mechanical drawing in the iteration isjOr RMSorting from big to small, and selecting the top N according to the sorting resultjOr NMThe mechanical drawing corresponding to the eigenvector similarity value forms a j +1 th iteration comparison mechanical drawing candidate set Cj+1Or a set of results from a mechanical mapping search, wherein NM<Nj,Nj+1<Nj
Preferably, in step S104, the mechanical drawing and the corresponding structured data included in the mechanical drawing search result set are output for the user to browse.
Preferably, the method of the present invention further comprises: s105, obtaining the mechanical drawing drawn by the user referring to the mechanical drawing in the mechanical drawing retrieval result set, extracting M characteristic vectors of the mechanical drawing and/or contour vectors of all elements in the mechanical drawing, and correspondingly storing the mechanical drawing, the M characteristic vectors and the contour vectors of all elements in a mechanical drawing database.
By the method, the newly added mechanical drawing can be automatically put in a warehouse, so that a user can obtain a comprehensive retrieval result based on a comprehensive mechanical drawing database during subsequent mechanical drawing retrieval.
The present invention also provides an apparatus for searching a mechanical drawing, referring to fig. 2, the apparatus comprising:
a storage unit for storing a mechanical drawing database in which M eigenvectors are stored for each mechanical drawing, wherein the (i + 1) th eigenvector Vi+1Is greater than the ith eigenvector ViMth feature vector VMIs the full eigenvector of the mechanical drawing, M is an integer greater than or equal to 2, i =1, … M-1;
an acquisition unit that acquires a reference map used for retrieving a mechanical drawing;
an extraction unit that extracts a full feature vector of the reference map;
the matching unit is used for matching in the mechanical mapping database based on the full feature vector of the reference map, and specifically, for j =1 and … M-1, the following processes are executed in an iterative manner: calculating a full eigenvector V of the reference mapAComparing j th eigenvector V of each mechanical drawing in the mechanical drawing candidate set with j th iterationjCharacteristic vector similarity value S ofjBased on the eigenvector similarity value SjObtaining a j +1 th iteration comparison mechanical drawing candidate set Cj+1Calculating a full eigenvector V of the reference map for the Mth iterationAComparing the Mth eigenvector V of each mechanical drawing in the mechanical drawing candidate set with the Mth iterationMCharacteristic vector similarity value S ofMBased on the eigenvector similarity value SMObtaining a mechanical drawing retrieval result set aiming at the reference drawing, and performing the 1 st iteration comparison on the mechanical drawing candidate set C1Constructed based on the mechanical mapping database;
and the output unit is used for outputting the mechanical drawing retrieval result set.
Preferably, the obtaining unit is further configured to check the quality of the reference map, determine whether the quality of the reference map meets a retrieval requirement, if so, trigger the extracting unit, otherwise, prompt the user to upload the reference map again, and obtain the reference map used for retrieving the mechanical drawing again;
preferably, the obtaining unit is further configured to perform preprocessing on the reference map, where the preprocessing includes converting the reference map into a picture format, extracting a key information portion in the converted reference map, for example, removing content such as a frame, a margin, and template information of the reference map, and performing denoising, image enhancement, binarization, and other preprocessing on the key information portion.
Preferably, the extraction unit extracts a full feature vector V of the reference mapAThe full feature vector of the key information part is extracted.
Preferably, the full feature vector V of the reference mapAIs equal to the number of all elements of the reference map.
Preferably, the feature vector and the full feature vector are topology vectors. The extraction unit is further configured to, for each mechanical drawing in the mechanical drawing database, generate a topological graph according to topological relations of some or all elements in the mechanical drawing, convert the topological graph into an adjacency matrix, calculate eigenvalues of the adjacency matrix, sort the eigenvalues to obtain M eigenvectors of the mechanical drawing, generate a topological graph according to topological relations of all elements in the reference graph, convert the topological graph into an adjacency matrix, calculate eigenvalues of the adjacency matrix, and sort the eigenvalues to obtain full eigenvectors of the reference graph.
Preferably, the i-th feature vector ViIs equal to the number of elements included in the topology graph generating the feature vector, generates the ith feature vector ViIs to generate the (i + 1) th feature vector Vi+1Is included in the topology graph of (a) a proper subset of a set of elements included in the topology graph of (b). The Mth feature vector VMIs equal to the number of all elements of the mechanical drawing. Ith eigenvector V of different mechanical drawingsiMay be the sameOr may be different.
Preferably, the matching unit performs the matching based on the feature vector similarity value SjObtaining a j +1 th iteration comparison mechanical drawing candidate set Cj+1Or, based on the eigenvector similarity value SMObtaining a mechanical drawing retrieval result set aiming at the reference diagram, specifically, selecting a characteristic vector similarity value S which is greater than a first preset threshold value in the iterationjOr SMThe corresponding mechanical drawing forms a j +1 th iteration comparison mechanical drawing candidate set Cj+1Or a mechanical drawing retrieval result set, wherein a first preset threshold corresponding to the j +1 th iteration is larger than a first preset threshold corresponding to the j th iteration, or a feature vector similarity value S obtained for each mechanical drawing in the iteration is obtainedjOr SMSorting from big to small, and selecting the top N according to the sorting resultjOr NMThe mechanical drawing corresponding to the eigenvector similarity value forms a j +1 th iteration comparison mechanical drawing candidate set Cj+1Or a set of results from a mechanical mapping search, wherein NM<Nj,Nj+1<Nj
Preferably, the 1 st round of iterative comparison mechanical mapping candidate set C1The mechanical drawing database is constructed based on the mechanical drawing database, and specifically comprises the following steps: 1 st iteration comparison mechanical drawing candidate set C1All mechanical drawings in the mechanical drawing database are included.
Preferably, the obtaining unit is further configured to: structured data is obtained for retrieval.
The 1 st iteration comparison mechanical drawing candidate set C1The mechanical drawing database is constructed based on the mechanical drawing database, and specifically comprises the following steps: obtaining a mechanical drawing which accords with the structured data in the mechanical drawing database, and constructing the 1 st iteration comparison mechanical drawing candidate set C based on the mechanical drawing1. The structured data is used to characterize the name, description, number, dimensions, etc. of the mechanical drawing.
Preferably, the reference map includes a front view, a top view and a left view. The extraction unit extracts the full feature vector of the reference map, specifically, extracts the full feature vector of the front view, the full feature vector of the top view, and the full feature vector of the left view of the reference map.
Preferably, the mechanical drawing comprises a front view, a top view and a left view. Each view for each mechanical drawing in the mechanical drawing database has M feature vectors each.
Preferably, the matching unit executes a full feature vector V based on the reference mapAMatching is carried out in a mechanical mapping database, and the method specifically comprises the following steps: for j =1, … M-1, the following procedure is iteratively performed: calculating a full feature vector V of the main view in the reference mapAComparing j th characteristic vector V of the main view of each mechanical drawing in the mechanical drawing candidate set with j th iterationjCharacteristic vector similarity value S ofjFCalculating a full eigenvector V of the top view in the reference mapAComparing the jth eigenvector V of the top view of each mechanical drawing in the mechanical drawing candidate set with the jth iterationjCharacteristic vector similarity value S ofjTCalculating a full feature vector V of the left view in the reference mapAComparing j th characteristic vector V of left view of each mechanical drawing in the mechanical drawing candidate set with j th iterationjCharacteristic vector similarity value S ofjLFor the similarity value S of the feature vector obtained based on the main viewjFFeature vector similarity value S obtained based on top viewjTAnd a feature vector similarity value S obtained based on the left viewjLWeighting to obtain the eigenvector similarity value S of each mechanical drawingjBased on the eigenvector similarity value SjObtaining a j +1 th iteration comparison mechanical drawing candidate set Cj+1Calculating a full eigenvector V of the main view in the reference map for the Mth iterationAComparing the Mth characteristic vector V of the main view of each mechanical drawing in the mechanical drawing candidate set with the Mth iterationMCharacteristic vector similarity value S ofMFCalculating a full eigenvector V of the top view in the reference mapAComparing the Mth characteristic vector V of the top view of each mechanical drawing in the mechanical drawing candidate set with the Mth iterationMCharacteristic vector similarity value S ofMTCalculating a full feature vector V of the left view in the reference mapAComparing the Mth characteristic vector V of the left view of each mechanical drawing in the mechanical drawing candidate set with the Mth iterationMCharacteristic vector similarity value S ofMLFor the similarity value S of the feature vector obtained based on the main viewMFFeature vector similarity value S obtained based on top viewMTAnd a feature vector similarity value S obtained based on the left viewMLWeighting to obtain the eigenvector similarity value S of each mechanical drawingMBased on the eigenvector similarity value SMObtaining a mechanical drawing retrieval result set aiming at the reference drawing, and performing the 1 st iteration comparison on the mechanical drawing candidate set C1And constructing based on the mechanical drawing database.
Preferably, the extracting unit is further configured to extract contour vectors of respective elements in the reference map.
Preferably, the contour vector of each element in the reference map is extracted as the contour vector V of each element in the key information partg
The mechanical drawing database also stores contour vectors of elements included in each mechanical drawing correspondingly, and stores elements included in a topological graph for generating any one feature vector of the mechanical drawing, namely elements corresponding to the feature vector, so that the contour vectors of the elements corresponding to the feature vector can be obtained.
The matching unit is further configured to perform matching in a mechanical mapping database based on the full feature vector of the reference map and the contour vector of each element, specifically: for j =1, … M-1, the following procedure is iteratively performed: calculating a full eigenvector V of the reference mapAComparing j th eigenvector V of each mechanical drawing in the mechanical drawing candidate set with j th iterationjCharacteristic vector similarity value S ofjOr a full eigenvector V based on the reference mapAComparing j th characteristic vector V of three views of each mechanical drawing in the mechanical drawing candidate set with j th iterationjCalculating a eigenvector similarity value Sj(ii) a Calculating the contour vector of each element in the reference map and the jth characteristic vector V of each mechanical drawing in the jth iteration comparison mechanical drawing candidate setjContour vector similarity T of contour vectors of corresponding elementsjBased on the eigenvector similarity value SjSimilarity to contour vector TjObtaining a j +1 th iteration comparison mechanical drawing candidate set Cj+1(ii) a Calculating a full eigenvector V of the reference map for the Mth iterationAComparing the Mth eigenvector V of each mechanical drawing in the mechanical drawing candidate M with the Mth iterationMCharacteristic vector similarity value S ofMOr a full eigenvector V based on the reference mapAComparing the Mth eigenvector V of three views of each mechanical drawing in the mechanical drawing candidate set with the Mth iterationMCalculating a eigenvector similarity value SM(ii) a Calculating the contour vector of each element in the reference map and the Mth characteristic vector V of each mechanical drawing in the M-th iteration comparison mechanical drawing candidate setMContour vector similarity T of contour vectors of corresponding elementsMBased on the eigenvector similarity value SMSimilarity to contour vector TMAnd obtaining a mechanical drawing retrieval result set aiming at the reference drawing.
Preferably, the similarity value S is based on the feature vectorjSimilarity to contour vector TjObtaining a j +1 th iteration comparison mechanical drawing candidate set Cj+1Or, based on the eigenvector similarity value SMSimilarity to contour vector TMObtaining a mechanical drawing retrieval result set aiming at the reference diagram, specifically, based on the eigenvector similarity value SjSimilarity to contour vector TjCalculating to obtain comprehensive similarity RjOr, based on the eigenvector similarity value SMSimilarity to contour vector TMCalculating to obtain comprehensive similarity RMSelecting the eigenvector similarity value R larger than a second preset threshold in the iterationjOr RMThe corresponding mechanical drawing forms a j +1 th iteration comparison mechanical drawing candidate set Cj+1Or for mechanical drawingSearching a result set, wherein a second preset threshold corresponding to the j +1 th iteration is larger than a second preset threshold corresponding to the j th iteration, or a feature vector similarity value R obtained by each mechanical drawing in the iteration isjOr RMSorting from big to small, and selecting the top N according to the sorting resultjOr NMThe mechanical drawing corresponding to the eigenvector similarity value forms a j +1 th iteration comparison mechanical drawing candidate set Cj+1Or a set of results from a mechanical mapping search, wherein NM<Nj,Nj+1<Nj
The acquisition unit is further configured to: acquiring a mechanical drawing drawn by a user with reference to the mechanical drawing in the mechanical drawing retrieval result set;
the extraction unit is further configured to: extracting M characteristic vectors of the mechanical drawing and/or contour vectors of each element in the mechanical drawing;
the storage unit is further used for correspondingly storing the mechanical drawing, the M characteristic vectors and the contour vector of each element into a mechanical drawing database.
The invention also provides a computer-readable storage medium in which a computer program executable on a processor is stored, which computer program, when being executed, carries out the method as described above.
The invention also provides an apparatus for searching mechanical drawings, comprising a processor and a memory, in which a computer program is stored which is executable on the processor, which computer program, when being executed by the processor, carries out the method as described above.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. The computer-readable storage medium may include: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), a flash memory, an erasable programmable read-only memory (EPROM), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
Computer program code for carrying out operations of the present invention may be written in one or more programming languages, or a combination thereof.
The above description is only an example for the convenience of understanding the present invention, and is not intended to limit the scope of the present invention. In the specific implementation, a person skilled in the art may change, add, or reduce the components of the apparatus according to the actual situation, and may change, add, reduce, or change the order of the steps of the method according to the actual situation without affecting the functions implemented by the method.
While embodiments of the invention have been shown and described, it will be understood by those skilled in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents, and all changes that come within the meaning and range of equivalency of the claims are to be embraced within their scope.

Claims (10)

1. A method of searching a mechanical drawing, the method comprising:
step S101, acquiring a reference diagram for retrieving a mechanical drawing;
step S102, extracting a full feature vector of the reference image;
step S103, matching in a mechanical map database based on the full feature vector of the reference map; m eigenvectors are correspondingly stored in the mechanical drawing database for each mechanical drawing, wherein the (i + 1) th eigenvector Vi+1Is greater than the ith eigenvector ViCharacteristic of the MQuantity VMIs the full eigenvector of the mechanical drawing, M is an integer greater than or equal to 2, i =1, … M-1; the full feature vector V based on the reference mapAMatching is carried out in a mechanical mapping database, and the method specifically comprises the following steps: for j =1, … M-1, the following procedure is iteratively performed: calculating a full eigenvector V of the reference mapAComparing j th eigenvector V of each mechanical drawing in the mechanical drawing candidate set with j th iterationjCharacteristic vector similarity value S ofjBased on the eigenvector similarity value SjObtaining a j +1 th iteration comparison mechanical drawing candidate set Cj+1Calculating a full eigenvector V of the reference map for the Mth iterationAComparing the Mth eigenvector V of each mechanical drawing in the mechanical drawing candidate set with the Mth iterationMCharacteristic vector similarity value S ofMBased on the eigenvector similarity value SMObtaining a mechanical drawing retrieval result set aiming at the reference drawing, and performing the 1 st iteration comparison on the mechanical drawing candidate set C1Constructed based on the mechanical mapping database;
and step S104, outputting the mechanical drawing retrieval result set.
2. The method according to claim 1, wherein the step S101 further comprises: obtaining structural data for retrieval, and performing the 1 st round of iterative comparison mechanical drawing candidate set C in the step S1031The mechanical drawing database is constructed based on the mechanical drawing database, and specifically comprises the following steps: obtaining a mechanical drawing which accords with the structured data in the mechanical drawing database, and constructing the 1 st iteration comparison mechanical drawing candidate set C based on the mechanical drawing1
3. The method according to claim 1, wherein the eigenvectors and the full eigenvectors are topological vectors, and before step S101, for each mechanical drawing in a mechanical drawing database, a topological graph is generated according to topological relations of some or all elements in the mechanical drawing, the topological graph is converted into an adjacency matrix, eigenvalues of the adjacency matrix are calculated, and the eigenvalues are sorted to obtain M eigenvectors of the mechanical drawing; in step S102, extracting the full feature vector of the reference map specifically includes: and generating a topological graph according to the topological relation of all elements in the reference graph, converting the topological graph into an adjacency matrix, calculating the characteristic value of the adjacency matrix, and sequencing the characteristic value to obtain the full characteristic vector of the reference graph.
4. The method of claim 3, wherein the ith eigenvector ViIs equal to the number of elements included in the topology map that generated the feature vector.
5. An apparatus for searching a mechanical drawing, the apparatus comprising:
a storage unit for storing a mechanical drawing database in which M eigenvectors are stored for each mechanical drawing, wherein the (i + 1) th eigenvector Vi+1Is greater than the ith eigenvector ViMth feature vector VMIs the full eigenvector of the mechanical drawing, M is an integer greater than or equal to 2, i =1, … M-1;
an acquisition unit that acquires a reference map used for retrieving a mechanical drawing;
an extraction unit that extracts a full feature vector of the reference map;
the matching unit is used for matching in the mechanical mapping database based on the full feature vector of the reference map, and specifically, for j =1 and … M-1, the following processes are executed in an iterative manner: calculating a full eigenvector V of the reference mapAComparing j th eigenvector V of each mechanical drawing in the mechanical drawing candidate set with j th iterationjCharacteristic vector similarity value S ofjBased on the eigenvector similarity value SjObtaining a j +1 th iteration comparison mechanical drawing candidate set Cj+1Calculating a full eigenvector V of the reference map for the Mth iterationAComparing the Mth eigenvector V of each mechanical drawing in the mechanical drawing candidate set with the Mth iterationMIs characterized in thatEigenvector similarity value SMBased on the eigenvector similarity value SMObtaining a mechanical drawing retrieval result set aiming at the reference drawing, and performing the 1 st iteration comparison on the mechanical drawing candidate set C1Constructed based on the mechanical mapping database;
and the output unit is used for outputting the mechanical drawing retrieval result set.
6. The apparatus of claim 5, wherein the obtaining unit is further configured to: acquiring structured data for retrieval;
the 1 st iteration comparison mechanical drawing candidate set C1The mechanical drawing database is constructed based on the mechanical drawing database, and specifically comprises the following steps: obtaining a mechanical drawing which accords with the structured data in the mechanical drawing database, and constructing the 1 st iteration comparison mechanical drawing candidate set C based on the mechanical drawing1
7. The apparatus according to claim 5, wherein the eigenvector and the full eigenvector are topological vectors, the extraction unit is further configured to generate a topological graph according to topological relations of some or all elements in the mechanical drawings, convert the topological graph into an adjacency matrix, calculate eigenvalues of the adjacency matrix, and sort the eigenvalues to obtain M eigenvectors of the mechanical drawings, for each mechanical drawing in a mechanical drawing database, and further configured to generate a topological graph according to topological relations of all elements in the reference diagram, convert the topological graph into an adjacency matrix, calculate eigenvalues of the adjacency matrix, and sort the eigenvalues to obtain the full eigenvector of the reference diagram.
8. The apparatus of claim 7, wherein the ith eigenvector ViIs equal to the number of elements included in the topology map that generated the feature vector.
9. A computer-readable storage medium, in which a computer program that is executable on a processor is stored, which computer program, when being executed, carries out the method according to any one of claims 1 to 4.
10. An apparatus for searching mechanical drawings, comprising a processor and a memory, in which a computer program is stored which is executable on the processor, the computer program, when being executed by the processor, implementing the method as set forth in any one of claims 1 to 4.
CN202010310066.6A 2020-04-20 2020-04-20 Method and device for searching mechanical drawing Pending CN111506751A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010310066.6A CN111506751A (en) 2020-04-20 2020-04-20 Method and device for searching mechanical drawing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010310066.6A CN111506751A (en) 2020-04-20 2020-04-20 Method and device for searching mechanical drawing

Publications (1)

Publication Number Publication Date
CN111506751A true CN111506751A (en) 2020-08-07

Family

ID=71874485

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010310066.6A Pending CN111506751A (en) 2020-04-20 2020-04-20 Method and device for searching mechanical drawing

Country Status (1)

Country Link
CN (1) CN111506751A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105528364A (en) * 2014-09-30 2016-04-27 株式会社日立制作所 Iterative video image retrieval method and device
CN106844715A (en) * 2017-02-08 2017-06-13 摩登大道时尚电子商务有限公司 A kind of picture retrieval matching process and device
CN106951911A (en) * 2017-02-13 2017-07-14 北京飞搜科技有限公司 A kind of quick multi-tag picture retrieval system and implementation method
CN110162716A (en) * 2019-05-21 2019-08-23 湖南大学 A kind of influence power community search method and system based on community's retrieval
CN110472079A (en) * 2019-07-08 2019-11-19 浙江省北大信息技术高等研究院 Search method, device, equipment and the storage medium of target image
CN110472087A (en) * 2019-08-07 2019-11-19 腾讯科技(深圳)有限公司 A kind of facial expression image recommended method, device, equipment and medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105528364A (en) * 2014-09-30 2016-04-27 株式会社日立制作所 Iterative video image retrieval method and device
CN106844715A (en) * 2017-02-08 2017-06-13 摩登大道时尚电子商务有限公司 A kind of picture retrieval matching process and device
CN106951911A (en) * 2017-02-13 2017-07-14 北京飞搜科技有限公司 A kind of quick multi-tag picture retrieval system and implementation method
CN110162716A (en) * 2019-05-21 2019-08-23 湖南大学 A kind of influence power community search method and system based on community's retrieval
CN110472079A (en) * 2019-07-08 2019-11-19 浙江省北大信息技术高等研究院 Search method, device, equipment and the storage medium of target image
CN110472087A (en) * 2019-08-07 2019-11-19 腾讯科技(深圳)有限公司 A kind of facial expression image recommended method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN109670191B (en) Calibration optimization method and device for machine translation and electronic equipment
CN106951484B (en) Picture retrieval method and device, computer equipment and computer readable medium
CN111723575A (en) Method, device, electronic equipment and medium for recognizing text
CN112163424A (en) Data labeling method, device, equipment and medium
CN112417381B (en) Method and device for rapidly positioning infringement image applied to image copyright protection
CN112632226A (en) Semantic search method and device based on legal knowledge graph and electronic equipment
CN112181490A (en) Method, device, equipment and medium for identifying function category in function point evaluation method
CN111506751A (en) Method and device for searching mechanical drawing
CN115797795A (en) Remote sensing image question-answering type retrieval system and method based on reinforcement learning
CN111950615B (en) Network fault feature selection method based on tree species optimization algorithm
CN115186138A (en) Comparison method and terminal for power distribution network data
CN114756617A (en) Method, system, equipment and storage medium for extracting structured data of engineering archives
CN111310442B (en) Method for mining shape-word error correction corpus, error correction method, device and storage medium
CN114154480A (en) Information extraction method, device, equipment and storage medium
CN113128231A (en) Data quality inspection method and device, storage medium and electronic equipment
CN111242307A (en) Judgment result obtaining method and device based on deep learning and storage medium
CN112416754B (en) Model evaluation method, terminal, system and storage medium
CN111859896A (en) Formula document detection method and device, computer readable medium and electronic equipment
CN117235137B (en) Professional information query method and device based on vector database
CN112819205B (en) Method, device and system for predicting working hours
CN115905456B (en) Data identification method, system, equipment and computer readable storage medium
CN112837148B (en) Risk logic relationship quantitative analysis method integrating domain knowledge
CN111402012B (en) E-commerce defective product identification method based on transfer learning
CN117009528A (en) Business processing method, device, equipment and medium based on natural language processing
CN116894195A (en) Text similarity calculation method, device, computer equipment and storage medium

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