Method, device and equipment for searching medical image and storage medium

By encoding the feature vectors of medical images to generate an inverted list, the problems of slow search speed and large storage space caused by high-dimensional feature vectors are solved, and more efficient medical image search is achieved.

CN114282025BActive Publication Date: 2025-10-21TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111051931.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-08
Publication Date
2025-10-21
Estimated Expiration
2041-10-06

AI Technical Summary

Technical Problem

In existing technologies, medical image search is slow and occupies a large amount of memory storage space, mainly due to the high computing resource requirements during feature extraction and search of high-dimensional feature vectors.

Method used

By encoding the feature vectors of candidate medical images, low-dimensional candidate encoding vectors are generated, and an inverted list is constructed based on the encoding vectors to reduce the memory storage space and computational complexity required during the search process, and the inverted list is used to quickly locate similar medical images.

Benefits of technology

It improves the speed and efficiency of medical image search, reduces memory storage space usage, and maintains the accuracy of search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114282025B_ABST
    Figure CN114282025B_ABST
Patent Text Reader

Abstract

The application discloses a medical image searching method, device and equipment and a storage medium, and relates to the field of artificial intelligence. The method comprises the following steps: obtaining a target feature vector of a target medical image, wherein the target feature vector is obtained by performing feature extraction on the target medical image; encoding the target feature vector to obtain a target encoding vector, wherein the vector length of the target encoding vector is smaller than that of the target feature vector; determining a target inverted list from an inverted list based on the target feature vector, wherein the inverted list comprises candidate encoding vectors corresponding to candidate medical images, and different inverted lists correspond to different candidate medical images; searching for a similar encoding vector of the target encoding vector from the target inverted list based on the target encoding vector; and determining a similar medical image of the target medical image based on the similar encoding vector. The scheme provided in the application embodiment improves the searching speed of the medical image, reduces the memory storage space occupied in the searching process, and guarantees the searching accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of artificial intelligence, and in particular to a medical image search method, apparatus, device, and storage medium. Background Art

[0002] Medical image search refers to the process of searching for similar medical images from a database based on a given medical image, and has high requirements for search accuracy and speed.

[0003] In related technologies, before implementing medical image search, a feature extraction model is first trained using machine learning to extract features from images. This model is then used to extract features from medical images in a database, generating high-dimensional feature vectors corresponding to the medical images. During the medical image search, a computer device uses the feature extraction model to extract features from the target medical image and calculates similarity between the extracted target feature vectors and the high-dimensional feature vectors in the database. Ultimately, similar medical images are identified based on vector similarity.

[0004] However, since the database contains a massive amount of medical images and the image features extracted by the feature extraction model have high dimensions, the speed of medical image search in related technologies is slow and requires memory storage space. Summary of the Invention

[0005] The embodiments of the present application provide a medical image search method, apparatus, device, and storage medium that can improve the search speed of medical images while ensuring search accuracy and reduce the memory storage space occupied during the search process. The technical solution is as follows:

[0006] In one aspect, an embodiment of the present application provides a method for searching medical images, the method comprising:

[0007] Acquire a target feature vector of a target medical image, where the target feature vector is obtained by performing feature extraction on the target medical image;

[0008] Encoding the target feature vector to obtain a target encoding vector, wherein a vector length of the target encoding vector is smaller than a vector length of the target feature vector;

[0009] Determining a target inverted list from the inverted lists based on the target feature vector, wherein the inverted lists contain candidate encoding vectors corresponding to candidate medical images, and different inverted lists correspond to different candidate medical images;

[0010] Based on the target code vector, searching the target inverted list for a similar code vector to the target code vector;

[0011] A similar medical image to the target medical image is determined based on the similarity encoding vector.

[0012] In another aspect, an embodiment of the present application provides a medical image search device, the device comprising:

[0013] A first acquisition module is used to acquire a target feature vector of a target medical image, where the target feature vector is obtained by performing feature extraction on the target medical image;

[0014] a first encoding module, configured to encode the target feature vector to obtain a target encoding vector, wherein the vector length of the target encoding vector is smaller than the vector length of the target feature vector;

[0015] a determination module, configured to determine a target inverted list from the inverted lists based on the target feature vector, wherein the inverted lists contain candidate encoding vectors corresponding to candidate medical images, and different inverted lists correspond to different candidate medical images;

[0016] A search module, configured to search, based on the target code vector, for a similar code vector to the target code vector from the target inverted list;

[0017] A determination module is configured to determine similar medical images of the target medical image based on the similar coding vector.

[0018] On the other hand, an embodiment of the present application provides a computer device, which includes a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the medical image search method as described in the above aspects.

[0019] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the medical image search method as described in the above aspects.

[0020] In another aspect, embodiments of the present application provide a computer program product or computer program, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the medical image search method provided in the above aspects.

[0021] In an embodiment of the present application, a candidate coding vector is obtained by encoding the feature vector of a candidate medical image, and an inverted list is generated based on the candidate coding vector, so that when a medical image search is subsequently performed, the target feature vector of the target medical image is encoded, and a target inverted list is determined based on the target feature vector, so that a similar coding vector search is performed in the target inverted list based on the encoded target coding vector, and finally a similar medical image is determined based on the searched similar coding vector; since the vector length of the coding vector is smaller than the vector length of the original feature vector, the memory storage space occupied during the search process is smaller, and the amount of computation during the search process is lower, which helps to improve the efficiency of the image search; in addition, the target inverted list is first determined during the search process, so that subsequent searches only need to be performed in the target inverted list, which further reduces the amount of computation during the search process compared to the global search, thereby improving the efficiency of the image search. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0023] Figure 1 is a schematic diagram of a medical image search method shown in an exemplary embodiment of the present application;

[0024] Figure 2 is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;

[0025] Figure 3 A flowchart of a medical image search method provided by an exemplary embodiment of the present application is shown;

[0026] Figure 4 A flowchart of a medical image search preparation process provided by an exemplary embodiment of the present application is shown;

[0027] Figure 5 is a schematic diagram illustrating an implementation of a clustering process according to an exemplary embodiment of the present application;

[0028] Figure 6 1 is a schematic diagram illustrating an implementation of a feature vector encoding process according to an exemplary embodiment of the present application;

[0029] Figure 7 is a k-nearest neighbor graph shown in an exemplary embodiment of the present application;

[0030] Figure 81 is a schematic diagram illustrating an implementation of a posting list generation process and a search process according to an exemplary embodiment of the present application;

[0031] Figure 9 A flowchart of a medical image search method provided by another exemplary embodiment of the present application is shown;

[0032] Figure 10 is a structural block diagram of a medical image search device provided by an exemplary embodiment of the present application;

[0033] Figure 11 A schematic structural diagram of a computer device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION

[0034] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0035] Artificial Intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also involves studying the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.

[0036] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0037] Computer vision is the study of how machines can "see." Specifically, it refers to the use of cameras and computers to replace the human eye in identifying, tracking, and measuring objects. This involves further processing the images, transforming them into images more suitable for human observation or transmission to instruments. As a scientific discipline, computer vision studies related theories and technologies, aiming to build artificial intelligence systems capable of extracting information from images or multidimensional data. Computer vision technologies typically include image processing, image recognition, image semantic understanding, image retrieval, optical character recognition (OCR), video processing, video semantic understanding, video content / action recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping, autonomous driving, and smart transportation. It also includes common biometric recognition technologies such as facial recognition and fingerprint recognition.

[0038] Image feature extraction is a crucial step in achieving specific functions, and the quality of the extracted image features directly impacts the quality of the function. For example, when performing image recognition, high-quality extracted image features help improve the accuracy of subsequent image recognition; when performing similar image searches, high-quality extracted image features help improve the comprehensiveness of search results and reduce the probability of finding non-similar images.

[0039] In related technologies, in order to improve the quality of feature extraction, a supervised model training method is usually used to train a feature extraction model, and then the trained feature extraction model is used to extract image features to obtain a high-dimensional feature vector.

[0040] While high-dimensional feature vectors can improve the quality of subsequent functions, they also pose significant challenges to storage and computational complexity. For example, when implementing similar medical image search based on high-dimensional feature vectors, storing the high-dimensional feature vectors of medical images requires a large amount of storage space. Furthermore, during the search process, operating on the massive number of high-dimensional feature vectors consumes significant computing resources and memory storage space, resulting in slower medical image search speeds.

[0041] In order to improve the search speed of medical images and reduce the memory storage space occupied during the search process while ensuring the accuracy of medical image search, the embodiment of the present application provides a medical image search method based on "vector encoding + inverted list". Figure 1As shown, in the preparation stage, for each candidate medical image 11 in the data base, the feature extraction model is first used to extract features of the candidate medical image 11 to obtain a high-dimensional candidate feature vector 12, and then the candidate feature vector 12 is encoded to obtain a low-dimensional candidate encoding vector 13, and the candidate encoding vector 13 is added to the corresponding inverted list 14 based on the candidate feature vector 12, wherein the similarity of the candidate medical images in the same inverted list is higher than the similarity of the medical images in different inverted lists.

[0042] During the search phase, the computer device first extracts features from the target medical image 15 to be searched using a feature extraction model to obtain a high-dimensional target feature vector 16. The target feature vector 16 is then encoded to obtain a low-dimensional target encoding vector 17. To avoid a global search and improve search efficiency, the computer device determines a target inverted list from a number of inverted lists 14 based on the target feature vector 16, searches for a similar encoding vector 18 from the target inverted list based on the target encoding vector 17, and then determines a similar medical image 19 based on the similar encoding vector 18.

[0043] When searching for similar images based on the coding vectors stored in the inverted list, since the vector length of the coding vector is smaller than the vector length of the original feature vector, the memory storage space occupied during the search process is smaller, and the amount of computation during the search process is lower, which helps to improve the efficiency of image search; in addition, after adding the candidate coding data to the inverted list, subsequent searches only need to be performed in the target inverted list, which further reduces the amount of computation during the search process compared to global search and improves the efficiency of image search.

[0044] Figure 2 A schematic diagram of an implementation environment provided by an exemplary embodiment of the present application is shown. The implementation environment includes a terminal 210 and a server 220. Data communication between the terminal 210 and the server 220 is performed via a communication network. Optionally, the communication network can be a wired network or a wireless network, and the communication network can be at least one of a local area network, a metropolitan area network, and a wide area network.

[0045] The terminal 210 is an electronic device that has a medical image search requirement. The electronic device may be a smart phone, a tablet computer, a personal computer, or a vehicle-mounted terminal, etc., and this embodiment does not limit this. Figure 2 In the embodiment, the terminal 210 is used as a computer used by medical personnel. The electronic device can also be applied to medical vehicles.

[0046] In some embodiments, an application with a medical image search function is installed in terminal 210. When a similar medical image search is required, the user enters the target medical image to be searched into the application, which then uploads the target medical image to server 220. Server 220 then performs a similar medical image search and feeds the search results back to terminal 210.

[0047] Server 220 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0048] In some embodiments, the server 220 is configured to provide a medical image search service for an application installed in the terminal 210. Optionally, after receiving the target medical image uploaded by the terminal 210, the server 220 first performs feature extraction using a feature extraction model 221 to obtain a target feature vector 222, and then encodes the target feature vector 222 to obtain a target encoding vector 223. The server 220 pre-extracts features and encodes the candidate medical images in the medical image database, and adds the encoded candidate encoding vectors to the posting list 224. When performing an image search, the server 220 determines a similar encoding vector 225 by calculating the vector distance between the target encoding vector 223 and the candidate encoding vectors in the posting list 224. Furthermore, based on the similar encoding vector 225, the server 220 determines a similar medical image 226, and feeds the similar encoding vector 226 back to the terminal 210 for display by the terminal 210.

[0049] Of course, in other possible implementations, the feature extraction, encoding, and search processes can be performed locally by the terminal 210 without the need for the server 220. Alternatively, feature extraction can be performed locally by the terminal 210, while the encoding and search processes can be performed by the server 220. This embodiment is not limited to this. For ease of description, the following embodiments illustrate the medical image search method performed by a computer device as an example.

[0050] Figure 3 A flowchart of a medical image search method provided by an exemplary embodiment of the present application is shown. This embodiment uses the method applied to a computer device as an example to illustrate the method, which includes the following steps.

[0051] Step 301 : Obtain a target feature vector of a target medical image. The target feature vector is obtained by performing feature extraction on the target medical image.

[0052] In one possible implementation, upon receiving a similar image search request for a target medical image, the computer device extracts features from the target medical image using a pre-trained feature extraction model to obtain a target feature vector. The target feature vector is a high-dimensional feature vector, for example, a 1024-dimensional vector with 32 bits per dimension (i.e., a 1024-dimensional floating-point feature vector).

[0053] In order to ensure the accuracy of the search results, the feature extraction model used in the search process is consistent with the feature extraction model used in the preparation stage to extract features from the candidate medical images in the medical image database.

[0054] Optionally, the feature extraction model may be a convolutional neural network model or other models that can be used for image feature extraction, which is not limited in the embodiments of the present application.

[0055] Step 302: Encode the target feature vector to obtain a target encoded vector, where the vector length of the target encoded vector is smaller than the vector length of the target feature vector.

[0056] In order to reduce the amount of computation in the subsequent image search process, the computer device encodes the target feature vector to obtain a low-dimensional target encoding vector. This encoding process can be understood as a dimensionality reduction process.

[0057] In some embodiments, the dimension of the target encoding vector is lower than the dimension of the target feature vector. For example, the dimension of the target encoding vector is 8 dimensions, and the dimension of the target feature vector is 1024 dimensions.

[0058] Optionally, the data length of each dimension in the target encoding vector is lower than the data length of each dimension in the target feature vector. For example, the data length of each dimension in the target encoding vector is 8 bits, and the data length of each dimension in the target feature vector is 32 bits.

[0059] Overall, after encoding, the target encoding vector has a smaller length than the target feature vector, meaning the target encoding vector has a smaller data size than the target feature vector. For example, the target feature vector has a data size of 1024 × 32 bits, while the target encoding vector has a data size of 8 × 8 bits, resulting in a compression ratio of 512 times.

[0060] In order to ensure the accuracy of the search results, the encoding method used for the target encoding vector is consistent with the encoding method used for the candidate feature vectors corresponding to the candidate medical images in the preparation stage.

[0061] Step 303 : determining a target posting list from the posting lists based on the target feature vector, wherein the posting list contains candidate encoding vectors corresponding to the candidate medical images, and different posting lists correspond to different candidate medical images.

[0062] In one possible implementation, the computer device pre-extracts and encodes features of candidate medical images in a medical image database to obtain candidate encoding vectors corresponding to each candidate medical image. To avoid having to traverse the candidate encoding features corresponding to all candidate medical images during the search process, the computer device also adds the candidate encoding vectors to a posting list during the preparatory phase. This allows the computer device to first identify a target posting list from a large number of posting lists during the search, thereby narrowing the image search scope and improving search efficiency.

[0063] Optionally, the inverted list is composed of an inverted list header and table entries, and the table entries include candidate coding vectors.

[0064] Optionally, in the preparation stage, the computer device adds the corresponding candidate encoding vector of the candidate medical image to the corresponding inverted list based on the candidate feature vector of the candidate medical image (that is, the candidate medical images corresponding to different inverted lists are different); correspondingly, in the search stage, the computer device determines the target inverted list from a large number of inverted lists based on the target feature vector of the target medical image.

[0065] The number of the target posting lists is at least one, which is not limited in this embodiment.

[0066] Step 304: Based on the target code vector, search the target inverted list for code vectors similar to the target code vector.

[0067] In related technologies, computers determine image similarity by calculating the vector distance between corresponding feature vectors. However, in this embodiment, since code vectors are used to approximate feature vectors, the computer can approximate the vector distance between code vectors to the vector distance between feature vectors, thereby determining image similarity. Because the vector length of code vectors is much smaller than that of feature vectors, the computational complexity of searches based on code vectors is reduced, allowing more search tasks to be completed in the same amount of time.

[0068] In one possible embodiment, for each candidate coding vector in the target inverted list, the computer device determines the vector distance between the candidate coding vector and the target coding vector (the smaller the vector distance, the higher the similarity between the images), thereby determining the candidate coding vector whose vector distance is less than the distance threshold as a similar coding vector.

[0069] Step 305 : Determine similar medical images of the target medical image based on the similar coding vectors.

[0070] Furthermore, the computer device retrieves similar medical images of the target medical image from a medical image database based on the similar coding vectors. In some embodiments, the computer device determines the candidate medical image corresponding to the similar coding vector as the target medical image. Alternatively, the computer device further filters the similar coding vectors and determines the candidate medical image corresponding to the filtered similar coding vector as the target medical image.

[0071] In a possible implementation, the computer device feeds back the determined similar medical images. For example, the server feeds back the determined similar medical images to the terminal so that the terminal can display the search results of similar medical images.

[0072] To summarize, in an embodiment of the present application, a candidate coding vector is obtained by encoding the feature vector of a candidate medical image, and an inverted list is generated based on the candidate coding vector, so that when a medical image search is subsequently performed, the target feature vector of the target medical image is encoded, and a target inverted list is determined based on the target feature vector, so that a similar coding vector search is performed in the target inverted list based on the encoded target coding vector, and finally a similar medical image is determined based on the searched similar coding vector; since the vector length of the coding vector is smaller than the vector length of the original feature vector, the memory storage space occupied during the search process is smaller, and the amount of computation during the search process is lower, which helps to improve the efficiency of the image search; in addition, the target inverted list is first determined during the search process, so that subsequent searches only need to be performed in the target inverted list, which further reduces the amount of computation during the search process compared to the global search, thereby improving the efficiency of the image search.

[0073] In order to improve the search speed in the search phase, the computer device needs to perform feature extraction, vector encoding, and posting list generation in the preparation phase. The above process is explained below through an exemplary embodiment.

[0074] Figure 4 The flowchart of the medical image search preparation process of an exemplary embodiment of the present application is shown. The process includes the following steps.

[0075] Step 401: Obtain a sample feature vector of a sample medical image.

[0076] In one possible implementation, the computer device randomly selects sample medical images from a medical image database and obtains a sample feature vector for each sample medical image; or, the computer device obtains sample medical images from outside the medical image database and performs feature extraction on the sample medical images to obtain a sample feature vector. This embodiment does not limit this.

[0077] Step 402: Divide the sample feature vector into n sample feature sub-vectors.

[0078] In one possible implementation, the computer device encodes the feature vector using a product quantization method. During encoding, the computer device first divides the sample feature vector into n vector spaces to obtain n sample feature subvectors. Each sample feature subvector has the same dimension, being one-nth of the sample feature vector.

[0079] In some embodiments, in order to ensure the search accuracy, it is necessary to avoid too few divisions of the sample feature sub-vectors. Figure 5 As shown, the computer device divides the 1024-dimensional sample feature vector 501 into eight 128-dimensional sample sub-vectors. It should be noted that this embodiment only uses the division into eight sample feature sub-vectors as an example for explanation. Developers can set the number of divisions based on the dimensions of the sample feature vector and the search accuracy requirements. This embodiment does not limit this.

[0080] Step 403 : clustering the sample feature subvectors corresponding to the sample medical images in the same vector space to obtain i cluster centers of the vector space.

[0081] Since similar features are clustered in the same vector space, in an embodiment of the present application, the computer device clusters the sample feature sub-vectors in the same vector space to obtain several cluster centers, determines the cluster centers to which the sample feature sub-vectors belong, and uses the cluster centers to which they belong to replace the sample feature sub-vectors, thereby achieving the effect of reducing the amount of data.

[0082] In one possible implementation, the computer device uses a k-means clustering algorithm to cluster the sample feature subvectors in the same vector space to obtain i cluster centers. The embodiment of the present application does not limit the specific clustering algorithm.

[0083] The cluster centers are represented in the same format as the sample feature vectors. For example, if the sample feature vector is a 128-dimensional floating-point vector (128×32 bits), the cluster centers are also 128-dimensional floating-point vectors. The number of cluster centers is set by the developer and should not be too small to ensure search accuracy.

[0084] Indicative, such as Figure 5 As shown, the computer device clusters the sample feature subvectors 502 in the same vector space to obtain 256 cluster centers 503. It should be noted that this embodiment only uses 256 cluster centers corresponding to each vector space as an example for description. Developers can set the number of cluster centers based on search accuracy requirements (for example, 512 cluster centers or 128 cluster centers), and this embodiment does not limit this.

[0085] Optionally, after determining the cluster centers in the vector space, the computer device assigns a center identifier to each cluster center. For example, when the number of cluster centers is 256, the center identifiers of the cluster centers range from 0 to 255, occupying 8 bits.

[0086] Step 404 : Encode the candidate feature vector of the candidate medical image based on the cluster center to obtain a candidate encoding vector. The candidate feature vector is obtained by extracting features from the candidate medical image, and the vector length of the candidate encoding vector is less than the vector length of the candidate feature vector.

[0087] Furthermore, the computer device encodes the candidate feature vectors of the candidate medical images in the medical image base based on the cluster center to obtain a candidate encoding vector corresponding to each candidate medical image. In one possible implementation, the process of encoding the candidate medical images may include the following steps:

[0088] 1. Divide the candidate feature vector into n candidate feature sub-vectors.

[0089] Similar to the above step 402 , the computer device divides the candidate feature vector into n candidate feature sub-vectors.

[0090] Indicatively, in Figure 5 On the basis of Figure 6 As shown, when the candidate feature vector 601 is 1024×32 bits (1024-dimensional floating-point vector), the computer device divides the candidate feature vector 601 into 8 candidate feature sub-vectors of 128×32 bits (128-dimensional floating-point vector).

[0091] 2. Determine the target cluster center corresponding to the mth candidate feature subvector from the i cluster centers in the vector space to which the mth candidate feature subvector belongs, where m is a positive integer less than or equal to n.

[0092] In this embodiment, when encoding a candidate feature vector, the computer device replaces the candidate feature subvector with the cluster center to which the candidate feature subvector belongs. In one possible implementation, for the mth candidate feature subvector among n candidate feature subvectors, the computer device calculates the distance between the mth candidate feature subvector and each cluster center in the vector space to which it belongs, thereby determining the cluster center corresponding to the minimum distance as the target cluster center corresponding to the mth feature subvector. The distance between the candidate feature subvector and the cluster center can be represented by cosine distance, Mahalanobis distance, etc., which is not limited in this embodiment.

[0093] Illustratively, the computer device determines the target cluster center from 256 cluster centers by calculating the vector distance between two 128-dimensional floating-point vectors (one is the candidate feature subvector and the other is the cluster center).

[0094] 3. Determine the target center identifier corresponding to each of the n target cluster centers.

[0095] Furthermore, after determining the target cluster center, the computer device obtains the target center identifier corresponding to the target cluster center, and subsequently uses the target center identifier to replace the candidate feature sub-vectors corresponding to each vector dimension to achieve the effect of data compression.

[0096] In an illustrative example, a computer device determines eight target cluster centers in eight vector spaces, and obtains eight target center identifiers, which are 245, 112, 31, 20, 11, 9, 204, and 94, respectively.

[0097] 4. Determine the vector composed of n target center identifiers as the candidate encoding vector.

[0098] The computer device determines the vector formed by the n target center identifiers as a candidate encoding vector based on the order of each vector space. Combining the example of the above steps, the candidate encoding vector is [245, 112, 31, 20, 11, 9, 204, 94].

[0099] Indicative, such as Figure 6 As shown, since the center identifier of each cluster center 603 occupies 8 bits, the candidate encoding vector finally generated is 8×8 bits. Compared with the 1024-dimensional floating-point candidate feature vector 601, the data volume is greatly compressed.

[0100] Step 405: Add the candidate encoding vector to the posting list.

[0101] In order to improve the subsequent image search speed, the computer device needs to further add the candidate coding vectors to the divided multiple posting lists. In a possible implementation, this step may include the following steps.

[0102] 1. Cluster the candidate feature vectors and generate j posting list headers based on the clustering results, where j is an integer greater than or equal to 2.

[0103] In one possible implementation, a computer device clusters the candidate feature vectors to obtain several cluster centers, and then uses the central feature vector corresponding to each cluster center as a posting list header. When a candidate encoding vector is subsequently added to the posting list, the posting list to which the candidate encoding vector belongs is determined based on the distance between the candidate feature vector and the posting list header.

[0104] The representation form of the posting list header is the same as that of the candidate feature vector. For example, when the candidate feature vector is a 1024-dimensional floating-point vector, the posting list header is also a 1024-dimensional floating-point vector.

[0105] 2. Construct a k-nearest neighbor graph based on the j postings list headers. The k-nearest neighbor graph is used to represent the k-nearest neighbor relationships between the postings list headers, where k is an integer greater than or equal to 2.

[0106] Since there may be a large number of postings lists (possibly on the order of 100,000), traversing these massive lists one by one during the search process to determine the target postings list would require a large amount of computation, affecting image search efficiency (adding candidate feature vectors to the postings list also takes a long time). To increase the speed of determining the target postings list during the search process, in this embodiment, the computer device constructs a k-nearest neighbor graph based on the j identified postings list headers, so that the speed of subsequently determining the target postings list can be increased based on this k-nearest neighbor graph.

[0107] The k-nearest-neighbor graph contains j nodes, corresponding to j inverted list headers, and the lines between the nodes are used to represent the neighbor relationship.

[0108] Indicative, such as Figure 7 As shown, when there are 9 nodes (ABCDEFGHI) and k=3, when generating the k-nearest neighbor graph, node A is added first. Since there is no other node, there is no need to connect the nodes; after adding node B, since only node A currently exists, nodes A and B need to be connected; after adding node C, since nodes A and B exist, nodes C and B, as well as nodes C and A need to be connected; after adding node D, since nodes A, B, and C exist, nodes D and A, nodes D and B, and nodes D and C need to be connected; after adding node E, since nodes A, B, C, and D exist, it is necessary to determine the three nodes closest to node E, namely nodes A, C, and D, so as to connect nodes E and A, nodes E and C, and nodes E and D; after adding node F, since nodes A, B, C, D, and E exist, it is necessary to determine the three nodes closest to node F, namely nodes C, D, and E, so as to connect nodes F and C, nodes F and D, and nodes F and E. And so on, until the addition of node I is completed.

[0109] 3. Add the candidate encoding vectors to the inverted list based on the k-nearest neighbor graph.

[0110] Furthermore, after completing the construction of the k-nearest neighbor graph, the computer device determines the posting list header closest to the candidate feature vector based on the neighbor relationship indicated by the k-nearest neighbor graph, and then adds the candidate encoding vector corresponding to the candidate feature vector to the posting list corresponding to the posting list header.

[0111] In one possible implementation, the computer device randomly determines a first postings list header from the k-nearest neighbor graph, and determines a first candidate postings list header connected to the first postings list header (i.e., there is a connection between the nodes). Then, based on the distance between the first candidate postings list header and the candidate feature vector, the computer device selects the first candidate postings list header with the closest distance to the candidate feature vector as the second postings list header. Further, the computer device determines a second candidate postings list header connected to the second postings list header (i.e., there is a connection between the nodes). Then, based on the distance between the second candidate postings list header and the candidate feature vector, the computer device selects the second candidate postings list header with the closest distance to the candidate feature vector as the third postings list header. This process is repeated until the postings list header with the closest distance to the candidate feature vector is determined.

[0112] Indicative, such as Figure 7 As shown, for candidate feature vector P, the computer device determines inverted list header H as the first inverted list header, and determines inverted list header CFIG as the first candidate inverted list header. Since the distance between inverted list header C and candidate feature vector P is the shortest, the computer device determines inverted list header C as the second inverted list header. Further, the computer device determines inverted list header AEDB as the second candidate inverted list header (inverted list header FGH has been calculated and is therefore excluded). Since the distance between inverted list header B and candidate feature vector P is the shortest, the computer device determines inverted list header B as the third inverted list header. Since the distances between the other inverted list headers connected to inverted list header B and candidate feature vector P are all greater than the distance between inverted list header B and candidate feature vector P, inverted list header B is the inverted list header corresponding to candidate feature vector P.

[0113] Correspondingly, during the image search process, when determining the target posting list, the computer device does not need to traverse all posting list headers one by one, but instead determines the target posting list from the posting lists based on the target feature vector and the k-nearest neighbor graph.

[0114] In one possible implementation, the computer device determines a target postings list header from j postings list headers based on the target feature vector and the k-nearest neighbor graph, where the distance between the target postings list header and the target feature vector is smaller than the distances between other postings list headers and the target feature vector; thereby determining the postings list corresponding to the target postings list header as the target postings list.

[0115] Optionally, the computer device uses a random node in the k-nearest neighbor graph as a starting point and, based on the neighbor relationships between the nodes, step-by-step determines the target node closest to the target feature vector, thereby determining the target postings header. The specific determination process can be referred to the above embodiment and will not be repeated in this embodiment.

[0116] In an illustrative example, Figure 8 As shown, in the preparation phase, the computer device determines the posting list header 83 corresponding to the candidate feature vector 81 from the massive posting list headers 83 based on the k-nearest neighbor graph 82, and adds the encoded candidate code vector 85 to the corresponding posting list 84. In the search phase, the computer device determines the target posting list header corresponding to the target feature vector 86 from the massive posting list headers 83 based on the k-nearest neighbor graph 82, and based on the encoded target code vector 87, searches the target posting list corresponding to the target posting list header to obtain a similar code vector 88.

[0117] In this embodiment, the computer device divides the feature vector and clusters the feature sub-vectors after division to determine the cluster center in each vector space, and then uses the center identifier in the cluster to replace the feature sub-vector to obtain the encoding vector corresponding to the feature vector, thereby achieving data compression, helping to reduce the occupied storage space, and improving the speed of subsequent image searches based on the encoding vector.

[0118] In addition, in this embodiment, the computer device constructs a posting list header based on the clustering results of the feature vectors, and further constructs a k-nearest neighbor graph based on the posting list header, so that when performing subsequent image searches, the computer device can quickly determine the target posting list from the massive posting lists based on the k-nearest neighbor graph, further improving the speed of image searches.

[0119] The above embodiment describes the preparation process for medical image search. The following uses an exemplary embodiment to describe the actual image search process.

[0120] Figure 9 A flowchart of a medical image search method provided by another exemplary embodiment of the present application is shown. This embodiment uses the method applied to a computer device as an example to illustrate the method, which includes the following steps.

[0121] Step 901 : Obtain a target feature vector of a target medical image. The target feature vector is obtained by performing feature extraction on the target medical image.

[0122] The implementation of this step can refer to the above step 301, and will not be repeated here in this embodiment.

[0123] Step 902: Divide the target feature vector into n feature sub-vectors, where n is an integer greater than or equal to 2.

[0124] Similar to the encoding process in the preparation phase, when encoding the target feature vector, the computer device first divides the target feature vector into n vector spaces to obtain n target feature subvectors. Among them, each target feature subvector has the same dimension, which is one-nth of the target feature vector.

[0125] Illustratively, the computer device divides the 1024-dimensional target feature vector to obtain eight 128-dimensional target feature sub-vectors.

[0126] Step 903: Determine the target cluster center corresponding to the mth feature subvector from the i cluster centers in the vector space to which the mth feature subvector belongs. The distance between the mth feature subvector and the target cluster center is less than the distance between the mth feature subvector and other cluster centers, where m is a positive integer less than or equal to n.

[0127] In this embodiment, when encoding the target feature vector, the computer device replaces the target feature subvector with the cluster center to which the target feature subvector belongs. In one possible implementation, for the mth target feature subvector among the n target feature subvectors, the computer device calculates the distance between the mth target feature subvector and each cluster center in the vector space to which it belongs, thereby determining the cluster center corresponding to the minimum distance as the target cluster center corresponding to the mth target feature subvector. The distance between the target feature subvector and the cluster center can be represented by cosine distance, Mahalanobis distance, etc., which is not limited in this embodiment.

[0128] Illustratively, the computer device determines the target cluster center from the 256 cluster centers by calculating the vector distance between two 128-dimensional floating-point vectors (one is the target feature subvector and the other is the cluster center).

[0129] Step 904: Determine the target center identifier corresponding to each of the n target cluster centers.

[0130] Furthermore, after determining the target cluster center, the computer device obtains the target center identifier corresponding to the target cluster center, and subsequently uses the target center identifier to replace the target feature sub-vector corresponding to each vector dimension to achieve the effect of data compression.

[0131] In an illustrative example, a computer device determines eight target cluster centers in eight vector spaces, and obtains eight target center identifiers, which are 126, 117, 25, 24, 23, 35, 6, and 88, respectively.

[0132] Step 905: Determine the vector formed by the n target center identifiers as the target coding vector.

[0133] The computer device determines the vector formed by the n target center identifiers as the target encoding vector based on the order of each vector space. Combining the example of the above steps, the target encoding vector is [126, 117, 25, 24, 23, 35, 6, 88].

[0134] Step 906: Based on the target feature vector and the k-nearest neighbor graph, determine a target postings list header from the j postings list headers, where the distance between the target postings list header and the target feature vector is smaller than the distances between other postings list headers and the target feature vector.

[0135] Step 907: Determine the posting list corresponding to the target posting list header as the target posting list.

[0136] Step 908: Determine the vector distance between the target coding vector and each candidate coding vector in the target inverted list.

[0137] In a possible implementation, for each candidate coding vector in the target inverted list, the computer device calculates the vector distance between the target coding vector and the candidate coding vector in real time.

[0138] In another possible implementation, since the code vectors are composed of cluster identifiers of cluster centers, and the number of cluster centers in each vector space is known, the computer device can calculate the distances between cluster centers within the same vector space during the preparation phase to construct a cluster center distance table corresponding to that vector space. Accordingly, during the search phase, the computer device can quickly calculate the distances between the target code vector and candidate code vectors in each vector space by querying the cluster center distance table, eliminating the need for real-time calculations and further improving search speed.

[0139] Optionally, this step may include the following sub-steps:

[0140] 1. Obtain the cluster center distance table corresponding to each vector space. The cluster center distance table contains the distances between cluster centers in the same vector space.

[0141] Different vector spaces correspond to different cluster center distance tables. For example, when a feature vector is divided into eight feature subvectors during encoding, corresponding to eight vector spaces, the computer device can obtain eight cluster center distance tables. In an illustrative example, assuming there are 256 cluster centers, the cluster center distance table is shown in Table 1.

[0142] Table 1

[0143]

[0144] 2. Based on the cluster center distance table, determine the sub-vector distance between the target encoding sub-vector and the candidate encoding sub-vector in different vector spaces.

[0145] For the code sub-vectors in each vector space, the computer device determines the sub-vector distance between the target code sub-vector and the candidate code sub-vectors in the same vector space by querying the cluster center distance table.

[0146] Combining the examples in the above steps, the computer device queries dis0(126,245), dis1(117,112), dis2(25,31), dis3(24,20), dis4(23,11), dis5(35,9), dis6(6,204), and dis7(88,94) from the 8 cluster center distance tables respectively.

[0147] 3. Determine the vector distance between the target encoding vector and the candidate encoding vector based on the sub-vector distance.

[0148] Furthermore, the computer device determines a vector distance between the target coding vector and the candidate coding vector based on the n sub-vector distances.

[0149] Combined with the example in the above steps, the vector distance (d(pq(x),pq(y))) between the target encoding vector (pq(x)) and the candidate encoding vector (pq(y)) is (dis0(126,245) 2 +dis1(117,112) 2 +dis2(25,31) 2 +dis3(24,20) 2 +dis4(23,11) 2 +dis5(35,9) 2 +dis6(6,204) 2 +dis7(88,94)) 1 / 2 .

[0150] Step 909: Determine similar coding vectors based on vector distance.

[0151] In one possible implementation, the computer device determines candidate coding vectors whose vector distance is less than a distance threshold as similar coding vectors, or the computer device sorts the candidate coding vectors in ascending order based on the vector distance, thereby determining the topK candidate coding vectors as similar coding vectors.

[0152] Step 910 : Determine similar medical images to the target medical image based on the similar coding vectors.

[0153] In a possible implementation, the computer device directly determines the candidate medical image corresponding to the similar coding vector as a similar medical image to the target medical image.

[0154] In another possible embodiment, although the vector distance between the coding vectors can be approximated as the vector distance between the feature vectors, there is still an error between the two. Because in order to improve the search accuracy of similar images, the computer device obtains the candidate feature vector of the candidate medical image corresponding to the similar coding vector, and then calculates the vector distance between the candidate feature vector and the target feature vector.

[0155] In response to the vector distance being less than the distance threshold, the computer device determines the candidate medical image corresponding to the similar coding vector as a similar medical image to the target medical image. Since the screening has been performed based on the coding vector, the amount of computation required to calculate the vector distance between the feature vectors is significantly reduced.

[0156] In one possible embodiment, when feedback is required on the search results of similar images, the computer device obtains candidate feature vectors of the similar medical images and determines the image similarity between the target medical image and the similar medical image based on the vector distance between the candidate feature vector and the target feature vector.

[0157] In some embodiments, the computer device calculates a cosine distance between the candidate feature vector and the target feature vector, and determines the image similarity based on the cosine distance, wherein the image similarity is positively correlated with the cosine distance.

[0158] Furthermore, the computer device sorts the similar medical images based on image similarity, and then provides search result feedback based on the sorted similar medical images. Optionally, when providing search result feedback, the computer device may associate the image similarity with the similar medical images, so that the terminal can simultaneously display the similarity between the similar medical images and the target medical image when displaying the similar medical images.

[0159] Furthermore, in some embodiments, candidate coding vectors are associated with image identifiers and stored in entries of a posting list. To further enrich the medical image database, the computer device can assign an image identifier to a target medical image and generate a target entry based on the target coding vector and the image identifier of the target medical image, thereby adding the target entry to the target posting list. In subsequent image searches, the target medical image serves as a candidate medical image.

[0160] Figure 10 : is a structural block diagram of a medical image search device provided by an exemplary embodiment of the present application, the device comprising:

[0161] A first acquisition module 1001 is configured to acquire a target feature vector of a target medical image, where the target feature vector is obtained by performing feature extraction on the target medical image;

[0162] A first encoding module 1002 is configured to encode the target feature vector to obtain a target encoding vector, wherein the vector length of the target encoding vector is smaller than the vector length of the target feature vector;

[0163] A first determining module 1003 is configured to determine a target posting list from the posting lists based on the target feature vector, wherein the posting lists contain candidate encoding vectors corresponding to candidate medical images, and different posting lists correspond to different candidate medical images;

[0164] A search module 1004 is configured to search, based on the target code vector, for a code vector similar to the target code vector from the target inverted list;

[0165] The second determining module 1005 is configured to determine similar medical images of the target medical image based on the similar coding vectors.

[0166] Optionally, the first encoding module 1002 includes:

[0167] A first division unit is configured to divide the target feature vector into n feature sub-vectors, where n is an integer greater than or equal to 2;

[0168] a first determining unit, configured to determine a target cluster center corresponding to the m-th characteristic subvector from i cluster centers in the vector space to which the m-th characteristic subvector belongs, wherein a distance between the m-th characteristic subvector and the target cluster center is less than a distance between the m-th characteristic subvector and the other cluster centers, and m is a positive integer less than or equal to n;

[0169] A second determining unit is used to determine the target center identifier corresponding to each of the n target cluster centers;

[0170] The third determining unit is used to determine a vector composed of n target center identifiers as the target coding vector.

[0171] Optionally, the device further includes:

[0172] A second acquisition module is used to obtain a sample feature vector of a sample medical image;

[0173] A division module, configured to divide the sample feature vector into n sample feature sub-vectors;

[0174] A clustering module, configured to cluster the sample feature subvectors corresponding to the sample medical images in the same vector space to obtain i cluster centers in the vector space;

[0175] a second encoding module, configured to encode a candidate feature vector of the candidate medical image based on the cluster center to obtain the candidate encoding vector, wherein the candidate feature vector is obtained by performing feature extraction on the candidate medical image, and a vector length of the candidate encoding vector is smaller than a vector length of the candidate feature vector;

[0176] A first adding module is configured to add the candidate encoding vector to the inverted list.

[0177] Optionally, the first adding module includes:

[0178] a clustering unit, configured to cluster the candidate feature vectors and generate j posting list headers based on the clustering results, where j is an integer greater than or equal to 2;

[0179] a construction unit, configured to construct a k-nearest neighbor graph based on the j postings list headers, wherein the k-nearest neighbor graph is used to represent the k-nearest neighbor relationships between the postings list headers, where k is an integer greater than or equal to 2;

[0180] an adding unit, configured to add the candidate encoding vector to the posting list based on the k-nearest neighbor graph;

[0181] The first determining module 1003 is configured to:

[0182] The target posting list is determined from the posting lists based on the target feature vector and the k-nearest neighbor graph.

[0183] Optionally, the first determining module 1003 is specifically configured to:

[0184] Determining a target postings list header from the j postings list headers based on the target feature vector and the k-nearest neighbor graph, wherein a distance between the target postings list header and the target feature vector is smaller than a distance between other postings list headers and the target feature vector;

[0185] The posting list corresponding to the target posting list header is determined as the target posting list.

[0186] Optionally, the search module 1004 includes:

[0187] a fourth determining unit, configured to determine a vector distance between the target coding vector and each candidate coding vector in the target inverted list;

[0188] A fifth determining unit is configured to determine the similar coding vector based on the vector distance.

[0189] Optionally, the fourth determining unit is configured to:

[0190] Obtaining a cluster center distance table corresponding to each vector space, wherein the cluster center distance table includes distances between cluster centers in the same vector space;

[0191] Determining, based on the cluster center distance table, subvector distances between the target encoding subvector and the candidate encoding subvectors in different vector spaces;

[0192] A vector distance between the target encoding vector and the candidate encoding vector is determined based on the sub-vector distance.

[0193] Optionally, the second determining module 1005 includes:

[0194] a sixth determining unit, configured to determine the candidate medical image corresponding to the similar coding vector as a similar medical image to the target medical image;

[0195] or,

[0196] A seventh determination unit is used to obtain a candidate feature vector of the candidate medical image corresponding to the similar coding vector; calculate the vector distance between the candidate feature vector and the target feature vector; and in response to the vector distance being less than a distance threshold, determine the candidate medical image corresponding to the similar coding vector as a similar medical image of the target medical image.

[0197] Optionally, the device further includes:

[0198] A third acquisition module is used to obtain candidate feature vectors of the similar medical images;

[0199] The third determining module is configured to determine the image similarity between the target medical image and the similar medical image based on the vector distance between the candidate feature vector and the target feature vector.

[0200] Optionally, the device further includes:

[0201] a sorting module, configured to sort the similar medical images based on the image similarities;

[0202] A feedback module is used to provide search result feedback based on the sorted similar medical images.

[0203] Optionally, the candidate encoding vector is associated with the image identifier and stored in an entry of the inverted list;

[0204] The device further comprises:

[0205] an allocating module, configured to allocate an image identifier to the target medical image;

[0206] A generating module, configured to generate a target table entry based on the target coding vector and the image identifier of the target medical image;

[0207] The second adding module is configured to add the target entry to the target posting list.

[0208] To summarize, in an embodiment of the present application, a candidate coding vector is obtained by encoding the feature vector of a candidate medical image, and an inverted list is generated based on the candidate coding vector, so that when a medical image search is subsequently performed, the target feature vector of the target medical image is encoded, and a target inverted list is determined based on the target feature vector, so that a similar coding vector search is performed in the target inverted list based on the encoded target coding vector, and finally a similar medical image is determined based on the searched similar coding vector; since the vector length of the coding vector is smaller than the vector length of the original feature vector, the memory storage space occupied during the search process is smaller, and the amount of computation during the search process is lower, which helps to improve the efficiency of the image search; in addition, the target inverted list is first determined during the search process, so that subsequent searches only need to be performed in the target inverted list, which further reduces the amount of computation during the search process compared to the global search, thereby improving the efficiency of the image search.

[0209] It should be noted that the apparatus provided in the above embodiments is merely exemplified by the division of the above functional modules. In actual applications, the above functions can be distributed among different functional modules as needed, that is, the internal structure of the apparatus can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments are based on the same concept. The implementation process is detailed in the method embodiments and will not be repeated here.

[0210] Please refer to Figure 11 , which shows a schematic diagram of the structure of a computer device provided by an exemplary embodiment of the present application. Specifically, the computer device 1100 includes a central processing unit (CPU) 1101, a system memory 1104 including a random access memory 1102 and a read-only memory 1103, and a system bus 1105 connecting the system memory 1104 and the central processing unit 1101. The computer device 1100 also includes a basic input / output system (I / O system) 1106 that helps transmit information between various components within the computer, and a mass storage device 1107 for storing an operating system 1113, application programs 1114, and other program modules 1115.

[0211] The basic input / output system 1106 includes a display 1108 for displaying information and an input device 1109 such as a mouse and keyboard for user input. The display 1108 and the input device 1109 are both connected to the central processing unit 1101 via an input / output controller 1110 connected to the system bus 1105. The basic input / output system 1106 may also include an input / output controller 1110 for receiving and processing input from a variety of other devices such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 1110 also provides output to a display screen, printer, or other types of output devices.

[0212] The mass storage device 1107 is connected to the central processing unit 1101 via a mass storage controller (not shown) connected to the system bus 1105. The mass storage device 1107 and its associated computer-readable media provide non-volatile storage for the computer device 1100. In other words, the mass storage device 1107 may include a computer-readable medium (not shown) such as a hard disk or drive.

[0213] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include random access memory (RAM), read-only memory (ROM), flash memory or other solid-state storage technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, tape cassette, magnetic tape, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage medium is not limited to the above-mentioned ones. The above-mentioned system memory 1104 and mass storage device 1107 can be collectively referred to as memory.

[0214] The memory stores one or more programs, and the one or more programs are configured to be executed by one or more central processing units 1101. The one or more programs contain instructions for implementing the above-mentioned methods. The central processing unit 1101 executes the one or more programs to implement the methods provided by the above-mentioned various method embodiments.

[0215] According to various embodiments of the present application, the computer device 1100 may also be connected to a remote computer on a network such as the Internet for operation. That is, the computer device 1100 may be connected to a network 1112 via a network interface unit 1111 connected to the system bus 1105. Alternatively, the network interface unit 1111 may be used to connect to other types of networks or remote computer systems (not shown).

[0216] The memory also includes one or more programs, which are stored in the memory and include steps executed by a computer device in the method provided in the embodiment of the present application.

[0217] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the medical image search method described in any of the above embodiments.

[0218] Optionally, the computer-readable storage medium may include: ROM, RAM, solid state drives (SSDs) or optical disks, etc. Among them, RAM may include resistance random access memory (ReRAM) and dynamic random access memory (DRAM).

[0219] Embodiments of the present application provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the medical image search method described in the above embodiments.

[0220] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0221] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A medical image search method, characterized in that: The method comprises: Obtaining a sample feature vector of a sample medical image; Dividing the sample feature vector into n sample feature sub-vectors, where n is an integer greater than or equal to 2; Clustering the sample feature subvectors corresponding to the sample medical images in the same vector space to obtain i cluster centers of the vector space; encoding a candidate feature vector of the candidate medical image based on the cluster center to obtain a candidate encoding vector, wherein the candidate feature vector is obtained by extracting features from the candidate medical image, and a vector length of the candidate encoding vector is less than a vector length of the candidate feature vector; Clustering the candidate feature vectors, and generating j posting list headers based on the clustering results, where j is an integer greater than or equal to 2; Constructing a k-nearest neighbor graph based on the j postings list headers, wherein the k-nearest neighbor graph is used to represent the k-nearest neighbor relationship between the postings list headers, where k is an integer greater than or equal to 2; Adding the candidate encoding vector to a posting list based on the k-nearest neighbor graph; Acquire a target feature vector of a target medical image, where the target feature vector is obtained by performing feature extraction on the target medical image; Dividing the target feature vector into n feature sub-vectors; Determine a target cluster center corresponding to the m-th eigenvector from i cluster centers in the vector space to which the m-th eigenvector belongs, wherein the distance between the m-th eigenvector and the target cluster center is less than the distance between the m-th eigenvector and the other cluster centers, where m is a positive integer less than or equal to n; Determine the target center identifier corresponding to each of the n target cluster centers; Determining a vector formed by the n target center identifiers as a target coding vector, wherein the vector length of the target coding vector is less than the vector length of the target feature vector; Determining a target inverted list from the inverted lists based on the target feature vector and the k-nearest neighbor graph, wherein the inverted lists contain candidate encoding vectors corresponding to candidate medical images, and different inverted lists correspond to different candidate medical images; Based on the target code vector, searching the target inverted list for a similar code vector to the target code vector; A similar medical image to the target medical image is determined based on the similarity encoding vector.

2. The method according to claim 1, characterized in that Determining a target posting list from the posting lists based on the target feature vector and the k-nearest neighbor graph includes: Determining a target postings list header from the j postings list headers based on the target feature vector and the k-nearest neighbor graph, wherein a distance between the target postings list header and the target feature vector is smaller than a distance between other postings list headers and the target feature vector; The posting list corresponding to the target posting list header is determined as the target posting list.

3. The method according to claim 1, characterized in that The step of searching the target inverted list for a similar code vector to the target code vector based on the target code vector includes: Determining a vector distance between the target encoding vector and each candidate encoding vector in the target inverted list; The similar encoding vectors are determined based on the vector distances.

4. The method according to claim 3, characterized in that Determining the vector distance between the target coding vector and each candidate coding vector in the target inverted list includes: Obtaining a cluster center distance table corresponding to each vector space, wherein the cluster center distance table includes distances between cluster centers in the same vector space; Determining, based on the cluster center distance table, subvector distances between the target encoding subvector and the candidate encoding subvectors in different vector spaces; A vector distance between the target encoding vector and the candidate encoding vector is determined based on the sub-vector distance.

5. The method according to any one of claims 1 to 4, characterized in that: The determining a similar medical image of the target medical image based on the similar coding vector includes: determining the candidate medical image corresponding to the similar coding vector as a similar medical image to the target medical image; or, Obtain a candidate feature vector of the candidate medical image corresponding to the similar coding vector; calculate a vector distance between the candidate feature vector and the target feature vector; and in response to the vector distance being less than a distance threshold, determine the candidate medical image corresponding to the similar coding vector as a similar medical image of the target medical image.

6. The method according to any one of claims 1 to 4, characterized in that: After determining a similar medical image of the target medical image based on the similar coding vector, the method further includes: Obtaining candidate feature vectors of the similar medical images; An image similarity between the target medical image and the similar medical image is determined based on a vector distance between the candidate feature vector and the target feature vector.

7. The method according to claim 6, characterized in that After determining the image similarity between the target medical image and the similar medical image, the method further includes: sorting the similar medical images based on the image similarities; Search result feedback is performed based on the sorted similar medical images.

8. The method according to any one of claims 1 to 4, characterized in that: The candidate coding vector is associated with the image identifier and stored in an entry of the inverted list; The method further comprises: assigning an image identifier to the target medical image; generating a target table entry based on the target coding vector and the image identifier of the target medical image; Add the target entry to the target posting list.

9. A medical image search device, characterized in that: The device comprises: A second acquisition module is used to obtain a sample feature vector of a sample medical image; a partitioning module, configured to partition the sample feature vector into n sample feature sub-vectors, where n is an integer greater than or equal to 2; A clustering module, configured to cluster the sample feature subvectors corresponding to the sample medical images in the same vector space to obtain i cluster centers of the vector space; a second encoding module, configured to encode a candidate feature vector of the candidate medical image based on the cluster center to obtain a candidate encoding vector, wherein the candidate feature vector is obtained by performing feature extraction on the candidate medical image, and a vector length of the candidate encoding vector is smaller than a vector length of the candidate feature vector; a first adding module, configured to cluster the candidate feature vectors, generate j posting list headers based on the clustering results, where j is an integer greater than or equal to 2; construct a k-nearest neighbor graph based on the j posting list headers, where the k-nearest neighbor graph is used to characterize the k-nearest neighbor relationships between the posting list headers, where k is an integer greater than or equal to 2; and add the candidate encoding vector to the posting list based on the k-nearest neighbor graph; A first acquisition module is used to acquire a target feature vector of a target medical image, where the target feature vector is obtained by performing feature extraction on the target medical image; A first encoding module is configured to divide the target feature vector into n feature sub-vectors; determine a target cluster center corresponding to the m-th feature sub-vector from i cluster centers in the vector space to which the m-th feature sub-vector belongs, wherein the distance between the m-th feature sub-vector and the target cluster center is less than the distance between the m-th feature sub-vector and other cluster centers, where m is a positive integer less than or equal to n; determine target center identifiers corresponding to each of the n target cluster centers; and determine a vector formed by the n target center identifiers as a target encoding vector, wherein the vector length of the target encoding vector is less than the vector length of the target feature vector; A first determining module is configured to determine a target posting list from the posting lists based on the target feature vector and the k-nearest neighbor graph, wherein the posting lists contain candidate encoding vectors corresponding to candidate medical images, and different posting lists correspond to different candidate medical images; A search module, configured to search, based on the target code vector, for a similar code vector to the target code vector from the target inverted list; The second determining module is configured to determine similar medical images of the target medical image based on the similar coding vector.

10. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the medical image search method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that The readable storage medium stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the medical image search method according to any one of claims 1 to 8.

12. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the medical image search method described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Massive image retrieval method based on multi-characteristic signature

    CN101859320A

  • Image retrieval method and device, equipment and storage medium

    CN113239226A