Resource comparison method and device, equipment, storage medium and program product

Through real-time image feature extraction and historical image feature retrieval, natural resource comparison is realized, the problems of high labor costs and low efficiency in the existing technology are solved, and automated monitoring and efficient resource comparison are realized.

CN118941811APending Publication Date: 2024-11-12INSPUR TIANYUAN COMM INFORMATION SYST CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410817343.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The existing natural resource comparison methods are costly and inefficient in human resources, and cannot effectively monitor changes in natural resources.

Method used

By obtaining the real-time image of the resource to be compared, performing feature extraction and historical image feature retrieval, using feature extraction models, instance segmentation models and information fusion models to obtain real-time image features, performing image comparisons to determine resource comparison results, and reducing manual intervention.

Benefits of technology

It is possible to effectively monitor changes in natural resources without manual participation, reduce labor costs, and improve resource comparison efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118941811A_ABST
    Figure CN118941811A_ABST
Patent Text Reader

Abstract

The invention provides a resource comparison method and device, equipment, a storage medium and a program product, and relates to the technical field of artificial intelligence, and the method comprises the steps: obtaining a real-time image of a to-be-compared resource; performing feature extraction on the real-time image to obtain real-time image features of the real-time image; performing retrieval based on the real-time image features, and determining historical image features of the to-be-compared resources; and performing image comparison based on the real-time image features and the historical image features to obtain a resource comparison result of the to-be-compared resources. Through the above mode, feature extraction is performed on the real-time image of the to-be-compared resource to obtain the real-time image feature of the real-time image, retrieval is performed based on the real-time image feature to determine the historical image feature of the to-be-compared resource, and image comparison is performed based on the real-time image feature and the historical image feature to obtain the resource comparison result of the to-be-compared resource. Manual natural resource comparison is not needed, the labor cost can be effectively reduced, and the natural resource comparison efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a resource comparison method, device, equipment, storage medium and program product. Background Art

[0002] Protecting natural resources is one of the key points of protecting the ecological environment. Sewage discharge, forest destruction, changes in land use and other behaviors will lead to the destruction of natural resources. Therefore, how to determine the changes in natural resources and audit them in a timely manner has become an urgent problem to be solved.

[0003] At present, in the audit work of natural resources, staff are required to conduct on-site comparisons based on the planning drawings of natural resources to obtain comparison results of natural resources: if the existing natural resources do not match the planning drawings, it means that the natural resources have been destroyed; if the existing natural resources are consistent with the planning drawings, it means that the natural resources have not been destroyed.

[0004] However, existing resource comparison methods are labor-intensive and inefficient. Summary of the invention

[0005] The present invention provides a resource comparison method, device, equipment, storage medium and program product, which are used to solve the defects of high labor cost and low efficiency of resource comparison methods in the prior art.

[0006] The present invention provides a resource comparison method, comprising: obtaining a real-time image of a resource to be compared; performing feature extraction on the real-time image to obtain real-time image features of the real-time image; performing retrieval based on the real-time image features to determine historical image features of the resource to be compared; performing image comparison based on the real-time image features and the historical image features to obtain a resource comparison result of the resource to be compared.

[0007] According to a resource comparison method provided by the present invention, feature extraction is performed on a real-time image to obtain real-time image features of the real-time image, including: inputting the real-time image into a feature extraction model to obtain image feature coding output by the feature extraction model; inputting the real-time image into an instance segmentation model to obtain instance feature coding output by the instance segmentation model; inputting the image feature coding and the instance feature coding into an information fusion model to obtain real-time image features of the real-time image output by the information fusion model; wherein the feature extraction model is trained based on sample images and sample image feature coding corresponding to the sample images; the instance segmentation model is trained based on sample images and sample instance feature coding corresponding to the sample images; and the information fusion model is trained based on sample image feature coding corresponding to the sample images, sample instance feature coding corresponding to the sample images, and image features corresponding to the sample images.

[0008] According to a resource comparison method provided by the present invention, a search is performed based on real-time image features to determine the historical image features of the resources to be compared, including: searching based on the real-time image features to obtain candidate historical image features of the resources to be compared; the number of candidate historical image features is at least two, and each candidate historical image feature is an image feature of a historical image of the resource to be compared; respectively determining the similarity between the real-time image feature and each candidate historical image feature; based on each similarity, determining the historical image feature of the resource to be compared; the historical image feature is the image feature with the highest similarity to the real-time image feature.

[0009] According to a resource comparison method provided by the present invention, before obtaining the real-time image of the resource to be compared, it also includes: obtaining the historical image of the resource to be compared; the number of historical images is at least two; performing feature extraction on the historical image to obtain candidate historical image features; and storing the candidate historical image features in a database.

[0010] According to a resource comparison method provided by the present invention, image comparison is performed based on real-time image features and historical image features to obtain resource comparison results of resources to be compared, including: inputting real-time image features and historical image features into a resource comparison model to obtain resource comparison results of resources to be compared output by the resource comparison model; wherein the resource comparison model is trained based on sample real-time image features, sample historical image features and sample resource comparison results.

[0011] According to a resource comparison method provided by the present invention, a real-time image of a resource to be compared is obtained, including: obtaining a real-time video of the resource to be compared; decoding and frame extraction processing the real-time video to obtain an initial real-time image of the resource to be compared; performing image correction processing on the initial real-time image to obtain a real-time image of the resource to be compared.

[0012] The present invention also provides a resource comparison device, including: an acquisition module, used to obtain a real-time image of a resource to be compared; a feature extraction module, used to extract features from the real-time image to obtain real-time image features of the real-time image; a retrieval module, used to perform retrieval based on the real-time image features to determine the historical image features of the resource to be compared; and a comparison module, used to perform image comparison based on the real-time image features and the historical image features to obtain a resource comparison result of the resource to be compared.

[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any one of the resource comparison methods described above is implemented.

[0014] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, any of the resource comparison methods described above is implemented.

[0015] The present invention also provides a computer program product, including a computer program, and when the computer program is executed by a processor, any one of the resource comparison methods described above is implemented.

[0016] The resource comparison method, device, equipment, storage medium and program product provided by the present invention obtain the real-time image of the resource to be compared; perform feature extraction on the real-time image to obtain the real-time image features of the real-time image; perform retrieval based on the real-time image features to determine the historical image features of the resource to be compared; perform image comparison based on the real-time image features and the historical image features to obtain the resource comparison results of the resource to be compared. Through the above-mentioned method, feature extraction is performed on the real-time image of the resource to be compared to obtain the real-time image features of the real-time image, and then the real-time image features are retrieved to determine the historical image features of the resource to be compared, and image comparison is performed based on the real-time image features and the historical image features to obtain the resource comparison results of the resource to be compared. There is no need to rely on manual comparison of natural resources, which can effectively reduce labor costs and improve the efficiency of natural resource comparison. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0018] Figure 1 This is one of the flow charts of the resource comparison method provided by the present invention.

[0019] Figure 2 It is a structural schematic diagram of the resource comparison system provided by the present invention.

[0020] Figure 3 This is the second flow chart of the resource comparison method provided by the present invention.

[0021] Figure 4 It is a structural schematic diagram of the resource comparison device provided by the present invention.

[0022] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] See also Figure 1 , Figure 1 This is one of the flow charts of the resource comparison method provided by the present invention. In this embodiment, the resource comparison method includes steps S110 to S140, and each step is specifically as follows: S110: Acquire a real-time image of the resource to be compared.

[0025] Specifically, natural resources are distributed over a wide area. Therefore, in order to improve the efficiency of natural resource comparison, real-time video of the resources to be compared can be taken by a drone, and the real-time video can be decoded and frame-extracted to obtain an initial real-time image of the resources to be compared. Since the initial real-time image will be affected by the drone's flight altitude, flight direction and shooting angle, it may affect subsequent image comparison. Therefore, the initial real-time image can be corrected by rotating, scaling, and perspective transformation operations to correct the initial real-time image, and the influence of the drone's flight altitude, flight direction and shooting angle can be filtered to obtain a real-time image of the resources to be compared.

[0026] S120: extracting features from the real-time image to obtain real-time image features of the real-time image.

[0027] S130: Search based on the real-time image features to determine the historical image features of the resource to be compared.

[0028] It is understandable that inspections and audits of natural resources are carried out regularly at preset time intervals. Even for resources to be compared in the same area, historical images of the resources to be compared from different periods may be stored in the database, that is, there may be multiple historical images of the resources to be compared. Therefore, it is necessary to retrieve the historical images suitable for this comparison from the database and perform the comparison based on the historical images.

[0029] Generally, historical images from the last inspection are selected for comparison.

[0030] Since the historical image at the last inspection is the most recent image of the resource to be compared, the similarity between the historical image at the last inspection and the real-time image is the highest, that is, the similarity between the image features of the historical image at the last inspection and the real-time image features is the highest. Based on this, a search can be performed in the database based on the real-time image features to retrieve the historical image features with the highest similarity to the real-time image features for resource comparison.

[0031] S140: Perform image comparison based on the real-time image features and the historical image features to obtain resource comparison results of the resources to be compared.

[0032] Real-time image features can reflect the real-time information of the resources to be compared, and historical image features can reflect the historical information of the resources to be compared. Based on the differences between real-time image features and historical image features, changes in the resources to be compared can be determined, and resource comparison results for the resources to be compared can be generated.

[0033] Understandably, depending on the different resources to be compared, the inspection business of natural resources can be divided into water resources monitoring, forest resources monitoring, land resources analysis, regional desertification analysis, etc.

[0034] The resource comparison method provided in this embodiment obtains a real-time image of the resource to be compared; performs feature extraction on the real-time image to obtain the real-time image features of the real-time image; performs retrieval based on the real-time image features to determine the historical image features of the resource to be compared; performs image comparison based on the real-time image features and the historical image features to obtain the resource comparison results of the resource to be compared. Through the above method, feature extraction is performed on the real-time image of the resource to be compared to obtain the real-time image features of the real-time image, and then the real-time image features are retrieved to determine the historical image features of the resource to be compared, and image comparison is performed based on the real-time image features and the historical image features to obtain the resource comparison results of the resource to be compared. There is no need to rely on manual comparison of natural resources, which can effectively reduce labor costs and improve the efficiency of natural resource comparison.

[0035] In some embodiments, feature extraction is performed on a real-time image to obtain real-time image features of the real-time image, including: inputting the real-time image into a feature extraction model to obtain image feature coding output by the feature extraction model; inputting the real-time image into an instance segmentation model to obtain instance feature coding output by the instance segmentation model; inputting the image feature coding and the instance feature coding into an information fusion model to obtain real-time image features of the real-time image output by the information fusion model; wherein the feature extraction model is trained based on sample images and sample image feature coding corresponding to the sample images; the instance segmentation model is trained based on sample images and sample instance feature coding corresponding to the sample images; and the information fusion model is trained based on sample image feature coding corresponding to the sample images, sample instance feature coding corresponding to the sample images, and image features corresponding to the sample images.

[0036] See also Figure 2 and Figure 3 , Figure 2 is a schematic diagram of the structure of the resource comparison system provided by the present invention, Figure 3 This is the second flow chart of the resource comparison method provided by the present invention.

[0037] like Figure 2 As shown, the resource comparison method of this embodiment can be applied to a resource comparison system, which includes a business application module, an intelligent analysis module, a data processing module and a data storage module.

[0038] Depending on the resources to be compared, the business application modules are used for water resource monitoring, forest resource monitoring, land resource analysis, regional desertification analysis, etc.

[0039] The data processing module is used for video preprocessing, image preprocessing and feature extraction.

[0040] The intelligent analysis module is used for instance segmentation, image retrieval and image comparison.

[0041] The data storage module is used for data storage, and is provided with a video database, an image database, a structured database and a fusion feature database.

[0042] like Figure 3 As shown, after obtaining the real-time video of the resource to be compared taken by the drone, preliminary video preprocessing can be performed on the real-time video, and the real-time video after preliminary video preprocessing can be stored in the video database; after further preprocessing such as decoding and frame extraction on the real-time video after preliminary video preprocessing, the initial real-time image of the resource to be compared can be obtained, and after image correction processing is performed on the initial real-time image, the real-time image of the resource to be compared can be obtained; the real-time image of the resource to be compared is stored in the image database.

[0043] Furthermore, the data processing module may perform feature extraction on the real-time image to obtain real-time image features of the real-time image.

[0044] Specifically, the real-time image is input into the feature extraction model to obtain the image feature coding output by the feature extraction model.

[0045] The feature extraction model is obtained by training based on the sample image and the sample image feature encoding corresponding to the sample image.

[0046] Image feature coding can reflect the geometric features, color features and other information of real-time images.

[0047] Optionally, the feature extraction model is any one of a ViT model, a CLIP model and a CNN model.

[0048] At the same time, the real-time image is input into the instance segmentation model to obtain the instance feature encoding output by the instance segmentation model.

[0049] Among them, the instance segmentation model is obtained by training based on sample images and sample instance feature encoding corresponding to the sample images.

[0050] Instance feature encoding can reflect the instance type, location and other information of the real-time image.

[0051] Instance types include various natural resources, animals, people, objects, etc.

[0052] Preferably, movable targets (such as people, animals, vehicles, etc.) in the instance types are filtered, and the filtered instance types are replaced with background instances to avoid affecting subsequent comparisons.

[0053] It should be noted that both image feature coding and instance feature coding are structured data and can be stored in a structured database for long-term preservation.

[0054] Furthermore, the image feature coding and the instance feature coding are input into the information fusion model to obtain the real-time image features of the real-time image output by the information fusion model.

[0055] The information fusion model is obtained by training based on the sample image feature coding corresponding to the sample image, the sample instance feature coding corresponding to the sample image, and the image feature corresponding to the sample image.

[0056] Specifically, the information fusion model can perform multimodal information fusion based on a deep neural network, map image feature encoding and instance feature encoding into a unified feature vector space, and generate real-time image features.

[0057] Real-time image features can be stored in a fusion feature database.

[0058] Furthermore, a search is performed based on the real-time image features to determine the historical image features of the resources to be compared; and image comparison is performed based on the real-time image features and the historical image features to obtain resource comparison results of the resources to be compared.

[0059] In some embodiments, searching based on real-time image features to determine historical image features of resources to be compared includes: searching based on real-time image features to obtain candidate historical image features of resources to be compared; the number of candidate historical image features is at least two, and each candidate historical image feature is an image feature of a historical image of the resource to be compared; respectively determining the similarity between the real-time image feature and each candidate historical image feature; based on each similarity, determining the historical image feature of the resource to be compared; the historical image feature is the image feature with the highest similarity to the real-time image feature.

[0060] For the resources to be compared in the same area, the image database may store historical images of the resources to be compared from different periods, that is, there may be multiple historical images of the resources to be compared. Therefore, it is necessary to retrieve the historical images suitable for this comparison in the database and perform the comparison based on the historical images.

[0061] Generally, historical images from the last inspection are selected for comparison.

[0062] Since the historical image at the last inspection is the most recent image of the resource to be compared, the similarity between the historical image at the last inspection and the real-time image is the highest, that is, the similarity between the image features of the historical image at the last inspection and the real-time image features is the highest. Based on this, a search can be performed in the database based on the real-time image features to retrieve the historical image features with the highest similarity to the real-time image features for resource comparison.

[0063] It can be understood that historical images can also be acquired through drone photography to construct an initialization data set including historical images of various natural resources. The historical images in the initialization data set can be preprocessed and spliced ​​to form panoramic images of different areas. The panoramic images can be stored in the image database in segments.

[0064] Similarly, for each historical image of the same resource to be compared, its image features can be extracted through feature extraction models, instance segmentation models and information fusion models as candidate historical image features for subsequent resource comparison; the candidate historical image features are stored in the fusion feature database.

[0065] Specifically, after obtaining the real-time image features, the intelligent analysis module may search in the fusion feature database based on the real-time image features to obtain candidate historical image features of the resources to be compared.

[0066] The number of candidate historical image features is at least two, and each candidate historical image feature is an image feature of a historical image of the resource to be compared.

[0067] Furthermore, the similarity between the real-time image feature and each candidate historical image feature is determined respectively.

[0068] Furthermore, a similarity comparison is performed based on each similarity, and an image feature with the highest similarity to the real-time image feature is screened out as a historical image feature of the resource to be compared.

[0069] Optionally, after determining the historical image feature, the corresponding historical image may be determined based on the historical image feature, and then the historical image with the highest similarity to the real-time image may be determined.

[0070] Optionally, based on the real-time image, a historical image that is closest to the real-time image (with the highest similarity) is directly matched in the image database for subsequent resource comparison.

[0071] In some embodiments, before obtaining the real-time image of the resource to be compared, it also includes: obtaining the historical image of the resource to be compared; the number of historical images is at least two; performing feature extraction on the historical image to obtain candidate historical image features; and storing the candidate historical image features in a database.

[0072] In some embodiments, image comparison is performed based on real-time image features and historical image features to obtain resource comparison results of the resources to be compared, including: inputting real-time image features and historical image features into a resource comparison model to obtain the resource comparison results of the resources to be compared output by the resource comparison model; wherein the resource comparison model is trained based on sample real-time image features, sample historical image features and sample resource comparison results.

[0073] Specifically, the intelligent analysis module can input real-time image features and historical image features into the resource comparison model. The resource comparison model can perform image difference comparison based on the input real-time image features and historical image features, analyze the differences between the real-time image and the historical image, and generate resource comparison results for the resources to be compared.

[0074] Optionally, the resource comparison result includes a difference position and a difference description between the real-time image and the historical image.

[0075] Optionally, the resource comparison model can extract the changed areas of the real-time image and the historical image based on the instance segmentation algorithm, use the multimodal network to compare the changed areas of the real-time image and the historical image, analyze the differences in the changed areas, and return the resource comparison results in the form of natural language.

[0076] In some embodiments, obtaining a real-time image of the resource to be compared includes: obtaining a real-time video of the resource to be compared; decoding and extracting frames of the real-time video to obtain an initial real-time image of the resource to be compared; and performing image correction on the initial real-time image to obtain a real-time image of the resource to be compared.

[0077] Specifically, natural resources are distributed over a wide area. Therefore, in order to improve the efficiency of natural resource comparison, real-time video of the resources to be compared can be taken by a drone, and the real-time video can be decoded and frame-extracted to obtain an initial real-time image of the resources to be compared. Since the initial real-time image will be affected by the drone's flight altitude, flight direction and shooting angle, it may affect subsequent image comparison. Therefore, the initial real-time image can be corrected by rotating, scaling, and perspective transformation operations to correct the initial real-time image, and the influence of the drone's flight altitude, flight direction and shooting angle can be filtered to obtain a real-time image of the resources to be compared.

[0078] The present invention also provides a resource comparison device. Figure 4 , Figure 4 4 is a schematic diagram of the structure of the resource comparison device provided by the present invention. In this embodiment, the resource comparison device includes an acquisition module 410 , a feature extraction module 420 , a search module 430 and a comparison module 440 .

[0079] The acquisition module 410 is used to acquire a real-time image of the resource to be compared.

[0080] The feature extraction module 420 is used to extract features from the real-time image to obtain real-time image features of the real-time image.

[0081] The retrieval module 430 is used to perform retrieval based on the real-time image features to determine the historical image features of the resource to be compared.

[0082] The comparison module 440 is used to perform image comparison based on the real-time image features and the historical image features to obtain resource comparison results of the resources to be compared.

[0083] In some embodiments, the feature extraction module 420 is used to input the real-time image into a feature extraction model to obtain the image feature coding output by the feature extraction model; input the real-time image into an instance segmentation model to obtain the instance feature coding output by the instance segmentation model; input the image feature coding and the instance feature coding into an information fusion model to obtain the real-time image features of the real-time image output by the information fusion model; wherein the feature extraction model is trained based on the sample image and the sample image feature coding corresponding to the sample image; the instance segmentation model is trained based on the sample image and the sample instance feature coding corresponding to the sample image; the information fusion model is trained based on the sample image feature coding corresponding to the sample image, the sample instance feature coding corresponding to the sample image, and the image features corresponding to the sample image.

[0084] In some embodiments, the retrieval module 430 is used to perform retrieval based on real-time image features to obtain candidate historical image features of the resources to be compared; the number of candidate historical image features is at least two, and each candidate historical image feature is an image feature of a historical image of the resource to be compared; the similarity between the real-time image feature and each candidate historical image feature is determined respectively; based on each similarity, the historical image feature of the resource to be compared is determined; the historical image feature is the image feature with the highest similarity to the real-time image feature.

[0085] In some embodiments, the acquisition module 410 is used to acquire historical images of the resource to be compared; the number of historical images is at least two; feature extraction is performed on the historical images to obtain candidate historical image features; and the candidate historical image features are stored in a database.

[0086] In some embodiments, the comparison module 440 is used to input real-time image features and historical image features into a resource comparison model to obtain a resource comparison result of the resources to be compared output by the resource comparison model; wherein the resource comparison model is trained based on sample real-time image features, sample historical image features and sample resource comparison results.

[0087] In some embodiments, the acquisition module 410 is used to acquire real-time video of the resource to be compared; perform decoding and frame extraction processing on the real-time video to obtain an initial real-time image of the resource to be compared; and perform image correction processing on the initial real-time image to obtain a real-time image of the resource to be compared.

[0088] The present invention also provides an electronic device, Figure 5 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the resource comparison method.

[0089] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0090] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the resource comparison method provided by the above methods is implemented.

[0091] The present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the resource comparison method provided by the above methods.

[0092] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0093] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A resource comparison method, characterized in that: include: Obtain real-time images of the resources to be compared; Performing feature extraction on the real-time image to obtain real-time image features of the real-time image; Performing a search based on the real-time image features to determine the historical image features of the resource to be compared; Image comparison is performed based on the real-time image features and the historical image features to obtain a resource comparison result of the resource to be compared.

2. The resource comparison method according to claim 1, characterized in that: The step of extracting features from the real-time image to obtain real-time image features of the real-time image includes: Inputting the real-time image into a feature extraction model to obtain an image feature code output by the feature extraction model; Inputting the real-time image into an instance segmentation model to obtain instance feature coding output by the instance segmentation model; Inputting the image feature code and the instance feature code into an information fusion model to obtain real-time image features of the real-time image output by the information fusion model; Wherein, the feature extraction model is obtained by training based on the sample image and the sample image feature encoding corresponding to the sample image; The instance segmentation model is obtained by training based on the sample image and the sample instance feature encoding corresponding to the sample image; The information fusion model is obtained by training based on the sample image feature coding corresponding to the sample image, the sample instance feature coding corresponding to the sample image, and the image feature corresponding to the sample image.

3. The resource comparison method according to claim 1, characterized in that: The searching based on the real-time image features to determine the historical image features of the resource to be compared includes: Retrieve based on the real-time image feature to obtain candidate historical image features of the resource to be compared; the number of the candidate historical image features is at least two, and each candidate historical image feature is an image feature of a historical image of the resource to be compared; respectively determining the similarity between the real-time image feature and each of the candidate historical image features; Based on each of the similarities, a historical image feature of the resource to be compared is determined; the historical image feature is an image feature with the highest similarity to the real-time image feature.

4. The resource comparison method according to claim 3, characterized in that: Before obtaining the real-time image of the resource to be compared, the method further includes: Acquire historical images of the resource to be compared; the number of the historical images is at least two; Extracting features from the historical image to obtain features of the candidate historical image; The candidate historical image features are stored in a database.

5. The resource comparison method according to claim 1, characterized in that: The performing image comparison based on the real-time image feature and the historical image feature to obtain the resource comparison result of the resource to be compared includes: Inputting the real-time image features and the historical image features into a resource comparison model to obtain a resource comparison result of the resource to be compared output by the resource comparison model; The resource comparison model is trained based on sample real-time image features, sample historical image features and sample resource comparison results.

6. The resource comparison method according to claim 1, characterized in that: The step of obtaining the real-time image of the resource to be compared includes: Get the real-time video of the resource to be compared; Decoding and extracting frames of the real-time video to obtain an initial real-time image of the resource to be compared; Perform image correction processing on the initial real-time image to obtain a real-time image of the resource to be compared.

7. A resource comparison device, characterized in that: include: An acquisition module, used to acquire real-time images of resources to be compared; A feature extraction module, used to extract features from the real-time image to obtain real-time image features of the real-time image; A retrieval module, used to perform retrieval based on the real-time image features to determine the historical image features of the resource to be compared; The comparison module is used to perform image comparison based on the real-time image features and the historical image features to obtain a resource comparison result of the resource to be compared.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the resource comparison method according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the resource comparison method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the resource comparison method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Image retrieval method and device

    CN113282781A

  • Multi-target tracking method based on Mask R-CNN and apparent feature fusion

    CN113506317A

  • Target matching method and device, electronic equipment and computer program product

    CN115238113A

  • Electric vehicle instance retrieval method in streetscape monitoring scene and related device

    CN117746331A