CN111061888A - Image acquisition method and system - Google Patents

Image acquisition method and system Download PDF

Info

Publication number
CN111061888A
CN111061888A CN201911143385.6A CN201911143385A CN111061888A CN 111061888 A CN111061888 A CN 111061888A CN 201911143385 A CN201911143385 A CN 201911143385A CN 111061888 A CN111061888 A CN 111061888A
Authority
CN
China
Prior art keywords
image
images
unit
storage format
adapter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911143385.6A
Other languages
Chinese (zh)
Other versions
CN111061888B (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 an image, 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, images in a unified format can be provided to the outside, and user experience is improved.

Description

Image acquisition method and system
Technical Field
The present invention relates to image search technologies, and in particular, to a method and system for image acquisition.
Background
With the rapid development of information technology, face recognition and other operations are more and more applied to the field of criminal investigation and case solving, and the case handling labor and time cost of public security and police officers are greatly saved by using methods such as image searching, portrait comparison and the like, but the existing 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 image is single and cannot acquire images with multiple dimensions. For example, when the method is applied to the field of criminal investigation and case solving, the efficiency of case solving is restricted to a certain extent.
Disclosure of Invention
In view of this, an embodiment of the present invention provides an image acquisition method, 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 an image acquisition system, which comprises: unifying the frame unit and a plurality of subordinate adapters;
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 system is also used for sending an image query request to all subordinate adapters, wherein the image query request carries the image entity identification;
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, converting the one or more images into the preset storage format and then sending the one or more images to the unified framework 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 framework unit; the unified framework unit is also used for converting the images sent by all the adapters into the preset storage format;
and the unified framework unit is also used for sending the image with the preset storage format to the third party according to a preset strategy.
According to the technical scheme provided by the embodiment of the invention, all the acquired images are converted into the preset storage format and then are sent to the third party, so that the images in the uniform format can be provided to 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 the practice of the application. Other advantages of the present application may be realized and attained by the instrumentalities and combinations particularly pointed out in the specification and the drawings.
Drawings
The accompanying drawings are included to provide an understanding of the present disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the examples serve to explain the principles of the disclosure and not to limit the disclosure.
Fig. 1 is a schematic flowchart of an image acquisition method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an image acquisition method according to another embodiment of the present invention;
FIG. 3 is a flowchart illustrating an image acquisition method according to another embodiment of the present invention;
FIG. 4 is a flowchart illustrating an image capturing method according to another embodiment of the present invention;
FIG. 5 is a schematic diagram of an image acquisition system according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an image acquisition system according to another embodiment of the present invention;
FIG. 7 is a flowchart illustrating an image acquisition method according to another embodiment of the present invention;
FIG. 8 is a schematic structural diagram of an image acquisition system according to another embodiment of the present invention;
FIG. 9 is a flowchart illustrating a method for image acquisition according to another embodiment of the present invention;
fig. 10 is a schematic structural diagram of an image acquisition system according to another embodiment of the present invention.
Detailed Description
The present application describes embodiments, but the description is illustrative rather than 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 instead of any other feature or element in any other embodiment, unless expressly limited otherwise.
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 disclosed in this application may also be combined with any conventional features or elements to form a unique inventive concept as defined by the claims. Any feature or element of any embodiment may also be combined with features or elements from other inventive aspects to form yet another unique inventive aspect, as defined by 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 limited except as by the appended claims and their equivalents. Furthermore, various modifications and changes may be made within the scope of the appended claims.
Further, 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 orders of steps are possible as will be understood by those of ordinary skill in the art. Therefore, the particular order of the steps set forth in the specification should not be construed as limitations on the claims. Further, 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 schematic flowchart of an image acquisition method according to an embodiment of the present invention, as shown in fig. 1, the method includes:
101, a system receives an image acquisition request sent by a third party, wherein the image acquisition request carries an image entity identifier;
102, acquiring one or more images meeting the image entity identification, and converting the one or more images into a preset storage format;
and 103, sending the image in the preset storage format to the third party according to a preset strategy.
Optionally, the system comprises a unified framework unit and one or more subordinate adapters;
each adapter is adapted to an image data source;
the receiving of the image acquisition request sent by the third party includes:
and the unified framework unit receives an image acquisition request sent by a third party.
Optionally, the obtaining one or more images satisfying the image entity identifier, and converting the one or more images into a preset storage format includes:
the unified framework unit sends an image query request to all subordinate adapters, wherein the image query request carries the image entity identification;
and each adapter acquires one or more images meeting the image entity identification and the self storage format requirement from an external data source, converts the one or more images into the preset storage format and then sends the preset storage format to the unified frame unit.
Optionally, the obtaining one or more images satisfying the image entity identifier, and converting the one or more images into a preset storage format includes:
the unified framework unit sends an image query request to all subordinate adapters, wherein the image query request carries the image entity identification;
each adapter acquires one or more images meeting the image entity identification and the self storage format requirement from an external data source and sends the images to the unified frame unit;
and the unified framework unit converts the images sent by all the adapters into the preset storage format.
Optionally, the system further includes a storage unit, configured to pre-store the image in the preset storage format;
the acquiring one or more images meeting the image entity identification and converting the one or more images into a preset storage format includes:
the unified framework unit sends an image query request to the storage unit, wherein the image query request carries the image entity identification;
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 framework 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 requirements 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;
or each adapter periodically acquires one or more images meeting the requirements of the self storage format from an external data source and sends the images to the storage unit,
and the storage unit converts the one or more images into the preset storage format and then stores the one or more images.
Optionally, when the storage unit does not acquire an image satisfying the image entity identifier from images saved in the storage unit, the method further includes:
the unified framework unit sends an image query request to all subordinate adapters, wherein the image query request carries the image entity identification;
each adapter acquires one or more images meeting the image entity identification and the self storage format requirement from an external data source, converts the one or more images into the preset storage format and then sends the preset storage format to the unified frame unit;
or, the unified framework unit sends an image query request to all subordinate adapters, where 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 requirement from an external data source and sends the images to the unified frame unit;
and the unified framework 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 framework unit sorts the images in a preset storage format according to a priority strategy and then sends the images to the third party;
the priority strategy is a data sorting strategy or a data screening strategy;
or, the unified framework 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 the acquired images are converted into the preset storage format and then are sent to the third party, so that the images in the uniform format can be provided to the outside, and the user experience is improved.
Fig. 2 is a schematic flow chart of an image acquisition method according to another embodiment of the present invention, in which the method according to the present embodiment is applied to a system, and the system includes: unifying the frame unit and one or more subordinate adapters; each adapter adapts one storage format of the image.
As shown in fig. 2, the method includes:
step 201, the unified framework 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 framework unit, and is used for being called by a third party.
Optionally, the third party may provide a front-end device or a third-party application of the second image acquisition service for the user.
Step 202, the unified framework unit sends an image query request to all subordinate adapters, wherein the image query request carries the image entity identification;
optionally, the adapter comprises at least one of:
url adapter, html adapter, blob adapter, other adapters.
The other adapter refers to any existing adapter except the three adapters, or a specific adapter customized according to the actual image data source. The particular adapter is adapted to hold an image data source of a particular storage format.
Optionally, the adapter may exist in the form of a plug-in, that is, access to the unified framework unit in the form of a plug-in.
Alternatively, the adapter may not exist in the form of a plug-in, and the unified framework unit exists as a whole, and the architecture is not flexible, but can achieve the same functions.
Optionally, all the subordinate adapters adapter may also be an integrated adapter, the adapter is adapted to multiple image storage formats, and images in multiple formats may be acquired from multiple data sources.
Optionally, the image entity identifier refers to an identifier of an entity related to the image to be acquired, where the entity refers to various types of elements such as people and cases.
Optionally, the unified framework unit may further be provided with a user interface through which a user may delete or add one or more adapters. For example, a user may increase or decrease one or more adapters depending on actual scene needs. And the added adapter can be dynamically loaded to the unified framework unit.
Step 203, each adapter acquires one or more images meeting the image entity identification and the self storage format requirement from an external data source, converts the one or more images into the preset storage format, and sends the one or more images to the unified framework unit;
wherein each adapter is adapted to an external data source.
Optionally, the external data source comprises at least one of:
an Ftp server, a web page, a database, other storage;
the image in the url format is stored in the Ftp server, the html embedded image is stored in the webpage, the image in the blob format is stored in the database, and other storage means that any other existing image storage format except the url format, the html format and the blob format is stored.
The url adapter is adapted to the Ftp server, and can acquire an image in the url format on the Ftp server. The html editor is adapted to a webpage, and can acquire an image embedded in html of the webpage, and the blob adapter can acquire an image stored in a binary form of blob in a database.
Optionally, the preset storage format may be any existing image storage format such as url format, html format, blob format, and the like.
Optionally, when the adapter acquires an image from an external data source, an inquiry time threshold may be preset, that is, if the image acquired within the threshold is not empty, the image is subjected to subsequent processing, and if the image acquired within the threshold is empty, a response that the inquiry fails or the result is empty is returned to the unified framework unit.
Specifically, for example, the unified framework unit traverses all the adapters, sends an image query request to each adapter, each adapter sends an image query request to an external image source, and the adapters obtain a returned image list result and return the returned image list result to the unified framework 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 images to the third party.
Optionally, the priority policy may be any one of an existing or user-customized data screening or data sorting policy, such as a data source priority policy, a time priority policy, and the like.
The data source priority policy means that different data sources have different priorities, for example, the priorities of the three data sources, that is, the Ftp server, the web page, and the database, are set to be sequentially lower, in this step, the images from the server, the web page, and the database are sequentially sorted according to the set priorities, and the image with the higher priority is sorted in front. The time priority strategy means that the time for generating the images has different priorities, and assuming that three images A, B, C are acquired, the time for generating the images is respectively 2019-1-1, 2019-2-2 and 2019-3-3, the earlier the time is set to be higher priority, the images are sorted according to A, B, C in the step, and the later the time is set to be higher priority, the images are sorted according to C, B, A in the step.
Optionally, the unified framework unit may be provided with a user interface. The user can edit or input the preset priority strategy according to actual needs through the user operation interface.
Optionally, the unified framework unit directly sends the image with the preset storage format to the third party, that is, directly sends the image without sorting.
Specifically, the front-end or third-party application sends an image acquisition request (carrying an entity id) to the system, and entities in the request are not limited to people, cases and the like; the unified framework unit traverses all the adapters, sends query requests to the adapters, sends image query requests to corresponding external image sources by each adapter, sends image lists acquired from the external image sources to the unified framework unit according to a unified format, and returns the image lists or representative images after the unified format to a third party for application according to a priority strategy after the unified framework unit integrates the image lists of the adapters.
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 schematic flow chart of an image acquisition method according to another embodiment of the present invention, in which the method provided in this embodiment is applied to a system, and the system includes: unifying the frame unit and one or more subordinate adapters; each adapter adapts one storage format of the image.
As shown in fig. 3, the method includes:
step 301, the unified framework 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 framework unit, and is used for being called by a third party.
Optionally, the third party may provide a front-end device or a third-party application of the second image acquisition service for the user.
Step 302, the unified framework unit sends an image query request to all subordinate adapters, wherein the image query request carries the image entity identification;
optionally, the adapter comprises at least one of:
url adapter, html adapter, blob adapter, other adapters.
The other adapter refers to any existing adapter except the three adapters, or a specific adapter customized according to the actual image data source. The particular adapter is adapted to hold an image data source of a particular storage format.
Optionally, the adapter may exist in the form of a plug-in, that is, access to the unified framework unit in the form of a plug-in.
Alternatively, the adapter may not exist in the form of a plug-in, and the unified framework unit exists as a whole, and the architecture is not flexible, but can achieve the same functions.
Optionally, all the subordinate adapters adapter may also be an integrated adapter, the adapter is adapted to multiple image storage formats, and images in multiple formats may be acquired from multiple data sources.
Optionally, the image entity identifier refers to an identifier of an entity related to the image to be acquired, where the entity refers to various types of elements such as people and cases.
Optionally, the unified framework unit may further be provided with a user interface through which a user may delete or add one or more adapters. For example, a user may increase or decrease one or more adapters depending on actual scene needs. And the added adapter can be dynamically loaded to the unified framework unit. Therefore, a new adapter can be accessed aiming at a new data source, a system can be flexibly accessed, and the comprehensiveness of image acquisition is improved.
303, each adapter acquires one or more images meeting the image entity identification and the self storage format requirement from an external data source and sends the images to the unified framework unit;
wherein each adapter is adapted to an external data source.
Optionally, the external data source comprises at least one of:
an Ftp server, a web page, a database, other storage;
the image in the url format is stored in the Ftp server, the html embedded image is stored in the webpage, the image in the blob format is stored in the database, and other storage means that any other existing image storage format except the url format, the html format and the blob format is stored.
The url adapter is adapted to the Ftp server, and can acquire an image in the url format on the Ftp server. The html editor is adapted to a webpage, and can acquire an image embedded in html of the webpage, and the blob adapter can acquire an image stored in a binary form of blob in a database.
Optionally, when the adapter acquires an image from an external data source, an inquiry time threshold may be preset, that is, if the image acquired within the threshold is not empty, the image is subjected to subsequent processing, and if the image acquired within the threshold is empty, a response that the inquiry fails or the result is empty is returned to the unified framework unit.
Step 304, the unified framework unit converts the images sent by all the adapters into the preset storage format;
optionally, the preset storage format may be any existing image storage format such as url format, html format, blob format, and the like.
And 305, the unified framework unit sorts the images in the preset storage format according to a priority policy and then sends the images to the third party.
Optionally, the priority policy may be any one of an existing or user-customized data screening or data sorting policy, such as a data source priority policy, a time priority policy, and the like.
The data source priority policy means that different data sources have different priorities, for example, the priorities of the three data sources, that is, the Ftp server, the web page, and the database, are set to be sequentially lower, in this step, the images from the server, the web page, and the database are sequentially sorted according to the set priorities, and the image with the higher priority is sorted in front. The time priority strategy means that the time for generating the images has different priorities, and assuming that three images A, B, C are acquired, the time for generating the images is respectively 2019-1-1, 2019-2-2 and 2019-3-3, the earlier the time is set to be higher priority, the images are sorted according to A, B, C in the step, and the later the time is set to be higher priority, the images are sorted according to C, B, A in the step.
Optionally, the unified framework unit may be provided with a user interface. The user can edit or input the preset priority strategy according to actual needs through the user operation interface.
Optionally, the unified framework unit directly sends the image with the preset storage format to the third party, that is, directly sends the image without sorting.
Specifically, for example, the front-end or third-party application sends an image acquisition request (carrying an entity id) to the system, and the entity in the request is not limited to people, 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 return to the unified frame unit after acquiring returned image list results, and then the unified frame unit returns an image list or a representative image 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 provide images with uniform formats to the outside and improves the user experience.
Fig. 4 is a schematic flow chart of an image acquisition method according to another embodiment of the present invention, where the method provided in this embodiment is applied to a system, and the system includes: unifying the frame unit and one or more subordinate adapters; the system also comprises a storage unit, and each adapter adapts to one storage format of the image.
As shown in fig. 4, the method includes:
step 401, the unified framework 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 framework unit, and is used for being called by a third party.
Optionally, the third party may provide a front-end device or a third-party application of the second image acquisition service for the user.
Step 402, the unified framework 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 image with the preset storage format in advance.
Before receiving an image acquisition request sent by a third party, the method further comprises the following steps:
each adapter periodically acquires one or more images meeting the requirements 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 acquired images into the preset storage format and then stores the preset storage format.
For example, each adapter period pulls an image list from an external image source in batch/increment, writes the acquired image list into the storage unit in batch, and returns a successful writing response to the adapter after the storage unit is successfully written.
Optionally, the adapter comprises at least one of:
url adapter, html adapter, blob adapter, other adapters.
The other adapter refers to any existing adapter except the three adapters, or a specific adapter customized according to the actual image data source. The particular adapter is adapted to hold an image data source of a particular storage format.
Optionally, the adapter may exist in the form of a plug-in, that is, access to the unified framework unit in the form of a plug-in.
Alternatively, the adapter may not exist in the form of a plug-in, and the unified framework unit exists as a whole, and the architecture is not flexible, but can achieve the same functions.
Optionally, all the subordinate adapters adapter may also be an integrated adapter, the adapter is adapted to multiple image storage formats, and images in multiple formats may be acquired from multiple data sources.
Optionally, the image entity identifier refers to an identifier of an entity related to the image to be acquired, where the entity refers to various types of elements such as people and cases.
Optionally, the unified framework unit may further be provided with a user interface through which a user may delete or add one or more adapters. For example, a user may increase or decrease one or more adapters depending on actual scene needs. And the added adapter can be dynamically loaded to the unified framework unit.
Step 403, the storage unit acquires one or more images meeting the image entity identifier from images stored by the storage unit and sends the images to the unified framework unit;
alternatively, the storage unit may be any existing storage system or storage medium, such as a distributed storage.
Optionally, when the storage unit does not acquire an image satisfying the image entity identifier from images saved in the storage unit, the method further includes:
the unified framework unit sends an image query request to all subordinate adapters, wherein the image query request carries the image entity identification;
each adapter acquires one or more images meeting the image entity identification and the self storage format requirement from an external data source, converts the one or more images into the preset storage format and then sends the preset storage format to the unified frame unit;
or, the unified framework unit sends an image query request to all subordinate adapters, where 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 requirement from an external data source and sends the images to the unified frame unit;
and the unified framework unit converts the images sent by all the adapters into the preset storage format.
And 404, the unified framework unit sorts the images in the preset storage format according to a priority policy and then sends the images to the third party.
Optionally, the priority policy may be any one of an existing or user-customized data screening or data sorting policy, such as a data source priority policy, a time priority policy, and the like.
The data source priority policy means that different data sources have different priorities, for example, the priorities of the three data sources, that is, the Ftp server, the web page, and the database, are set to be sequentially lower, in this step, the images from the server, the web page, and the database are sequentially sorted according to the set priorities, and the image with the higher priority is sorted in front. The time priority strategy means that the time for generating the images has different priorities, and assuming that three images A, B, C are acquired, the time for generating the images is respectively 2019-1-1, 2019-2-2 and 2019-3-3, the earlier the time is set to be higher priority, the images are sorted according to A, B, C in the step, and the later the time is set to be higher priority, the images are sorted according to C, B, A in the step.
Optionally, the unified framework unit may be provided with a user interface. The user can edit or input the preset priority strategy according to actual needs through the user operation interface.
Optionally, the unified framework unit directly sends the image with the preset storage format to the third party, that is, directly sends the image without sorting.
Specifically, for example, the front-end or third-party application sends an image acquisition request (carrying an entity id) to the system, and the entity in the request is not limited to people, cases, and the like; and the unified framework unit sends an image query request to the storage unit, acquires a returned image list result, and directly returns the returned image list result to the unified framework if the list is not empty. If the list is empty, traversing all the adapters, sending an image query request to the corresponding external image source by each adapter, sending the image list acquired from the external image source to the unified frame unit according to a unified format, integrating the image lists of the adapters by the unified frame unit, and returning the image lists with the unified format to a third-party application according to a priority strategy; or each adapter sends an image query request to the corresponding external image source and then directly sends the image list acquired from the external image source to the unified frame unit, the unified frame unit converts the images in the image list of each adapter into a unified format for integration, and the image list or the representative image in the unified format is returned to the third-party application according to the priority strategy.
The technical scheme provided by the embodiment of the invention isolates the difference of various image data sources, can provide images with uniform formats to the outside and improves the user experience. Furthermore, the data of each image source is uniformly stored according to the pre-stored format and then inquired, so that the inquiring efficiency is improved.
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 subordinate adapters;
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 system is also used for sending an image query request to all subordinate adapters, wherein the image query request carries the image entity identification;
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, converting the one or more images into the preset storage format and then sending the one or more images to the unified framework 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 framework unit; the unified framework unit is also used for converting the images sent by all the adapters into the preset storage format;
and the unified framework unit is also used for sending the image with the preset storage format to the third party according to a preset strategy.
Optionally, the system further comprises: a storage unit;
the storage unit is used for storing images in a preset storage format in advance;
the unified framework 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 in the storage unit and sending the images to the unified framework unit.
Optionally, the unified framework unit is specifically configured to sort the images in the preset storage format according to a priority policy and then send the sorted images to the third party; the priority strategy is a data sorting strategy or a data screening strategy; or, the image in the preset storage format is directly sent 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 framework unit is further configured to send an image query request to all subordinate adapters adapter when the storage unit does not obtain an image satisfying the image entity identifier from an image stored in the storage unit, where the image query request carries the image entity identifier;
each adapter is further used for acquiring one or more images meeting the image entity identification and the storage format requirements of the adapter from an external data source, converting the one or more images into the preset storage format, and then sending the one or more images to the unified framework unit; or, one or more images meeting the image entity identification and the self storage format requirement are acquired from an external data source and sent to the unified framework unit; the unified framework 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, before receiving an image acquisition request sent by a third party, periodically acquire one or more images meeting the requirements of the self-storage format from an external data source, convert the one or more images into the preset storage format, and send the preset storage format to the storage unit for storage, or periodically acquire one or more images meeting the requirements of the self-storage format from the external data source 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 an image acquisition system according to another embodiment of the present invention.
As shown in FIG. 6, the system is mainly composed of adapters and a unified framework.
The adapter is mainly responsible for adapting to an external image data source, and directly sends the acquired image to the unified frame or converts the format of the acquired image into a unified format and then accesses the unified frame.
The adapter mainly comprises the following components:
url adapter: the image processing device is used for converting the image in the url form on the ftp server and then accessing the image to the unified framework;
html adapter: the system is used for analyzing and converting the image embedded in the webpage html and then accessing the image to a unified frame;
blob adapter: the system comprises a database, a unified framework and a database management module, wherein the database is used for storing images in a blob binary form;
optionally, the adapter may exist in the form of a plug-in, which may not only be limited to the known image source, but also customize its own adapter according to the actual image source, and access the unified framework 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, and the architecture is not flexible but can achieve the same functionality.
The system is dynamic in adaptation to the data source, and the adapter can be increased or decreased according to the actual scene.
Wherein, unified frame main functions include:
providing a uniform image format in the external interface for the front-end or third-party service to call;
the adapter is dynamically loaded, and a user can increase or decrease the adapter according to the actual scene requirement;
the user can configure the priority policy (including but not limited to the data source priority policy and the time priority policy) of the images, sort the image list, and rank the high priority in front.
Alternatively, the above system may be deployed in a physical machine, a virtual machine, a docker container, and the like. The system can also be extended according to the actual concurrency level.
Based on the system shown in fig. 6, optionally, the flow of image acquisition as shown in fig. 7 includes:
step 1, the third party application sends a request to the system,
the request carries an entity id, and entities in the request are not limited to entities such as personnel, cases and the like; the request is used to obtain a list of images according to the entity id.
Step 2, the unified framework traverses all adapters;
in the step, traversing all the adapters points to each adapter to send a query request;
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 this step, the response carries the inquired image list result;
step 5, the adapter returns the image result to the unified frame 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 lists of the adapters, and return the image lists 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 provide images with uniform formats to the outside and improves the user experience.
Fig. 8 is a schematic structural diagram of an image acquisition system 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 to an external image data source, and directly sends the acquired image to the unified frame or converts the format of the acquired image into a unified format and then accesses the unified frame.
The adapter mainly comprises the following components:
url adapter: the image processing device is used for converting the image in the url form on the ftp server and then accessing the image to the unified framework;
html adapter: the system is used for analyzing and converting the image embedded in the webpage html and then accessing the image to a unified frame;
blob adapter: the system comprises a database, a unified framework and a database management module, wherein the database is used for storing images in a blob binary form;
optionally, the adapter may exist in the form of a plug-in, which may not only be limited to the known image source, but also customize its own adapter according to the actual image source, and access the unified framework 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, and the architecture is not flexible but can achieve the same functionality.
Wherein, unified frame main functions include:
providing a uniform image format in the external interface for the front-end or third-party service to call;
the adapter is dynamically loaded, and a user can increase or decrease the adapter according to the actual scene requirement;
the user can configure the priority policy (including but not limited to the data source priority policy and the time priority policy) of the images, sort the image list, and rank the high priority in front.
Alternatively, the above system may be deployed in a physical machine, a virtual machine, a docker container, and the like. The system can also be extended according to the actual concurrency level.
The adapter adds the image resources to the unified storage periodically, and the images in the unified storage are in the converted unified format.
Optionally, the adapter periodically converts the incremental image of the external data source into a uniform format and then sends the uniform format to the uniform storage for storage, or directly sends the incremental image of the external data source to the uniform storage, and the uniform storage converts the image into a uniform format for storage.
Since the unified framework and the external image data source are not usually in the same network environment, the access efficiency may have a certain effect. In the embodiment, the data of each image source can be stored in a unified way, so that the efficiency of image query 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 storage corresponds to the storage unit.
Based on the system shown in fig. 8, optionally, the flow of image acquisition as shown in fig. 9 includes:
step 1, the third party application sends a request to the system,
the request carries an entity id, and entities in the request are not limited to entities such as personnel, cases and the like; the request is used to obtain a list of images according to the entity id.
Step 2, the unified framework traverses all adapters;
in the step, traversing all the adapters points to each adapter to send a query request;
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 the unified storage;
in this step, the response carries the inquired 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 this step, the response carries the inquired image list result;
step 7, the adapter returns the image result to the unified frame 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 lists of the adapters, and return the image lists 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 provide images with uniform formats to the outside and improves the user experience. Furthermore, the data of each image source is uniformly stored according to the pre-stored format and then inquired, so that the inquiring efficiency is improved.
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 acquiring and converting 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, configured to send the image in the preset storage format to the third party according to a preset policy,
optionally, the obtaining and converting unit is specifically configured to obtain one or more images that satisfy the image entity identifier and the storage format requirement 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 includes a storage unit, configured to pre-store the image in the 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 obtaining and converting unit is further configured to, before receiving an image obtaining request sent by a third party, periodically obtain one or more images meeting the requirement of the self-storage format from an external data source, convert the one or more images into the preset storage format, and send the preset storage format to the storage unit for storage, or periodically obtain one or more images meeting the requirement of the self-storage format from the external data source and send the one or more images to the storage unit, where the storage unit converts the one or more images into the preset storage format and then stores the one or more images.
Optionally, the obtaining and converting unit is further configured to, when the storage unit does not obtain an image that meets the image entity identifier from images stored in the storage unit, obtain one or more images that meet the image entity identifier and a storage format requirement 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 rank the images in the preset storage format according to a priority policy and then send the ranked images to the third party;
the priority strategy is a data sorting strategy or a data screening strategy;
or, the image in the preset storage format is directly sent 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 the acquired images are converted into the preset storage format and then are sent to the third party, so that the images in the uniform format can be provided to the outside, and the user experience is improved.
The receiving unit in this embodiment is implemented by the unified framework, the obtaining and converting unit is implemented by the unified framework and the adapter, and the sending unit is implemented by the unified framework.
The technical scheme provided by the embodiment of the invention isolates the difference of various image data sources, can provide images with uniform formats to the outside and improves the user experience.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between 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 by several physical components in cooperation. 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 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 is well known to those of ordinary skill 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 accessed by a computer. In addition, 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 as known to those skilled in the art.

Claims (10)

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;
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.
2. The method of claim 1,
the system comprises a unified framework unit and one or more subordinate adapters;
the receiving of the image acquisition request sent by the third party includes:
and the unified framework unit receives an image acquisition request sent by a third party.
3. The method according to claim 2, wherein the obtaining one or more images satisfying the image entity identifier and converting the one or more images into a preset storage format comprises:
the unified framework unit sends an image query request to all subordinate adapters, wherein the image query request carries the image entity identification;
and each adapter acquires one or more images meeting the image entity identification and the self storage format requirement from an external data source, converts the one or more images into the preset storage format and then sends the preset storage format to the unified frame unit.
4. The method according to claim 2, wherein the obtaining one or more images satisfying the image entity identifier and converting the one or more images into a preset storage format comprises:
the unified framework unit sends an image query request to all subordinate adapters, wherein the image query request carries the image entity identification;
each adapter acquires one or more images meeting the image entity identification and the self storage format requirement from an external data source and sends the images to the unified frame unit;
and the unified framework unit converts the images sent by all the adapters into the preset storage format.
5. The method of claim 2,
the system also comprises a storage unit, a processing unit and a display unit, wherein the storage unit is used for pre-storing the image with the preset storage format;
the acquiring one or more images meeting the image entity identification and converting the one or more images into a preset storage format includes:
the unified framework unit sends an image query request to the storage unit, wherein the image query request carries the image entity identification;
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 framework unit.
6. The method of claim 5, 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 requirements 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;
or each adapter periodically acquires one or more images meeting the requirements of the self storage format from an external data source and sends the images to the storage unit,
and the storage unit converts the one or more images into the preset storage format and then stores the one or more images.
7. The method according to claim 5, wherein when the storage unit does not obtain the image satisfying the image entity identifier from the image saved in the storage unit, the method further comprises:
the unified framework unit sends an image query request to all subordinate adapters, wherein the image query request carries the image entity identification;
each adapter acquires one or more images meeting the image entity identification and the self storage format requirement from an external data source, converts the one or more images into the preset storage format and then sends the preset storage format to the unified frame unit;
or, the unified framework unit sends an image query request to all subordinate adapters, where 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 requirement from an external data source and sends the images to the unified frame unit;
and the unified framework unit converts the images sent by all the adapters into the preset storage format.
8. The method of claim 2, further comprising:
one or more adapters are deleted or added.
9. A system for image acquisition, comprising: unifying the frame unit and a plurality of subordinate adapters;
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 system is also used for sending an image query request to all subordinate adapters, wherein the image query request carries the image entity identification;
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, converting the one or more images into the preset storage format and then sending the one or more images to the unified framework 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 framework unit; the unified framework unit is also used for converting the images sent by all the adapters into the preset storage format;
and the unified framework unit is also used for sending the image with the preset storage format to the third party according to a preset strategy.
10. The system of claim 9, further comprising: a storage unit;
the storage unit is used for storing images in a preset storage format in advance;
the unified framework 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 in the storage unit and sending the images to the unified framework unit.
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 true CN111061888A (en) 2020-04-24
CN111061888B 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 (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150278173A1 (en) * 2012-12-14 2015-10-01 Tencent Technology (Shenzhen) Company Limited Method, apparatus, terminal, and storage medium for image processing
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

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150278173A1 (en) * 2012-12-14 2015-10-01 Tencent Technology (Shenzhen) Company Limited Method, apparatus, terminal, and storage medium for image processing
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
CN111061888B (en) 2023-05-16

Similar Documents

Publication Publication Date Title
US20200328984A1 (en) Method and apparatus for allocating resource
CN110798654B (en) Method and system for defining camera by software and camera
CN110532405B (en) Multimedia file processing method, communication device and computer readable storage medium
CN111143446A (en) Data structure conversion processing method and device of data object and electronic equipment
CN115981563A (en) Method and system for storing traffic image information
CN110955441B (en) Algorithm updating method and device
US20190317866A1 (en) Database restoration across cloud environments
CN110505289B (en) File downloading method and device, computer readable medium and wireless communication equipment
CN111061888B (en) Image acquisition method and system
CN105095224A (en) Method, apparatus and system for carrying out OLAP analysis in mobile communication network
CN112035413B (en) Metadata information query method, device and storage medium
CN110971664B (en) Interface service management system
CN110888847B (en) Recycle bin system and file recycling method
CN109996089B (en) Method and system for processing operation log and streaming media server
US8200284B2 (en) Communication device and method for managing multimedia files
CN110389966B (en) Information processing method and device
CN113468886A (en) Work order processing method and device and computer equipment
US8484182B1 (en) Wireless device content searching
CN112579877A (en) Information source system control method, device, storage medium and equipment
CN111949619B (en) Dynamic catalog generation method, system, electronic equipment and storage medium
WO2023050423A1 (en) Image processing method and device, and storage medium
CN116820354B (en) Data storage method, data storage device and data storage system
CN113407488A (en) File storage conversion processing method and device, electronic equipment and storage medium
CN113626396B (en) Cluster detection method and device, electronic equipment, storage medium and product
CN114679495B (en) Scheduling method and scheduling execution method for resource service operation request

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