CN111061888B - Image acquisition method and system - Google Patents

Image acquisition method and system Download PDF

Info

Publication number
CN111061888B
CN111061888B CN201911143385.6A CN201911143385A CN111061888B CN 111061888 B CN111061888 B CN 111061888B CN 201911143385 A CN201911143385 A CN 201911143385A CN 111061888 B CN111061888 B CN 111061888B
Authority
CN
China
Prior art keywords
image
images
adapter
frame unit
unified frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911143385.6A
Other languages
Chinese (zh)
Other versions
CN111061888A (en
Inventor
曹进辉
贾卫林
罗利利
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Mininglamp Software System Co ltd
Original Assignee
Beijing Mininglamp Software System Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Mininglamp Software System Co ltd filed Critical Beijing Mininglamp Software System Co ltd
Priority to CN201911143385.6A priority Critical patent/CN111061888B/en
Publication of CN111061888A publication Critical patent/CN111061888A/en
Application granted granted Critical
Publication of CN111061888B publication Critical patent/CN111061888B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Facsimiles In General (AREA)

Abstract

The embodiment of the invention discloses a method and a system for acquiring images, wherein the method comprises the following steps: the system receives an image acquisition request sent by a third party, wherein the image acquisition request carries an image entity identifier; acquiring one or more images meeting the image entity identification, and converting the one or more images into a preset storage format; and sending the image in the preset storage format to the third party according to a preset strategy. Therefore, the image with the uniform format can be provided for the outside, and the user experience is improved.

Description

Image acquisition method and system
Technical Field
The embodiment of the invention relates to an image searching technology, in particular to a method and a system for acquiring images.
Background
With the rapid development of information technology, face recognition and other operations are increasingly applied to the criminal investigation and case breaking field, and by adopting a graph searching and image comparison and peer-to-peer method, the case handling labor and time cost of public security and dry polices are greatly saved, but the current image library has more data sources (some images are stored in an ftp server, some images are stored in a database, some images are embedded in a webpage, and the like).
In the existing scheme, because the storage formats of various image data sources are not uniform, only a data source with a single storage format can be accessed during image acquisition, namely, only an image with one storage format can be acquired, so that the acquired images are single, and images with multiple dimensions cannot be acquired. For example, when applied to the criminal investigation case-breaking field, the case-breaking efficiency is limited to a certain extent.
Disclosure of Invention
In view of this, an embodiment of the present invention provides a method for acquiring an image, including:
the system receives an image acquisition request sent by a third party, wherein the image acquisition request carries an image entity identifier;
acquiring one or more images meeting the image entity identification, and converting the one or more images into a preset storage format;
and sending the image in the preset storage format to the third party according to a preset strategy.
The embodiment of the invention also provides a system for acquiring the image, which comprises the following steps: unifying the frame unit and the subordinate plurality of adapter;
the unified frame unit is used for receiving an image acquisition request sent by a third party, wherein the image acquisition request carries an image entity identifier; the image query method is also used for sending an image query request to all subordinate adapter adapters, wherein the image query request carries the image entity identifier;
Each adapter is used for acquiring one or more images meeting the requirements of the image entity identifier and the storage format of the image entity identifier from an external data source, converting the one or more images into the preset storage format and then sending the converted images to the unified frame unit; or each adapter is used for acquiring one or more images meeting the image entity identification and the self-storage format requirement from an external data source and sending the images to the unified frame unit; the unified frame unit is further used for converting the images sent by all the adapters into the preset storage format;
the unified frame unit is further configured to send an image in a preset storage format to the third party according to a preset policy.
According to the technical scheme provided by the embodiment of the invention, all acquired images are converted into the preset storage format and then sent to the third party, so that the images with the uniform format can be provided for the outside, and the user experience is improved.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. Other advantages of the present application may be realized and attained by the structure particularly pointed out in the written description and drawings.
Drawings
The accompanying drawings are included to provide an understanding of the technical aspects of the present application, and are incorporated in and constitute a part of this specification, illustrate the technical aspects of the present application and together with the examples of the present application, and not constitute a limitation of the technical aspects of the present application.
FIG. 1 is a flowchart of a method for image acquisition according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for image acquisition according to another embodiment of the present invention;
FIG. 3 is a flowchart of a method for image acquisition according to another embodiment of the present invention;
FIG. 4 is a flowchart of a method for image acquisition according to another embodiment of the present invention;
FIG. 5 is a schematic diagram of an image capturing system according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a system for image acquisition according to another embodiment of the present invention;
FIG. 7 is a flowchart of a method for image acquisition according to another embodiment of the present invention;
FIG. 8 is a schematic diagram of a system for image acquisition according to another embodiment of the present invention;
FIG. 9 is a flowchart of a method for image acquisition according to another embodiment of the present invention;
fig. 10 is a schematic structural diagram of a system for acquiring an image according to another embodiment of the present invention.
Detailed Description
The present application describes a number of embodiments, but the description is illustrative and not limiting and it will be apparent to those of ordinary skill in the art that many more embodiments and implementations are possible within the scope of the embodiments described herein. Although many possible combinations of features are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are possible. Any feature or element of any embodiment may be used in combination with or in place of any other feature or element of any other embodiment unless specifically limited.
The present application includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The embodiments, features and elements of the present disclosure may also be combined with any conventional features or elements to form a unique inventive arrangement as defined in the claims. Any feature or element of any embodiment may also be combined with features or elements from other inventive arrangements to form another unique inventive arrangement as defined in the claims. Thus, it should be understood that any of the features shown and/or discussed in this application may be implemented alone or in any suitable combination. Accordingly, the embodiments are not to be restricted except in light of the attached claims and their equivalents. Further, various modifications and changes may be made within the scope of the appended claims.
Furthermore, in describing representative embodiments, the specification may have presented the method and/or process as a particular sequence of steps. However, to the extent that the method or process does not rely on the particular order of steps set forth herein, the method or process should not be limited to the particular sequence of steps described. Other sequences of steps are possible as will be appreciated by those of ordinary skill in the art. Accordingly, the particular order of the steps set forth in the specification should not be construed as limitations on the claims. Furthermore, the claims directed to the method and/or process should not be limited to the performance of their steps in the order written, and one skilled in the art can readily appreciate that the sequences may be varied and still remain within the spirit and scope of the embodiments of the present application.
Fig. 1 is a flowchart of a method for acquiring an image according to an embodiment of the present invention, as shown in fig. 1, the method includes:
step 101, a system receives an image acquisition request sent by a third party, wherein the image acquisition request carries an image entity identifier;
step 102, acquiring one or more images meeting the image entity identification, and converting the one or more images into a preset storage format;
And step 103, sending the image in the preset storage format to the third party according to a preset strategy.
Optionally, the system includes a unified frame unit and one or more adapter adapters subordinate thereto;
each adapter is adapted to an image data source;
the receiving the image acquisition request sent by the third party comprises the following steps:
the unified frame unit receives an image acquisition request sent by a third party.
Optionally, the acquiring one or more images that satisfy the image entity identifier, and converting the one or more images into a preset storage format, includes:
the unified frame unit sends an image query request to all adapter adapters subordinate to the unified frame unit, wherein the image query request carries the image entity identifier;
each adapter acquires one or more images meeting the image entity identification and the storage format requirements of the adapter from an external data source, converts the one or more images into the preset storage format and then sends the images to the unified frame unit.
Optionally, the acquiring one or more images that satisfy the image entity identifier, and converting the one or more images into a preset storage format, includes:
The unified frame unit sends an image query request to all adapter adapters subordinate to the unified frame unit, wherein the image query request carries the image entity identifier;
each adapter acquires one or more images meeting the image entity identification and the storage format requirements of the adapter from an external data source and sends the images to the unified frame unit;
and the unified frame unit converts the images sent by all the adapters into the preset storage format.
Optionally, the system further comprises a storage unit, configured to pre-store an image in a preset storage format;
the obtaining one or more images meeting the image entity identification, and converting the one or more images into a preset storage format includes:
the unified frame unit sends an image query request to the storage unit, wherein the image query request carries the image entity identifier;
and the storage unit acquires one or more images meeting the image entity identification from the images stored by the storage unit and sends the images to the unified frame unit.
Optionally, before receiving the image acquisition request sent by the third party, the method further includes:
each adapter periodically acquires one or more images meeting the requirement of a self storage format from an external data source, converts the one or more images into the preset storage format and sends the preset storage format to the storage unit for storage;
Alternatively, each adapter periodically obtains one or more images from an external data source that meet its own storage format requirements and sends the images to the storage unit,
and the storage unit converts the one or more images into the preset storage format and stores the images.
Optionally, when the storage unit does not acquire an image satisfying the image entity identifier from the images stored in the storage unit, the method further includes:
the unified frame unit sends an image query request to all adapter adapters subordinate to the unified frame unit, wherein the image query request carries the image entity identifier;
each adapter acquires one or more images meeting the image entity identification and the self storage format requirements from an external data source, converts the one or more images into the preset storage format and then sends the images to the unified frame unit;
or the unified frame unit sends an image query request to all adapter adapters subordinate to the unified frame unit, wherein the image query request carries the image entity identifier;
each adapter acquires one or more images meeting the image entity identification and the storage format requirements of the adapter from an external data source and sends the images to the unified frame unit;
And the unified frame unit converts the images sent by all the adapters into the preset storage format.
Optionally, the sending the image in the preset storage format to the third party according to a preset policy includes:
the unified frame unit sorts the images in the preset storage format according to a priority strategy and then sends the sorted images to the third party;
the priority policy is a data ordering policy or a data screening policy;
or the unified frame unit directly sends the image with the preset storage format to the third party.
Optionally, the method further comprises:
one or more adapters are deleted or added.
According to the technical scheme provided by the embodiment of the invention, all acquired images are converted into the preset storage format and then sent to the third party, so that the images with the uniform format can be provided for the outside, and the user experience is improved.
Fig. 2 is a flowchart of a method for acquiring an image according to another embodiment of the present invention, where the method provided in the present embodiment is applied to a system, and the system includes: unifying the frame unit and one or more adapter adapters of the subordinate; each adapter adapts to a storage format of the image.
As shown in fig. 2, the method includes:
step 201, the unified frame unit receives an image acquisition request sent by a third party, wherein the image acquisition request carries an image entity identifier;
optionally, an interface may be provided in the unified frame unit, for a third party to call.
Optionally, the third party may provide a front-end device or a third party application for the user to provide the first image acquisition service, etc.
Step 202, the unified frame unit sends an image query request to all subordinate adapter adapters, wherein the image query request carries the image entity identifier;
optionally, the adapter comprises at least one of:
url adapters, html adapters, blob adapters, other adapters.
Wherein the other adapters refer to any existing adapter other than the above three kinds of adapters, or specific adapters customized according to the actual image data source. The specific adapter is adapted to hold an image data source of a specific storage format.
Alternatively, the adapter may exist in the form of a plug-in, i.e. access to the unified frame unit in the form of a plug-in.
Alternatively, the adapter may not exist in the form of a plug-in, and the unified frame unit exists as a whole, but the architecture is inflexible and can implement the same function.
Alternatively, all adapter adapters of the subordinate may be an integrated adapter that is adapted to multiple image storage formats from which images of multiple formats may be obtained from multiple data sources.
Optionally, the image entity identifier refers to an identifier of an associated entity of the image to be acquired, where the entity refers to various types of elements such as personnel, cases, and the like.
Optionally, the unified frame unit may further set up a user interface through which a user may delete or add one or more adapters. For example, the user may increase or decrease one or more adapters according to actual scene needs. The added adapter can be dynamically loaded to the unified frame element.
Step 203, each adapter obtains one or more images meeting the image entity identifier and the requirement of the storage format of the adapter from an external data source, converts the one or more images into the preset storage format, and sends the converted images to the unified frame unit;
wherein each adapter is adapted to an external data source.
Optionally, the external data source comprises at least one of:
ftp server, web page, database, other storage;
The Ftp server stores url format images, the web page stores html embedded images, the database stores blob format images, and other storage means any other existing image storage format except url format, html format and blob format.
The url adapter is adapted to the Ftp server, and images in url format on the Ftp server can be acquired. The html adapter is adapted to the web page, and can acquire the embedded image in the web page html, and the blob adapter can acquire the image stored in the database in the form of blob binary.
Alternatively, the preset storage format may be any existing image storage format such as url format, html format, blob format, etc.
Optionally, when the adapter acquires an image from an external data source, a query time threshold may be preset, that is, the image acquired within the threshold is not empty, that is, the image is subjected to subsequent processing, and if the image acquired within the threshold is empty, a response that the query fails or the result is empty is returned to the unified frame unit.
Specifically, for example, the unified frame unit traverses all the adapters, sends an image query request to each adapter, and each adapter sends an image query request to an external image source, and the adapters acquire a returned image list result and then return the returned image list result to the unified frame unit according to a unified format.
And 204, the unified framework unit sorts the images in the preset storage format according to a priority strategy and then sends the sorted images to the third party.
Alternatively, the priority policy may be any existing or custom data screening or data ordering policy, such as a data source priority policy, a time priority policy, or the like.
The data source priority policy means that different data sources have different priorities, for example, the priorities of the Ftp server, the web page and the database are set to be sequentially reduced, and in this step, the images from the server, the web page and the database are sequentially ordered according to the set priorities, and the priority is higher. The time priority policy means that the time of image generation is different and has different priorities, and if three images A, B, C are acquired, the time of image generation is 2019-1-1, 2019-2-2, 2019-3-3, respectively, the earlier the time is set to be the higher priority, the sorting is performed according to A, B, C in this step, and the later the time is set to be the higher priority, the sorting is performed according to C, B, A in this step.
Optionally, the unified frame unit may set a user operation interface. The user can edit or input the preset priority strategy according to the actual requirement through the user operation interface.
Optionally, the unified frame unit directly sends the images with the preset storage format to the third party, that is, directly sends the images without sorting.
Specifically, the front-end or third party application sends an image acquisition request (carrying entity id) to the system, and the entity in the request is not limited to personnel, cases and the like; the unified frame unit traverses all the adapters and sends query requests to the adapters, each adapter sends an image query request to a corresponding external image source and then sends an image list acquired from the external image source to the unified frame unit according to a unified format, and the unified frame unit integrates the image lists of the adapters and returns the image list or the representative graph after the unified format to a third party application according to a priority policy.
The technical scheme provided by the embodiment of the invention isolates the difference of various image data sources and can provide images with uniform formats to the outside.
Fig. 3 is a flowchart of a method for acquiring an image according to another embodiment of the present invention, where the method provided in the present embodiment is applied to a system, and the system includes: unifying the frame unit and one or more adapter adapters of the subordinate; each adapter adapts to a storage format of the image.
As shown in fig. 3, the method includes:
step 301, the unified frame unit receives an image acquisition request sent by a third party, wherein the image acquisition request carries an image entity identifier;
optionally, an interface may be provided in the unified frame unit, for a third party to call.
Optionally, the third party may provide a front-end device or a third party application for the user to provide the first image acquisition service, etc.
Step 302, the unified frame unit sends an image query request to all subordinate adapter adapters, wherein the image query request carries the image entity identifier;
optionally, the adapter comprises at least one of:
url adapters, html adapters, blob adapters, other adapters.
Wherein the other adapters refer to any existing adapter other than the above three kinds of adapters, or specific adapters customized according to the actual image data source. The specific adapter is adapted to hold an image data source of a specific storage format.
Alternatively, the adapter may exist in the form of a plug-in, i.e. access to the unified frame unit in the form of a plug-in.
Alternatively, the adapter may not exist in the form of a plug-in, and the unified frame unit exists as a whole, but the architecture is inflexible and can implement the same function.
Alternatively, all adapter adapters of the subordinate may be an integrated adapter that is adapted to multiple image storage formats from which images of multiple formats may be obtained from multiple data sources.
Optionally, the image entity identifier refers to an identifier of an associated entity of the image to be acquired, where the entity refers to various types of elements such as personnel, cases, and the like.
Optionally, the unified frame unit may further set up a user interface through which a user may delete or add one or more adapters. For example, the user may increase or decrease one or more adapters according to actual scene needs. The added adapter can be dynamically loaded to the unified frame element. Therefore, aiming at a new data source, a new adapter can be accessed, the system can be flexibly accessed, and the comprehensiveness of image acquisition is improved.
Step 303, each adapter obtains one or more images meeting the image entity identifier and the self-storage format requirement from an external data source and sends the images to the unified frame unit;
wherein each adapter is adapted to an external data source.
Optionally, the external data source comprises at least one of:
Ftp server, web page, database, other storage;
the Ftp server stores url format images, the web page stores html embedded images, the database stores blob format images, and other storage means any other existing image storage format except url format, html format and blob format.
The url adapter is adapted to the Ftp server, and images in url format on the Ftp server can be acquired. The html adapter is adapted to the web page, and can acquire the embedded image in the web page html, and the blob adapter can acquire the image stored in the database in the form of blob binary.
Optionally, when the adapter acquires an image from an external data source, a query time threshold may be preset, that is, the image acquired within the threshold is not empty, that is, the image is subjected to subsequent processing, and if the image acquired within the threshold is empty, a response that the query fails or the result is empty is returned to the unified frame unit.
Step 304, the unified frame unit converts the images sent by all the adapters into the preset storage format;
alternatively, the preset storage format may be any existing image storage format such as url format, html format, blob format, etc.
And 305, the unified framework unit sorts the images in the preset storage format according to a priority strategy and then sends the sorted images to the third party.
Alternatively, the priority policy may be any existing or custom data screening or data ordering policy, such as a data source priority policy, a time priority policy, or the like.
The data source priority policy means that different data sources have different priorities, for example, the priorities of the Ftp server, the web page and the database are set to be sequentially reduced, and in this step, the images from the server, the web page and the database are sequentially ordered according to the set priorities, and the priority is higher. The time priority policy means that the time of image generation is different and has different priorities, and if three images A, B, C are acquired, the time of image generation is 2019-1-1, 2019-2-2, 2019-3-3, respectively, the earlier the time is set to be the higher priority, the sorting is performed according to A, B, C in this step, and the later the time is set to be the higher priority, the sorting is performed according to C, B, A in this step.
Optionally, the unified frame unit may set a user operation interface. The user can edit or input the preset priority strategy according to the actual requirement through the user operation interface.
Optionally, the unified frame unit directly sends the images with the preset storage format to the third party, that is, directly sends the images without sorting.
Specifically, for example, the front end or the third party application sends an image acquisition request (carrying an entity id) to the present system, and the entity in the request is not limited to personnel, cases, and the like; the unified frame unit traverses all the adapters, sends image query requests to the adapters, each adapter sends the image query requests to an external image source, the adapters acquire a returned image list result and then return the image list or the representative graph to the unified frame unit, and the unified frame unit returns the image list or the representative graph to a third party according to a unified format.
The technical scheme provided by the embodiment of the invention isolates the difference of various image data sources, can externally provide images in a uniform format, and improves user experience.
Fig. 4 is a flowchart of a method for acquiring an image according to another embodiment of the present invention, where the method provided in the present embodiment is applied to a system, and the system includes: unifying the frame unit and one or more adapter adapters of the subordinate; the system further comprises a storage unit, each adapter adapting a storage format of the image.
As shown in fig. 4, the method includes:
step 401, the unified frame unit receives an image acquisition request sent by a third party, wherein the image acquisition request carries an image entity identifier;
optionally, an interface may be provided in the unified frame unit, for a third party to call.
Optionally, the third party may provide a front-end device or a third party application for the user to provide the first image acquisition service, etc.
Step 402, the unified frame unit sends an image query request to the storage unit, wherein the image query request carries the image entity identifier;
the storage unit is used for storing the images in a preset storage format in advance.
Wherein, before receiving the image acquisition request sent by the third party, the method further comprises:
each adapter periodically acquires one or more images meeting the requirement of the storage format of the adapter from an external data source, converts the one or more images into the preset storage format and sends the preset storage format to the storage unit for storage, or directly sends the acquired images to the storage unit, and the storage unit converts the images into the preset storage format and then stores the images.
For example, each adapter cycle pulls image lists from external image sources in batches/increments, writes the acquired image lists into storage unit batches, and returns a successful write response to the adapter after the storage unit is successfully written.
Optionally, the adapter comprises at least one of:
url adapters, html adapters, blob adapters, other adapters.
Wherein the other adapters refer to any existing adapter other than the above three kinds of adapters, or specific adapters customized according to the actual image data source. The specific adapter is adapted to hold an image data source of a specific storage format.
Alternatively, the adapter may exist in the form of a plug-in, i.e. access to the unified frame unit in the form of a plug-in.
Alternatively, the adapter may not exist in the form of a plug-in, and the unified frame unit exists as a whole, but the architecture is inflexible and can implement the same function.
Alternatively, all adapter adapters of the subordinate may be an integrated adapter that is adapted to multiple image storage formats from which images of multiple formats may be obtained from multiple data sources.
Optionally, the image entity identifier refers to an identifier of an associated entity of the image to be acquired, where the entity refers to various types of elements such as personnel, cases, and the like.
Optionally, the unified frame unit may further set up a user interface through which a user may delete or add one or more adapters. For example, the user may increase or decrease one or more adapters according to actual scene needs. The added adapter can be dynamically loaded to the unified frame element.
Step 403, the storage unit acquires one or more images meeting the image entity identifier from the images stored in the storage unit and sends the images to the unified frame unit;
alternatively, the storage unit may be any existing storage system or storage medium, such as distributed storage.
Optionally, when the storage unit does not acquire an image satisfying the image entity identifier from the images stored in the storage unit, the method further includes:
the unified frame unit sends an image query request to all adapter adapters subordinate to the unified frame unit, wherein the image query request carries the image entity identifier;
each adapter acquires one or more images meeting the image entity identification and the self storage format requirements from an external data source, converts the one or more images into the preset storage format and then sends the images to the unified frame unit;
or the unified frame unit sends an image query request to all adapter adapters subordinate to the unified frame unit, wherein the image query request carries the image entity identifier;
each adapter acquires one or more images meeting the image entity identification and the storage format requirements of the adapter from an external data source and sends the images to the unified frame unit;
And the unified frame unit converts the images sent by all the adapters into the preset storage format.
And step 404, the unified framework unit sorts the images in the preset storage format according to a priority policy and then sends the sorted images to the third party.
Alternatively, the priority policy may be any existing or custom data screening or data ordering policy, such as a data source priority policy, a time priority policy, or the like.
The data source priority policy means that different data sources have different priorities, for example, the priorities of the Ftp server, the web page and the database are set to be sequentially reduced, and in this step, the images from the server, the web page and the database are sequentially ordered according to the set priorities, and the priority is higher. The time priority policy means that the time of image generation is different and has different priorities, and if three images A, B, C are acquired, the time of image generation is 2019-1-1, 2019-2-2, 2019-3-3, respectively, the earlier the time is set to be the higher priority, the sorting is performed according to A, B, C in this step, and the later the time is set to be the higher priority, the sorting is performed according to C, B, A in this step.
Optionally, the unified frame unit may set a user operation interface. The user can edit or input the preset priority strategy according to the actual requirement through the user operation interface.
Optionally, the unified frame unit directly sends the images with the preset storage format to the third party, that is, directly sends the images without sorting.
Specifically, for example, the front end or the third party application sends an image acquisition request (carrying an entity id) to the present system, and the entity in the request is not limited to personnel, cases, and the like; the unified frame unit sends an image query request to the storage unit, acquires a returned image list result, and directly returns to the unified frame if the list is not empty. If the list is empty, traversing all the adapters, sending an image query request to a corresponding external image source by each adapter, then sending an image list acquired from the external image source to a unified frame unit according to a unified format, integrating the image lists of the adapters by the unified frame unit, and returning the image list with the unified format to a third party application according to a priority strategy; or each adapter sends an image query request to a corresponding external image source, then directly sends an image list acquired from the external image source to a unified frame unit, and the unified frame unit integrates the images in the image list of each adapter after converting the images into a unified format, and returns the image list or the representative graph after the unified format to a third party application according to a priority policy.
The technical scheme provided by the embodiment of the invention isolates the difference of various image data sources, can externally provide images in a uniform format, and improves user experience. Furthermore, the query efficiency is improved by uniformly storing and querying the image source data according to the pre-stored format.
Fig. 5 is a schematic structural diagram of an image acquisition system according to an embodiment of the present invention. As shown in fig. 5, the system includes: unifying the frame unit and one or more adapter adapters of the subordinate;
the unified framework unit is used for receiving an image acquisition request sent by a third party, wherein the image acquisition request carries an image entity identifier; the image query method is also used for sending an image query request to all subordinate adapter adapters, wherein the image query request carries the image entity identifier;
each adapter is used for acquiring one or more images meeting the requirements of the image entity identifier and the storage format of the image entity identifier from an external data source, converting the one or more images into the preset storage format and then sending the converted images to the unified frame unit; or each adapter is used for acquiring one or more images meeting the image entity identification and the self-storage format requirement from an external data source and sending the images to the unified frame unit; the unified frame unit is further used for converting the images sent by all the adapters into the preset storage format;
The unified frame unit is further configured to send an image in a preset storage format to the third party according to a preset policy.
Optionally, the system further comprises: a storage unit;
the storage unit is used for pre-storing images in a preset storage format;
the unified frame unit is further configured to send an image query request to the storage unit, where the image query request carries the image entity identifier;
the storage unit is used for acquiring one or more images meeting the image entity identification from the images stored by the storage unit and sending the images to the unified frame unit.
Optionally, the unified frame unit is specifically configured to sort the images in the preset storage format according to a priority policy and send the sorted images to the third party; the priority policy is a data ordering policy or a data screening policy; or directly sending the image in the preset storage format to the third party.
Optionally, the system further comprises: and the adapter management unit is used for deleting or adding one or more adapters.
Optionally, the unified frame unit is further configured to send an image query request to all subordinate adapter adapters when the storage unit does not acquire an image meeting the image entity identifier from the images stored in the storage unit, where the image query request carries the image entity identifier;
Each adapter is further configured to obtain one or more images meeting the image entity identifier and the self-storage format requirement from an external data source, convert the one or more images into the preset storage format, and send the converted images to the unified frame unit; or, obtaining one or more images meeting the image entity identification and the self-storage format requirements from an external data source and sending the images to the unified frame unit; the unified frame unit is further configured to convert the images sent by all the adapters into the preset storage format.
Optionally, each adapter is further configured to periodically acquire, before receiving an image acquisition request sent by a third party, one or more images meeting a requirement of a storage format of the adapter from an external data source, and convert the one or more images into the preset storage format and send the one or more images to the storage unit for storage, or periodically acquire, from the external data source, one or more images meeting the requirement of the storage format of the adapter and send the one or more images to the storage unit, where the storage unit is further configured to convert the one or more images into the preset storage format and then store the one or more images.
Fig. 6 is a schematic structural diagram of a system for acquiring an image according to another embodiment of the present invention.
As shown in fig. 6, the system is mainly composed of adapters and a unified frame.
The adapter is mainly responsible for adapting an external image data source, directly transmitting the acquired image to the unified frame or converting the format of the acquired image into the unified format and then accessing the unified frame.
The adapter is mainly composed of the following:
url adapter: the method comprises the steps of converting url-form images on an ftp server and then accessing the converted url-form images into a unified frame;
html adapter: the method comprises the steps of analyzing an embedded image in the html of the webpage, converting the analyzed image, and accessing the converted image into a unified frame;
blob adapter: the method comprises the steps of converting images stored in a blob binary form in a database and accessing the images into a unified frame;
alternatively, the adapter may exist in the form of a plug-in, not only the above known image sources, but also the adapter itself may be customized according to the actual image source, and the unified frame may be accessed in the form of a plug-in.
Alternatively, the adapter may not exist in the form of a plug-in, and the unified framework exists as a whole, but the architecture is inflexible and can implement the same function.
The adaptation of the system to the data source is dynamic, and the adaptation can be increased or decreased according to the actual scene.
Wherein, unified frame main functions include:
providing a unified image format in the external interface for calling by a front end or a third party service;
dynamically loading the adapter, wherein a user can increase or decrease the adapter according to actual scene requirements;
the user may configure the priority policies of the images (including, but not limited to, data source priority policies, time priority policies), order the list of images, and order the top of priority.
Alternatively, the above-described system may be deployed in a physical machine, a virtual machine, a dock container, or the like. The system can be horizontally expanded according to the actual concurrency number.
Based on the system shown in fig. 6, optionally, the flow of image acquisition includes, as shown in fig. 7:
step 1, the third party application sends a request to the system,
the request carries entity id, and the entity in the request is not limited to entities such as personnel, cases and the like; the request is for obtaining a list of images from the entity id.
Step 2, traversing all adapters by the unified framework;
traversing all adapters in the step refers to sending a query request to each adapter;
step 3, the adapter sends a query request to an external image source;
in this step, the query request is used to query the corresponding image according to the entity id.
Step 4, the adapter acquires a response returned by the external image source;
in the step, the response carries the queried image list result;
step 5, returning the image result to the unified frame by the adapter according to the unified format;
step 6, the unified framework returns a response to the third party;
in this step, the response carries all the acquired image lists.
Optionally, the unified framework may integrate the image list of each adapter, and then return the image list in the unified format to the third party application according to the priority policy.
The technical scheme provided by the embodiment of the invention isolates the difference of various image data sources, can externally provide images in a uniform format, and improves user experience.
Fig. 8 is a schematic structural diagram of a system for acquiring an image according to another embodiment of the present invention.
As shown in fig. 8, the system is mainly composed of adapters, a unified framework and a unified storage.
The adapter is mainly responsible for adapting an external image data source, directly transmitting the acquired image to the unified frame or converting the format of the acquired image into the unified format and then accessing the unified frame.
The adapter is mainly composed of the following:
url adapter: the method comprises the steps of converting url-form images on an ftp server and then accessing the converted url-form images into a unified frame;
html adapter: the method comprises the steps of analyzing an embedded image in the html of the webpage, converting the analyzed image, and accessing the converted image into a unified frame;
blob adapter: the method comprises the steps of converting images stored in a blob binary form in a database and accessing the images into a unified frame;
alternatively, the adapter may exist in the form of a plug-in, not only the above known image sources, but also the adapter itself may be customized according to the actual image source, and the unified frame may be accessed in the form of a plug-in.
Alternatively, the adapter may not exist in the form of a plug-in, and the unified framework exists as a whole, but the architecture is inflexible and can implement the same function.
Wherein, unified frame main functions include:
providing a unified image format in the external interface for calling by a front end or a third party service;
dynamically loading the adapter, wherein a user can increase or decrease the adapter according to actual scene requirements;
the user may configure the priority policies of the images (including, but not limited to, data source priority policies, time priority policies), order the list of images, and order the top of priority.
Alternatively, the above-described system may be deployed in a physical machine, a virtual machine, a dock container, or the like. The system can be horizontally expanded according to the actual concurrency number.
The adapter is used for adding the periodical synchronization of each image resource into the unified storage, and the images in the unified storage are all in a converted unified format.
Optionally, the adapter periodically converts the incremental image of the external data source into a unified format and then sends the converted incremental image to the unified storage for storage, or directly sends the incremental image of the external data source to the unified storage, and the unified storage converts the image into the unified format and then stores the converted image.
Since the unified framework and external image data sources are not typically within the same network environment, some access efficiency may have some impact. In the embodiment, the image source data can be uniformly stored first, so that the image query efficiency can be improved.
Alternatively, the unified storage in this embodiment may be implemented using distributed storage.
The unified frame corresponds to the unified frame unit, and the unified frame unit and the unified storage unit are stored in a unified mode.
Based on the system shown in fig. 8, optionally, the flow of image acquisition includes, as shown in fig. 9:
step 1, the third party application sends a request to the system,
the request carries entity id, and the entity in the request is not limited to entities such as personnel, cases and the like; the request is for obtaining a list of images from the entity id.
Step 2, traversing all adapters by the unified framework;
traversing all adapters in the step refers to sending a query request to each adapter;
step 3, the adapter sends a query request to the unified storage;
in this step, the query request is used to query the corresponding image according to the entity id.
Step 4, the adapter acquires a response returned by unified storage;
in the step, the response carries the queried image list result; and directly jumping to the step 7 when the returned image list result is not null, and executing the step 5 if the returned image list result is null:
step 5, the adapter sends a query request to an external image source;
in this step, the query request is used to query the corresponding image according to the entity id.
Step 6, the adapter acquires a response returned by the external image source;
in the step, the response carries the queried image list result;
step 7, returning the image result to the unified frame by the adapter according to the unified format;
step 8, the unified framework returns a response to the third party;
in this step, the response carries all the acquired image lists.
Optionally, the unified framework may integrate the image list of each adapter, and then return the image list in the unified format to the third party application according to the priority policy.
The technical scheme provided by the embodiment of the invention isolates the difference of various image data sources, can externally provide images in a uniform format, and improves user experience. Furthermore, the query efficiency is improved by uniformly storing and querying the image source data according to the pre-stored format.
Fig. 10 is a schematic structural diagram of an image acquisition system according to an embodiment of the present invention. As shown in fig. 5, the system includes:
the receiving unit is used for receiving an image acquisition request sent by a third party, wherein the image acquisition request carries an image entity identifier;
the acquisition and conversion unit is used for acquiring one or more images meeting the image entity identification and converting the one or more images into a preset storage format;
a sending unit for sending the image with the preset storage format to the third party according to a preset strategy,
optionally, the acquiring and converting unit is specifically configured to acquire one or more images that meet the requirements of the image entity identifier and the storage format of the image entity identifier from an external data source, and convert the one or more images into the preset storage format.
Optionally, the system further comprises a storage unit, configured to pre-store an image in a preset storage format;
The acquiring and converting unit is specifically configured to send an image query request to the storage unit, where the image query request carries the image entity identifier;
the storage unit acquires one or more images meeting the image entity identification from the images stored by the storage unit and sends the images to the acquisition and conversion unit.
Optionally, the acquiring and converting unit is further configured to periodically acquire, before receiving an image acquiring request sent by a third party, one or more images meeting a requirement of a storage format of the image or images from an external data source, and convert the one or more images into the preset storage format and send the images to the storage unit for storage, or periodically acquire, from the external data source, one or more images meeting the requirement of the storage format of the image or images and send the images to the storage unit, where the storage unit converts the one or more images into the preset storage format and then stores the images.
Optionally, the acquiring and converting unit is further configured to, when the storage unit does not acquire an image satisfying the image entity identifier from the images stored in the storage unit, acquire one or more images satisfying the image entity identifier and the requirement of the storage format of the storage unit from an external data source, and convert the one or more images into the preset storage format.
Optionally, the sending unit is specifically configured to sort the images in the preset storage format according to a priority policy and send the sorted images to the third party;
the priority policy is a data ordering policy or a data screening policy;
or directly sending the image in the preset storage format to the third party.
Optionally, the method further comprises:
one or more adapters are deleted or added.
According to the technical scheme provided by the embodiment of the invention, all acquired images are converted into the preset storage format and then sent to the third party, so that the images with the uniform format can be provided for the outside, and the user experience is improved.
The receiving unit in this embodiment is implemented by the above-mentioned unified frame, the acquiring and converting unit is implemented by the above-mentioned unified frame and adapter, and the transmitting unit is implemented by the above-mentioned unified frame.
The technical scheme provided by the embodiment of the invention isolates the difference of various image data sources, can externally provide images in a uniform format, and improves user experience.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, functional modules/units in the apparatus, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed cooperatively by several physical components. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.

Claims (6)

1. A method of image acquisition, comprising:
the system receives an image acquisition request sent by a third party, wherein the image acquisition request carries an image entity identifier;
the system comprises a unified frame unit, one or more subordinate adapter adapters and a storage unit for pre-storing images in a preset storage format;
the receiving the image acquisition request sent by the third party comprises the following steps:
the unified frame unit receives an image acquisition request sent by a third party;
acquiring one or more images meeting the image entity identification, and converting the one or more images into a preset storage format, wherein the method comprises the following steps:
the unified frame unit sends an image query request to the storage unit, wherein the image query request carries the image entity identifier;
the storage unit acquires one or more images meeting the image entity identification from the images stored by the storage unit and sends the images to the unified frame unit;
transmitting the image in the preset storage format to the third party according to a preset strategy;
when the storage unit does not acquire the image meeting the image entity identification from the images stored by the storage unit:
The unified frame unit sends an image query request to all adapter adapters subordinate to the unified frame unit, wherein the image query request carries the image entity identifier;
each adapter acquires one or more images meeting the image entity identification and the self storage format requirements from an external data source, converts the one or more images into the preset storage format and then sends the images to the unified frame unit;
or the unified frame unit sends an image query request to all adapter adapters subordinate to the unified frame unit, wherein the image query request carries the image entity identifier;
each adapter acquires one or more images meeting the image entity identification and the storage format requirements of the adapter from an external data source and sends the images to the unified frame unit;
and the unified frame unit converts the images sent by all the adapters into the preset storage format.
2. The method of claim 1, wherein the acquiring one or more images satisfying the image entity identification and converting the one or more images to a preset storage format comprises:
the unified frame unit sends an image query request to all adapter adapters subordinate to the unified frame unit, wherein the image query request carries the image entity identifier;
Each adapter acquires one or more images meeting the image entity identification and the storage format requirements of the adapter from an external data source, converts the one or more images into the preset storage format and then sends the images to the unified frame unit.
3. The method of claim 1, wherein the acquiring one or more images satisfying the image entity identification and converting the one or more images to a preset storage format comprises:
the unified frame unit sends an image query request to all adapter adapters subordinate to the unified frame unit, wherein the image query request carries the image entity identifier;
each adapter acquires one or more images meeting the image entity identification and the storage format requirements of the adapter from an external data source and sends the images to the unified frame unit;
and the unified frame unit converts the images sent by all the adapters into the preset storage format.
4. The method of claim 1, wherein prior to receiving the image acquisition request sent by the third party, the method further comprises:
each adapter periodically acquires one or more images meeting the requirement of a self storage format from an external data source, converts the one or more images into the preset storage format and sends the preset storage format to the storage unit for storage;
Alternatively, each adapter periodically obtains one or more images from an external data source that meet its own storage format requirements and sends the images to the storage unit,
and the storage unit converts the one or more images into the preset storage format and stores the images.
5. The method according to claim 1, characterized in that the method further comprises:
one or more adapters are deleted or added.
6. A system for image acquisition, comprising: a unified frame unit, a plurality of adapter of subordinate, and a storage unit for pre-storing images of a preset storage format;
the unified frame unit is used for receiving an image acquisition request sent by a third party, wherein the image acquisition request carries an image entity identifier; the image query method is also used for sending an image query request to all subordinate adapter adapters, wherein the image query request carries the image entity identifier; the image query request is also used for sending an image query request to the storage unit, and the image query request carries the image entity identifier; each adapter is used for acquiring one or more images meeting the requirements of the image entity identifier and the storage format of the image entity identifier from an external data source, converting the one or more images into the preset storage format and then sending the converted images to the unified frame unit; or each adapter is used for acquiring one or more images meeting the image entity identification and the self-storage format requirement from an external data source and sending the images to the unified frame unit; the unified frame unit is further used for converting the images sent by all the adapters into the preset storage format;
The unified frame unit is further used for sending the images in the preset storage format to the third party according to a preset strategy;
the storage unit is used for acquiring one or more images meeting the image entity identification from the images stored by the storage unit and sending the images to the unified frame unit;
when the storage unit does not acquire the image meeting the image entity identification from the images stored by the storage unit:
the unified frame unit sends an image query request to all adapter adapters subordinate to the unified frame unit, wherein the image query request carries the image entity identifier;
each adapter acquires one or more images meeting the image entity identification and the self storage format requirements from an external data source, converts the one or more images into the preset storage format and then sends the images to the unified frame unit;
or the unified frame unit sends an image query request to all adapter adapters subordinate to the unified frame unit, wherein the image query request carries the image entity identifier;
each adapter acquires one or more images meeting the image entity identification and the storage format requirements of the adapter from an external data source and sends the images to the unified frame unit;
And the unified frame unit converts the images sent by all the adapters into the preset storage format.
CN201911143385.6A 2019-11-20 2019-11-20 Image acquisition method and system Active CN111061888B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911143385.6A CN111061888B (en) 2019-11-20 2019-11-20 Image acquisition method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911143385.6A CN111061888B (en) 2019-11-20 2019-11-20 Image acquisition method and system

Publications (2)

Publication Number Publication Date
CN111061888A CN111061888A (en) 2020-04-24
CN111061888B true CN111061888B (en) 2023-05-16

Family

ID=70298246

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911143385.6A Active CN111061888B (en) 2019-11-20 2019-11-20 Image acquisition method and system

Country Status (1)

Country Link
CN (1) CN111061888B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107305572A (en) * 2016-04-25 2017-10-31 ***通信集团贵州有限公司 A kind of data processing method and server
CN109829073A (en) * 2018-12-29 2019-05-31 深圳云天励飞技术有限公司 A kind of method and device of picture search

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103873918B (en) * 2012-12-14 2017-08-29 腾讯科技(深圳)有限公司 Image processing method, device and terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107305572A (en) * 2016-04-25 2017-10-31 ***通信集团贵州有限公司 A kind of data processing method and server
CN109829073A (en) * 2018-12-29 2019-05-31 深圳云天励飞技术有限公司 A kind of method and device of picture search

Also Published As

Publication number Publication date
CN111061888A (en) 2020-04-24

Similar Documents

Publication Publication Date Title
CN101552976B (en) Multi-service form file processing system and method
CN110798654B (en) Method and system for defining camera by software and camera
CN109241178A (en) The method and apparatus for managing memory space
CN107092686B (en) File management method and device based on cloud storage platform
CN110413282B (en) Redundant resource processing method, device, equipment and storage medium
CN110865842A (en) OTA (over the air) upgrading method and device
US20180018363A1 (en) Time series data processing method and apparatus
CN110955441B (en) Algorithm updating method and device
US20190317866A1 (en) Database restoration across cloud environments
CN111061888B (en) Image acquisition method and system
CN112579877A (en) Information source system control method, device, storage medium and equipment
CN103559000B (en) A kind of massive image data moving method towards quality and system
CN113468446B (en) Method, system and equipment for supporting identification of third party two-dimensional code data
CN106126313B (en) A kind of method and server integrating Solr based on Ambari
CN112417259B (en) Media resource processing method, device, equipment and storage medium
CN111400327B (en) Data synchronization method and device, electronic equipment and storage medium
CN115080504A (en) File management method, terminal and storage medium
US8484182B1 (en) Wireless device content searching
CN113568630A (en) Method, system and equipment for updating algorithm
CN112631642B (en) Intelligent contract upgrading method and device, blockchain node and storage medium
EP4195068B1 (en) Storing and retrieving media recordings in an object store
CN111427856B (en) Java data processing method and device
CN114679495B (en) Scheduling method and scheduling execution method for resource service operation request
CN111179097B (en) Method, device, electronic equipment and storage medium for modifying warranty
CN113407488A (en) File storage conversion processing method and device, electronic equipment and storage medium

Legal Events

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