WO2019051797A1 - 图像处理方法和装置、计算机设备、计算机可读存储介质 - Google Patents

图像处理方法和装置、计算机设备、计算机可读存储介质 Download PDF

Info

Publication number
WO2019051797A1
WO2019051797A1 PCT/CN2017/101935 CN2017101935W WO2019051797A1 WO 2019051797 A1 WO2019051797 A1 WO 2019051797A1 CN 2017101935 W CN2017101935 W CN 2017101935W WO 2019051797 A1 WO2019051797 A1 WO 2019051797A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
clustering
server
processed
subset
Prior art date
Application number
PCT/CN2017/101935
Other languages
English (en)
French (fr)
Inventor
柯秀华
曹威
王俊
Original Assignee
广东欧珀移动通信有限公司
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 广东欧珀移动通信有限公司 filed Critical 广东欧珀移动通信有限公司
Priority to PCT/CN2017/101935 priority Critical patent/WO2019051797A1/zh
Publication of WO2019051797A1 publication Critical patent/WO2019051797A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/65Transmission of management data between client and server

Definitions

  • the present application relates to the field of computer technology, and in particular, to an image processing method and apparatus, a computer device, and a computer readable storage medium.
  • the server can respond quickly and accurately. There may be thousands of users requesting, and a single user may have multiple requests, causing the server to double the pressure while processing the task. After the server returns the processing result, it will be displayed to the user, and the user will view the processing result.
  • the embodiment of the present application provides an image processing method and apparatus, a computer device, and a computer readable storage medium, which can improve the accuracy of image processing.
  • An image processing method comprising:
  • the image set to be processed is classified according to the local clustering result and the server clustering result.
  • An image processing apparatus comprising:
  • An image obtaining module configured to acquire a to-be-processed image set, and perform clustering processing on the to-be-processed image set to obtain a local clustering result, where the to-be-processed image set includes a first image subset and a second image subset;
  • An image sending module configured to send the first image subset to a server, and receive a server clustering result returned by the server, where the server clustering result is clustered according to the first image subset of;
  • the image processing module is configured to classify the image set to be processed according to the local clustering result and the server clustering result.
  • a computer device comprising a memory and a processor, wherein the memory stores computer readable instructions, and when the instructions are executed by the processor, the processor performs the following steps:
  • the image set to be processed is classified according to the local clustering result and the server clustering result.
  • One or more non-transitory computer readable storage media containing computer executable instructions that, when executed by one or more processors, cause the processor to perform the following steps:
  • the image set to be processed is classified according to the local clustering result and the server clustering result.
  • An image processing method comprising:
  • the server clustering result to the client, to instruct the client to perform performing classification according to the server clustering result and a local clustering result, where the to-be-processed image set is classified, where the local aggregation
  • the class result is obtained by the client performing clustering according to the to-be-processed image set, and the to-be-processed image set includes a first image subset and a second image subset.
  • An image processing apparatus comprising:
  • An image receiving module configured to receive a first image subset sent by the client
  • a clustering processing module configured to perform clustering processing according to the first image subset to obtain a server clustering result
  • a result sending module configured to send the server clustering result to the client, to instruct the client to perform the classifying the to-be-processed image set according to the server clustering result and the local clustering result And the local clustering result is obtained by the client performing clustering according to the to-be-processed image set, where the to-be-processed image set includes a first image subset and a second image subset.
  • a computer device comprising a memory and a processor, wherein the memory stores computer readable instructions, and when the instructions are executed by the processor, the processor performs the following steps:
  • the server clustering result to the client, to instruct the client to perform performing classification according to the server clustering result and a local clustering result, where the to-be-processed image set is classified, where the local aggregation
  • the class result is obtained by the client performing clustering according to the to-be-processed image set, and the to-be-processed image set includes a first image subset and a second image subset.
  • One or more non-transitory computer readable storage media containing computer executable instructions that, when executed by one or more processors, cause the processor to perform Next steps:
  • the server clustering result to the client, to instruct the client to perform performing classification according to the server clustering result and a local clustering result, where the to-be-processed image set is classified, where the local aggregation
  • the class result is obtained by the client performing clustering according to the to-be-processed image set, and the to-be-processed image set includes a first image subset and a second image subset.
  • FIG. 1 is a schematic diagram of an application environment of an image processing method in an embodiment
  • FIG. 2 is a schematic diagram of an application environment of an image processing method in another embodiment
  • FIG. 3 is a schematic diagram of an application environment of an image processing method in still another embodiment
  • FIG. 4 is a hardware interaction timing diagram of an image processing method in an embodiment
  • Figure 5 is a flow chart of an image processing method in an embodiment
  • FIG. 6 is a display diagram of a mobile terminal album classification result in an embodiment
  • FIG. 7 is a flow chart of an image processing method in another embodiment
  • Figure 8 is a flow chart of an image processing method in still another embodiment
  • FIG. 9 is a server architecture diagram for implementing clustering processing in an embodiment
  • FIG. 10 is a system architecture diagram of an image processing system in an embodiment
  • FIG. 11 is a system architecture diagram of an image processing system in another embodiment
  • FIG. 12 is a system architecture diagram of an image processing system in still another embodiment
  • Figure 13 is a system architecture diagram of an image processing system in still another embodiment
  • FIG. 14 is a schematic structural diagram of an image processing apparatus in an embodiment
  • 15 is a schematic structural diagram of an image processing apparatus in another embodiment
  • 16 is a schematic diagram showing the internal structure of a server in an embodiment
  • FIG. 17 is a block diagram showing a part of a structure of a mobile phone related to a computer device according to an embodiment of the present invention.
  • first may be referred to as a second client
  • second client may be referred to as a first client, without departing from the scope of the present application.
  • Both the first client and the second client are clients, but they are not the same client.
  • FIG. 1 is a schematic diagram of an application environment of an image processing method in an embodiment.
  • the application environment includes a client 12 and a server 14.
  • the client 12 is configured to acquire a to-be-processed image set, and perform clustering processing on the to-be-processed image set to obtain a local clustering result, and send the first image subset in the to-be-processed image set to the server 14.
  • the server 14 performs clustering processing according to the first image subset to obtain a server clustering result, and sends the server clustering result to the client 12.
  • the client 12 further classifies the image set to be processed according to the local clustering result and the server clustering result.
  • the client 12 is an electronic device that is mainly used for inputting user information and outputting processing results at the outermost periphery of the computer network, and may be, for example, a personal computer, a mobile terminal, a personal digital assistant, a wearable electronic device, or the like.
  • the server 14 is a device for providing a computing service in response to a service request, and may be, for example, one or more computers.
  • the application environment includes a client 22, a first server 24, and a second server 26.
  • the client 22 is configured to acquire a set of images to be processed, and perform clustering processing on the image set to be processed to obtain local clustering.
  • the first subset of images in the set of images to be processed is sent to the first server 24.
  • the first server 24 performs feature recognition processing according to the first image subset, obtains a feature set corresponding to the first image subset, and transmits the feature set to the second server 26.
  • the second server 26 performs clustering processing according to the feature set to obtain a server clustering result, and sends the server clustering result to the client 22.
  • the client 22 further classifies the image set to be processed according to the local clustering result and the server clustering result.
  • the client 22 is an electronic device that is mainly used for inputting user information and outputting processing results at the outermost periphery of the computer network, and may be, for example, a personal computer, a mobile terminal, a personal digital assistant, a wearable electronic device, or the like.
  • the first server 24 and the second server 26 are devices for providing a computing service in response to a service request, and may be, for example, one or more computers.
  • FIG. 3 is a schematic diagram of an application environment of an image processing method in still another embodiment.
  • the application environment includes a client 32, a server 34, and a sub-server cluster 36.
  • the client 32 can obtain a set of images to be processed, perform clustering processing on the image set to be processed to obtain a local clustering result, generate a clustering request according to the first image subset in the image set to be processed, and send the clustering request to the server.
  • the server 34 generates a clustering request queue according to the received clustering request, searches for the target server identifier by using the status identifier of each sub-server 362, and sends the clustering request in the clustering request queue to the sub-server 362 corresponding to the target server identifier.
  • the server clustering result obtained by the subserver 362 may be directly sent to the client 32, or may be sent to the server 34 first, and then sent to the client 32 through the server 34.
  • the sub-server cluster 36 includes one or more sub-servers 362 for implementing distributed task processing.
  • the client 32 is an electronic device that is mainly used to input user information and output processing results at the outermost periphery of the computer network, and may be, for example, a personal computer, a mobile terminal, a personal digital assistant, a wearable electronic device, or the like.
  • the server 34 and the subserver 362 are devices for providing a computing service in response to a service request, and may be, for example, one or more computers.
  • the interaction timing diagram includes steps 402 to 410. among them:
  • Step 402 The client acquires a to-be-processed image set, and performs clustering processing according to the to-be-processed image set to obtain a local clustering result.
  • the to-be-processed image set includes a first image subset and a second image subset
  • the client clusters the to-be-processed image collection to obtain a local clustering result.
  • the client can set a condition for triggering the clustering process, and if the condition is met, the image set to be processed is acquired, and the clustering process is performed.
  • the preset trigger condition is met, the image set to be processed is acquired.
  • the image set to be processed and the corresponding historical classification information may be acquired, and the image set to be processed is clustered according to the historical classification information to obtain a local clustering result. Further, it may be first determined whether the local clustering model is updated. If the local clustering model is not updated, only the newly added image set to be processed may be clustered to obtain a local clustering result.
  • step 404 the client sends the first image subset to the server.
  • the client may generate a clustering request according to the first image subset and send the clustering request to the server, and the server performs clustering processing on the first image subset according to the clustering request.
  • Step 406 The server performs clustering processing according to the first image subset to obtain a server clustering result.
  • the set of regions of interest corresponding to the first subset of images may be sent to the server, and the server clustering result returned by the server is received, and the server clustering result is a set of regions of interest corresponding to the first subset of images.
  • the clustering process is obtained.
  • the first image subset and the corresponding historical classification information are sent to the server, and the server clustering result returned by the server is received, and the server clustering result is performed according to the first image subset and the corresponding historical classification information.
  • Clustered processing Further, the first image subset and the corresponding system classification information are sent to the server, and the server clustering result returned by the server is received, and the server clustering result is clustered according to the first image subset and the corresponding system classification information. Processed.
  • step 408 the server sends the server clustering result to the client.
  • the obtained server clustering result is sent to the client.
  • the server can also generate tag data based on server clustering results and store tag data on disk.
  • Step 410 The client compares the image to be processed according to the local clustering result and the server clustering result. sort.
  • the to-be-processed image in the first image subset is classified according to the server clustering result; according to the local clustering
  • the second local clustering result in the result classifies the image to be processed in the second image subset.
  • the first local clustering result refers to a clustering result obtained by clustering the first image subsets locally, and the second local clustering result is obtained by clustering the second image subsets locally. Clustering results.
  • the local clustering result classifies the image to be processed; if the local clustering result is the same as the server clustering result, the image to be processed is classified by the server clustering result; if the image to be processed in the image set to be processed does not have a corresponding server For the class result, the image to be processed is classified by the local clustering result.
  • FIG. 5 is a flow chart of an image processing method in one embodiment. As shown in FIG. 5, the image processing method includes steps 502 to 506. among them:
  • Step 502 Acquire an image set to be processed, and perform clustering processing on the image set to be processed to obtain a local clustering result, where the to-be-processed image set includes a first image subset and a second image subset.
  • the image to be processed refers to an image that needs to be processed, for example, the image to be processed may be an image that needs to be subjected to feature recognition, classification, and the like.
  • the image set to be processed refers to a set of images to be processed, and one or more images to be processed may be included in the image set to be processed.
  • Clustering is the process of dividing a collection of objects into multiple objects, each of which consists of one or more similar objects.
  • Clustering the image set to be processed is to divide the image to be processed in the image set to be processed into one or more different types of processes.
  • the local clustering result refers to the clustering result obtained by clustering the image to be processed on the client.
  • the first image subset and the second image set represent a set of some or all of the to-be-processed images in the image set to be processed Hehe.
  • the client stores the image in the storage space, and the client can directly obtain the image from the preset storage address, or traverse all the folders in the mobile terminal to obtain the image.
  • the storage space of the client is divided into internal memory and external storage.
  • the internal memory refers to the memory that comes with the client itself and is part of the client hardware structure.
  • the external storage refers to the external storage device of the client, and the external storage can transmit data to the client through a dedicated interface.
  • the external storage may be an SD card, a USB flash drive or the like.
  • the image set to be processed may include images stored in the internal memory and the external memory, the first image subset may refer to the image stored in the internal memory, and the second image subset may refer to the image stored in the external memory.
  • the first image subset is sent to the server for clustering processing, and the transmission speed is slow because the original image occupying a large space.
  • only the region of interest in the image to be processed may be sent to the server for clustering.
  • the image set to be processed and the corresponding set of regions of interest may be acquired, and the set of regions of interest corresponding to the first subset of images is sent to the server.
  • the region of interest refers to the region in the image to be processed that is of interest when the image set to be processed is clustered.
  • the region of interest may be the region where the face is located in the image to be processed.
  • the clustering process may be performed according to the image set to be processed, or may be clustered according to the set of regions of interest. It can be understood that the extracted region of interest corresponds to the corresponding image to be processed, and one image to be processed may include one or more regions of interest, and the image to be processed is marked by the image identifier, and the region of interest may pass The area identifier is marked, and the image identifier and the area identifier may be a one-to-one correspondence or a one-to-many correspondence.
  • a condition for triggering the clustering process may be set, and if the condition is satisfied, the image set to be processed is acquired, and the clustering process is performed. Specifically, when the preset trigger condition is met, the image set to be processed is acquired.
  • the preset trigger condition refers to a condition for trigger cluster processing that is set in advance, and clustering processing is performed when the preset trigger condition is satisfied.
  • the preset triggering condition may be, but is not limited to, the clustering triggering condition includes at least one of the following methods: the number of newly added pictures on the client is greater than a preset number; the current time is a preset time; and the time from the last time the clustering request is initiated Exceeding the preset time period; The mobile terminal is currently in a charging state; the current clustering model changes.
  • the image collection to be processed is clustered to obtain local clustering results, which specifically refers to clustering the image collection to be processed according to the local clustering model to obtain local clustering results.
  • the clustering model refers to an algorithm model for clustering processing, and the clustering model can cluster the images to be processed.
  • commonly used clustering models include k-means clustering model, hierarchical clustering model, SOM clustering model and FCM clustering model.
  • the local clustering model refers to a locally stored clustering model.
  • the image set to be processed is clustered, that is, the image to be processed in the image set to be processed may have been clustered multiple times. And there is corresponding classification information. That is to say, some or all of the images to be processed in the image set to be processed may already have corresponding classification information. Then, the historical classification information can be obtained, and the image collection to be processed is clustered according to the historical clustering information.
  • the step 502 may include: acquiring a to-be-processed image set and corresponding historical classification information, and performing clustering processing on the to-be-processed image set according to the historical classification information to obtain a local clustering result.
  • the historical classification information refers to historical classification information corresponding to the image to be processed. For example, in the previous clustering process, the image processed by the clustering has corresponding classification information, and the image generated after the previous clustering processing has no corresponding classification information. If the local clustering model is not updated, this time can be Only this part of the newly added images will be clustered.
  • the historical classification information may include system classification information and manual classification information
  • the system classification information refers to classification information obtained by automatically classifying the processed image by the system
  • the manual classification information refers to the classification of the image to be manually processed by the user.
  • Classified information For example, when the mobile terminal presents the classification information of the image to be processed, the user can view the information. If the classification information of a certain image to be processed does not meet the personal preference, the classification information of the image to be processed can be manually changed. For the newly added pictures, the system separately creates a grouping for these newly added pictures, so that when the image to be processed is obtained, the classified information can be used to determine which pictures are added.
  • the to-be-processed image set corresponding to the system classification information may be clustered to obtain a local clustering result. That is, the image to be processed manually classified by the user is not clustered, and only the image to be processed corresponding to the system classification information is clustered. Further, it can be determined first that the local clustering model is If there is an update, if the local clustering model is not updated, only the newly added image set to be processed can be clustered to obtain the local clustering result.
  • Step 504 Send the first image subset to the server, and receive the server clustering result returned by the server, where the server clustering result is obtained by performing clustering processing according to the first image subset.
  • the first subset of images is sent to a server, and the server performs clustering processing according to the first subset of images to obtain a server clustering result.
  • the server After receiving the first image subset, the server stores the first image subset and performs clustering processing according to the first image subset.
  • the obtained clustering processing result can be marked by the classification label, and the classification label can know which type of data the image to be processed belongs to.
  • the label data is formed by the image identifier of the image to be processed and the corresponding classification label, and the clustering result returned by the server only needs to include the label data, and there is no need to return the entire image collection.
  • each image to be processed in the to-be-processed image set has a corresponding image identifier, and the image identifier has a corresponding relationship with the formed classification label, and the image to be processed corresponding to the image identifier can be classified according to the classification label.
  • the image identification includes “image 1", “image 2", and “image 3”
  • the classification label may include “category 1” and “category 2”
  • “category 1" corresponds to "image 1" and "image 2”
  • Category 2" corresponds to "Image 3".
  • Step 504 may include: sending a set of regions of interest corresponding to the first subset of images to a server, and receiving a server clustering result returned by the server, where the server clustering result is aggregated according to the set of regions of interest corresponding to the first subset of images Class processed.
  • the server clustering model is stored in the server, and after receiving the first image subset, the first image subset is clustered according to the server clustering model. It can be understood that if the set of regions of interest is received, the set of regions of interest may also be clustered according to the server clustering model.
  • the first image subset may be clustered according to the historical classification information.
  • the step 504 may specifically include: sending the first image subset and the corresponding historical classification information to the server, and The server clustering result returned by the server is received, and the server clustering result is obtained by performing clustering processing according to the first image subset and the corresponding historical classification information. Further, the first image subset and the corresponding system classification information are sent to the server, and the server clustering result returned by the server is received, and the server clustering result is clustered according to the first image subset and the corresponding system classification information. Processed.
  • Step 506 classifying the image set to be processed according to the local clustering result and the server clustering result.
  • the client performs clustering processing on the first image subset and the second image subset to obtain a local clustering result.
  • the server performs server clustering results on the first image subset.
  • the client can classify the image to be processed in the image set to be processed by the local clustering result and the server clustering result.
  • step 506 may specifically include: if the first local clustering result in the local clustering result is different from the server clustering result, performing the to-be-processed image in the first image subset according to the server clustering result. Classification; classifying the image to be processed in the second image subset according to the second local clustering result in the local clustering result.
  • the first local clustering result refers to a clustering result obtained by clustering the first image subsets locally, and the second local clustering result is obtained by clustering the second image subsets locally. Clustering results.
  • the local clustering result classifies the image to be processed; if the local clustering result is the same as the server clustering result, the image to be processed is classified by the server clustering result; if the image to be processed in the image set to be processed does not have a corresponding server For the class result, the image to be processed is classified by the local clustering result.
  • the client displays the classified images in groups, and the user can directly view the display interface of the client, or view the application account by logging in.
  • the client can set the function of the user to manually move the group, that is, the user can manually move the grouping of the image based on the existing classification.
  • the packet can also be encrypted, and the user can only view the corresponding packet after being authenticated, for example, by one or more of information such as a password, a fingerprint, or an iris.
  • it is also possible to display different groups by inputting different authentication information, for example, inputting a fingerprint of a thumb, displaying the group 1 in the first place; inputting the fingerprint of the index finger, and displaying the group 2 in the second position.
  • FIG. 6 is a diagram showing a result of classification of a mobile terminal album in an embodiment.
  • the mobile terminal classifies the pictures in the album according to the clustering processing result returned by the server, and displays the classified result on the interface of the mobile terminal.
  • Six classification results are displayed on the interface in this embodiment, including "Class 1", “Class 2", “Class 3”, “Class 4", “Class 5" and “Class 6", respectively. Contains several common images, click on the corresponding category to view the images in the category.
  • the image processing method provided in the above embodiment obtains a set of images to be processed for clustering, and sends a first subset of the image in the image set to be sent to a server for clustering, and according to the local clustering result and the server clustering result. Classify the collection of images to be processed. In this way, not only the clustering process can be performed by the client, but also the clustering processing result of the server can be considered, the problem of inaccurate image clustering result caused by clustering processing at one end is prevented, and the accuracy of image processing is improved.
  • FIG. 7 is a flow chart of an image processing method in another embodiment. As shown in FIG. 7, the image processing method includes steps 702 to 706. among them:
  • Step 702 Receive a first image subset sent by a client.
  • the client may acquire a set of images to be processed, and the set of images to be processed refers to a set of images to be processed, and one or more images to be processed may be included in the set of images to be processed.
  • the set of images to be processed includes a first subset of images and a second subset of images.
  • the first subset of images and the second set of images represent a collection of some or all of the images to be processed in the set of images to be processed.
  • a communication connection and a communication connection can be established first between the client and the server. After successful, the server will return a successful connection message to the client, and then the client will send the first image subset to the server according to the connection success information.
  • a communication port can be established between a client and a server through a pair of port numbers. After the connection is established, the picture is sent through the connected port number.
  • the first image subset After receiving the first image subset sent by the client, the first image subset may be stored, so that the client may obtain the image in the first image subset even if it is deleted from the server. It can be understood that after storing the first image subset, a webpage link can be generated and the webpage link can be returned to the client.
  • the client can view the stored first image subset by accessing the webpage link, and can download the image in the first image subset.
  • the webpage link corresponds to a webpage document, and the client obtains and reads the webpage document when clicking the webpage link, and the webpage document includes the storage address and the image identifier of the webpage.
  • the client parses the webpage document and displays the content in the webpage document, and the user views the image through the displayed content.
  • Step 702 Perform clustering processing according to the first image subset to obtain a server clustering result.
  • performing the clustering process according to the first image subset may include: performing feature recognition processing on the image to be processed in the first image subset to obtain a feature set corresponding to the first image subset; Clustering is performed to obtain server clustering results.
  • the feature set is a set of features extracted according to the acquired first image subset.
  • the first image subset is a set of images to be processed for performing classification processing, and the feature set refers to a collection of features for cluster processing in the image to be processed.
  • Features for clustering processing may represent type features in the image to be processed. For example, the images in the album are classified according to the face, and the feature set is a set of face regions in the image.
  • the feature recognition process is performed according to the first image subset, and the feature set is obtained, and the clustering process is performed according to the feature set to obtain the clustering result.
  • the space occupied by the received image set is very large, and after clustering the image set, the returned clustering result refers to the data that marks the image in the image set, so the clustering result occupies The space is very small and the transfer speed will be very fast.
  • Image identification of the image to be processed and characteristics corresponding to the feature in the clustering result The root identifier and the classification label are corresponding, and the client can find out which category the image to be processed belongs to by the clustering result, and classify the image to be processed.
  • Step 704 the server clustering result is sent to the client, and is used to instruct the client to perform classification according to the server clustering result and the local clustering result, and the local clustering result is determined by the client according to the image to be processed.
  • the set of images to be processed includes a first image subset and a second image subset.
  • the server clustering result may be directly pushed to the client.
  • the server clustering result is pushed to the client through the PUSH service.
  • the PUSH service is a service for pushing data.
  • the local clustering result is a clustering result obtained by the client clustering according to the image set to be processed, and includes a first local clustering result and a second local clustering result, where the first local clustering result is according to the first image sub-s
  • the clustering result obtained by clustering is collected, and the second local clustering result is a clustering result obtained by clustering according to the second image subset. If the first local clustering result in the local clustering result is different from the server clustering result, the to-be-processed image in the first image subset is classified according to the server clustering result; according to the second local in the local clustering result
  • the clustering result classifies the image to be processed in the second image subset.
  • the first local clustering result refers to a clustering result obtained by clustering the first image subsets locally, and the second local clustering result is obtained by clustering the second image subsets locally. Clustering results.
  • the classification type corresponding to each image to be processed is recorded in the clustering result, and the image to be processed can be classified by the clustering result. Specifically, traversing each image to be processed in the image set to be processed, and acquiring a local clustering result corresponding to the image to be processed and a server clustering result, if the local clustering result and the server clustering result are the same, the local The clustering result classifies the image to be processed; if the local clustering result is the same as the server clustering result, the image to be processed is classified by the server clustering result; if the image to be processed in the image set to be processed does not have a corresponding server For the class result, the image to be processed is classified by the local clustering result.
  • the image processing method provided by the foregoing embodiment acquires a set of images to be processed for clustering processing,
  • the first image subset in the image set to be processed is sent to the server for clustering processing, and the image set to be processed is classified according to the local clustering result and the server clustering result.
  • the clustering processing result of the server can be considered, the problem of inaccurate image clustering result caused by clustering processing at one end is prevented, and the accuracy of image processing is improved.
  • FIG. 8 is a flow chart of an image processing method in still another embodiment. As shown in FIG. 8, the image processing method includes steps 802 to 810. among them:
  • Step 802 Receive a clustering request generated by the client according to the first image subset, and generate a clustering request queue according to the received clustering request.
  • clustering refers to the process of dividing a collection of objects into a plurality of combinations of objects, each combination of objects being composed of one or more similar objects.
  • a clustering request is a command for clustering a clustering object set.
  • the clustering request queue is a queue formed by one or more clustering requests, and the clustering request is processed according to the clustering request queue.
  • the request origination object refers to the object that initiated the clustering request.
  • the clustering request may include information such as a request originating device identifier, a request receiving device identifier, a request initiation time, a clustering object set, and an attribute parameter of the clustering object.
  • the clustering object set refers to a set of objects used for clustering processing, for example, the clustering object set may be a first image subset.
  • the attribute parameter of the clustering object refers to a parameter indicating an attribute of the clustering object set.
  • the attribute parameter of the clustering object may refer to a file size, a size, a file format, and the like of a picture used for clustering.
  • the receiving device receives multiple clustering requests from multiple sending clients, a clustering request queue is formed according to the multiple clustering requests, and the clustering request in the clustering request queue is processed.
  • the clustering object set may also be a clustering object identifier, that is, the server may search for the clustering object set according to the clustering object identifier, and perform clustering processing on the clustering object set.
  • the first image sub-collection is pre-stored on the server, and when the client sends the clustering request, only the cluster object identifier needs to be sent, and the server can directly identify the cluster object according to the cluster object identifier. Finding a first subset of images and clustering the first subset of images.
  • the client can receive clustering requests from multiple clients, and each client can also initiate multiple clustering requests.
  • the client may preset a condition for triggering a clustering request to the server, and the set clustering triggering condition includes at least one of the following methods: the number of newly added pictures on the client is greater than a preset number; the current time is a preset time; The time for initiating the clustering request exceeds the preset time period; the client is currently in the charging state; the current clustering model changes. For example, when the mobile terminal adds more than 50 pictures, if the current time is between 2 am and 5 am, and the mobile terminal is in a charging state, the mobile terminal initiates a clustering request.
  • Step 804 Acquire the same clustering request of the request originating object from the clustering request queue, and merge the acquired clustering requests.
  • the client may initiate a clustering request to the server, and the server may connect to multiple clients and receive clustering requests sent by multiple clients.
  • the merge clustering request refers to a process of combining multiple clustering requests into one clustering request and processing the merged clustering request, and implementing multiple clustering requests simultaneously.
  • the request initiation device identifier included in each cluster request in the cluster request queue is obtained, and the cluster request requests in the cluster request queue that request the same device identifier are merged.
  • the requesting initiation device identifies the same clustering request, that is, the clustering request sent by the same request originating object.
  • the clustering request can be initiated to the server by the client where the application account is located. That is to say, when the client initiates a clustering request to the server, the requesting device identifier may refer to an application account identifier or a terminal identifier.
  • the application account identifier refers to a unique identifier used to represent the identity of the user, and the terminal identifier refers to a unique identifier that distinguishes different clients.
  • the terminal identifier may be, but not limited to, an IP (Internet Protocol) protocol, a MAC (Media Access Control) address, and the like of the client.
  • the user can log in to the smart terminal through the application account, and send a request for clustering the photos in the album to the server through the smart terminal.
  • the server clusters the photos in the album. Process and return the results of the clustering process to the smart end end.
  • the clustering request is merged, the clustering object set in each clustering request is merged. Since the requesting initiating objects of the merged clustering request are the same, the clustering processing result is processed after the merged clustering request is processed, and the obtained clustering processing result is obtained. Can be sent directly to the cluster request originating object.
  • the clustering request queue includes three clustering requests, which are arranged in chronological order: clustering request 1, and application account A sends a clustering request at 03:30 on August 20, 2017, including Clustering object set 1; clustering request 2, clustering request sent by application account B at 02:41 on August 21, 2017, including cluster object set 2; clustering request 3, application account A in August 2017
  • the clustering request sent at 04:02 on the 22nd contains the clustering object set 3.
  • the clustering request 1 and the clustering request 3 are merged, and the clustering object set obtained after the combination is the union of the clustering object set 1 and the clustering object set 3.
  • the step 804 may specifically include: sorting the clustering request in the clustering request queue according to the request initiation time, and acquiring the specified clustering request in the sorted clustering request queue; acquiring the clustering request queue The same clustering request as the request originating object of the specified clustering request. For example, the clustering request is sorted in ascending order according to the request initiation time, or the clustering request is arranged in descending order according to the request initiation time, and the specified clustering request is obtained according to the sorted clustering request queue.
  • the server cannot process all clustering requests simultaneously because of limited processing power.
  • the server may form a clustering request queue according to the order of the request initiation time, and process the clustering request with the top request initiation time first, and request the clustering request post-processing after the initiation time.
  • the specified clustering request refers to a clustering request in the clustering request queue that meets the specified conditions, and the obtained specified clustering request is used as the clustering request currently processed.
  • the specified clustering request may be obtained according to the request initiation time, for example, the clustering request of the first ranking in the clustering request queue, and the clustering request of the last ranking .
  • the specified clustering request is compared with each clustering request in the clustering request queue, and the same clustering request as the requesting initiating object of the specified clustering request is obtained.
  • the clustering task list may be established according to the request in the clustering request, and the requesting device identifier and the request receiving device of each clustering request are recorded in the clustering task list. Information such as the backup identifier, request initiation time, and so on.
  • the obtaining the same clustering request requesting the specified clustering request may include: obtaining the requesting device identifier of the specified clustering request, traversing the clustering task list, and acquiring the same requesting device identifier as the specified clustering request. Clustering request.
  • the acquired clustering requests are merged, specifically, the clustering object sets in each clustering request are combined. That is, for multiple clustering requests initiated by the same request originating object, the clustering object set of the clustering request may be merged and processed together, and each clustering object is processed only once, without repeating the clustering request.
  • the class object is processed multiple times.
  • the step 804 may further include: arranging the clustering requests in the clustering request queue according to the request initiation time in a first-to-last order, and acquiring the first clustering request in the clustering request queue; The same clustering request in the class request queue as the request originating object of the first clustering request.
  • the first clustering request obtained is the first clustering request in the clustering request queue, that is, the clustering request in the clustering request queue with the earliest request initiation time.
  • the step 804 may further include: sorting the clustering request in the clustering request queue according to the priority of the requesting initiating device, and acquiring the specified cluster in the sorted clustering request queue. Request; obtain the same clustering request in the clustering request queue as the request originating object of the specified clustering request.
  • the priority of the requesting device refers to the priority of the task processing, for example, the clustering request priority processing initiated by the mobile terminal, and the clustering request post-processing initiated by the PC (Personal Computer). It is also possible to sort the clustering requests in the clustering request queue according to the size of the clustering object set, that is, the clustering object with a large space occupied by the clustering object set is preferentially processed.
  • the request status corresponding to the clustering request may be recorded to indicate the processing procedure of the clustering request.
  • the request status may include unprocessed, in-process, re-process, and process completion status, and may be represented by tags such as "R-Result", "De-Handle”, "Re-Group”, and "End", respectively.
  • the request status tag of the current cluster request is read, and the status of the current cluster request can be known according to the request status tag. If the clustering request may be re-processed due to a hardware or software failure, etc., the clustering request may indicate that the current request status is heavy through the "Re-Group" tag. New processing.
  • Step 806 Perform clustering processing according to the first image subset corresponding to the merged clustering request, to obtain a server clustering result.
  • the first image sub-collection corresponding to the merged clustering request the first image sub-collection corresponding to the same clustering request requesting object is obtained, and the acquired first image sub-collection is obtained.
  • the union is used as a collection of clustering objects.
  • the image identifier corresponding to the merged clustering request may be obtained, and the first image subset is obtained according to the image identifier.
  • the clustering process can be implemented by a server cluster that includes multiple sub-servers.
  • the working state can be divided into an available state and a non-available state.
  • the sub-server can receive the cluster object set and cluster the cluster object set; in the non-available state, the sub-server cannot receive the cluster object set, and clusters the cluster object set.
  • the server may indicate the current working status by using the status identifier, and obtaining the status identifier may determine whether the server is available.
  • Each sub-server can send the status identifier to the registration server periodically or in real time, and the registration server stores the received status identifier.
  • the status identifier can be stored directly as a file or in the form of a list.
  • the obtaining the status identifier corresponding to the sub-server may include at least one of the following methods: receiving a status identifier corresponding to each sub-server sent by the registration server, obtaining a status identifier list, and obtaining a status identifier from the status identifier list, where the status identifier is obtained.
  • the list is formed by the registration server based on the status flags reported by each server.
  • the status identifier is an identifier indicating whether each subserver is available, and the subservers in the available state can be found according to the status identifier.
  • the server identifier corresponding to the sub-server may be simultaneously uploaded.
  • the server identifier refers to a unique identifier that distinguishes different sub-servers.
  • the generated status identifier and the server identifier are in one-to-one correspondence. According to the server identifier, the corresponding sub-server can be searched, and the working status of the sub-server can be known through the corresponding status identifier.
  • step 806 has The body may include: obtaining a state identifier corresponding to the child server, and acquiring a target server identifier according to the state identifier, where the state identifier is generated according to the working state of the child server; sending the first image subset to the child server corresponding to the target service identifier And receiving a server clustering result returned by the sub-server corresponding to the target service identifier, where the server clustering result is obtained by performing clustering processing according to the first image subset.
  • the target server identifier is a server identifier corresponding to the sub-server used for clustering processing.
  • the status identifier it can be known which sub-servers are available. If there are multiple sub-servers in the available state, the target sub-server can be obtained through a preset routing algorithm.
  • the status identifier corresponding to the sub-server may be obtained first, and the status identifier is obtained according to the status identifier list; the available server identifier is obtained according to the status identifier, and the target server identifier is obtained from the available server identifier according to a preset routing algorithm.
  • the preset routing algorithm refers to an algorithm for selecting a target server identifier.
  • the preset routing algorithm may be a load balancing algorithm, and the load balancing algorithm may be a random algorithm, a polling algorithm, a source address hash algorithm, etc., and does not do this. limited.
  • the status identifier list may also be a list of available services, and only the server identifier corresponding to the sub-server in the available state is recorded in the available service list. If the available service list is empty, the sub-server is not available.
  • Step 806 may specifically include: obtaining an available service list, obtaining a server identifier in the available service list, selecting a target server identifier from the obtained server identifier by using a preset routing algorithm, and transmitting the first image subset to the target server identifier.
  • the child server performs clustering processing.
  • selecting the target server identifier from the acquired server identifiers by using the preset routing algorithm may further include: acquiring attribute parameters of the first image subset corresponding to the merged cluster request, and load parameters of the sub-server; The sub-server is searched according to the attribute parameter and the load parameter, and the first image sub-set is sent to the found sub-server for cluster processing.
  • the attribute parameter may be a file size of the first image subset, and the load parameter refers to a parameter indicating a maximum load processing capability of the child server. The larger the general load parameter, the stronger the processing power of the server; the smaller the load parameter, the weaker the processing capability of the server.
  • the obtained server identifier is obtained by using a preset routing algorithm.
  • the selecting the target server identifier may further include: obtaining a priority corresponding to the request originating object, and a load parameter corresponding to the server identifier, where the request originating object refers to a device that initiates the feature identification request; according to the priority and the load parameter, the slave server identifier Get the target server ID.
  • the priority corresponding to the request originating object is used to determine the priority of processing the clustering request initiated by the request originating object. For example, if the priority of the mobile terminal is higher than that of the PC (Personal Computer), then the clustering request initiated by the mobile terminal is preferentially processed, and the clustering request is initiated by the PC.
  • the number of request initiations corresponding to the request initiation object may also be obtained, and the more the number of request initiations, the higher the corresponding priority.
  • the selecting the target server identifier from the obtained server identifiers by using the preset routing algorithm may further include: obtaining an attribute parameter of the image set to be processed, and a load parameter corresponding to the server identifier; and acquiring the target server from the server identifier according to the attribute parameter and the load parameter.
  • logo The attribute parameter of the first image subset refers to a parameter indicating an attribute of the first image subset, for example, the attribute parameter of the first image subset may refer to a file size, a size, a file format, and the like of the first image subset.
  • the target server identifier is obtained according to the attribute parameter and the load parameter. For example, the first image subset that takes up a large space is allocated to a sub-server with a large load parameter for processing.
  • the geographic identifier corresponding to the request originating object and the geographic identifier corresponding to the available server may also be obtained, and the target server identifier is obtained from the server identifier according to the geographic identifier corresponding to the request originating object and the geographic identifier corresponding to the available server.
  • the geographic identifier refers to a related parameter indicating the geographic region.
  • the geographic identifier can be obtained through the IP address of the device, or can be obtained by using a GPS (Global Positioning System). For example, if the client belongs to “Guangdong province”, the clustering request initiated by the client is sent to the sub-server corresponding to “Guangdong province” for processing.
  • selecting the target server identifier from the obtained server identifiers by using the preset routing algorithm may further include: acquiring a file size of the first image subset, and matching according to the carrying capacity of the plurality of sub-servers in an available state.
  • a first subset of images of the corresponding file size For example, the first image subset that occupies a large space is sent to a sub-server with a large carrying capacity for clustering processing.
  • FIG. 9 is a diagram showing a server architecture for implementing clustering processing in one embodiment.
  • the server architecture diagram includes a first server and a second server cluster, and the second server cluster includes a plurality of second servers.
  • the first server is for providing a cluster access service 902 and a queue service 904 for providing a clustering service 906 and a tag data service 908.
  • the cluster access service 902 is configured to receive a clustering request
  • the queue service 904 is configured to generate a clustering request queue according to the clustering request received by the clustering access service, and send the first image subset to the second server to perform clustering. deal with.
  • the clustering service 906 is configured to perform clustering processing according to the first image subset sent by the first server
  • the label data service 908 is configured to generate label data according to the server clustering result, and store the label data.
  • the second server may provide a state detection interface, and the first server periodically detects the state detection interface of each second server, and obtains the state identifier through the state detection interface.
  • the second server may report the status identifier to the first server, that is, when the working status of the second server changes, the second server sends a status identifier to the first server, and reports the current working status. For example, when the current clustering task processing of the second server is completed, the current working state is reported to the first server as an available state.
  • the working status of each second server may be recorded in the form of a status list in the first server.
  • the status identifier of each second server may be obtained by reading the status list, and according to The status ID looks for a second server that is in an available state.
  • performing clustering processing on the first image subset includes: performing feature recognition processing on the to-be-processed image in the first image subset to obtain a feature set corresponding to the first image subset; and performing, according to the feature set Cluster processing to obtain server clustering results.
  • Feature recognition processing refers to a process of identifying specific feature attributes of an image to be processed.
  • the feature recognition process may be to identify information such as face features, color features, edge features, and texture features in the image to be processed. Different features are identified and the recognition models used are different. For example, commonly used edge detection models include Sobel edge detection algorithm, Canny edge detection algorithm and Roberts edge detection algorithm.
  • the feature recognition process is performed on the image to be processed, and the feature recognition values are represented by the feature values, and a feature set is formed by the feature recognition result.
  • a pending image may correspond to one or more features that may represent attributes for classification in the image to be processed. For example, the images in the album are classified according to the face, and the feature set is a set of face regions in the image. Forming The feature set can be used to perform clustering processing on the image to be processed.
  • performing the feature recognition processing on the to-be-processed image in the first image subset may include: generating an image queue according to the first image subset and performing feature recognition processing on the image to be processed in the image queue.
  • the image queue refers to a queue formed by the image to be processed in the first image subset, and can be processed according to the image queue to process the image to be processed.
  • a preset number of to-be-processed images may be acquired from the image queue each time the feature recognition process is performed, and the acquired preset number of to-be-processed images are subjected to feature recognition processing.
  • the image queues may be randomly generated or may be arranged according to attributes such as the size and format of the image to be processed.
  • the images to be processed are arranged according to the format, and the images to be processed in the same format are processed together.
  • the image to be processed can be divided into JPG, PNG, TIFF, RAW and the like.
  • the processing speed of the image to be processed can also be controlled, and a preset number of images to be processed are processed each time. For example, there are a total of 500 images to be processed, 100 sheets at a time.
  • performing the feature recognition processing on the to-be-processed image in the first image subset may further include: performing an encryption process on the first image subset, and generating an image queue according to the encrypted first image subset;
  • the image to be processed in the image queue is subjected to decryption processing, and the image to be processed after the decryption processing is subjected to feature recognition processing.
  • Encryption processing refers to the process of changing the original information by a special algorithm so that unauthorized users cannot know the original information.
  • the clustering object set can be encrypted by an encryption algorithm such as 3DES (Triple Data Encryption Algorithm) or RC5.
  • 3DES Triple Data Encryption Algorithm
  • the decryption process refers to the process of restoring the encrypted information to the original information, and the encryption process and the decryption process are the opposite processes.
  • the image to be processed is subjected to encryption processing, and the processing speed of the image to be processed is controlled by the image queue.
  • the image to be processed is processed, the image to be processed after the encryption process needs to be decrypted, and then the image to be processed after the decryption process is subjected to feature recognition processing.
  • the image to be processed may be subjected to a certain degree of compression or cropping processing.
  • the image is subjected to compression or cropping processing, and the image to be processed after compression or cropping is subjected to feature recognition processing.
  • the compression process refers to a process of compressing a to-be-processed image to a certain extent to make the space occupied by the image to be processed smaller.
  • the trimming process refers to a process of cutting a to-be-processed image to a certain extent, so that the occupied image takes up less space.
  • the degree of image compression or cropping processing should not be too large. If the degree of compression or cropping is too large, the feature recognition accuracy of the image to be processed will be seriously affected.
  • the clustering process can divide the cluster object set into a plurality of categories according to one or more features. For example, people can be divided into men and women according to their gender. They can be divided into teenagers, youth, middle-aged and so on according to their age. There are more combinations according to gender and age.
  • clustering object sets can be classified according to the clustering model.
  • Commonly used clustering models include k-means clustering model, hierarchical clustering model, SOM clustering model and FCM clustering model. Further, the clustering model can be trained according to the clustering sample set.
  • the cluster sample set refers to a sample set used for training to obtain a model
  • the cluster sample set may be a sample set generated according to the cluster object set, or may be a sample set specifically used for training the cluster model.
  • the clustered sample set can be part of a first subset of images.
  • Step 808 Generate tag data according to the server clustering processing result, and store the tag data in a preset storage space.
  • the tag data refers to an identifier for marking the classification type attribute of the cluster object in the cluster object set. For example, if the cluster object 1 belongs to the category 1, the formed tag data may be "category 1". It can be understood that each image to be processed in the first image subset has a corresponding image identifier for identifying the uniqueness of the image to be processed. According to the server clustering result, the classification label can be associated with the image identifier, the label data is generated, and the label data is stored in the preset storage space.
  • the processed image to be processed may be extracted without clustering. Processing, currently only clustering processing for unprocessed images to be processed. Then, the clustering processing of the first image subset may specifically include: placing the first image subset The other images to be processed other than the history processed image are subjected to clustering processing.
  • the history processed image refers to the image processed by history.
  • the image identifier of the image to be processed in the first image subset may be compared with the image identifier corresponding to the label data stored in the preset storage space, and the image to be processed that matches the image identifier is a historical processed image.
  • the request initiation object identifier and the request initiation object identifier corresponding to the label data may be first matched, and if there is a matching request initiation object identifier, the historical processing image is searched according to the image identifier.
  • the server clustering model stored on the server is updated from time to time, and each version of the server clustering model has a corresponding model identifier, and the label data stored in the preset storage space also has a corresponding model.
  • Step 810 the server clustering result is sent to the client, and is used to instruct the client to perform classification according to the server clustering result and the local clustering result, and the local clustering result is determined by the client according to the image to be processed.
  • the set of images to be processed includes a first image subset and a second image subset.
  • the client obtains the image set to be processed for clustering, sends the first image subset in the image set to be processed to the server, and performs clustering processing on the first image subset through the subserver. And classify the image set to be processed according to the local clustering result and the server clustering result.
  • the clustering processing result of the server can be considered, the problem of inaccurate image clustering result caused by clustering processing at one end is prevented, and the accuracy of image processing is improved.
  • FIG. 10 is a system architecture diagram of an image processing system in one embodiment. As shown in FIG. 10, the image processing system includes a client 1002 and a server 1004. among them:
  • the client 1002 is configured to acquire a to-be-processed image set, and cluster the to-be-processed image collection.
  • the local clustering result is obtained, the first image subset is sent to the server 1004, the server clustering result returned by the server 1004 is received, and the image set to be processed is classified according to the local clustering result and the server clustering result, wherein,
  • the processed image set includes a first image subset and a second image subset, and the server clustering result is obtained by performing clustering processing according to the first image subset.
  • the client 1002 is further configured to acquire a to-be-processed image set and a corresponding set of regions of interest; send the set of regions of interest corresponding to the first image subset to the server, and receive the server clustering result returned by the server.
  • the server clustering result is obtained by performing clustering processing according to the set of regions of interest corresponding to the first image subset.
  • the client 1002 is further configured to acquire a to-be-processed image set and corresponding historical classification information, and perform clustering processing on the to-be-processed image set according to the historical classification information to obtain a local clustering result;
  • the set and the corresponding historical classification information are sent to the server, and the server clustering result returned by the server is received, and the server clustering result is obtained by performing clustering processing according to the first image subset and the corresponding historical classification information.
  • the client 1002 is further configured to perform clustering processing on the to-be-processed image set corresponding to the system classification information to obtain a local clustering result, and send the first image subset and the corresponding system classification information to the server, and The server clustering result returned by the server is received, and the server clustering result is obtained by clustering processing according to the first image subset and the corresponding system classification information.
  • the client 1002 is further configured to: if the first local clustering result in the local clustering result is different from the server clustering result, perform the to-be-processed image in the first image subset according to the server clustering result. Classification; classifying the image to be processed in the second image subset according to the second local clustering result in the local clustering result.
  • the client 1002 is further configured to acquire a to-be-processed image set when a preset trigger condition is met.
  • the server 1004 is configured to receive the first image subset sent by the client 1002, perform clustering processing according to the first image subset to obtain a server clustering result, and send the server clustering result to the client 1002.
  • the server 1004 is further configured to receive, according to the first image, sent by the client. Collecting the generated clustering request, and generating a clustering request queue according to the received clustering request; obtaining the same clustering request from the clustering request queue, and merging the acquired clustering requests; The first image subset corresponding to the clustering request is clustered to obtain a server clustering result.
  • the server 1004 is further configured to sort the clustering request in the clustering request queue according to the request initiation time, and obtain the specified clustering request in the sorted clustering request queue; and obtain the clustering request queue.
  • the server 1004 is further configured to arrange the clustering request in the clustering request queue in a first-to-last order according to the request initiation time, obtain a first clustering request in the clustering request queue, and obtain a clustering request. The same clustering request in the queue as the request originating object of the first clustering request.
  • the server 1004 is further configured to perform feature recognition processing on the to-be-processed image in the first image subset to obtain a feature set corresponding to the first image subset; and perform clustering according to the feature set to obtain server clustering. result.
  • the server 1004 is further configured to generate an image queue according to the first image subset and perform feature recognition processing on the image to be processed in the image queue.
  • the server 1004 is further configured to perform encryption processing on the first image subset, and generate an image queue according to the encrypted first image subset; decrypt the image to be processed in the image queue, and The image to be processed after the decryption process is subjected to feature recognition processing.
  • the server 1004 is further configured to perform compression or cropping processing on the image to be processed in the first image subset, and perform feature recognition processing on the compressed or cropped image to be processed.
  • the server 1004 is further configured to obtain a status identifier corresponding to the sub-server, and obtain a target server identifier according to the status identifier, where the status identifier is generated according to the working status of the sub-server; and send the first image sub-set to the target
  • the sub-server corresponding to the service identifier receives the server clustering result returned by the sub-server corresponding to the target service identifier, where the server clustering result is obtained by performing clustering processing according to the first image sub-collection.
  • the server 1004 is further configured to obtain a status identifier list, and according to the status label
  • the identification list obtains the status identifier; obtains the available server identifier according to the status identifier, and obtains the target server identifier from the available server identifier according to a preset routing algorithm.
  • the server 1004 is further configured to generate tag data according to the server clustering processing result, and store the tag data in a preset storage space.
  • the image processing system obtained in the above embodiment obtains a set of images to be processed for clustering processing, and sends a first subset of images in the image set to be processed to a server for clustering processing, and according to local clustering results and server clustering results. Classify the collection of images to be processed. In this way, not only the clustering process can be performed by the client, but also the clustering processing result of the server can be considered, the problem of inaccurate image clustering result caused by clustering processing at one end is prevented, and the accuracy of image processing is improved.
  • FIG. 11 is a system architecture diagram of an image processing system in another embodiment.
  • the image processing system includes a client 1102, a feature server 1104, and a clustering server 1106. among them:
  • the client 1102 is configured to obtain a to-be-processed image set, perform clustering processing on the to-be-processed image set to obtain a local clustering result, send the first image subset to the feature server 1104, and receive the feature set returned by the feature server 1104.
  • the set is sent to the clustering server 1106, and receives the server clustering result returned by the clustering server 1106, and classifies the image set to be processed according to the local clustering result and the server clustering result, wherein the image to be processed includes the first image.
  • the subset and the second subset of images are obtained by clustering the first image subset.
  • the feature server 1104 is configured to receive the first image subset sent by the client 1102, perform feature recognition processing according to the first image subset to obtain a feature set, and send the feature set to the client 1102.
  • the feature server may be a server cluster, that is, distributed processing that implements feature recognition processing by multiple servers.
  • the feature server may, but is not limited to, provide a data transfer service, an encryption and decryption service, a feature recognition service, a storage interface service, and a storage service.
  • the data transmission service is used for data transmission, for example, receiving the first image subset sent by the client through the IO Service, or sending the feature set to the client.
  • the encryption and decryption service is used for encrypting and decrypting data.
  • the encryption and decryption service may be a Privacy service, and the image to be processed is encrypted by the Privacy service.
  • the feature recognition service refers to a service that provides feature recognition processing, such as extracting cluster features in a first image subset.
  • the storage service is a service that stores data, for example, a first subset of images to be stored on a feature server for storage.
  • a storage interface service refers to a service that interfaces with a storage service, such as a docking service with a storage service.
  • the clustering server 1106 is configured to receive the feature set sent by the client 1102, perform clustering processing according to the feature set to obtain a server clustering result, and send the server clustering result to the client 1102.
  • the clustering server can include, but is not limited to, a tag data service, a clustering service, a machine learning service, and a data transfer service.
  • the tag data service refers to a service that generates tag data according to a server clustering result.
  • a clustering service refers to a service that clusters data sets, for example, clustering feature sets.
  • the clustering server may also train the training image set to obtain a clustering model and a feature recognition model, cluster the clustering feature set according to the clustering model, and send the feature recognition model to the feature server to extract the image set to be processed. Cluster feature set.
  • the machine learning service refers to a service that provides model training, for example, training a cluster model and a feature recognition model according to a training image set.
  • the training image set may be part or all of the first image subset, or may be an image set dedicated to training the model.
  • a data transmission service refers to a service that provides data transmission, for example, pushing a cluster processing result to a client through a PUSH method.
  • Figure 12 is a system architecture diagram of an image processing system in still another embodiment. As shown in FIG. 12, the image processing system includes a client 1202, a feature server 1204, and a clustering server 1206. among them:
  • the client 1202 is configured to acquire a to-be-processed image set, perform clustering processing on the image set to be processed to obtain a local clustering result, and send the first image subset to the feature server 1204 to receive the cluster.
  • the server clustering result returned by the server 1206, and classifying the image set to be processed according to the local clustering result and the server clustering result, wherein the image group to be processed includes the first image subset and the second image subset, and the server gathers
  • the class result is obtained by clustering according to the first image subset.
  • the feature server 1204 is configured to receive the first image subset sent by the client 1202, perform feature recognition processing according to the first image subset to obtain a feature set, and send the feature set to the clustering server 1206.
  • the feature server may be a server cluster, that is, distributed processing that implements feature recognition processing by multiple servers.
  • the feature server may be, but is not limited to, providing a data transfer service, an encryption and decryption service, a feature recognition service, a feature escalation service, a storage interface service, and a storage service.
  • the data transmission service is used for data transmission, for example, receiving the first image subset sent by the client through the IO Service, or sending the feature set to the client.
  • the encryption and decryption service is used for encrypting and decrypting data.
  • the encryption and decryption service may be a Privacy service, and the first image subset is encrypted by the Privacy service.
  • the feature recognition service refers to a service that provides feature recognition processing, such as extracting cluster features in a first image subset.
  • the feature reporting service is used to report the acquired feature set to the clustering server.
  • a storage service is a service that stores data, such as storing a first subset of images on a feature server for storage.
  • a storage interface service refers to a service that interfaces with a storage service, such as a docking service with a storage service.
  • the clustering server 1206 is configured to receive the feature set sent by the feature server 1204, perform clustering processing according to the feature set to obtain a server clustering result, and send the server clustering result to the client 1202.
  • the clustering server may include, but is not limited to, a tag data service, a clustering service, a feature receiving service, a machine learning service, and a data transfer service.
  • the tag data service refers to a service that generates tag data according to a clustering process result.
  • the clustering service refers to a service that clusters data sets, for example, clustering feature sets.
  • the feature receiving service is configured to receive a feature set reported by the feature server.
  • the clustering server can also train the training image set to obtain a clustering model and a feature recognition model, and cluster the clustering model according to the clustering model.
  • the class feature set performs clustering processing, and sends the feature recognition model to the feature server to extract a cluster feature set of the to-be-processed image set.
  • the training image set may be part or all of the first image subset, or may be an image set dedicated to training the model.
  • the machine learning service refers to a service that provides model training, for example, training a cluster model and a feature recognition model according to a training image set.
  • a data transmission service refers to a service that provides data transmission, for example, pushing a cluster processing result to a client through a PUSH method.
  • Figure 13 is a system architecture diagram of an image processing system in still another embodiment.
  • the image processing system includes a client 132, a local server 134, and a cloud server 136.
  • the client 132 can initiate a clustering request through the trigger 1322, and then obtain the to-be-processed image set and the corresponding historical classification information from the face database 1320 through the data obtaining module 1324, and store the to-be-processed image collection and classification information in the backup.
  • the first image subset and the corresponding historical classification information are sent to the local server 134.
  • the local server 134 After receiving the first image subset and the corresponding historical classification information, the local server 134 packages the first image subset and the corresponding historical classification information through the Package packaging module 1340, and the packaged first image subset and corresponding The historical classification information is sent to the cloud server 136 through the communication module 1342 for clustering processing.
  • the cloud server 136 delivers the obtained server clustering result to the local server 134.
  • the local server 134 receives the server clustering result through the communication module 1342, and parses the server clustering result by the package parsing module 1344, and then transmits the parsed server clustering result to the client 132.
  • the client 132 stores the received server clustering result in the backup database 1326, and performs clustering processing on the image set to be processed by the classification processing module 1328 to obtain a local clustering result. Then, the image set to be processed is classified by the server clustering result and the local clustering result, and the classified image set to be processed is stored in the face database 1320.
  • FIG. 14 is a block diagram showing the structure of an image processing apparatus in an embodiment.
  • the image processing device 1410 includes an image acquisition module 1402, an image transmission module 1404, and an image processing module 1406. among them:
  • the image obtaining module 1402 is configured to acquire a to-be-processed image set, and perform clustering processing on the to-be-processed image set to obtain a local clustering result, where the to-be-processed image set includes a first image subset and a second image subset.
  • the image sending module 1404 is configured to send the first image subset to the server, and receive a server clustering result returned by the server, where the server clustering result is clustering according to the first image subset owned.
  • the image processing module 1406 is configured to classify the image set to be processed according to the local clustering result and the server clustering result.
  • the image processing apparatus obtaineds a set of images to be processed for clustering processing, and sends a first subset of images in the image set to be processed to a server for clustering processing, and according to local clustering results and server clustering results. Classify the collection of images to be processed. In this way, not only the clustering process can be performed by the client, but also the clustering processing result of the server can be considered, the problem of inaccurate image clustering result caused by clustering processing at one end is prevented, and the accuracy of image processing is improved.
  • the image obtaining module 1402 is further configured to acquire a to-be-processed image set and a corresponding set of regions of interest.
  • the image obtaining module 1402 is further configured to acquire a to-be-processed image set and corresponding historical classification information, and perform clustering processing on the to-be-processed image set according to the historical classification information to obtain a local clustering result.
  • the image obtaining module 1402 is further configured to perform clustering processing on the to-be-processed image set corresponding to the system classification information to obtain a local clustering result.
  • the image obtaining module 1402 is further configured to acquire a to-be-processed image set when the preset trigger condition is met.
  • the image sending module 1404 is further configured to send a set of regions of interest corresponding to the first subset of images to a server, and receive a server clustering result returned by the server, where the server clusters The result is obtained by performing clustering processing according to the set of regions of interest corresponding to the first image subset.
  • the image sending module 1404 is further configured to send the first image subset and corresponding historical classification information to a server, and receive a server clustering result returned by the server, where the server clustering result The clustering process is performed according to the first image subset and the corresponding historical classification information.
  • the image sending module 1404 is further configured to send the first image subset and corresponding system classification information to a server, and receive a server clustering result returned by the server, the server clustering result The clustering process is performed according to the first image subset and the corresponding system classification information.
  • the image processing module 1406 is further configured to: if the first local clustering result in the local clustering result is different from the server clustering result, according to the server clustering result, the first image subset is The to-be-processed image is classified; and the to-be-processed image in the second image subset is classified according to the second local clustering result in the local clustering result.
  • FIG. 15 is a block diagram showing the structure of an image processing apparatus in another embodiment.
  • the image processing apparatus 1500 includes an image receiving module 1502, a clustering processing module 1504, and a result transmitting module 1506. among them:
  • the image receiving module 1502 is configured to receive a first subset of images sent by the client.
  • the clustering processing module 1504 is configured to perform clustering processing according to the first image subset to obtain a server clustering result.
  • a result sending module 1506 configured to send the server clustering result to the client, to instruct the client to perform performing, according to the server clustering result and the local clustering result, the image set to be processed The classification, wherein the local clustering result is obtained by the client performing clustering according to the to-be-processed image set, where the to-be-processed image set includes a first image subset and a second image subset.
  • the image processing apparatus obtained in the above embodiment obtains a set of images to be processed for clustering processing, and sends a first subset of images in the image set to be processed to a server for clustering processing, and according to local clustering results and server clustering results. Classify the collection of images to be processed. This will not only Clustering processing by the client can also take into account the clustering processing results of the server, prevent the problem of inaccurate image clustering results caused by clustering processing at one end, and improve the accuracy of image processing.
  • the image receiving module 1502 is further configured to receive a clustering request generated by the client according to the first image subset, and generate a clustering request queue according to the received clustering request;
  • the clustering processing module 1504 is further configured to: acquire the same clustering request from the clustering request queue from the clustering request queue, and merge the acquired clustering request; according to the merged clustering request The corresponding first image subset is subjected to clustering processing to obtain a server clustering result.
  • the clustering processing module 1504 is further configured to sort the clustering request in the clustering request queue according to the request initiation time, and obtain a specified clustering request in the sorted clustering request queue;
  • a clustering request queue has the same clustering request as the request originating object of the specified clustering request.
  • the clustering processing module 1504 is further configured to arrange the clustering request in the clustering request queue according to the request initiation time in a first-to-last order, and obtain the first clustering request in the clustering request queue. Obtaining a clustering request in the clustering request queue that is the same as the request originating object of the first clustering request.
  • the clustering processing module 1504 is further configured to perform feature recognition processing on the to-be-processed image in the first image subset to obtain a feature set corresponding to the first image subset; and perform clustering processing according to the feature set. , get the server clustering results.
  • the clustering processing module 1504 is further configured to generate an image queue according to the first image subset and perform feature recognition processing on the image to be processed in the image queue.
  • the clustering processing module 1504 is further configured to perform an encryption process on the first image subset, and generate an image queue according to the encrypted first image subset; and to process the image queue The image is subjected to decryption processing, and the image to be processed after the decryption processing is subjected to feature recognition processing.
  • the clustering processing module 1504 is further configured to compress or trim the image to be processed in the first image subset, and perform the feature of the compressed or cropped image to be processed. Identification processing.
  • the clustering processing module 1504 is further configured to obtain a status identifier corresponding to the sub-server, and obtain a target server identifier according to the status identifier, where the status identifier is generated according to the working status of the sub-server;
  • the first image sub-set is sent to the sub-server corresponding to the target service identifier, and the server clustering result returned by the sub-server corresponding to the target service identifier is received, where the server clustering result is according to the first image sub-
  • the collection is obtained by clustering.
  • the clustering processing module 1504 is further configured to obtain a status identifier list, and obtain a status identifier according to the status identifier list; obtain an available server identifier according to the status identifier, and use the available server according to a preset routing algorithm. Get the target server ID in the ID.
  • the image processing apparatus may further include a label generating module, configured to generate label data according to the server clustering processing result, and store the label data in a preset storage space.
  • a label generating module configured to generate label data according to the server clustering processing result, and store the label data in a preset storage space.
  • each module in the above image processing apparatus is for illustrative purposes only. In other embodiments, the image processing apparatus may be divided into different modules as needed to complete all or part of the functions of the image processing apparatus.
  • the embodiment of the invention further provides a computer readable storage medium.
  • One or more non-transitory computer readable storage media containing a computer program when executed by one or more processors, cause the processor to perform the image processing method described above.
  • FIG. 16 is a schematic diagram showing the internal structure of a server in an embodiment.
  • the server includes a processor connected through a system bus, a non-volatile storage medium, an internal memory, and a network interface.
  • the non-volatile storage medium of the server stores an operating system and a computer program.
  • the computer program is executed by a processor to implement an image processing method.
  • the server's processor is used to provide computing and control capabilities that support the operation of the entire server.
  • the network interface of the server is used to communicate with an external terminal through a network connection, such as receiving a clustering request sent by the terminal and returning a clustering processing result to the terminal.
  • the server can be composed of a separate server or multiple servers. Server cluster to achieve.
  • FIG. 16 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the server to which the solution of the present application is applied.
  • the specific server may include a ratio. More or fewer components are shown in the figures, or some components are combined, or have different component arrangements.
  • the embodiment of the invention also provides a computer device. As shown in FIG. 17, for the convenience of description, only parts related to the embodiment of the present invention are shown, and the specific technical details are not disclosed. Please refer to the method part of the embodiment of the present invention.
  • the computer device may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, a wearable device, and the like, taking a computer device as a mobile phone as an example. :
  • FIG. 17 is a block diagram showing a part of a structure of a mobile phone related to a computer device according to an embodiment of the present invention.
  • the mobile phone includes: a radio frequency (RF) circuit 1710, a memory 1720, an input unit 1730, a display unit 1740, a sensor 1750, an audio circuit 1760, a wireless fidelity (WiFi) module 1770, and a processor 1780. And power supply 1790 and other components.
  • RF radio frequency
  • the RF circuit 1710 can be used for receiving and transmitting information during the transmission and reception of information or during the call.
  • the downlink information of the base station can be received and processed by the processor 1780.
  • the uplink data can also be sent to the base station.
  • RF circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
  • RF circuitry 1710 can also communicate with the network and other devices via wireless communication.
  • the above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division). Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (LTE), e-mail, Short Messaging Service (SMS), etc.
  • GSM Global System of Mobile communication
  • GPRS General Packet Radio Service
  • the memory 1720 can be used to store software programs and modules, and the processor 1780 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 1720.
  • the memory 1720 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as an application of a sound playing function, an application of an image playing function, etc.);
  • the data storage area can store data (such as audio data, address book, etc.) created according to the use of the mobile phone.
  • memory 1720 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the input unit 1730 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset 1700.
  • the input unit 1730 may include a touch panel 1731 and other input devices 1732.
  • the touch panel 1731 which may also be referred to as a touch screen, can collect touch operations on or near the user (such as the user using a finger, a stylus, or the like on the touch panel 1731 or near the touch panel 1731. Operation) and drive the corresponding connection device according to a preset program.
  • the touch panel 1731 may include two parts of a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 1780 is provided and can receive commands from the processor 1780 and execute them.
  • the touch panel 1731 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 1730 may also include other input devices 1732.
  • other input devices 1732 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.).
  • the display unit 1740 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone.
  • the display unit 1740 can include a display panel 1741.
  • a liquid crystal display (LCD), an organic light emitting diode can be used.
  • the display panel 1741 is configured in the form of an Organic Light-Emitting Diode (OLED) or the like.
  • the touch panel 1731 can cover the display panel 1741. When the touch panel 1731 detects a touch operation thereon or nearby, the touch panel 1731 transmits to the processor 1780 to determine the type of the touch event, and then the processor 1780 is The type of touch event provides a corresponding visual output on display panel 1741.
  • the touch panel 1731 and the display panel 1741 are two independent components to implement the input and input functions of the mobile phone, in some embodiments, the touch panel 1731 and the display panel 1741 may be integrated. Realize the input and output functions of the phone.
  • the handset 1700 can also include at least one sensor 1750, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1741 according to the brightness of the ambient light, and the proximity sensor may close the display panel 1741 and/or when the mobile phone moves to the ear. Or backlight.
  • the motion sensor may include an acceleration sensor, and the acceleration sensor can detect the magnitude of the acceleration in each direction, and the magnitude and direction of the gravity can be detected at rest, and can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching), and vibration recognition related functions (such as Pedometer, tapping, etc.; in addition, the phone can also be equipped with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors.
  • the acceleration sensor can detect the magnitude of the acceleration in each direction, and the magnitude and direction of the gravity can be detected at rest, and can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching), and vibration recognition related functions (such as Pedometer, tapping, etc.; in addition, the phone can also be equipped with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors.
  • Audio circuitry 1760, speaker 1761, and microphone 1762 can provide an audio interface between the user and the handset.
  • the audio circuit 1760 can transmit the converted electrical data of the received audio data to the speaker 1761, and convert it into a sound signal output by the speaker 1761; on the other hand, the microphone 1762 converts the collected sound signal into an electrical signal, by the audio circuit 1760. After receiving, it is converted into audio data, and then processed by the audio data output processor 1780, transmitted to another mobile phone via the RF circuit 1710, or outputted to the memory 1720 for subsequent processing.
  • WiFi is a short-range wireless transmission technology.
  • the mobile phone through the WiFi module 1770 can help users to send and receive e-mail, browse the web and access streaming media, etc. It provides users with wireless broadband Internet access.
  • FIG. 17 shows the WiFi module 1770, it will be understood that it does not belong to the essential configuration of the handset 1700 and may be omitted as needed.
  • the processor 1780 is a control center of the mobile phone, and connects the entire mobile phone by using various interfaces and lines. The various portions of the mobile phone perform overall monitoring of the handset by running or executing software programs and/or modules stored in the memory 1720, as well as invoking data stored in the memory 1720, performing various functions and processing data of the handset.
  • processor 1780 can include one or more processing units.
  • the processor 1780 can integrate an application processor and a modem processor, wherein the application processor primarily processes an operating system, a user interface, an application, etc.; the modem processor primarily processes wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 1780.
  • the handset 1700 also includes a power source 1790 (such as a battery) that powers the various components.
  • a power source 1790 such as a battery
  • the power source can be logically coupled to the processor 1780 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
  • the handset 1700 can also include a camera, a Bluetooth module, and the like.
  • the processor 1780 included in the mobile terminal implements the image processing method described above when executing a computer program stored in a memory.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or the like.
  • Non-volatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM), which acts as an external cache.
  • RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronization.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDR SDRAM dual data rate SDRAM
  • ESDRAM enhanced SDRAM
  • synchronization Link (Synchlink) DRAM (SLDRAM), Memory Bus (Rambus) Direct RAM (RDRAM), Straight Connect to Memory Bus Dynamic RAM (DRDRAM) and Memory Bus Dynamic RAM (RDRAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Image Analysis (AREA)

Abstract

一种图像处理方法包括:获取待处理图像集合,并将所述待处理图像集合进行聚类处理得到本地聚类结果,其中待处理图像集合中包括第一图像子集合和第二图像子集合;将所述第一图像子集合发送至服务器,并接收所述服务器返回的服务器聚类结果,所述服务器聚类结果是根据所述第一图像子集合进行聚类处理得到的;根据所述本地聚类结果和服务器聚类结果,对待处理图像集合进行分类。

Description

图像处理方法和装置、计算机设备、计算机可读存储介质 技术领域
本申请涉及计算机技术领域,特别是涉及图像处理方法和装置、计算机设备、计算机可读存储介质。
背景技术
用户可以通过智能终端实现各种应用需求,然而由于智能终端的处理能力和存储能力有限,往往无法在本地处理大量的用户操作。因此,为了更好的为用户提供服务,智能终端在接收到用户的操作请求之后,会将该操作请求发送至服务器进行处理,然后再将处理结果返回给智能终端。这样不需要消耗太多智能终端的资源,就可以实现对用户的应用需求。
对于单个用户的请求,服务器可以快速准确的响应。请求的用户可能成千上万,同时单个用户又可能会有多次请求,使得服务器在处理任务的时候压力倍增。服务器返回处理结果后,会展示给用户,用户对处理结果进行查看。
发明内容
本申请实施例提供一种图像处理方法和装置、计算机设备、计算机可读存储介质,可以提高图像处理的准确率。
一种图像处理方法,所述方法包括:
获取待处理图像集合,并将所述待处理图像集合进行聚类处理得到本地聚类结果,其中待处理图像集合中包括第一图像子集合和第二图像子集合;
将所述第一图像子集合发送至服务器,并接收所述服务器返回的服务器聚类结果,所述服务器聚类结果是根据所述第一图像子集合进行聚类处理得 到的;
根据所述本地聚类结果和服务器聚类结果,对待处理图像集合进行分类。
一种图像处理装置,所述装置包括:
图像获取模块,用于获取待处理图像集合,并将所述待处理图像集合进行聚类处理得到本地聚类结果,其中待处理图像集合中包括第一图像子集合和第二图像子集合;
图像发送模块,用于将所述第一图像子集合发送至服务器,并接收所述服务器返回的服务器聚类结果,所述服务器聚类结果是根据所述第一图像子集合进行聚类处理得到的;
图像处理模块,用于根据所述本地聚类结果和服务器聚类结果,对待处理图像集合进行分类。
一种计算机设备,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述指令被所述处理器执行时,使得所述处理器执行如下步骤:
获取待处理图像集合,并将所述待处理图像集合进行聚类处理得到本地聚类结果,其中待处理图像集合中包括第一图像子集合和第二图像子集合;
将所述第一图像子集合发送至服务器,并接收所述服务器返回的服务器聚类结果,所述服务器聚类结果是根据所述第一图像子集合进行聚类处理得到的;
根据所述本地聚类结果和服务器聚类结果,对待处理图像集合进行分类。
一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行如下步骤:
获取待处理图像集合,并将所述待处理图像集合进行聚类处理得到本地聚类结果,其中待处理图像集合中包括第一图像子集合和第二图像子集合;
将所述第一图像子集合发送至服务器,并接收所述服务器返回的服务器聚类结果,所述服务器聚类结果是根据所述第一图像子集合进行聚类处理得到的;
根据所述本地聚类结果和服务器聚类结果,对待处理图像集合进行分类。
一种图像处理方法,所述方法包括:
接收客户端发送的第一图像子集合;
根据所述第一图像子集合进行聚类处理,得到服务器聚类结果;
将所述服务器聚类结果发送至所述客户端,用于指示所述客户端执行根据所述服务器聚类结果和本地聚类结果,对所述待处理图像集合进行分类,其中所述本地聚类结果是由所述客户端根据所述待处理图像集合进行聚类所得到的,所述待处理图像集合中包括第一图像子集合和第二图像子集合。
一种图像处理装置,所述装置包括:
图像接收模块,用于接收客户端发送的第一图像子集合;
聚类处理模块,用于根据所述第一图像子集合进行聚类处理,得到服务器聚类结果;
结果发送模块,用于将所述服务器聚类结果发送至所述客户端,用于指示所述客户端执行根据所述服务器聚类结果和本地聚类结果,对所述待处理图像集合进行分类,其中所述本地聚类结果是由所述客户端根据所述待处理图像集合进行聚类所得到的,所述待处理图像集合中包括第一图像子集合和第二图像子集合。
一种计算机设备,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述指令被所述处理器执行时,使得所述处理器执行如下步骤:
接收客户端发送的第一图像子集合;
根据所述第一图像子集合进行聚类处理,得到服务器聚类结果;
将所述服务器聚类结果发送至所述客户端,用于指示所述客户端执行根据所述服务器聚类结果和本地聚类结果,对所述待处理图像集合进行分类,其中所述本地聚类结果是由所述客户端根据所述待处理图像集合进行聚类所得到的,所述待处理图像集合中包括第一图像子集合和第二图像子集合。
一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行如 下步骤:
接收客户端发送的第一图像子集合;
根据所述第一图像子集合进行聚类处理,得到服务器聚类结果;
将所述服务器聚类结果发送至所述客户端,用于指示所述客户端执行根据所述服务器聚类结果和本地聚类结果,对所述待处理图像集合进行分类,其中所述本地聚类结果是由所述客户端根据所述待处理图像集合进行聚类所得到的,所述待处理图像集合中包括第一图像子集合和第二图像子集合。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为一个实施例中图像处理方法的应用环境示意图;
图2为另一个实施例中图像处理方法的应用环境示意图;
图3为又一个实施例中图像处理方法的应用环境示意图;
图4为一个实施例中图像处理方法的硬件交互时序图;
图5为一个实施例中图像处理方法的流程图;
图6为一个实施例中移动终端相册分类结果的展示图;
图7为另一个实施例中图像处理方法的流程图;
图8为又一个实施例中图像处理方法的流程图;
图9为一个实施例中实现聚类处理的服务器架构图;
图10为一个实施例中图像处理系统的系统架构图;
图11为另一个实施例中图像处理系统的系统架构图;
图12为又一个实施例中图像处理系统的系统架构图;
图13为又一个实施例中图像处理系统的系统架构图;
图14为一个实施例中图像处理装置的结构示意图;
图15为另一个实施例中图像处理装置的结构示意图;
图16为一个实施例中服务器的内部结构示意图;
图17为与本发明实施例提供的计算机设备相关的手机的部分结构的框图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一客户端称为第二客户端,且类似地,可将第二客户端称为第一客户端。第一客户端和第二客户端两者都是客户端,但其不是同一客户端。
图1为一个实施例中图像处理方法的应用环境示意图。如图1所示,该应用环境包括客户端12和服务器14。其中,客户端12用于获取待处理图像集合,并将所述待处理图像集合进行聚类处理得到本地聚类结果,将待处理图像集合中的第一图像子集合发送至服务器14。服务器14根据第一图像子集合进行聚类处理,得到服务器聚类结果,并将服务器聚类结果发送至客户端12。客户端12再根据所述本地聚类结果和服务器聚类结果,对待处理图像集合进行分类。其中,客户端12为处于计算机网络最外围,主要用于输入用户信息以及输出处理结果的电子设备,例如可以是个人电脑、移动终端、个人数字助理、可穿戴电子设备等。服务器14是用于响应服务请求,同时提供计算服务的设备,例如可以是一台或者多台计算机。
图2为另一个实施例中图像处理方法的应用环境示意图。如图2所示,该应用环境包括客户端22、第一服务器24和第二服务器26。其中,客户端22用于获取待处理图像集合,将待处理图像集合进行聚类处理得到本地聚类 结果,并将待处理图像集合中的第一图像子集合发送至第一服务器24。第一服务器24根据第一图像子集合进行特征识别处理,得到第一图像子集合对应的特征集合,并将特征集合发送到第二服务器26。第二服务器26根据特征集合进行聚类处理得到服务器聚类结果,并将服务器聚类结果发送到客户端22。客户端22再根据所述本地聚类结果和服务器聚类结果,对待处理图像集合进行分类。其中,客户端22为处于计算机网络最外围,主要用于输入用户信息以及输出处理结果的电子设备,例如可以是个人电脑、移动终端、个人数字助理、可穿戴电子设备等。第一服务器24和第二服务器26是用于响应服务请求,同时提供计算服务的设备,例如可以是一台或者多台计算机。
图3为又一个实施例中图像处理方法的应用环境示意图。如图3所示,该应用环境包括客户端32、服务器34和子服务器集群36。客户端32可以获取待处理图像集合,将待处理图像集合进行聚类处理得到本地聚类结果,根据待处理图像集合中的第一图像子集合生成聚类请求,并将聚类请求发送至服务器34。服务器34根据接收到聚类请求生成聚类请求队列,通过各个子服务器362的状态标识查找目标服务器标识,并将聚类请求队列中的聚类请求发送至目标服务器标识对应的子服务器362中进行聚类处理,得到服务器聚类结果。子服务器362得到的服务器聚类结果可以直接发送至客户端32,也可以先发送到服务器34,再通过服务器34发送到客户端32中。其中,子服务器集群36中包括一个或多个子服务器362,用于实现分布式任务处理。客户端32为处于计算机网络最外围,主要用于输入用户信息以及输出处理结果的电子设备,例如可以是个人电脑、移动终端、个人数字助理、可穿戴电子设备等。服务器34和子服务器362是用于响应服务请求,同时提供计算服务的设备,例如可以是一台或者多台计算机。
图4为一个实施例中图像处理方法的硬件交互时序图。如图4所示,该交互时序图包括步骤402至步骤410。其中:
步骤402,客户端获取待处理图像集合,并根据待处理图像集合进行聚类处理,得到本地聚类结果。
在一个实施例中,待处理图像集合包括第一图像子集合和第二图像子集合,客户端将待处理图像集合进行聚类,得到本地聚类结果。客户端可以设置触发聚类处理的条件,在满足条件的情况下,获取待处理图像集合,并进行聚类处理。当满足预设触发条件时,获取待处理图像集合。具体地,可以获取待处理图像集合以及对应的历史分类信息,并根据所述历史分类信息将待处理图像集合进行聚类处理,得到本地聚类结果。更进一步地,可以先判断本地聚类模型是否有更新,若本地聚类模型未更新,则可以只对新增的待处理图像集合进行聚类处理,得到本地聚类结果。
步骤404,客户端发送第一图像子集合至服务器。
在一个实施例中,客户端可以根据第一图像子集合生成聚类请求,并将聚类请求发送至服务器,服务器根据聚类请求对第一图像子集合进行聚类处理。
步骤406,服务器根据第一图像子集合进行聚类处理,得到服务器聚类结果。
在一个实施例中,可以将第一图像子集合对应的感兴趣区域集合发送至服务器,并接收服务器返回的服务器聚类结果,服务器聚类结果是根据第一图像子集合对应的感兴趣区域集合进行聚类处理得到的。在其他实施例中,将第一图像子集合以及对应的历史分类信息发送至服务器,并接收服务器返回的服务器聚类结果,服务器聚类结果是根据第一图像子集合以及对应的历史分类信息进行聚类处理得到的。更进一步地,将第一图像子集合以及对应的系统分类信息发送至服务器,并接收服务器返回的服务器聚类结果,服务器聚类结果是根据第一图像子集合以及对应的系统分类信息进行聚类处理得到的。
步骤408,服务器发送服务器聚类结果至客户端。
服务器完成聚类处理之后,将得到的服务器聚类结果发送至客户端。服务器还可以根据服务器聚类结果生成标签数据,并将标签数据存储在磁盘中。
步骤410,客户端根据本地聚类结果和服务器聚类结果,将待处理图像 进行分类。
在一个实施例中,若本地聚类结果中的第一本地聚类结果与服务器聚类结果不同,则根据服务器聚类结果将第一图像子集合中的待处理图像进行分类;根据本地聚类结果中的第二本地聚类结果,将第二图像子集合中的待处理图像进行分类。其中,第一本地聚类结果是指在本地将第一图像子集合进行聚类处理得到的聚类结果,第二本地聚类结果是指在本地将第二图像子集合进行聚类处理得到的聚类结果。
具体地,遍历待处理图像集合中的每一张待处理图像,并获取该待处理图像对应的本地聚类结果和服务器聚类结果,若本地聚类结果和服务器聚类结果相同,则以本地聚类结果将待处理图像进行分类;若本地聚类结果和服务器聚类结果相同,则以服务器聚类结果将待处理图像进行分类;若待处理图像集合中的待处理图像没有对应的服务器聚类结果,则以本地聚类结果将该待处理图像进行分类。
图5为一个实施例中图像处理方法的流程图。如图5所示,该图像处理方法包括步骤502至步骤506。其中:
步骤502,获取待处理图像集合,并将待处理图像集合进行聚类处理得到本地聚类结果,其中待处理图像集合中包括第一图像子集合和第二图像子集合。
在本申请提供的实施例中,待处理图像是指需要进行处理的图像,例如待处理图像可以是需要进行特征识别、分类等处理的图像。待处理图像集合是指待处理图像的集合,待处理图像集合中可以包括一张或多张待处理图像。聚类处理是指将对象集合分成多个对象组合的过程,每个对象组合是由一个或多个相似的对象组成。将待处理图像集合进行聚类处理,就是将待处理图像集合中的待处理图像分成一个或多个不同类型的过程。本地聚类结果是指在客户端将待处理图像进行聚类处理得到的聚类结果。第一图像子集合和第二图像集合表示待处理图像集合中的部分或全部的待处理图像所组成的集 合。
一般地,客户端的存储空间中存储着图片,客户端可以从预设存储地址中直接获取图片,也可以遍历移动终端中的所有文件夹获取图片。客户端的存储空间分为内存储器和外接存储器。内存储器是指客户端本身自带的存储器,是客户端硬件结构的一部分。外接存储器是指客户端外接的存储设备,外接存储可以通过专用接口与客户端进行数据传输。例如,外接存储器可以是SD卡、U盘等。那么,待处理图像集合中可以包含内存储器和外接存储器中存储的图片,第一图像子集合可以是指内存储器中存储的图片,第二图像子集合可以是指外接存储器中存储的图片。
将第一图像子集合发送至服务器进行聚类处理,由于图像原图占用空间非常大,导致发送的速度较慢。在一个实施例中,可以只将待处理图像中的感兴趣区域发送至服务器进行聚类处理。具体地,可以获取待处理图像集合及对应的感兴趣区域集合,并将第一图像子集合对应的感兴趣区域集合发送至服务器。感兴趣区域是指对待处理图像集合进行聚类处理时,所关注的待处理图像中的区域。例如,根据人脸将待处理图像集合进行聚类时,感兴趣区域可以是待处理图像中人脸所在的区域。
可以根据待处理图像集合进行聚类处理,也可以根据感兴趣区域集合进行聚类处理。可以理解的是,提取的感兴趣区域与对应的待处理图像是对应的,一张待处理图像中可以包含一个或多个感兴趣区域,待处理图像通过图像标识进行标记,感兴趣区域可以通过区域标识进行标记,图像标识和区域标识可以为一对一的对应关系,也可以为一对多的对应关系。
在一个实施例中,可以设置触发聚类处理的条件,在满足条件的情况下,获取待处理图像集合,并进行聚类处理。具体地,当满足预设触发条件时,获取待处理图像集合。预设触发条件是指预先设置的触发聚类处理的条件,在满足该预设触发条件时,进行聚类处理。预设触发条件可以但不限于是:聚类触发条件包括以下方法中至少一种:在客户端的新增图片数量大于预设数量;当前时间为预设时间;距上次发起聚类请求的时间超过预设时间段; 移动终端当前处于充电状态;当前聚类模型发生变化。
将待处理图像集合进行聚类处理得到本地聚类结果,具体是指根据本地聚类模型将待处理图像集合进行聚类处理得到本地聚类结果。聚类模型是指进行聚类处理的算法模型,聚类模型可以将待处理图像集合进行聚类处理。例如,常用的聚类模型包括k-means聚类模型、层次聚类模型、SOM聚类模型和FCM聚类模型等。本地聚类模型是指本地存储的聚类模型。
在本申请提供的实施例中,在满足预设聚类触发条件时,将待处理图像集合进行聚类处理,也就是说待处理图像集合中的待处理图像可能已经进行过多次聚类处理,并存在对应的分类信息。也就是说,待处理图像集合中的部分或全部待处理图像,可能已经存在对应的分类信息。那么可以获取历史分类信息,并根据历史聚类信息将待处理图像集合进行聚类处理。步骤502具体可以包括:获取待处理图像集合以及对应的历史分类信息,并根据所述历史分类信息将待处理图像集合进行聚类处理,得到本地聚类结果。其中,历史分类信息就是指待处理图像对应的历史分类信息。例如,前一次聚类处理的时候,进行聚类处理的图片具有对应的分类信息,前一次聚类处理之后所产生的图片没有对应的分类信息,如果本地聚类模型没有更新的话,本次可以只将这部分新增的图片进行聚类处理。
可以理解的是,历史分类信息可以包括系统分类信息和手动分类信息,系统分类信息是指通过系统自动对待处理图像进行分类得到的分类信息,手动分类信息是指用户手动对待处理图像进行分类得到的分类信息。例如,移动终端在呈现待处理图像的分类信息时,用户可以进行查看,若查看到某张待处理图像的分类信息不符合个人喜好,则可以手动改变该待处理图像的分类信息。对于新增的图片,系统对这些新增的图片单独建立一个分组,这样在获取待处理图像时,就可以通过这个分类信息判断哪些图片是新增的。具体地,可以将系统分类信息对应的待处理图像集合进行聚类处理,得到本地聚类结果。即用户手动分类的待处理图像再不进行聚类,只将系统分类信息对应的待处理图像进行聚类处理。更进一步地,可以先判断本地聚类模型是 否有更新,若本地聚类模型未更新,则可以只对新增的待处理图像集合进行聚类处理,得到本地聚类结果。
步骤504,将第一图像子集合发送至服务器,并接收服务器返回的服务器聚类结果,服务器聚类结果是根据第一图像子集合进行聚类处理得到的。
在一个实施例中,将第一图像子集合发送至服务器,服务器根据该第一图像子集合进行聚类处理,得到服务器聚类结果。服务器在接收到第一图像子集合之后,会将第一图像子集合进行存储,并根据第一图像子集合进行聚类处理。得到的聚类处理结果可以通过分类标签进行标记,通过分类标签可以知道待处理图像具体属于哪一类型的数据。通过待处理图像的图像标识和对应的分类标签形成标签数据,服务器返回的聚类结果只需要包括该标签数据即可,无需再返回整个图像集合。
一般来说,待处理图像集合中的每一张待处理图像都有对应的图像标识,则图像标识与形成的分类标签具有对应关系,根据分类标签可以将图像标识对应的待处理图像进行分类。例如,图像标识包括“图像1”、“图像2”和“图像3”,分类标签可以包括“分类1”和“分类2”,“分类1”对应“图像1”和“图像2”,“分类2”对应“图像3”。
若服务器接收到的是第一图像子集合对应的感兴趣区域集合,则可以直接根据感兴趣区域集合进行聚类处理。步骤504可以包括:将第一图像子集合对应的感兴趣区域集合发送至服务器,并接收服务器返回的服务器聚类结果,服务器聚类结果是根据第一图像子集合对应的感兴趣区域集合进行聚类处理得到的。服务器中存储着服务器聚类模型,在接收到第一图像子集合之后,根据服务器聚类模型将第一图像子集合进行聚类处理。可以理解的是,若接收到的是感兴趣区域集合,也可以根据服务器聚类模型将感兴趣区域集合进行聚类处理。
在一个实施例中,若服务器接收到第一图像子集合及对应的历史分类信息,则可以根据历史分类信息将第一图像子集合进行聚类处理。步骤504具体可以包括:将第一图像子集合以及对应的历史分类信息发送至服务器,并 接收服务器返回的服务器聚类结果,服务器聚类结果是根据第一图像子集合以及对应的历史分类信息进行聚类处理得到的。更进一步地,将第一图像子集合以及对应的系统分类信息发送至服务器,并接收服务器返回的服务器聚类结果,服务器聚类结果是根据第一图像子集合以及对应的系统分类信息进行聚类处理得到的。
步骤506,根据本地聚类结果和服务器聚类结果,对待处理图像集合进行分类。
在本申请提供的实施例中,客户端对第一图像子集合和第二图像子集合进行聚类处理,得到本地聚类结果。服务器对第一图像子集合进行服务器聚类结果。客户端可以通过本地聚类结果和服务器聚类结果,对待处理图像集合中的待处理图像进行分类处理。
在一个实施例中,步骤506具体可以包括:若本地聚类结果中的第一本地聚类结果与服务器聚类结果不同,则根据服务器聚类结果将第一图像子集合中的待处理图像进行分类;根据本地聚类结果中的第二本地聚类结果,将第二图像子集合中的待处理图像进行分类。其中,第一本地聚类结果是指在本地将第一图像子集合进行聚类处理得到的聚类结果,第二本地聚类结果是指在本地将第二图像子集合进行聚类处理得到的聚类结果。
具体地,遍历待处理图像集合中的每一张待处理图像,并获取该待处理图像对应的本地聚类结果和服务器聚类结果,若本地聚类结果和服务器聚类结果相同,则以本地聚类结果将待处理图像进行分类;若本地聚类结果和服务器聚类结果相同,则以服务器聚类结果将待处理图像进行分类;若待处理图像集合中的待处理图像没有对应的服务器聚类结果,则以本地聚类结果将该待处理图像进行分类。
在一个实施例中,对待处理图像进行分类之后,客户端将分类后的图像进行分组显示,用户可以直接通过客户端的显示界面进行查看,也可以通过登录应用账户进行查看。可以理解的是,客户端可以设置用户手动移动分组的功能,即在现有的分类基础上,用户可以手动移动图像的分组。还可以隐 藏或编辑分组信息,例如将某个分组进行删除或隐藏,或将某个分组中的图像移动到其他分组。还可以对分组进行加密,用户只有通过认证之后才能查看对应的分组,例如可以是通过密码、指纹或虹膜等信息中的一种或多种进行认证。进一步地,还可以通过输入的不同认证信息显示不同的分组,例如输入大拇指的指纹,将分组1显示在第一位;输入食指的指纹,将分组2显示在第二位。
图6为一个实施例中移动终端相册分类结果的展示图。如图8所示,移动终端根据服务器返回的聚类处理结果将相册中的图片进行分类,并将分类的结果展示在移动终端的界面上。本实施例中的界面上展示了六个分类结果,分别包括“分类1”、“分类2”、“分类3”、“分类4”、“分类5”和“分类6”,每个分类都包含了若干张具有共性的图片,点击对应的分类,可以查看分类中的图片。
上述实施例提供的图像处理方法,获取待处理图像集合进行聚类处理,将待处理图像集合中的第一图像子集合发送至服务器进行聚类处理,并根据本地聚类结果和服务器聚类结果对待处理图像集合进行分类。这样不仅能够通过客户端进行聚类处理,还能考虑到服务器的聚类处理结果,防止在一端进行聚类处理时造成的图像聚类结果不准确的问题,提高了图像处理的准确率。
图7为另一个实施例中图像处理方法的流程图。如图7所示,该图像处理方法包括步骤702至步骤706。其中:
步骤702,接收客户端发送的第一图像子集合。
在一个实施例中,客户端可以获取一个待处理图像集合,待处理图像集合是指待处理图像的集合,待处理图像集合中可以包括一张或多张待处理图像。该待处理图像集合包括第一图像子集合和第二图像子集合。第一图像子集合和第二图像集合表示待处理图像集合中的部分或全部的待处理图像所组成的集合。具体地,客户端和服务器之间可以首先建立通信连接,通信连接 成功之后服务器会给客户端返回一个连接成功的信息,然后客户端根据连接成功的信息将第一图像子集合发送至服务器。例如,客户端和服务器之间可以通过一对端口号(socket)来建立通信连接,建立连接之后,通过连接好的端口号来发送图片。
接收到客户端发送的第一图像子集合后,可以将第一图像子集合进行存储,这样客户端即使将第一图像子集合中的图像删除了,还可以从服务器上进行获取。可以理解的是,在存储第一图像子集合后,可以生成一个网页链接,并将网页链接返回给客户端。客户端通过访问该网页链接,可以查看存储的第一图像子集合,并可以对第一图像子集合中的图像进行下载。该网页链接对应着一个网页文档,客户端在点击该网页链接的时候,获取并读取该网页文档,网页文档中包含了这些图片的存储地址和图片标识。客户端在获取到该网页文档之后,解析该网页文档,并将网页文档中的内容进行显示,用户通过显示的内容对图片进行查看。
步骤702,根据第一图像子集合进行聚类处理,得到服务器聚类结果。
在一个实施例中,根据第一图像子集合进行聚类处理具体可以包括:将第一图像子集合中的待处理图像进行特征识别处理,得到第一图像子集合对应的特征集合;根据特征集合进行聚类处理,得到服务器聚类结果。其中,特征集合是根据获取的第一图像子集合提取的特征的集合。第一图像子集合是用于进行分类处理的待处理图像的集合,特征集合是指待处理图像中用于聚类处理的特征的集合。用于聚类处理的特征可以表示待处理图像中的类型特征。例如,将相册中的图像根据人脸进行分类,那么特征集合就是图像中的人脸区域组成的集合。
首先根据第一图像子集合进行特征识别处理,得到特征集合,并根据特征集合进行聚类处理,得到聚类结果。一般来说,接收到图像集合所占用的空间是非常大的,而对图像集合进行聚类处理之后,返回的聚类结果是指对图像集合中的图像进行标记的数据,因此聚类结果占用的空间是非常小的,传输速度也会非常快。聚类结果中待处理图像的图像标识、特征对应的特征 根标识和分类标签是对应的,客户端可以通过聚类结果查找待处理图像属于哪个分类,并将待处理图像进行分类。
步骤704,将服务器聚类结果发送至客户端,用于指示客户端执行根据服务器聚类结果和本地聚类结果,对待处理图像集合进行分类,其中本地聚类结果是由客户端根据待处理图像集合进行聚类所得到的,待处理图像集合中包括第一图像子集合和第二图像子集合。
在一个实施例中,服务器完成聚类处理后,可以直接将服务器聚类结果推送给客户端。例如,通过PUSH服务将服务器聚类结果推送给客户端。其中,PUSH服务是一种用于推送数据的服务。客户端在接收到服务器聚类结果后,会根据服务器聚类结果和本地聚类结果,对待处理图像集合进行分类。本地聚类结果是由客户端根据待处理图像集合进行聚类得到的聚类结果,其中包括第一本地聚类结果和第二本地聚类结果,第一本地聚类结果是根据第一图像子集合进行聚类处理得到的聚类结果,第二本地聚类结果是根据第二图像子集合进行聚类处理得到的聚类结果。若本地聚类结果中的第一本地聚类结果与服务器聚类结果不同,则根据服务器聚类结果将第一图像子集合中的待处理图像进行分类;根据本地聚类结果中的第二本地聚类结果,将第二图像子集合中的待处理图像进行分类。其中,第一本地聚类结果是指在本地将第一图像子集合进行聚类处理得到的聚类结果,第二本地聚类结果是指在本地将第二图像子集合进行聚类处理得到的聚类结果。
可以理解的是,聚类结果中记录了每一张待处理图像对应的分类类型,通过聚类结果可以将待处理图像进行分类。具体地,遍历待处理图像集合中的每一张待处理图像,并获取该待处理图像对应的本地聚类结果和服务器聚类结果,若本地聚类结果和服务器聚类结果相同,则以本地聚类结果将待处理图像进行分类;若本地聚类结果和服务器聚类结果相同,则以服务器聚类结果将待处理图像进行分类;若待处理图像集合中的待处理图像没有对应的服务器聚类结果,则以本地聚类结果将该待处理图像进行分类。
上述实施例提供的图像处理方法,获取待处理图像集合进行聚类处理, 将待处理图像集合中的第一图像子集合发送至服务器进行聚类处理,并根据本地聚类结果和服务器聚类结果对待处理图像集合进行分类。这样不仅能够通过客户端进行聚类处理,还能考虑到服务器的聚类处理结果,防止在一端进行聚类处理时造成的图像聚类结果不准确的问题,提高了图像处理的准确率。
图8为又一个实施例中图像处理方法的流程图。如图8所示,该图像处理方法包括步骤802至步骤810。其中:
步骤802,接收客户端发送的根据第一图像子集合生成的聚类请求,并根据接收到的聚类请求生成聚类请求队列。
在本申请提供的实施例中,聚类是指将对象集合分成多个对象组合的过程,每个对象组合是由一个或多个相似的对象组成。聚类请求是指用于对聚类对象集合进行聚类处理的命令。聚类请求队列是由一个或多个聚类请求形成的队列,根据聚类请求队列对聚类请求进行处理。请求发起对象是指发起聚类请求的对象。
一般地,客户端向服务器发送聚类请求时,聚类请求中可以包含请求发起设备标识、请求接收设备标识、请求发起时间、聚类对象集合和聚类对象的属性参数等信息。其中,聚类对象集合是指用于聚类处理的对象的集合,例如聚类对象集合可以是第一图像子集合。聚类对象的属性参数是指表示聚类对象集合的属性的参数,例如聚类对象的属性参数可以是指用于聚类的图片的文件大小、尺寸大小、文件格式等。服务器接收到聚类请求之后会根据聚类对象集合进行聚类处理。若接收设备接收到多个发送客户端的多个聚类请求时,会根据这个多个聚类请求形成一个聚类请求队列,并对聚类请求队列中的聚类请求进行处理。其中,聚类对象集合也可以是聚类对象标识,即服务器可以根据聚类对象标识查找聚类对象集合,并对聚类对象集合进行聚类处理。例如,服务器上预先存储着第一图像子集合,客户端在发送聚类请求的时候,只需要发送聚类对象标识,服务器就可以直接根据聚类对象标识 查找第一图像子集合,并将第一图像子集合进行聚类处理。
可以接收多个客户端的聚类请求,每个客户端也可以发起多次聚类请求。客户端可以预先设置触发向服务器发起聚类请求的条件,设置的聚类触发条件包括以下方法中至少一种:在客户端的新增图片数量大于预设数量;当前时间为预设时间;距上次发起聚类请求的时间超过预设时间段;客户端当前处于充电状态;当前聚类模型发生变化。例如,在移动终端新增图片大于50张时,若当前时间为凌晨2点到5点,且移动终端处于充电状态,则移动终端发起聚类请求。
步骤804,从聚类请求队列中获取请求发起对象相同的聚类请求,并将获取的聚类请求进行合并。
在一个实施例中,客户端可以向服务器发起聚类请求,服务器可以连接多个客户端,并接收多个客户端发送的聚类请求。合并聚类请求是指将多个聚类请求合并为一个聚类请求,并对合并后的聚类请求进行处理的过程,实现了多个聚类请求同时处理。具体地,获取聚类请求队列中每个聚类请求包含的请求发起设备标识,并将聚类请求队列中请求发起设备标识相同的聚类请求进行合并。请求发起设备标识相同的聚类请求,即为同一个请求发起对象发送的聚类请求。
可以理解的是,客户端中可以登录多个应用账户,不同用户对应不同的应用账户,用户需要进行聚类处理时,可以通过应用账户所在的客户端向服务器发起聚类请求。也就是说,当客户端向服务器发起聚类请求时,请求发起设备标识可以是指应用账户标识,也可以是终端标识。其中,应用账户标识是指用于表示用户身份的唯一身份标识,终端标识是指区分不同客户端的唯一标识。终端标识可以但不限于是客户端的IP(Internet Protocol,网络之间互连的协议)地址、MAC(Media Access Control,媒体访问控制)地址等。例如,用户可以通过应用账户登录智能终端,并通过智能终端向服务器发送对相册中的照片进行聚类处理的请求,服务器接收到智能终端发送的聚类请求之后,将相册中的照片进行聚类处理,并将聚类处理的结果返回给智能终 端。聚类请求合并之后会将各个聚类请求中的聚类对象集合进行合并,由于合并的聚类请求的请求发起对象相同,那么将合并后的聚类请求进行处理后,得到的聚类处理结果可以直接发送给聚类请求发起对象。
举例来说,聚类请求队列中包含了三个聚类请求,按照时间先后顺序排列分别为:聚类请求1,应用账户A在2017年8月20日03:30发送的聚类请求,包含聚类对象集合1;聚类请求2,应用账户B在2017年8月21日02:41发送的聚类请求,包含聚类对象集合2;聚类请求3,应用账户A在2017年8月22日04:02发送的聚类请求,包含聚类对象集合3。则将聚类请求1和聚类请求3进行合并,合并后获取的聚类对象集合为聚类对象集合1和聚类对象集合3的并集。
在一个实施例中,步骤804具体可以包括:根据请求发起时间将聚类请求队列中的聚类请求进行排序,并获取排序后的聚类请求队列中的指定聚类请求;获取聚类请求队列中与指定聚类请求的请求发起对象相同的聚类请求。例如,将聚类请求按请求发起时间进行升序排列,或者将聚类请求按请求发起时间进行降序排列,并根据排序后的聚类请求队列获取指定聚类请求。一般地,服务器在接收到多个聚类请求之后,由于处理能力有限,无法将所有聚类请求同时进行处理。那么服务器可以根据请求发起时间的先后顺序形成聚类请求队列,并将请求发起时间靠前的聚类请求先进行处理,请求发起时间靠后的聚类请求后处理。指定聚类请求是指聚类请求队列中符合指定条件的聚类请求,获取的指定聚类请求作为当前进行处理的聚类请求。根据请求发起时间将聚类请求队列的聚类请求进行排序之后,可以根据请求发起时间获取指定聚类请求,例如,聚类请求队列中的排序首位的聚类请求,排序末位的聚类请求。
在获取到指定聚类请求之后,将指定聚类请求与聚类请求队列中的各个聚类请求进行对比,获取与指定聚类请求的请求发起对象相同的聚类请求。接收到聚类请求之后,可以根据聚类请求中的请求发起对象建立聚类任务列表,聚类任务列表中记录了各个聚类请求的请求发起设备标识、请求接收设 备标识、请求发起时间等信息。则获取与指定聚类请求的请求发起对象相同的聚类请求具体可以包括:获取指定聚类请求的请求发起设备标识,遍历聚类任务列表,获取与指定聚类请求的请求发起设备标识相同的聚类请求。将获取的聚类请求进行合并,具体是指将各个聚类请求中的聚类对象集合进行合并。即对于同一个请求发起对象的发起的多个聚类请求,可以将聚类请求的聚类对象集合合并到一起处理,每个聚类对象只处理一次,而无需将聚类请求中重复的聚类对象重复多次进行处理。
在其他实施例中,步骤804具体还可以包括:根据请求发起时间由先到后的顺序将聚类请求队列中的聚类请求进行排列,获取聚类请求队列中的首位聚类请求;获取聚类请求队列中与首位聚类请求的请求发起对象相同的聚类请求。获取的首位聚类请求,即为聚类请求队列中排序第一的聚类请求,也就是聚类请求队列中请求发起时间最早的聚类请求。
在本申请提供的其他实施例中,步骤804具体还可以包括:根据请求发起设备的优先级将聚类请求队列中的聚类请求进行排序,获取排序后的聚类请求队列中的指定聚类请求;获取聚类请求队列中与指定聚类请求的请求发起对象相同的聚类请求。其中,请求发起设备的优先级是指任务处理的优先级,例如移动终端发起的聚类请求优先处理,PC(Personal Computer,个人电脑)端发起的聚类请求后处理。还可以是根据聚类对象集合的大小将聚类请求队列中的聚类请求进行排序,即聚类对象集合占用空间较大的聚类请求优先处理。
在一个实施例中,对于客户端发起的聚类请求,可以记录聚类请求对应的请求状态,用于表示聚类请求的处理过程。例如,请求状态可以包括未处理、处理中、重新处理和处理完成等状态,可以分别通过“R-Result”、“De-Handle”、“Re-Group”和“End”等标签进行表示。读取当前聚类请求的请求状态标签,根据请求状态标签可以知道当前聚类请求的状态。其中,如果由于硬件或软件故障造成请求中断等情况,聚类请求可能会重新进行处理,那么该聚类请求就可以通过“Re-Group”标签来表示当前请求状态为重 新处理。
步骤806,根据合并后的聚类请求所对应的第一图像子集合进行聚类处理,得到服务器聚类结果。
可以理解的是,根据合并后的聚类请求所对应的第一图像子集合具体可以包括:获取请求发起对象相同的聚类请求对应的第一图像子集合,并将获取的第一图像子集合的并集作为聚类对象集合。可以是获取合并后的聚类请求所对应的图像标识,并根据图像标识获取第一图像子集合。
在一个实施例中,可以通过一个服务器集群来实现聚类处理,服务器集群中包含了多个子服务器。一般地,子服务器在提供聚类服务时,工作状态可以分为可用状态和非可用状态。在可用状态下,子服务器可以接收聚类对象集合,并对聚类对象集合进行聚类处理;非可用状态下,子服务器无法接收聚类对象集合,并对聚类对象集合进行聚类处理。例如,子服务器正在执行任务或者硬件出现故障时,会标记为非可用状态,在非可用状态下子服务器无法进行聚类处理。具体地,服务器可以通过状态标识来表示当前的工作状态,获取到该状态标识即可判断服务器是否可用。
各个子服务器的可以定时或实时地将状态标识发送到注册服务器中,注册服务器将接收到的状态标识进行存储。该状态标识可以直接以文件进行存储,也可以通过列表的形式进行存储。则获取子服务器对应的状态标识具体可以包括以下方法中的至少一种:接收注册服务器发送的各个子服务器对应的状态标识;获取状态标识列表,并从状态标识列表中获取状态标识,其中状态标识列表是由注册服务器根据各个服务器上报的状态标识形成的。状态标识为表示了各个子服务器是否可用的标识,根据状态标识可以查找到处于可用状态的子服务器。
在一个实施例中,子服务器上传状态标识的时候,可以同时上传子服务器对应的服务器标识。服务器标识是指区分不同子服务器的唯一标识,生成的状态标识和服务器标识一一对应,根据服务器标识可以查找对应的子服务器,并通过对应的状态标识可以知道该子服务器的工作状态。则步骤806具 体就可以包括:获取子服务器对应的状态标识,并根据状态标识获取目标服务器标识,其中状态标识是根据子服务器的工作状态生成的;将第一图像子集合发送至目标服务标识对应的子服务器,接收目标服务标识对应的子服务器返回的服务器聚类结果,其中服务器聚类结果是根据第一图像子集合进行聚类处理得到的。其中,目标服务器标识是只用来进行聚类处理的子服务器对应的服务器标识。
可以理解的是,根据状态标识可以知道哪些子服务器为可用状态,如果存在多个处于可用状态的子服务器,则可以通过预设路由算法获取目标子服务器。则可以首先获取子服务器对应的状态标识,并根据状态标识列表获取状态标识;根据状态标识获取可用服务器标识,根据预设路由算法从可用服务器标识中获取目标服务器标识。其中,预设路由算法是指选择目标服务器标识的算法,例如,预设路由算法可以是负载均衡算法,负载均衡算法可以是随机算法、轮询算法、源地址哈希算法等,在此不做限定。另外,状态标识列表还可以为可用服务列表,可用服务列表中只记录处于可用状态的子服务器对应服务器标识,若可用服务列表为空,则说明没有处于可用状态的子服务器。那么步骤806具体可以就包括:获取可用服务列表,获取可用服务列表中的服务器标识,通过预设路由算法从获取的服务器标识中选择目标服务器标识,将第一图像子集合发送到目标服务器标识对应的子服务器进行聚类处理。
在一个实施例中,通过预设路由算法从获取的服务器标识中选择目标服务器标识还可以包括:获取合并后的聚类请求对应的第一图像子集合的属性参数,以及子服务器的负载参数;根据属性参数和负载参数查找子服务器,并将第一图像子集合发送至该查找到的子服务器进行聚类处理。其中,属性参数可以是第一图像子集合的文件大小,负载参数是指表示子服务器的最大负载处理能力的参数。一般负载参数越大,服务器的处理能力越强;负载参数越小,服务器的处理能力越弱。
在本申请提供的其他实施例中,通过预设路由算法从获取的服务器标识 中选择目标服务器标识还可以包括:获取请求发起对象对应的优先级,以及服务器标识对应的负载参数,其中请求发起对象是指发起特征识别请求的设备;根据优先级和负载参数,从服务器标识中获取目标服务器标识。其中,请求发起对象对应的优先级,用于判断对请求发起对象发起的聚类请求进行处理的优先级。例如,移动终端的优先级高于PC(Personal Computer,个人电脑)端,那么移动终端发起的聚类请求优先处理,PC端发起的聚类请求后处理。还可以获取请求发起对象对应的请求发起次数,请求发起次数越多的,对应的优先级越高。
通过预设路由算法从获取的服务器标识中选择目标服务器标识还可以包括:获取待处理图像集合的属性参数,以及服务器标识对应的负载参数;根据属性参数和负载参数,从服务器标识中获取目标服务器标识。第一图像子集合的属性参数是指表示第一图像子集合的属性的参数,例如第一图像子集合的属性参数可以是指第一图像子集合的文件大小、尺寸大小、文件格式等。根据属性参数和负载参数获取目标服务器标识,例如,将占用空间较大的第一图像子集合,分配到负载参数较大的子服务器中进行处理。
在一个实施例中,还可以获取请求发起对象对应的地理标识以及可用服务器对应的地理标识,根据请求发起对象对应的地理标识以及可用服务器对应的地理标识,从服务器标识中获取目标服务器标识。其中,地理标识是指表示所属地域的相关参数,该地理标识可以通过设备的IP地址获取,也可以通过GPS(Global Positioning System,全球定位系统)进行获取。例如,客户端属于“广东省”,那么该客户端发起的聚类请求就发送到“广东省”对应的子服务器进行处理。
在其他实施例中,通过预设路由算法从获取的服务器标识中选择目标服务器标识还可以包括:获取第一图像子集合的文件大小,根据多个处于可用状态的子服务器的承载能力,来匹配相应文件大小的第一图像子集合。例如,将占用空间较大的第一图像子集合,发送到承载能力较大的子服务器进行聚类处理。
图9为一个实施例中实现聚类处理的服务器架构图。该服务器架构图中包括第一服务器和第二服务器集群,第二服务器集群中包含若干个第二服务器。第一服务器用于提供聚类接入服务902和队列服务904,第二服务器用于提供聚类服务906和标签数据服务908。聚类接入服务902用于接收聚类请求,队列服务904用于根据聚类接入服务接收的聚类请求生成聚类请求队列,并将第一图像子集合发送至第二服务器执行聚类处理。聚类服务906用于根据第一服务器发送的第一图像子集合进行聚类处理,标签数据服务908用于根据服务器聚类结果生成标签数据,并将标签数据进行存储。第二服务器可以提供状态检测接口,第一服务器定时检测各个第二服务器的状态检测接口,通过状态检测接口获取状态标识。还可以是第二服务器主动向第一服务器上报状态标识,即当第二服务器的工作状态发生变化时,第二服务器向第一服务器发送状态标识,上报当前工作状态。例如,当第二服务器当前聚类任务处理完成时,向第一服务器上报当前工作状态为可用状态。第一服务器中可以通过状态列表的形式来记录各个第二服务器的工作状态,当需要第二服务器进行聚类处理时,通过读取该状态列表即可获取各个第二服务器的状态标识,并根据状态标识查找处于可用状态的第二服务器。
在一个实施例中,对第一图像子集合进行聚类处理具体包括:将第一图像子集合中的待处理图像进行特征识别处理,得到第一图像子集合对应的特征集合;根据特征集合进行聚类处理,得到服务器聚类结果。特征识别处理是指识别待处理图像的具体特征属性的处理过程。例如,特征识别处理可以是识别待处理图像中的人脸特征、颜色特征、边缘特征和纹理特征等信息。识别不同的特征,采用的识别模型不同。例如,常用的边缘检测模型包括Sobel边缘检测算法、Canny边缘检测算法和Roberts边缘检测算法等。对待处理图像进行特征识别处理,可以通过特征值表示不同的特征识别结果,并通过特征识别结果形成一个特征集合。一张待处理图像可以对应一个或多个特征,该特征可以表示待处理图像中的用于分类的属性。例如,将相册中的图像根据人脸进行分类,那么特征集合就是图像中的人脸区域组成的集合。形成的 特征集合可以用于将待处理图像进行聚类处理。
具体地,将第一图像子集合中的待处理图像进行特征识别处理具体可以包括:根据第一图像子集合生成图像队列,并对图像队列中的待处理图像进行特征识别处理。图像队列是指第一图像子集合中的待处理图像形成的队列,可以根据图像队列对待处理图像进行处理,实现对待处理图像的有序处理。在形成图像队列之后,每次进行特征识别处理时可以从图像队列中获取预设数量的待处理图像,并将获取的预设数量的待处理图像进行特征识别处理。图像队列可以是随机生成的,也可以是根据待处理图像的大小、格式等属性进行排列生成的。例如,将待处理图像根据格式进行排列,将同一格式的待处理图像一起处理。一般地,待处理图像可以分为JPG、PNG、TIFF、RAW等格式。形成图像队列之后,还可以控制待处理图像的处理速度,每次处理预设数量的待处理图像。例如,总共有500张待处理图像,每次处理100张。
更进一步地,将第一图像子集合中的待处理图像进行特征识别处理具体还可以包括:将第一图像子集合进行加密处理,并根据加密处理后的第一图像子集合生成图像队列;将图像队列中的待处理图像进行解密处理,并将解密处理后的待处理图像进行特征识别处理。加密处理是指以某种特殊的算法将原有的信息进行改变,使得未授权的用户无法获知原有信息的处理方法。可通过3DES(Triple Data Encryption Algorithm,三重数据加密算法)、RC5等加密算法将聚类对象集合进行加密处理。经过加密处理后的待处理图像,在未经授权的用户进行访问时,无法获取待处理图像的真实信息。解密处理是指将加密后的信息还原为原有信息的处理,加密处理和解密处理是相反的处理过程。在形成图像队列之前,将待处理图像进行加密处理,通过图像队列控制待处理图像的处理速度。在对待处理图像进行处理的时候,需要将加密处理后的待处理图像进行解密处理,再将解密处理之后的待处理图像进行特征识别处理。
在一个实施例,为了提高待处理图像的特征识别效率,可以将待处理图像进行一定程度的压缩或剪裁处理。具体地,将第一图像子集合中的待处理 图像进行压缩或剪裁处理,并将压缩或剪裁处理后的待处理图像进行特征识别处理。压缩处理是指将待处理图像进行一定程度的压缩,使待处理图像占用空间变小的处理。剪裁处理是指将待处理图像进行一定程度的剪裁,使待处理图像占用空间变小的处理。一般对待处理图像压缩或剪裁处理的程度不宜过大,若压缩或剪裁处理的程度过大,会严重影响待处理图像的特征识别准确性。
聚类处理可以根据一个和多个特征将聚类对象集合分为多个分类。例如,人根据性别可以分为男性和女性,根据年龄又可以分为少年、青年、中老年等,根据性别和年龄又可以有更多的组合方式。一般可以根据聚类模型将聚类对象集合进行分类,常用的聚类模型包括k-means聚类模型、层次聚类模型、SOM聚类模型和FCM聚类模型等。更进一步地,聚类模型可以根据聚类样本集合进行训练得到。聚类样本集合是指用于训练得到模型的样本集合,聚类样本集合可以是根据聚类对象集合生成的样本集合,也可以是专门用于训练聚类模型的样本集合。例如,聚类样本集合可以是第一图像子集合中的一部分。
步骤808,根据服务器聚类处理结果生成标签数据,并将标签数据存储在预设存储空间。
在一个实施例中,标签数据是指用于标记聚类对象集合中聚类对象的分类类型属性的标识,例如,聚类对象1属于分类1,那么形成的标签数据可以是“分类1”。可以理解的是,第一图像子集合中的每张待处理图像都有对应的图像标识,用于标识待处理图像的唯一性。根据服务器聚类结果可以将分类标签与图像标识建立对应关系,生成标签数据,并将标签数据存储在预设存储空间中。
可以理解的是,若当前处理的聚类请求对应的第一图像子集合中,存在以前进行过聚类处理的待处理图像,则可以将这些处理过的待处理图像提取出来,不进行聚类处理,当前只针对未处理过的待处理图像进行聚类处理。那么将第一图像子集合进行聚类处理具体就可以包括:将第一图像子集合中 除历史处理图像之外的其他待处理图像进行聚类处理。其中,历史处理图像是指历史处理过的图像。可以将第一图像子集合中待处理图像的图像标识,与预设存储空间中存储的标签数据对应的图像标识进行比较,图像标识相匹配的待处理图像为历史处理图像。另外,还可以首先将请求发起对象标识和标签数据对应的请求发起对象标识进行匹配,若存在相匹配的请求发起对象标识,再根据图像标识查找历史处理图像。
在一个实施例中,服务器上存储的服务器聚类模型会不定期进行更新,每个版本的服务器聚类模型都会有对应的模型标识,预设存储空间中存储的标签数据也会有对应的模型标识,用于标记生成标签数据的聚类模型的版本。若第一图像子集合中存在历史处理图像,可以将历史处理图像对应的模型标识与当前服务器聚类模型的模型标识进行比较,若相同,则历史处理图像不再重新聚类处理;若不同,则对历史处理图像进行重新聚类处理。重新聚类之后,将历史处理图像的重新聚类结果生成标签数据覆盖原有的标签数据。
步骤810,将服务器聚类结果发送至客户端,用于指示客户端执行根据服务器聚类结果和本地聚类结果,对待处理图像集合进行分类,其中本地聚类结果是由客户端根据待处理图像集合进行聚类所得到的,待处理图像集合中包括第一图像子集合和第二图像子集合。
上述实施例提供的图像处理方法,客户端获取待处理图像集合进行聚类处理,将待处理图像集合中的第一图像子集合发送至服务器,通过子服务器对第一图像子集合进行聚类处理,并根据本地聚类结果和服务器聚类结果对待处理图像集合进行分类。这样不仅能够通过客户端进行聚类处理,还能考虑到服务器的聚类处理结果,防止在一端进行聚类处理时造成的图像聚类结果不准确的问题,提高了图像处理的准确率。
图10为一个实施例中图像处理系统的系统架构图。如图10所示,该图像处理系统中包括客户端1002和服务器1004。其中:
客户端1002,用于获取待处理图像集合,将待处理图像集合进行聚类处 理得到本地聚类结果,将第一图像子集合发送至服务器1004,接收服务器1004返回的服务器聚类结果,并根据本地聚类结果和服务器聚类结果,对待处理图像集合进行分类,其中,待处理图像集合中包括第一图像子集合和第二图像子集合,服务器聚类结果是根据第一图像子集合进行聚类处理得到的。
在一个实施例中,客户端1002还用于获取待处理图像集合及对应的感兴趣区域集合;将第一图像子集合对应的感兴趣区域集合发送至服务器,并接收服务器返回的服务器聚类结果,服务器聚类结果是根据第一图像子集合对应的感兴趣区域集合进行聚类处理得到的。
在一个实施例中,客户端1002还用于获取待处理图像集合以及对应的历史分类信息,并根据历史分类信息将待处理图像集合进行聚类处理,得到本地聚类结果;将第一图像子集合以及对应的历史分类信息发送至服务器,并接收服务器返回的服务器聚类结果,服务器聚类结果是根据第一图像子集合以及对应的历史分类信息进行聚类处理得到的。
在一个实施例中,客户端1002还用于将系统分类信息对应的待处理图像集合进行聚类处理,得到本地聚类结果;将第一图像子集合以及对应的系统分类信息发送至服务器,并接收服务器返回的服务器聚类结果,服务器聚类结果是根据第一图像子集合以及对应的系统分类信息进行聚类处理得到的。
在一个实施例中,客户端1002还用于若本地聚类结果中的第一本地聚类结果与服务器聚类结果不同,则根据服务器聚类结果将第一图像子集合中的待处理图像进行分类;根据本地聚类结果中的第二本地聚类结果,将第二图像子集合中的待处理图像进行分类。
在一个实施例中,客户端1002还用于当满足预设触发条件时,获取待处理图像集合。
服务器1004,用于接收客户端1002发送的第一图像子集合,并根据第一图像子集合进行聚类处理得到服务器聚类结果,并将服务器聚类结果发送至客户端1002。
在一个实施例中,服务器1004还用于接收客户端发送的根据第一图像子 集合生成的聚类请求,并根据接收到的聚类请求生成聚类请求队列;从聚类请求队列中获取请求发起对象相同的聚类请求,并将获取的聚类请求进行合并;根据合并后的聚类请求所对应的第一图像子集合进行聚类处理,得到服务器聚类结果。
在一个实施例中,服务器1004还用于根据请求发起时间将聚类请求队列中的聚类请求进行排序,并获取排序后的聚类请求队列中的指定聚类请求;获取聚类请求队列中与指定聚类请求的请求发起对象相同的聚类请求。
在一个实施例中,服务器1004还用于根据请求发起时间由先到后的顺序将聚类请求队列中的聚类请求进行排列,获取聚类请求队列中的首位聚类请求;获取聚类请求队列中与首位聚类请求的请求发起对象相同的聚类请求。
在一个实施例中,服务器1004还用于将第一图像子集合中的待处理图像进行特征识别处理,得到第一图像子集合对应的特征集合;根据特征集合进行聚类处理,得到服务器聚类结果。
在一个实施例中,服务器1004还用于根据第一图像子集合生成图像队列,并对图像队列中的待处理图像进行特征识别处理。
在一个实施例中,服务器1004还用于将第一图像子集合进行加密处理,并根据加密处理后的第一图像子集合生成图像队列;将图像队列中的待处理图像进行解密处理,并将解密处理后的待处理图像进行特征识别处理。
在一个实施例中,服务器1004还用于将第一图像子集合中的待处理图像进行压缩或剪裁处理,并将压缩或剪裁处理后的待处理图像进行特征识别处理。
在一个实施例中,服务器1004还用于获取子服务器对应的状态标识,并根据状态标识获取目标服务器标识,其中状态标识是根据子服务器的工作状态生成的;将第一图像子集合发送至目标服务标识对应的子服务器,接收目标服务标识对应的子服务器返回的服务器聚类结果,其中服务器聚类结果是根据第一图像子集合进行聚类处理得到的。
在一个实施例中,服务器1004还用于获取状态标识列表,并根据状态标 识列表获取状态标识;根据状态标识获取可用服务器标识,根据预设路由算法从可用服务器标识中获取目标服务器标识。
在一个实施例中,服务器1004还用于根据服务器聚类处理结果生成标签数据,并将标签数据存储在预设存储空间。
上述实施例提供的图像处理系统,获取待处理图像集合进行聚类处理,将待处理图像集合中的第一图像子集合发送至服务器进行聚类处理,并根据本地聚类结果和服务器聚类结果对待处理图像集合进行分类。这样不仅能够通过客户端进行聚类处理,还能考虑到服务器的聚类处理结果,防止在一端进行聚类处理时造成的图像聚类结果不准确的问题,提高了图像处理的准确率。
图11为另一个实施例中图像处理系统的系统架构图。如图11所示,该图像处理系统中包括客户端1102、特征服务器1104和聚类服务器1106。其中:
客户端1102,用于获取待处理图像集合,将待处理图像集合进行聚类处理得到本地聚类结果,将第一图像子集合发送至特征服务器1104,接收特征服务器1104返回的特征集合,将特征集合发送至聚类服务器1106,接收聚类服务器1106返回的服务器聚类结果,并根据本地聚类结果和服务器聚类结果,对待处理图像集合进行分类,其中,待处理图像集合中包括第一图像子集合和第二图像子集合,服务器聚类结果是根据第一图像子集合进行聚类处理得到的。
特征服务器1104,用于接收客户端1102发送的第一图像子集合,并根据第一图像子集合进行特征识别处理得到特征集合,并将特征集合发送至客户端1102。
在本申请提供的实施例中,特征服务器可以是一个服务器集群,即通过多台服务器实现特征识别处理的分布式处理。特征服务器可以但不限于提供数据传输服务、加解密服务、特征识别服务、存储接口服务和存储服务。其 中,数据传输服务用于数据的传输,例如通过IO Service接收客户端发送的第一图像子集合,或向客户端发送特征集合等。加解密服务用于对数据进行加解密处理,例如通过加解密服务可以是Privacy服务,通过Privacy服务将待处理图像进行加密处理。特征识别服务是指提供特征识别处理的服务,例如提取第一图像子集合中的聚类特征。存储服务是存储数据的服务,例如将待第一图像子集合在特征服务器上进行存储。存储接口服务是指与存储服务进行对接的服务,例如通过Storage服务实现与存储服务的对接。
聚类服务器1106,用于接收客户端1102发送的特征集合,并根据特征集合进行聚类处理得到服务器聚类结果,并将服务器聚类结果发送至客户端1102。
可以理解的是,在一个实施例中,聚类服务器可以但不限于包括:标签数据服务、聚类服务、机器学习服务和数据传输服务。其中,标签数据服务是指根据生成标签数据的服务,例如根据服务器聚类结果生成标签数据。聚类服务是指将数据集合进行聚类处理的服务,例如将特征集合进行聚类处理。聚类服务器还可以对训练图像集合进行训练得到聚类模型和特征识别模型,根据聚类模型对聚类特征集合进行聚类处理,并将特征识别模型发送至特征服务器以提取待处理图像集合的聚类特征集合。机器学习服务就是指提供模型训练的服务,例如根据训练图像集合训练得到聚类模型和特征识别模型。其中,训练图像集合可以是第一图像子集合中的部分或全部,也可以是专门用于训练模型的图像集合。数据传输服务是指提供数据传输的服务,例如通过PUSH方法将聚类处理结果推送给客户端。
图12为又一个实施例中图像处理系统的系统架构图。如图12所示,该图像处理系统中包括客户端1202、特征服务器1204和聚类服务器1206。其中:
客户端1202,用于获取待处理图像集合,将待处理图像集合进行聚类处理得到本地聚类结果,将第一图像子集合发送至特征服务器1204,接收聚类 服务器1206返回的服务器聚类结果,并根据本地聚类结果和服务器聚类结果,对待处理图像集合进行分类,其中,待处理图像集合中包括第一图像子集合和第二图像子集合,服务器聚类结果是根据第一图像子集合进行聚类处理得到的。
特征服务器1204,用于接收客户端1202发送的第一图像子集合,并根据第一图像子集合进行特征识别处理得到特征集合,并将特征集合发送至聚类服务器1206。
在本申请提供的实施例中,特征服务器可以是一个服务器集群,即通过多台服务器实现特征识别处理的分布式处理。特征服务器可以但不限于提供数据传输服务、加解密服务、特征识别服务、特征上报服务、存储接口服务和存储服务。其中,数据传输服务用于数据的传输,例如通过IO Service接收客户端发送的第一图像子集合,或向客户端发送特征集合等。加解密服务用于对数据进行加解密处理,例如通过加解密服务可以是Privacy服务,通过Privacy服务将第一图像子集合进行加密处理。特征识别服务是指提供特征识别处理的服务,例如提取第一图像子集合中的聚类特征。特征上报服务用于将获取的特征集合上报给聚类服务器。存储服务是存储数据的服务,例如将第一图像子集合在特征服务器上进行存储。存储接口服务是指与存储服务进行对接的服务,例如通过Storage服务实现与存储服务的对接。
聚类服务器1206,用于接收特征服务器1204发送的特征集合,并根据特征集合进行聚类处理得到服务器聚类结果,并将服务器聚类结果发送至客户端1202。
在一个实施例中,聚类服务器可以但不限于包括:标签数据服务、聚类服务、特征接收服务、机器学习服务和数据传输服务。其中,标签数据服务是指根据生成标签数据的服务,例如根据聚类处理结果生成标签数据。聚类服务是指将数据集合进行聚类处理的服务,例如将聚类特征集合进行聚类处理。特征接收服务用于接收特征服务器上报的特征集合。聚类服务器还可以对训练图像集合进行训练得到聚类模型和特征识别模型,根据聚类模型对聚 类特征集合进行聚类处理,并将特征识别模型发送至特征服务器以提取待处理图像集合的聚类特征集合。其中,训练图像集合可以是第一图像子集合中的部分或全部,也可以是专门用于训练模型的图像集合。机器学习服务就是指提供模型训练的服务,例如根据训练图像集合训练得到聚类模型和特征识别模型。数据传输服务是指提供数据传输的服务,例如通过PUSH方法将聚类处理结果推送给客户端。
图13为又一个实施例中图像处理系统的系统架构图。如图13所示,该图像处理系统中包括客户端132、本地服务器134和云端服务器136。其中,客户端132可以通过触发器1322发起聚类请求,然后通过数据获取模块1324从人脸数据库1320中获取待处理图像集合及对应的历史分类信息,将待处理图像集合和分类信息存放在备份数据库1326中,并将第一图像子集合和对应的历史分类信息发送到本地服务器134。本地服务器134接收到第一图像子集合和对应的历史分类信息之后,通过Package打包模块1340将第一图像子集合和对应的历史分类信息进行打包,并将打包后的第一图像子集合和对应的历史分类信息通过通信模块1342发送到云端服务器136进行聚类处理。云端服务器136将得到的服务器聚类结果下发到本地服务器134。本地服务器134通过通信模块1342接收服务器聚类结果,并通过Package解析模块1344将服务器聚类结果进行解析,然后将解析后的服务器聚类结果发送到客户端132。客户端132将接收到的服务器聚类结果存放到备份数据库1326中,并通过分类处理模块1328将待处理图像集合进行聚类处理,得到本地聚类结果。然后通过服务器聚类结果和本地聚类结果将待处理图像集合进行分类,并将分类后的待处理图像集合存放到人脸数据库1320中。
图14为一个实施例中图像处理装置的结构示意图。如图14所示,该图像处理装置1410包括图像获取模块1402、图像发送模块1404和图像处理模块1406。其中:
图像获取模块1402,用于获取待处理图像集合,并将所述待处理图像集合进行聚类处理得到本地聚类结果,其中待处理图像集合中包括第一图像子集合和第二图像子集合。
图像发送模块1404,用于将所述第一图像子集合发送至服务器,并接收所述服务器返回的服务器聚类结果,所述服务器聚类结果是根据所述第一图像子集合进行聚类处理得到的。
图像处理模块1406,用于根据所述本地聚类结果和服务器聚类结果,对待处理图像集合进行分类。
上述实施例提供的图像处理装置,获取待处理图像集合进行聚类处理,将待处理图像集合中的第一图像子集合发送至服务器进行聚类处理,并根据本地聚类结果和服务器聚类结果对待处理图像集合进行分类。这样不仅能够通过客户端进行聚类处理,还能考虑到服务器的聚类处理结果,防止在一端进行聚类处理时造成的图像聚类结果不准确的问题,提高了图像处理的准确率。
在一个实施例中,图像获取模块1402还用于获取待处理图像集合及对应的感兴趣区域集合。
在本申请提供的实施例中,图像获取模块1402还用于获取待处理图像集合以及对应的历史分类信息,并根据所述历史分类信息将待处理图像集合进行聚类处理,得到本地聚类结果。
在其中一个实施例中,图像获取模块1402还用于将系统分类信息对应的待处理图像集合进行聚类处理,得到本地聚类结果。
在其他实施例中,图像获取模块1402还用于当满足预设触发条件时,获取待处理图像集合。
在本申请提供的其他实施例中,图像发送模块1404还用于将第一图像子集合对应的感兴趣区域集合发送至服务器,并接收所述服务器返回的服务器聚类结果,所述服务器聚类结果是根据所述第一图像子集合对应的感兴趣区域集合进行聚类处理得到的。
在又一个实施例中,图像发送模块1404还用于将所述第一图像子集合以及对应的历史分类信息发送至服务器,并接收所述服务器返回的服务器聚类结果,所述服务器聚类结果是根据所述第一图像子集合以及对应的历史分类信息进行聚类处理得到的。
在其中一个实施例中,图像发送模块1404还用于将所述第一图像子集合以及对应的系统分类信息发送至服务器,并接收所述服务器返回的服务器聚类结果,所述服务器聚类结果是根据所述第一图像子集合以及对应的系统分类信息进行聚类处理得到的。
在一个实施例中,图像处理模块1406还用于若本地聚类结果中的第一本地聚类结果与服务器聚类结果不同,则根据所述服务器聚类结果将所述第一图像子集合中的待处理图像进行分类;根据所述本地聚类结果中的第二本地聚类结果,将所述第二图像子集合中的待处理图像进行分类。
图15为另一个实施例中图像处理装置的结构示意图。如图15所示,该图像处理装置1500包括图像接收模块1502、聚类处理模块1504和结果发送模块1506。其中:
图像接收模块1502,用于接收客户端发送的第一图像子集合。
聚类处理模块1504,用于根据所述第一图像子集合进行聚类处理,得到服务器聚类结果。
结果发送模块1506,用于将所述服务器聚类结果发送至所述客户端,用于指示所述客户端执行根据所述服务器聚类结果和本地聚类结果,对所述待处理图像集合进行分类,其中所述本地聚类结果是由所述客户端根据所述待处理图像集合进行聚类所得到的,所述待处理图像集合中包括第一图像子集合和第二图像子集合。
上述实施例提供的图像处理装置,获取待处理图像集合进行聚类处理,将待处理图像集合中的第一图像子集合发送至服务器进行聚类处理,并根据本地聚类结果和服务器聚类结果对待处理图像集合进行分类。这样不仅能够 通过客户端进行聚类处理,还能考虑到服务器的聚类处理结果,防止在一端进行聚类处理时造成的图像聚类结果不准确的问题,提高了图像处理的准确率。
在一个实施例中,图像接收模块1502还用于接收客户端发送的根据第一图像子集合生成的聚类请求,并根据接收到的聚类请求生成聚类请求队列;
在一个实施例中,聚类处理模块1504还用于从所述聚类请求队列中获取请求发起对象相同的聚类请求,并将获取的聚类请求进行合并;根据合并后的聚类请求所对应的第一图像子集合进行聚类处理,得到服务器聚类结果。
在一个实施例中,聚类处理模块1504还用于根据请求发起时间将聚类请求队列中的聚类请求进行排序,并获取排序后的聚类请求队列中的指定聚类请求;获取所述聚类请求队列中与所述指定聚类请求的请求发起对象相同的聚类请求。
在一个实施例中,聚类处理模块1504还用于根据请求发起时间由先到后的顺序将聚类请求队列中的聚类请求进行排列,获取所述聚类请求队列中的首位聚类请求;获取所述聚类请求队列中与所述首位聚类请求的请求发起对象相同的聚类请求。
在一个实施例中,聚类处理模块1504还用于将第一图像子集合中的待处理图像进行特征识别处理,得到第一图像子集合对应的特征集合;根据所述特征集合进行聚类处理,得到服务器聚类结果。
在一个实施例中,聚类处理模块1504还用于根据所述第一图像子集合生成图像队列,并对图像队列中的待处理图像进行特征识别处理。
在一个实施例中,聚类处理模块1504还用于将所述第一图像子集合进行加密处理,并根据加密处理后的第一图像子集合生成图像队列;将所述图像队列中的待处理图像进行解密处理,并将解密处理后的待处理图像进行特征识别处理。
在一个实施例中,聚类处理模块1504还用于将第一图像子集合中的待处理图像进行压缩或剪裁处理,并将压缩或剪裁处理后的待处理图像进行特征 识别处理。
在一个实施例中,聚类处理模块1504还用于获取子服务器对应的状态标识,并根据所述状态标识获取目标服务器标识,其中所述状态标识是根据子服务器的工作状态生成的;将所述第一图像子集合发送至所述目标服务标识对应的子服务器,接收所述目标服务标识对应的子服务器返回的服务器聚类结果,其中所述服务器聚类结果是根据所述第一图像子集合进行聚类处理得到的。
在一个实施例中,聚类处理模块1504还用于获取状态标识列表,并根据所述状态标识列表获取状态标识;根据所述状态标识获取可用服务器标识,根据预设路由算法从所述可用服务器标识中获取目标服务器标识。
在一个实施例中,该图像处理装置还可以包括标签生成模块,该标签生成模块用于根据所述服务器聚类处理结果生成标签数据,并将所述标签数据存储在预设存储空间。
上述图像处理装置中各个模块的划分仅用于举例说明,在其他实施例中,可将图像处理装置按照需要划分为不同的模块,以完成上述图像处理装置的全部或部分功能。
本发明实施例还提供了一种计算机可读存储介质。一个或多个包含计算机程序的非易失性计算机可读存储介质,当所述计算机程序被一个或多个处理器执行时,使得所述处理器执行上述图像处理方法。
图16为一个实施例中服务器的内部结构示意图。如图16所示,该服务器包括通过系统总线连接的处理器、非易失性存储介质、内存储器和网络接口。其中,该服务器的非易失性存储介质存储有操作系统和计算机程序。该计算机程序被处理器执行时以实现一种图像处理方法。该服务器的处理器用于提供计算和控制能力,支撑整个服务器的运行。该服务器的网络接口用于据以与外部的终端通过网络连接通信,比如接收终端发送的聚类请求以及向终端返回聚类处理结果等。服务器可以用独立的服务器或者是多个服务器组成的 服务器集群来实现。本领域技术人员可以理解,图16中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的服务器的限定,具体的服务器可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
本发明实施例还提供了一种计算机设备。如图17所示,为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。该计算机设备可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑、穿戴式设备等任意终端设备,以计算机设备为手机为例:
图17为与本发明实施例提供的计算机设备相关的手机的部分结构的框图。参考图17,手机包括:射频(Radio Frequency,RF)电路1710、存储器1720、输入单元1730、显示单元1740、传感器1750、音频电路1760、无线保真(wireless fidelity,WiFi)模块1770、处理器1780、以及电源1790等部件。本领域技术人员可以理解,图17所示的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
其中,RF电路1710可用于收发信息或通话过程中,信号的接收和发送,可将基站的下行信息接收后,给处理器1780处理;也可以将上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路1710还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access, WCDMA)、长期演进(Long Term Evolution,LTE))、电子邮件、短消息服务(Short Messaging Service,SMS)等。
存储器1720可用于存储软件程序以及模块,处理器1780通过运行存储在存储器1720的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器1720可主要包括程序存储区和数据存储区,其中,程序存储区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能的应用程序、图像播放功能的应用程序等)等;数据存储区可存储根据手机的使用所创建的数据(比如音频数据、通讯录等)等。此外,存储器1720可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
输入单元1730可用于接收输入的数字或字符信息,以及产生与手机1700的用户设置以及功能控制有关的键信号输入。具体地,输入单元1730可包括触控面板1731以及其他输入设备1732。触控面板1731,也可称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1731上或在触控面板1731附近的操作),并根据预先设定的程式驱动相应的连接装置。在一个实施例中,触控面板1731可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器1780,并能接收处理器1780发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1731。除了触控面板1731,输入单元1730还可以包括其他输入设备1732。具体地,其他输入设备1732可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)等中的一种或多种。
显示单元1740可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元1740可包括显示面板1741。在一个实施例中,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极 管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板1741。在一个实施例中,触控面板1731可覆盖显示面板1741,当触控面板1731检测到在其上或附近的触摸操作后,传送给处理器1780以确定触摸事件的类型,随后处理器1780根据触摸事件的类型在显示面板1741上提供相应的视觉输出。虽然在图17中,触控面板1731与显示面板1741是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板1731与显示面板1741集成而实现手机的输入和输出功能。
手机1700还可包括至少一种传感器1750,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1741的亮度,接近传感器可在手机移动到耳边时,关闭显示面板1741和/或背光。运动传感器可包括加速度传感器,通过加速度传感器可检测各个方向上加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换)、振动识别相关功能(比如计步器、敲击)等;此外,手机还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器等。
音频电路1760、扬声器1761和传声器1762可提供用户与手机之间的音频接口。音频电路1760可将接收到的音频数据转换后的电信号,传输到扬声器1761,由扬声器1761转换为声音信号输出;另一方面,传声器1762将收集的声音信号转换为电信号,由音频电路1760接收后转换为音频数据,再将音频数据输出处理器1780处理后,经RF电路1710可以发送给另一手机,或者将音频数据输出至存储器1720以便后续处理。
WiFi属于短距离无线传输技术,手机通过WiFi模块1770可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图17示出了WiFi模块1770,但是可以理解的是,其并不属于手机1700的必须构成,可以根据需要而省略。
处理器1780是手机的控制中心,利用各种接口和线路连接整个手机 的各个部分,通过运行或执行存储在存储器1720内的软件程序和/或模块,以及调用存储在存储器1720内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。在一个实施例中,处理器1780可包括一个或多个处理单元。在一个实施例中,处理器1780可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等;调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1780中。
手机1700还包括给各个部件供电的电源1790(比如电池),优选的,电源可以通过电源管理系统与处理器1780逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
在一个实施例中,手机1700还可以包括摄像头、蓝牙模块等。
在本发明实施例中,该移动终端所包括的处理器1780执行存储在存储器上的计算机程序时实现上述图像处理方法。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等。
如此处所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。合适的非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM),它用作外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDR SDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直 接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)。
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。

Claims (22)

  1. 一种图像处理方法,其特征在于,所述方法包括:
    获取待处理图像集合,并将所述待处理图像集合进行聚类处理得到本地聚类结果,其中待处理图像集合中包括第一图像子集合和第二图像子集合;
    将所述第一图像子集合发送至服务器,并接收所述服务器返回的服务器聚类结果,所述服务器聚类结果是根据所述第一图像子集合进行聚类处理得到的;
    根据所述本地聚类结果和服务器聚类结果,对待处理图像集合进行分类。
  2. 根据权利要求1所述的图像处理方法,其特征在于,所述获取待处理图像集合包括:
    获取待处理图像集合及对应的感兴趣区域集合;
    所述将所述第一图像子集合发送至服务器,并接收所述服务器返回的服务器聚类结果,所述服务器聚类结果是根据所述第一图像子集合进行聚类处理得到的包括:
    将第一图像子集合对应的感兴趣区域集合发送至服务器,并接收所述服务器返回的服务器聚类结果,所述服务器聚类结果是根据所述第一图像子集合对应的感兴趣区域集合进行聚类处理得到的。
  3. 根据权利要求1所述的图像处理方法,其特征在于,所述获取待处理图像集合,并将所述待处理图像集合进行聚类处理得到本地聚类结果包括:
    获取待处理图像集合以及对应的历史分类信息,并根据所述历史分类信息将待处理图像集合进行聚类处理,得到本地聚类结果;
    所述将所述第一图像子集合发送至服务器,并接收所述服务器返回的服务器聚类结果,所述服务器聚类结果是根据所述第一图像子集合进行聚类处理得到的包括:
    将所述第一图像子集合以及对应的历史分类信息发送至服务器,并接收所述服务器返回的服务器聚类结果,所述服务器聚类结果是根据所述第一图像子集合以及对应的历史分类信息进行聚类处理得到的。
  4. 根据权利要求3所述的图像处理方法,其特征在于,所述根据所述历史分类信息将待处理图像集合进行聚类处理,得到本地聚类结果包括:
    将系统分类信息对应的待处理图像集合进行聚类处理,得到本地聚类结果;
    所述将所述第一图像子集合以及对应的历史分类信息发送至服务器,并接收所述服务器返回的服务器聚类结果,所述服务器聚类结果是根据所述第一图像子集合以及对应的历史分类信息进行聚类处理得到的包括:
    将所述第一图像子集合以及对应的系统分类信息发送至服务器,并接收所述服务器返回的服务器聚类结果,所述服务器聚类结果是根据所述第一图像子集合以及对应的系统分类信息进行聚类处理得到的。
  5. 根据权利要求1所述的图像处理方法,其特征在于,所述根据所述本地聚类结果和服务器聚类结果,对待处理图像集合进行分类包括:
    若本地聚类结果中的第一本地聚类结果与服务器聚类结果不同,则根据所述服务器聚类结果将所述第一图像子集合中的待处理图像进行分类;
    根据所述本地聚类结果中的第二本地聚类结果,将所述第二图像子集合中的待处理图像进行分类。
  6. 根据权利要求1所述的图像处理方法,其特征在于,所述获取待处理图像集合包括:
    当满足预设触发条件时,获取待处理图像集合。
  7. 一种图像处理方法,其特征在于,所述方法包括:
    接收客户端发送的第一图像子集合;
    根据所述第一图像子集合进行聚类处理,得到服务器聚类结果;
    将所述服务器聚类结果发送至所述客户端,用于指示所述客户端执行根据所述服务器聚类结果和本地聚类结果,对所述待处理图像集合进行分类,其中所述本地聚类结果是由所述客户端根据所述待处理图像集合进行聚类所得到的,所述待处理图像集合中包括第一图像子集合和第二图像子集合。
  8. 根据权利要求7所述的图像处理方法,其特征在于,所述接收客户端 发送的第一图像子集合包括:
    接收客户端发送的根据第一图像子集合生成的聚类请求,并根据接收到的聚类请求生成聚类请求队列;
    所述根据所述第一图像子集合进行聚类处理,得到服务器聚类结果包括:
    从所述聚类请求队列中获取请求发起对象相同的聚类请求,并将获取的聚类请求进行合并;
    根据合并后的聚类请求所对应的第一图像子集合进行聚类处理,得到服务器聚类结果。
  9. 根据权利要求8所述的图像处理方法,其特征在于,所述从所述聚类请求队列中获取请求发起对象相同的聚类请求,并将获取的聚类请求进行合并包括:
    根据请求发起时间将聚类请求队列中的聚类请求进行排序,并获取排序后的聚类请求队列中的指定聚类请求;
    获取所述聚类请求队列中与所述指定聚类请求的请求发起对象相同的聚类请求。
  10. 根据权利要求8或9所述的图像处理方法,其特征在于,所述从所述聚类请求队列中获取请求发起对象相同的聚类请求,并将获取的聚类请求进行合并包括:
    根据请求发起时间由先到后的顺序将聚类请求队列中的聚类请求进行排列,获取所述聚类请求队列中的首位聚类请求;
    获取所述聚类请求队列中与所述首位聚类请求的请求发起对象相同的聚类请求。
  11. 根据权利要求7所述的图像处理方法,其特征在于,所述根据所述第一图像子集合进行聚类处理,得到服务器聚类结果包括:
    将第一图像子集合中的待处理图像进行特征识别处理,得到第一图像子集合对应的特征集合;
    根据所述特征集合进行聚类处理,得到服务器聚类结果。
  12. 根据权利要求11所述的图像处理方法,其特征在于,所述将第一图像子集合中的待处理图像进行特征识别处理包括:
    根据所述第一图像子集合生成图像队列,并对图像队列中的待处理图像进行特征识别处理。
  13. 根据权利要求12所述的图像处理方法,其特征在于,所述根据所述第一图像子集合生成图像队列,并对图像队列中的待处理图像进行特征识别处理包括:
    将所述第一图像子集合进行加密处理,并根据加密处理后的第一图像子集合生成图像队列;
    将所述图像队列中的待处理图像进行解密处理,并将解密处理后的待处理图像进行特征识别处理。
  14. 根据权利要求11所述的图像处理方法,其特征在于,所述将第一图像子集合中的待处理图像进行特征识别处理包括:
    将第一图像子集合中的待处理图像进行压缩或剪裁处理,并将压缩或剪裁处理后的待处理图像进行特征识别处理。
  15. 根据权利要求7所述的图像处理方法,其特征在于,所述根据所述第一图像子集合进行聚类处理,得到服务器聚类结果包括:
    获取子服务器对应的状态标识,并根据所述状态标识获取目标服务器标识,其中所述状态标识是根据子服务器的工作状态生成的;
    将所述第一图像子集合发送至所述目标服务标识对应的子服务器,接收所述目标服务标识对应的子服务器返回的服务器聚类结果,其中所述服务器聚类结果是根据所述第一图像子集合进行聚类处理得到的。
  16. 根据权利要求7所述的图像处理方法,其特征在于,所述获取子服务器对应的状态标识,并根据所述状态标识获取目标服务器标识包括:
    获取状态标识列表,并根据所述状态标识列表获取状态标识;
    根据所述状态标识获取可用服务器标识,根据预设路由算法从所述可用服务器标识中获取目标服务器标识。
  17. 根据权利要求7所述的图像处理方法,其特征在于,所述方法还包括:
    根据所述服务器聚类处理结果生成标签数据,并将所述标签数据存储在预设存储空间。
  18. 一种图像处理装置,其特征在于,所述装置包括:
    图像获取模块,用于获取待处理图像集合,并将所述待处理图像集合进行聚类处理得到本地聚类结果,其中待处理图像集合中包括第一图像子集合和第二图像子集合;
    图像发送模块,用于将所述第一图像子集合发送至服务器,并接收所述服务器返回的服务器聚类结果,所述服务器聚类结果是根据所述第一图像子集合进行聚类处理得到的;
    图像处理模块,用于根据所述本地聚类结果和服务器聚类结果,对待处理图像集合进行分类。
  19. 一种图像处理装置,其特征在于,所述装置包括:
    图像接收模块,用于接收客户端发送的第一图像子集合;
    聚类处理模块,用于根据所述第一图像子集合进行聚类处理,得到服务器聚类结果;
    结果发送模块,用于将所述服务器聚类结果发送至所述客户端,用于指示所述客户端执行根据所述服务器聚类结果和本地聚类结果,对所述待处理图像集合进行分类,其中所述本地聚类结果是由所述客户端根据所述待处理图像集合进行聚类所得到的,所述待处理图像集合中包括第一图像子集合和第二图像子集合。
  20. 一种计算机设备,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述指令被所述处理器执行时,使得所述处理器执行如权利要求1-6中任一项所述的图像处理方法。
  21. 一种计算机设备,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述指令被所述处理器执行时,使得所述处理器执行如权利要 求7-17中任一项所述的图像处理方法。
  22. 一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行如权利要求1-6中任一项和/或7-17中任一项所述的图像处理方法。
PCT/CN2017/101935 2017-09-15 2017-09-15 图像处理方法和装置、计算机设备、计算机可读存储介质 WO2019051797A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/101935 WO2019051797A1 (zh) 2017-09-15 2017-09-15 图像处理方法和装置、计算机设备、计算机可读存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/101935 WO2019051797A1 (zh) 2017-09-15 2017-09-15 图像处理方法和装置、计算机设备、计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2019051797A1 true WO2019051797A1 (zh) 2019-03-21

Family

ID=65723197

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/101935 WO2019051797A1 (zh) 2017-09-15 2017-09-15 图像处理方法和装置、计算机设备、计算机可读存储介质

Country Status (1)

Country Link
WO (1) WO2019051797A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110826616A (zh) * 2019-10-31 2020-02-21 Oppo广东移动通信有限公司 信息处理方法及装置、电子设备、存储介质
CN112269891A (zh) * 2020-10-26 2021-01-26 深圳市雷鸟网络传媒有限公司 动态影集生成方法、服务器、显示终端及可读存储介质
CN112561480A (zh) * 2020-12-16 2021-03-26 中国平安人寿保险股份有限公司 智能推动工作流方法、设备及计算机存储介质
CN112905254A (zh) * 2019-11-15 2021-06-04 北京百度网讯科技有限公司 用于发送请求的方法和装置
CN113449628A (zh) * 2021-06-24 2021-09-28 北京澎思科技有限公司 图像处理系统及方法、装置、存储介质、计算机程序产品
CN113568666A (zh) * 2021-06-07 2021-10-29 阿里巴巴新加坡控股有限公司 图像的处理方法、装置、存储介质和处理器

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102033958A (zh) * 2010-12-28 2011-04-27 Tcl数码科技(深圳)有限责任公司 一种照片分类管理系统及方法
CN103207870A (zh) * 2012-01-17 2013-07-17 华为技术有限公司 一种照片分类管理方法、服务器、装置及系统
CN104820675A (zh) * 2015-04-08 2015-08-05 小米科技有限责任公司 相册显示方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102033958A (zh) * 2010-12-28 2011-04-27 Tcl数码科技(深圳)有限责任公司 一种照片分类管理系统及方法
CN103207870A (zh) * 2012-01-17 2013-07-17 华为技术有限公司 一种照片分类管理方法、服务器、装置及系统
CN104820675A (zh) * 2015-04-08 2015-08-05 小米科技有限责任公司 相册显示方法及装置

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110826616A (zh) * 2019-10-31 2020-02-21 Oppo广东移动通信有限公司 信息处理方法及装置、电子设备、存储介质
CN110826616B (zh) * 2019-10-31 2023-06-30 Oppo广东移动通信有限公司 信息处理方法及装置、电子设备、存储介质
CN112905254A (zh) * 2019-11-15 2021-06-04 北京百度网讯科技有限公司 用于发送请求的方法和装置
CN112905254B (zh) * 2019-11-15 2023-10-31 北京百度网讯科技有限公司 用于发送请求的方法和装置
CN112269891A (zh) * 2020-10-26 2021-01-26 深圳市雷鸟网络传媒有限公司 动态影集生成方法、服务器、显示终端及可读存储介质
CN112561480A (zh) * 2020-12-16 2021-03-26 中国平安人寿保险股份有限公司 智能推动工作流方法、设备及计算机存储介质
CN113568666A (zh) * 2021-06-07 2021-10-29 阿里巴巴新加坡控股有限公司 图像的处理方法、装置、存储介质和处理器
CN113568666B (zh) * 2021-06-07 2024-05-24 阿里巴巴创新公司 图像的处理方法、装置、存储介质和处理器
CN113449628A (zh) * 2021-06-24 2021-09-28 北京澎思科技有限公司 图像处理系统及方法、装置、存储介质、计算机程序产品

Similar Documents

Publication Publication Date Title
WO2019051797A1 (zh) 图像处理方法和装置、计算机设备、计算机可读存储介质
WO2019052354A1 (zh) 图像处理方法和系统、计算机设备
CN107729815B (zh) 图像处理方法、装置、移动终端及计算机可读存储介质
CN107871011B (zh) 图像处理方法、装置、移动终端及计算机可读存储介质
CN107679560B (zh) 数据传输方法、装置、移动终端及计算机可读存储介质
CN107622117B (zh) 图像处理方法和装置、计算机设备、计算机可读存储介质
US10068130B2 (en) Methods and devices for querying and obtaining user identification
WO2019052351A1 (zh) 图像处理方法和系统、计算机设备
EP3493113B1 (en) Image processing method, computer device, and computer readable storage medium
WO2019056938A1 (zh) 图像处理方法和计算机设备、计算机可读存储介质
CN107995422B (zh) 图像拍摄方法和装置、计算机设备、计算机可读存储介质
WO2019052316A1 (zh) 图像处理方法、装置、计算机可读存储介质和移动终端
US11182593B2 (en) Image processing method, computer device, and computer readable storage medium
CN109325518B (zh) 图像的分类方法、装置、电子设备和计算机可读存储介质
WO2019051795A1 (zh) 图像处理方法、装置、终端、服务器和计算机可读存储介质
WO2019105457A1 (zh) 图像处理方法、计算机设备和计算机可读存储介质
WO2019052319A1 (zh) 数据传输方法、移动终端及计算机可读存储介质
WO2019052436A1 (zh) 图像处理方法、计算机可读存储介质和移动终端
US11314803B2 (en) Method for image-processing and mobile terminal
CN108256466B (zh) 数据处理方法、装置、电子设备及计算机可读存储介质
WO2019096207A1 (zh) 图像处理方法和计算机设备、计算机可读存储介质
CN108021669B (zh) 图像分类方法和装置、电子设备、计算机可读存储介质
WO2019051799A1 (zh) 图像处理方法、装置、移动终端、服务器和存储介质
WO2019041279A1 (zh) 搜索资源推荐方法及相关产品
CN113285940B (zh) 一种设备连接方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17925380

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17925380

Country of ref document: EP

Kind code of ref document: A1