CN112612980A - Picture service method, device, equipment, storage medium and computer program product - Google Patents

Picture service method, device, equipment, storage medium and computer program product Download PDF

Info

Publication number
CN112612980A
CN112612980A CN202011533322.4A CN202011533322A CN112612980A CN 112612980 A CN112612980 A CN 112612980A CN 202011533322 A CN202011533322 A CN 202011533322A CN 112612980 A CN112612980 A CN 112612980A
Authority
CN
China
Prior art keywords
picture
original picture
original
feature information
content data
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
CN202011533322.4A
Other languages
Chinese (zh)
Other versions
CN112612980B (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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202011533322.4A priority Critical patent/CN112612980B/en
Publication of CN112612980A publication Critical patent/CN112612980A/en
Application granted granted Critical
Publication of CN112612980B publication Critical patent/CN112612980B/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/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping

Abstract

The disclosure discloses a picture service method, a picture service device, picture service equipment, a storage medium and a computer program product, and relates to the field of computers, in particular to the field of computer vision, information flow and big data. The specific implementation scheme is as follows: responding to an uploading request of the original picture, storing content data of the original picture, and extracting and storing feature information of the original picture; the method comprises the steps of responding to an access request of an original picture, and cutting the original picture based on content data and characteristic information of the original picture to obtain a cut picture; the original picture is an original picture; and sending the cropped picture to the terminal equipment initiating the access request. The picture service method can improve the cutting efficiency and accuracy, thereby improving the quality of picture service.

Description

Picture service method, device, equipment, storage medium and computer program product
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to the field of computer vision, information flow, and big data technologies, and in particular, to a picture service method, apparatus, device, storage medium, and computer program product.
Background
The rapid development of multimedia technology and internet technology has made it possible for users to obtain a large amount of picture resources from the internet. The client side needs to occupy larger bandwidth resources during picture transmission, and the time for loading the pictures is longer, so that the pictures cannot be directly used on line.
Therefore, the server needs to cut the picture after receiving the picture downloading request, the size of the picture is reduced, and occupied bandwidth resources are reduced under the condition that the user checking is not influenced.
Disclosure of Invention
The disclosure provides a picture service method, a device, equipment, a storage medium and a computer program product.
According to a first aspect of the present disclosure, there is provided a picture service method, including:
responding to an uploading request of an original picture, storing content data of the original picture, and extracting and storing feature information of the original picture;
in response to an access request of an original picture, cropping the original picture based on the content data and the feature information of the original picture to obtain a cropped picture;
and sending the trimming picture to the terminal equipment initiating the access request.
According to a second aspect of the present disclosure, there is provided a picture service apparatus including:
the feature extraction module is used for responding to an uploading request of an original picture and extracting feature information of the original picture;
the storage module is used for storing the content data of the original picture and the characteristic information of the original picture;
the cropping module is used for responding to an access request of an original picture, cropping the original picture based on the content data and the characteristic information of the original picture and obtaining a cropped picture;
and the sending module is used for sending the cut picture to the terminal equipment initiating the access request.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any of the picture service methods.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of the picture service methods.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method of any of the above-mentioned picture service methods.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is an architecture diagram of a picture service method implementing an embodiment of the present disclosure;
FIG. 2 is a schematic diagram according to a first embodiment of the present disclosure;
FIG. 3 is a flow chart of cropping according to a first embodiment of the present disclosure;
FIG. 4 is a flow chart of a service method of logo pictures according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram according to a second embodiment of the present disclosure;
fig. 6 is a block diagram of an electronic device for implementing a picture service method according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The embodiments and features of the embodiments of the present application may be combined with each other without conflict.
As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
Fig. 1 is a schematic architecture diagram of a picture service method according to an embodiment of the present disclosure. As shown in fig. 1, the architecture includes: the terminal device 10, the server 20 and the network 30, wherein the terminal device 10 can upload and download pictures, the server 20 provides picture services, and the network 30 is used for connecting the terminal device 10 and the server 20.
The terminal device 10 includes, but is not limited to: personal computers, smart phones, tablet computers, personal digital assistant devices. These terminal devices 10 may each be installed with various Applications (APPs), such as a social App, a shopping App, and the like.
In the embodiment of the present disclosure, the terminal device 10 may open a webpage through the APP. The web page may include at least one picture, and the pictures may be pictures uploaded by the current user, or pictures uploaded to the server 20 by other users or service providers.
The server 20 is used to provide a storage and processing service for pictures. For example, the server 20 stores pictures uploaded by the user, such as content data of the stored pictures. Alternatively, the server 20 provides a processing service for pictures. Processing services include, but are not limited to, picture feature extraction processing and cropping processing, among others. The extracted feature information includes, but is not limited to, the size, the main body feature, and the color feature of the picture. The server 20 is also used for storing the characteristic information of the picture and the cut picture.
In the embodiment of the present disclosure, the server 20 is respectively provided with a Uniform Resource Locator (URL) for each original picture and each processed picture, and the original picture and the processed picture can be obtained according to the URL.
In the prior art, the cropping process of a picture is mainly based on experience for cropping, for example, a horizontal picture only keeps the middle area, and other areas are all cropped. The longitudinal picture only leaves the top area, the other areas being cropped. Since the distribution state of the effective information in the picture is unpredictable, the effective information in the picture is easily cropped by the empirical cropping mode, namely the cropping accuracy is low.
In order to improve the accuracy of cropping, the prior art provides an intelligent image cropping service, which completely crops images in a form of a synchronous interface, that is, when a user accesses an image, a server calls content data of the accessed image, crops the accessed image through an intelligent algorithm, and returns the cropped image to the user. The intelligent image cropping service adopts a synchronous interface form to crop images, the response time of each image is in the second level, and for a page with a plurality of images, the waiting access time is long, so that the intelligent image cropping service cannot be used in an actual service environment.
The embodiment of the present disclosure provides a picture service method, after receiving a picture uploaded by a terminal device 10 through a network 30, a server 20 not only stores content data of the picture, but also needs to extract feature information of the picture, and stores the extracted feature information. After a request for accessing the picture is received, the picture is cut based on the content data and the characteristic information of the picture, so that the cutting efficiency is greatly improved, and the cutting accuracy can be improved.
The following embodiments can be applied to the system architecture of the present embodiment. For simplicity of description, the following embodiments may be mutually referred to and cited.
In a first aspect, an embodiment of the present disclosure provides a picture service method, which may improve the accuracy of cropping and may also improve the cropping rate of a picture, thereby improving the access speed of a user.
Fig. 2 is a schematic diagram according to a first embodiment of the present disclosure. As shown in fig. 2, the picture service method may include the steps of:
step S201, responding to the upload request of the original picture, storing the content data of the original picture, and extracting and storing the feature information of the original picture.
The uploaded original picture can be any type of picture, such as portrait, trademark (logo), landscape, and the like. The content data of the original picture refers to a set of gradation values that numerically represent each pixel (pixel) in the original picture. The feature information of the original picture is information for representing a main feature in the original picture. For example, the feature information of the original picture includes, but is not limited to, at least one of face feature information, body feature information, and background color feature information.
The face feature information may be face feature information of all people in the original picture, or face feature information of a main person in the original picture, so as to avoid cropping the face of the main person. The main body characteristic information is characteristic information for embodying an original picture main body, and the main body information should be kept as much as possible in the cropping process. The background color characteristic information is characteristic information which embodies the background color of the original picture. For example, the original picture is a logo picture, the characteristic information representing the logo pattern is main characteristic information of the original picture, and the colors except the logo pattern are background color characteristic information.
In some embodiments, the upload request of the original picture may be a request sent by a user through a terminal device, or a request sent by a service provider providing a picture service. And after receiving the uploading request, the server stores the uploaded content data of the original picture in the storage module. Moreover, the server can also process the original picture, such as extracting feature information of the original picture, and store the extracted feature information. The storage module for storing the content data of the original picture and the storage module for storing the feature information of the original picture may be different storage modules or the same storage module.
It should be noted that the feature information of the original picture may be extracted by using an existing extraction method, for example, a face detection operator is used to obtain face feature information, a main body detection operator is used to obtain main body feature information, and a background color extraction operator is used to obtain background color feature information, which is not limited in this embodiment.
Step S202, responding to the access request of the original picture, and cutting the original picture based on the content data and the characteristic information of the original picture to obtain a cut picture.
The access request may be a request sent by a user through a terminal device. The original picture is a picture selected from a large number of original pictures, which have been stored in a server.
In some embodiments, after receiving the access request, the server cuts the original picture based on the content data and the feature information of the original picture to obtain a cut picture, and since the server already obtains the feature information of the original picture, after receiving the access request, the server does not need to wait for the time for extracting the feature information of the original picture, thereby improving the cutting efficiency, the cutting speed can reach millisecond level, and moreover, since the feature information is adopted to cut the original picture, the cutting accuracy can also be improved.
Step S203, sending the cropped picture to the terminal device that initiated the access request.
And after obtaining the cut picture corresponding to the original picture, the server sends the cut picture to the terminal equipment, wherein the terminal equipment initiates an access request.
After the original picture is obtained, the content data of the original picture is stored, the feature information is extracted from the original picture and stored, and after the access request is received, the original picture is cut based on the content data and the feature information of the original picture, so that the cutting time is shortened and the cutting efficiency is improved because the time for extracting the feature information of the original picture is not needed; moreover, the original picture is cut by adopting the characteristic information of the original picture, so that the cutting accuracy can be improved.
In some embodiments, step S201, in response to the original picture upload request, storing content data of the original picture, and extracting and storing feature information of the original picture, includes:
step S21, responding to the upload request of the original picture, and synchronously storing the content data of the original picture.
In some embodiments, after receiving the upload request of the original picture, the server receives the original picture and synchronously stores the content data of the original picture.
And step S22, responding to the uploading request of the original picture, and asynchronously extracting and storing the characteristic information of the original picture.
In some embodiments, after receiving an upload request of an original picture, the server receives the original picture, asynchronously extracts feature information of the original picture, and stores the feature information of the original picture.
It should be noted that, in step S21 and step S22, after the server receives the upload request of the original picture, the same step is to receive the original picture, and the difference is that the content data of the original picture is synchronously stored, and the feature information of the original picture is asynchronously extracted and stored.
In some embodiments, in step S22, in response to the upload request of the original picture, the feature information of the original picture is asynchronously extracted and stored, after the server receives the original picture, the server adds the extraction task to a message queue, and the server extracts the feature information of the original picture according to the order in the message queue.
In the embodiment of the disclosure, since the time taken for extracting the feature information of the original picture is longer than the time taken for storing the content data of the original picture, the content data of the original picture is synchronously stored, and the feature information of the original picture is asynchronously extracted and stored, which is beneficial to shortening the time for uploading the original picture, thereby improving the efficiency for uploading the original picture.
In some embodiments, as shown in fig. 3, in step S201, in response to an original picture access request, cropping an original picture based on content data and feature information corresponding to the original picture to obtain a cropped picture, including:
step S301, responding to the original picture access request, and searching whether a trimming picture corresponding to the original picture exists.
In practical applications, when an original picture is accessed for the first time, there is no cropped picture corresponding to the original picture in the server, and therefore, the original picture needs to be cropped, i.e., step S302 is performed. And after the original picture is accessed for the first time, the server stores the cut picture corresponding to the original picture and sets a corresponding URL for the cut picture corresponding to the original picture. Therefore, when the image is not accessed for the first time, the server can directly obtain the trimming image corresponding to the original image from the storage module.
In some embodiments, the server may determine, through the URL, whether a Content Delivery Network (CDN) of the original picture exists, and if the CDN of the original picture exists, it indicates that a cropped picture corresponding to the original picture exists in the server. For example, the server receives an original picture access request, and determines whether the original picture CDN exists according to the URL, and if the original picture CDN exists, it indicates that the original picture CDN exists.
Step S302, under the condition that the cut picture corresponding to the original picture does not exist, cutting the original picture based on the content data and the characteristic information corresponding to the original picture to obtain the cut picture corresponding to the original picture.
In some embodiments, in the absence of a cropped picture corresponding to the original picture, the original picture is cropped based on the content data and the feature information corresponding to the original picture to obtain a cropped picture corresponding to the original picture.
Step S303, directly accessing the cropped picture corresponding to the original picture when the cropped picture corresponding to the original picture exists.
In the embodiment of the disclosure, in response to an access request of an original picture, whether a cut picture corresponding to the original picture exists is searched, and a corresponding operation is performed according to a search result, for example, in the case that the cut picture corresponding to the original picture exists, the cut picture corresponding to the original picture is directly accessed, and only in the case that the cut picture corresponding to the original picture does not exist, the original picture is cut, so that the access speed can be increased, and thus, the user experience is improved.
In some embodiments, the step S102, in response to the access request of the original picture, crop the original picture based on the content data and the feature information corresponding to the original picture, and after obtaining a cropped picture, further includes:
the cropped picture is stored and the address of the uniform resource locator of the cropped picture is different from the address of the uniform resource locator of the original picture.
In the embodiment of the disclosure, the cut picture and the original picture are stored by using different addresses of the uniform resource locators, which is beneficial to addressing and calling different pictures, and avoids disordered storage of the original picture and the cut picture, thereby improving the access rate of the picture.
In the picture service, different users have different display proportion requirements, and the server cuts the original picture based on the display proportion requirements of the users to obtain cut pictures with different display proportions. Wherein the presentation scale may be a pixel scale that is best displayed by the user display device.
In some embodiments, the server cuts the original picture according to different display proportions, and after the cut pictures with different display proportions are obtained, the cut pictures with different display proportions are stored, and the addresses of the uniform resource locators of the cut pictures with different display proportions are different.
The embodiment of the disclosure provides cut pictures with various display proportions to meet the requirements of different users; and the addresses of the uniform resource locators of the cut pictures with different display proportions are different, so that the management of the cut pictures is facilitated, the disorder in calling the cut pictures is avoided, the calling efficiency is improved, and the access rate of a user is improved.
In the embodiment of the present disclosure, as shown in fig. 4, a service method for a logo picture includes:
step S401, an uploading request of an original logo picture is received.
Step S402, synchronously storing the content data of the original logo picture in a picture storage module.
Step S403, adding the extraction task of the original logo picture into a message queue.
And step S404, extracting the characteristic information of the original logo picture.
In this embodiment, the original logo picture is extracted and processed according to the sequence in the message queue. The feature information of the original logo picture comprises main body feature information and background color feature information. The main characteristic information of the original logo picture can be extracted through the existing technical means. The main characteristic information of the original logo picture is the logo pattern information. Based on the cutting of the main body characteristic information, the main body area can be prevented from being cut, and therefore the cutting accuracy is improved.
In this embodiment, the non-subject pixel points in the original logo picture are extracted according to the horizontal direction and the vertical direction respectively. Matching color similarity points of pixel points of the non-main body in the original logo picture, and counting a color histogram. And taking the color with the highest proportion in the color histogram as the background color.
The horizontal direction and the vertical direction are relative concepts, and the original logo picture can be converted from the horizontal direction to the vertical direction by rotating by an angle of 90 degrees by taking the symmetric center of the original logo picture as an axis.
Step S405, storing the feature information of the original logo picture in a feature information storage module.
Steps S401 to S405 may be completed asynchronously when the original logo picture is received.
Step S406, receiving a request for accessing the target logo picture.
Step S407, judging whether a trimming picture corresponding to the target logo picture is hit, if so, executing step S408; if not, step S409 is executed.
In this embodiment, the cropped picture corresponding to the target logo picture can determine whether the cropped picture CDN corresponding to the target logo picture is hit according to the URL.
Step S408, a trimming picture corresponding to the target logo picture is obtained and provided for the user.
In the embodiment of the disclosure, the CDN obtains the cropped picture corresponding to the target logo picture and provides the cropped picture to the user, that is, the CDN transmits the cropped picture corresponding to the target logo picture to the browser of the terminal device.
And step S409, acquiring the content data of the target logo picture and the characteristic information of the target logo picture, and cutting the target logo picture.
In the embodiment of the disclosure, before the target logo picture is cut, whether the target logo picture needs to be filled or not can be judged according to the main body characteristic information, and if so, the target logo picture is filled. For example, when the main color of the target logo picture is single, the target logo picture needs to be filled. And after cutting is finished, returning the cut picture corresponding to the target logo picture to the CDN, and transmitting the cut picture corresponding to the target logo picture to a browser of the terminal equipment by the CDN.
According to the picture service method provided by the embodiment, when the original picture is cut, the original picture is cut based on the asynchronously obtained characteristic information and the synchronously stored content data, the server does not need to extract the time of the characteristic information of the original picture, the cutting time is shortened, the average cutting time can be reduced to be less than 200ms, and the cutting efficiency is improved. Moreover, by performing cropping based on the feature information of the original picture, the error rate of cropping can be reduced, and the error rate can be reduced from 3% to 0.05%.
In a second aspect, the present disclosure provides a picture service apparatus, which may increase a cropping rate of a picture, thereby increasing an access speed of a user.
Fig. 5 is a schematic diagram of a second embodiment of the present disclosure. As shown in fig. 5, the picture service apparatus 500 includes:
the feature extraction module 501 is configured to respond to an upload request of an original picture, and extract feature information of the original picture.
The uploaded original picture can be any type of picture, such as portrait, trademark (logo), landscape, and the like. The content data of the original picture refers to a set of gradation values that numerically represent each pixel (pixel) in the original picture. The feature information of the original picture is information for representing a main feature in the original picture. For example, the feature information of the original picture includes, but is not limited to, at least one of face feature information, body feature information, and background color feature information.
The face feature information may be face feature information of all people in the original picture, or face feature information of main people in the original picture. The main body characteristic information is characteristic information which embodies the main body of the original picture. The background color characteristic information is characteristic information which embodies the background color of the original picture. For example, the original picture is a logo picture, the characteristic information representing the logo pattern is main characteristic information of the original picture, and the colors except the logo pattern are background color characteristic information.
In some embodiments, the upload request of the original picture may be a request sent by a user through a terminal device, or a request sent by a service provider providing a picture service.
The storage module 502 is configured to store content data of the original picture and feature information of the original picture.
And after receiving the uploading request, the server stores the uploaded content data of the original picture in the storage module. Moreover, the server can also process the original picture, such as extracting feature information of the original picture, and store the extracted feature information. The storage module for storing the content data of the original picture and the storage module for storing the feature information of the original picture may be different storage modules or the same storage module.
And a cropping module 503, configured to crop, in response to the access request of the original picture, the original picture based on the content data and the feature information of the original picture, so as to obtain a cropped picture.
In some embodiments, after receiving the access request, the server crops the original picture based on the content data and the feature information of the original picture to obtain a cropped picture. The server obtains the characteristic information of the original picture, and the time for extracting the characteristic information of the original picture is not needed, so that the cropping speed can reach millisecond level, and the cropping efficiency is improved.
A sending module 504, configured to send the cropped picture to the terminal device that initiated the access request.
After obtaining the cut picture corresponding to the original picture, the server sends the cut picture to the terminal equipment through the sending module, and the terminal equipment initiates an access request.
In some embodiments, the feature extraction module 501 extracts feature information of the original picture asynchronously. The storage module 502 synchronously stores content data of the original picture.
The feature extraction module 501 includes a face feature extraction unit, a main body feature extraction unit, and a background color feature extraction unit, where the face feature extraction unit is configured to extract face features in an original picture. The main body feature extraction unit is used for extracting main body features in the original picture. The background color feature extraction unit is used for extracting the background color features in the original picture.
In some embodiments, the cropping module 503 crops the original picture based on the content data and the feature information corresponding to the original picture to obtain a cropped picture corresponding to the original picture in the absence of the cropped picture corresponding to the original picture. In some embodiments, cropping module 503 crops the original picture at a different display scale, resulting in a cropped picture of a different display scale.
In some embodiments, the address of the url of the storage module 502 storing the cropped picture is different from the address of the url of the original picture, which is beneficial to addressing and calling different pictures and avoids confusion in storing the original picture and the cropped picture, thereby improving the access rate of the picture. The different addresses of the uniform resource locators of the cut pictures with different display proportions in the storage module 502 are beneficial to managing the cut pictures, confusion in calling the cut pictures is avoided, calling efficiency is improved, and accordingly the access rate of a user is improved.
According to the picture service device provided by the embodiment of the disclosure, when the original picture is cut by the cutting module, the original picture is cut based on the asynchronously obtained feature information and the synchronously stored content data, so that the cutting module does not need to extract the feature information of the original picture, the cutting time is shortened, the average cutting time can be reduced to be less than 200ms, and the cutting efficiency is improved. Moreover, the cropping module performs cropping based on the characteristic information of the original picture, so that the error rate of cropping can be reduced from 3% to 0.05%.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 6 illustrates a schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
FIG. 6 illustrates a schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The calculation unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, a mouse, or the like; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 601 performs the respective methods and processes described above, such as the picture service method. For example, in some embodiments, the picture service method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the picture service method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the picture service method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
According to an embodiment of the present disclosure, there is also provided a computer program product comprising a computer program which, when executed by a processor, implements any one of the above-mentioned picture service methods.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (10)

1. A picture service method, comprising:
responding to an uploading request of an original picture, storing content data of the original picture, and extracting and storing feature information of the original picture;
in response to an access request of an original picture, cropping the original picture based on the content data and the feature information of the original picture to obtain a cropped picture;
and sending the trimming picture to the terminal equipment initiating the access request.
2. The method of claim 1, wherein the storing the content data of the original picture and extracting and storing the feature information of the original picture in response to the upload request of the original picture comprises:
responding to the uploading request of the original picture, and synchronously storing the content data of the original picture; and asynchronously extracting and storing the feature information of the original picture.
3. The method of claim 1, wherein said cropping the original picture based on the content data and the feature information of the original picture in response to an access request for the original picture to obtain a cropped picture comprises:
responding to the access request of the original picture, and searching whether the cut picture corresponding to the original picture exists or not;
and under the condition that the trimming picture corresponding to the original picture does not exist, trimming the original picture based on the content data and the characteristic information corresponding to the original picture to obtain the trimming picture corresponding to the original picture.
4. The method of claim 1, wherein the cropping the original picture based on the content data and the feature information of the original picture in response to the access request for the original picture, after obtaining the cropped picture, further comprises:
storing the cropped picture, wherein an address of a uniform resource locator storing the cropped picture is different from an address of a uniform resource locator storing the original picture.
5. The method of claim 1, wherein the cropped picture comprises a plurality of display proportions of the cropped picture, and wherein addresses of uniform resource locators of the cropped picture of different display proportions are different.
6. The method of any of claims 1-5, wherein the feature information comprises at least one of: face feature information, body feature information, and background color feature information.
7. A picture service apparatus, comprising:
the feature extraction module is used for responding to an uploading request of an original picture and extracting feature information of the original picture;
the storage module is used for storing the content data of the original picture and the characteristic information of the original picture;
the cropping module is used for responding to an access request of an original picture, cropping the original picture based on the content data and the characteristic information of the original picture and obtaining a cropped picture;
and the sending module is used for sending the cut picture to the terminal equipment initiating the access request.
8. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
9. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-6.
10. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-6.
CN202011533322.4A 2020-12-22 2020-12-22 Picture service method, apparatus, device, storage medium and computer program product Active CN112612980B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011533322.4A CN112612980B (en) 2020-12-22 2020-12-22 Picture service method, apparatus, device, storage medium and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011533322.4A CN112612980B (en) 2020-12-22 2020-12-22 Picture service method, apparatus, device, storage medium and computer program product

Publications (2)

Publication Number Publication Date
CN112612980A true CN112612980A (en) 2021-04-06
CN112612980B CN112612980B (en) 2024-03-01

Family

ID=75244481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011533322.4A Active CN112612980B (en) 2020-12-22 2020-12-22 Picture service method, apparatus, device, storage medium and computer program product

Country Status (1)

Country Link
CN (1) CN112612980B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101025764A (en) * 2006-02-24 2007-08-29 佳能株式会社 Image processing apparatus, image processing method, and server and control method of the same
WO2017193906A1 (en) * 2016-05-09 2017-11-16 腾讯科技(深圳)有限公司 Image processing method and processing system
CN107393000A (en) * 2017-08-24 2017-11-24 广东欧珀移动通信有限公司 Image processing method, device, server and computer-readable recording medium
CN108122238A (en) * 2018-01-30 2018-06-05 百度在线网络技术(北京)有限公司 Image processing method, device, equipment and computer readable storage medium
CN109033261A (en) * 2018-07-06 2018-12-18 北京旷视科技有限公司 Image processing method, device, processing equipment and its storage medium
EP3493105A1 (en) * 2017-12-03 2019-06-05 Facebook, Inc. Optimizations for dynamic object instance detection, segmentation, and structure mapping
CN111063007A (en) * 2019-12-17 2020-04-24 北京思维造物信息科技股份有限公司 Image generation method, device, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101025764A (en) * 2006-02-24 2007-08-29 佳能株式会社 Image processing apparatus, image processing method, and server and control method of the same
WO2017193906A1 (en) * 2016-05-09 2017-11-16 腾讯科技(深圳)有限公司 Image processing method and processing system
CN107393000A (en) * 2017-08-24 2017-11-24 广东欧珀移动通信有限公司 Image processing method, device, server and computer-readable recording medium
EP3493105A1 (en) * 2017-12-03 2019-06-05 Facebook, Inc. Optimizations for dynamic object instance detection, segmentation, and structure mapping
CN108122238A (en) * 2018-01-30 2018-06-05 百度在线网络技术(北京)有限公司 Image processing method, device, equipment and computer readable storage medium
CN109033261A (en) * 2018-07-06 2018-12-18 北京旷视科技有限公司 Image processing method, device, processing equipment and its storage medium
CN111063007A (en) * 2019-12-17 2020-04-24 北京思维造物信息科技股份有限公司 Image generation method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
徐少平;刘小平;李春泉;胡凌燕;杨晓辉;: "基于区域特征分析的快速FCM图像分割改进算法", 模式识别与人工智能, no. 06, 15 December 2012 (2012-12-15) *

Also Published As

Publication number Publication date
CN112612980B (en) 2024-03-01

Similar Documents

Publication Publication Date Title
CN109992406B (en) Picture request method, picture request response method and client
CN104601534A (en) Method and system for processing CDN system images
US20190114989A1 (en) Systems and methods for image optimization
WO2014114144A1 (en) Method, server and terminal for information interaction
CN111225010A (en) Data processing method, data processing system and device
CN114792355B (en) Virtual image generation method and device, electronic equipment and storage medium
CN113138827A (en) Method, device, electronic equipment and medium for displaying data
CN111815738A (en) Map construction method and device
CN112688991B (en) Method for performing point cloud scanning operation, related apparatus and storage medium
CN108959393B (en) Dynamic picture processing method, device and storage medium
US11403835B2 (en) Method and device for processing feature point of image
CN112612980B (en) Picture service method, apparatus, device, storage medium and computer program product
CN112667368A (en) Task data processing method and device
CN113691937B (en) Method for determining position information, cloud mobile phone and terminal equipment
CN115858905A (en) Data processing method and device, electronic equipment and storage medium
CN110750602A (en) Method and device for determining site to which order address belongs
CN115016955A (en) Method and device for sharing information among multiple applications
CN115086194A (en) Data transmission method for cloud application, computing equipment and computer storage medium
CN112688982B (en) User request processing method and device
CN113032696A (en) Display method and display device of page picture
CN113760205A (en) Picture display method and device
CN112861504A (en) Text interaction method, device, equipment, storage medium and program product
CN115334040B (en) Method and device for determining Internet Protocol (IP) address of domain name
CN113032040B (en) Method, apparatus, device, medium, and article for processing tasks
CN114924826B (en) Page fusion method, device and equipment based on different code platforms

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