WO2019052319A1 - 数据传输方法、移动终端及计算机可读存储介质 - Google Patents

数据传输方法、移动终端及计算机可读存储介质 Download PDF

Info

Publication number
WO2019052319A1
WO2019052319A1 PCT/CN2018/101570 CN2018101570W WO2019052319A1 WO 2019052319 A1 WO2019052319 A1 WO 2019052319A1 CN 2018101570 W CN2018101570 W CN 2018101570W WO 2019052319 A1 WO2019052319 A1 WO 2019052319A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
server
uploaded
mobile terminal
clustering
Prior art date
Application number
PCT/CN2018/101570
Other languages
English (en)
French (fr)
Inventor
柯秀华
曹威
王俊
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019052319A1 publication Critical patent/WO2019052319A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/94Hardware or software architectures specially adapted for image or video understanding
    • G06V10/95Hardware or software architectures specially adapted for image or video understanding structured as a network, e.g. client-server architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation

Definitions

  • the present application relates to the field of Internet technologies, and in particular, to a data transmission method, a mobile terminal, and a non-transitory computer readable storage medium.
  • a data transmission method, a mobile terminal, and a non-transitory computer readable storage medium are provided in accordance with various embodiments of the present application.
  • a data transmission method is applied to a mobile terminal, including:
  • the image of the mobile terminal is assigned to a corresponding category according to the clustering result.
  • the intercepting the region of interest and generating a captured image includes:
  • the image content corresponding to the location information is read from the bitmap, and the image content is stored in a preset format to obtain a captured image.
  • the clustering result includes an identifier of the image to be uploaded corresponding to the captured image and an assigned label
  • the assigning the image of the mobile terminal to the corresponding category according to the image clustering result includes:
  • the uploading the intercepted image to a server includes:
  • the method further includes:
  • the sending the clustering request to the second server according to the received instruction further includes:
  • the clustering request is further used to instruct the second server cluster to belong to the allocated clustering request.
  • the clustering requests sent by the same mobile terminal at different times are merged, and the merged clustering request is allocated to the second server; the queue service is used to add a clustering request sent by the mobile terminal.
  • the clustering request carries an identifier of the mobile terminal
  • the clustering result is sent by the second server to the mobile terminal according to the identifier of the mobile terminal.
  • the method before the obtaining an image to be uploaded, the method further includes:
  • the identifying the region of interest of the image to be uploaded includes:
  • the region of interest of the image to be uploaded having the highest quality among the repeated images to be uploaded is identified.
  • a mobile terminal includes a memory and a processor, wherein the memory stores computer readable instructions, and when the computer readable instructions are executed by the processor, the processor performs the following operations:
  • the image of the mobile terminal is assigned to a corresponding category according to the clustering result.
  • One or more non-volatile computer-executable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processor to:
  • the image of the mobile terminal is assigned to a corresponding category according to the clustering result.
  • the image to be uploaded By acquiring the image to be uploaded of the mobile terminal, identifying the region of interest of the image to be uploaded, generating a captured image according to the region of interest, and uploading the captured image to the server, and only intercepting the region of interest of the image to be uploaded and uploading to the server for image clustering , can reduce the amount of data transferred and increase the transmission speed.
  • the image to be uploaded can be allocated to the corresponding category according to the clustering result returned by the server, and the image is classified and displayed, which is easier to find and convenient.
  • 1 is an application scenario diagram of a data transmission method in an embodiment
  • FIG. 2 is an application scenario diagram of a data transmission method in another embodiment
  • FIG. 3 is a sequence diagram of interaction between a mobile terminal and a first server and a second server in an embodiment
  • Figure 5 is a flow chart of generating an intercepted image in one embodiment
  • FIG. 6 is a flow chart of uploading an intercepted image to a first server in one embodiment
  • FIG. 7 is an architectural diagram of a first server in an embodiment
  • Figure 8 is a block diagram of a data transmission device in one embodiment
  • Figure 9 is a block diagram of an intercepting module in one embodiment
  • FIG. 10 is a block diagram of an upload module in one embodiment
  • Figure 11 is a block diagram of a mobile terminal in one embodiment.
  • 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 an application scenario diagram of a data transmission method in an embodiment.
  • the mobile terminal 10 can establish a communication connection with the server 20 via a network.
  • the mobile terminal 10 acquires an image to be uploaded, identifies a region of interest of the image to be uploaded, intercepts the identified region of interest, generates a captured image, and uploads the captured image to the server 20.
  • the server 20 may perform image clustering on the captured image and return the clustering result to the mobile terminal 10.
  • the mobile terminal 10 receives the clustering result returned by the server 20, and can assign the image on the mobile terminal 10 to the corresponding category according to the clustering result.
  • the server 20 can be a single server, a server cluster composed of multiple servers, or a server in a server cluster.
  • FIG. 2 is an application scenario diagram of a data transmission method in another embodiment.
  • the mobile terminal 10 can establish a communication connection with the first server 202 and the second server 204 via the network.
  • the mobile terminal 10 acquires an image to be uploaded, identifies a region of interest of the image to be uploaded, and generates a captured image according to the identified region of interest.
  • the mobile terminal 10 can upload the captured image to the first server 202 and simultaneously transmit an image recognition request to the first server 202.
  • the first server 202 receives the image recognition request sent by the mobile terminal 10, and can identify the captured image according to the image recognition request, and extracts the feature of the captured image, and then reports the feature of the captured image to the second server 204.
  • the receiving completion instruction can be transmitted to the mobile terminal 10.
  • the clustering request may be sent to the second server 204 according to the received completion instruction.
  • the second server 204 receives the clustering request sent by the mobile terminal 10, and may cluster the features of the captured image by using a preset model according to the clustering request, and assign corresponding labels to the features of the captured image according to the clustering result.
  • the mobile terminal 10 may receive the clustering result returned by the second server 204.
  • the clustering result may include the identifier of the image to be uploaded corresponding to the captured image, and the information of the assigned label, and the mobile terminal 10 according to the image to be uploaded corresponding to the captured image. Identifying, determining an image to be uploaded corresponding to the intercepted image, and assigning the image to be uploaded to a category corresponding to the label.
  • the first server 202 can be a single server, or a first server cluster composed of multiple first servers, or one of the first server clusters; the second server 204 can be A single server may also be a second server cluster consisting of multiple second servers or one of the second server clusters.
  • FIG. 3 is a sequence diagram of interaction between a mobile terminal and a first server and a second server in an embodiment.
  • the interaction process between the mobile terminal 10 and the first server 202 and the second server 204 may mainly include the following operations:
  • the mobile terminal 10 generates a captured image according to the region of interest of the image to be uploaded.
  • the mobile terminal 10 may acquire one or more images to be uploaded, extract image features of each image to be uploaded, and determine whether the corresponding image to be uploaded contains the region of interest according to the image feature, and when included, extract the image to be uploaded.
  • the region of interest of the image, and corresponding cropped images are generated, wherein each of the captured images includes image information, and the image information may include an identifier of the captured image, a corresponding identifier of the image to be uploaded, and the like.
  • the mobile terminal 10 uploads the captured image to the first server 202 and transmits an image recognition request to the first server 202.
  • the mobile terminal 10 may upload the generated one or more captured images to the first server 202.
  • the mobile terminal 10 may obtain an idle service list from the registration server every preset time period, if the idle service list is not If it is empty, the address information of the idle first server 202 is read from the idle service list.
  • the mobile terminal 10 may upload the intercepted image to the corresponding first server 202 according to the address information of the idle first server 202 read from the idle service list, and simultaneously send an image recognition request, wherein the image recognition request may carry the Information such as the identity, account, and the like of the requested mobile terminal 10.
  • the first server 202 identifies the captured image and extracts features of the captured image.
  • the first server 202 may identify the clipped image according to the image recognition request, and extract the feature of the clipped image.
  • the first server 202 may encrypt the received intercepted image by an encryption algorithm and cache the encrypted captured image into a file queue. After the first server 202 reads the cached captured image from the file queue, the read captured images may be decrypted, and the captured images are identified according to the preset feature model, and the image features of the respective captured images are extracted.
  • the first server 202 reports the feature of the captured image to the second server 204.
  • the first server 202 identifies the clipped image uploaded by the mobile terminal 10, and extracts the feature of the clipped image, and reports the feature of the clipped image, the corresponding image information, the mobile terminal identifier, and the account to the second server 204.
  • the mobile terminal 10 sends a clustering request to the second server 204.
  • the mobile terminal 10 uploads one or more intercepted images to the first server 202, and when the first server 202 has received all of the instructions, the mobile terminal 10 may send a reception completion instruction.
  • the mobile terminal 10 may send a clustering request to the second server 204 according to the received completion instruction, requesting clustering of the intercepted image.
  • the clustering request may be added to the queue service, and the clustering request is allocated according to the queue service.
  • the mobile terminal 10 may allocate a clustering request to the second server 204 in the order in which the clustering requests are sent in the queue service.
  • the mobile terminal 10 performs clustering request allocation, it can detect whether the queue service includes a clustering request that is sent by the same mobile terminal at different times according to the allocated clustering request, and when included, the clustering request can be allocated.
  • the clustering requests sent by the same mobile terminal at different times are merged, and the merged clustering request is allocated to the second server 204.
  • the second server 204 clusters the features of the captured image using a preset model.
  • the feature of the captured image corresponding to the clustering request may be acquired according to the identifier of the mobile terminal 10, the account, and the like, and the clustering model is paired by the preset clustering model.
  • the class requests the corresponding features of the intercepted image for clustering.
  • the second server 204 may classify the captured images including the similar features into one class, and may add corresponding labels to each of the captured images according to the clustering result, and the labels are used to indicate the category to which the captured images belong.
  • the second server 204 returns the clustering result to the mobile terminal 10.
  • the mobile terminal 10 assigns an image of the mobile terminal 10 to a corresponding category based on the clustering result.
  • the second server 204 may return the clustering result to the mobile terminal 10.
  • the clustering result may include image information of each clipped image and an assigned label, and the mobile terminal 10 may assign the image to be uploaded to the corresponding category according to the clustering result.
  • the identifier of the image to be uploaded corresponding to each clipped image and the assigned label may be obtained from the clustering result, and the image to be uploaded corresponding to the clipped image is allocated to the category corresponding to the assigned label.
  • a data transmission method is provided, which is applied to a mobile terminal and is described from the perspective of a mobile terminal, and includes the following operations:
  • Operation 410 Acquire an image to be uploaded of the mobile terminal.
  • the mobile terminal may acquire one or more images to be uploaded from a memory such as a memory.
  • the image to be uploaded may be an image taken by the user on the mobile terminal, or may be an image acquired from another computer device.
  • the image to be uploaded may be an image sent by another mobile terminal, or may be an image saved when the user browses the webpage through the mobile terminal.
  • the image to be uploaded may be a photo, and the mobile terminal may upload an image to be uploaded to the server, and perform clustering on the server, thereby generating a corresponding album.
  • the mobile terminal can obtain an image between the time when the image was last uploaded to the server and the current time, and upload the image as the image to be uploaded.
  • the user can also select the image to be uploaded in the interface, and obtain the image to be uploaded according to the user's selection operation. The image is uploaded.
  • the mobile terminal may detect whether the acquired multiple images to be uploaded include a repeated image, where the repeated image refers to multiple images with similarities greater than a threshold. When included, the mobile terminal may select the image with the highest quality from the plurality of repeated images as the image to be uploaded for uploading, and other images with poor quality are not uploaded. The mobile terminal can determine the image quality according to the values of saturation, sharpness, brightness, etc. in the repeated images, and select the image with the highest quality for uploading.
  • Operation 420 identifying a region of interest of the image to be uploaded.
  • the mobile terminal may identify each acquired image to be uploaded, and determine whether the image to be uploaded includes a region of interest, where the region of interest refers to a focused region of interest in the image to be uploaded when the image is clustered.
  • the region of interest may be associated with a clustering approach, and different clustering approaches may select different regions of interest.
  • the clustering method is to perform clustering according to the face, and the region of interest of the image to be uploaded may be a face region, and the clustering manner is clustering according to the scene, and the region of interest of the image to be uploaded may be a background region, etc. But it is not limited to this.
  • the server may cluster the images according to the face, and the mobile terminal may separately perform face recognition on each image to be uploaded.
  • the mobile terminal can extract image features of the image to be uploaded, and analyze the image features by using a preset face recognition model to determine whether the corresponding image to be uploaded includes a human face.
  • the image feature may include a shape feature, a spatial feature, an edge feature, and the like, wherein the shape feature refers to a local shape in the image to be uploaded, and the spatial feature refers to a mutual space between the plurality of regions segmented in the image to be uploaded. Position or relative direction relationship, the edge feature refers to the boundary pixels between the two regions in the image to be uploaded, and the like.
  • the face recognition model may be a decision model constructed in advance through machine learning.
  • a large number of sample images may be acquired, and the sample image includes a face image and an unmanned image, which may be according to each Whether the sample image contains a human face marks the sample image, and the marked sample image is used as an input of the face recognition model, and is trained by machine learning to obtain a face recognition model.
  • the face region may be used as the region of interest. It can be understood that the same image to be uploaded may include one or more regions of interest, and the number of regions of interest may be The number of faces included in the uploaded image corresponds.
  • Operation 430 generating a captured image according to the region of interest, and uploading the captured image to the server.
  • the region of interest of the image to be uploaded may be intercepted, and the region of interest may be extracted from the entire image to be uploaded by using a map or the like, and a corresponding image is generated. Capture the image.
  • Each of the captured images includes image information, and the image information may include an identifier of the captured image, an interception time, an identifier of the corresponding image to be uploaded, and the like, wherein the identifier may be a name, an image number, or the like.
  • the mobile terminal may upload the generated captured image corresponding to each image to be uploaded to the server. When the number of intercepted images that the mobile terminal needs to upload is large, the intercepted images may be uploaded to the server in batches to reduce the network transmission pressure and ensure the data transmission speed.
  • Operation 440 receiving a clustering result returned by the server, and the clustering result is obtained by clustering the intercepted image.
  • the server may cluster the intercepted images, classify the intercepted images according to the image features contained in the captured images, and classify the intercepted images containing similar features into one class.
  • the server may cluster the captured images according to the face, extract features of the faces included in each of the captured images, and classify the captured images including the similar features into one class, that is, Intercepted images containing the same face can be divided into one class.
  • the server may add a corresponding label to each clipped image according to the clustering result, and the label is used to indicate the category to which the clipped image belongs.
  • Operation 450 assigning an image of the mobile terminal to a corresponding category according to the clustering result.
  • the server can return the clustering result to the mobile terminal.
  • the clustering result may include the image information of each intercepted image and the assigned label, and the mobile terminal may allocate the image to be uploaded to the corresponding category according to the clustering result, and obtain the to-be-upload corresponding to each intercepted image from the clustering result.
  • the identifier of the image and the assigned label, and the image to be uploaded corresponding to the captured image is assigned to the category corresponding to the assigned label.
  • the clustering result may also include the clustering result of other captured images that are uploaded by the history, and the server may re-cluster the intercepted image of the image to be uploaded and other intercepted images uploaded by the history, and
  • the class result is returned to the mobile terminal.
  • the mobile terminal may acquire the image identifier and the assigned label corresponding to each clipped image according to the clustering result, and allocate the image corresponding to the clipped image to the category corresponding to the assigned label.
  • the mobile terminal may create one or more albums, and each category may correspond to one album.
  • the images to be uploaded corresponding to the captured images having the same label may be displayed in the same album for display.
  • the data transmission method identifies the region of interest of the image to be uploaded, generates a captured image according to the region of interest, and uploads the captured image to the server, and only intercepts the region of interest of the image to be uploaded and uploads it to the server for image clustering, thereby reducing transmission
  • the amount of data increases the transmission speed.
  • the image to be uploaded can be allocated to the corresponding category according to the clustering result returned by the server, and the image is classified and displayed, which is easier to find and convenient.
  • the operation generates a captured image based on the region of interest, including the following operations:
  • Operation 502 converting the image to be uploaded into a bitmap.
  • the mobile terminal After the mobile terminal acquires one or more images to be uploaded and identifies the region of interest of each image to be uploaded, the region of interest in the image to be uploaded may be intercepted to generate a captured image.
  • the mobile terminal can convert the image to be uploaded into a bitmap.
  • a bitmap also known as a bitmap image or a rendered image.
  • a bitmap consists of a single point of a pixel that can be arranged and colored differently to form a different pattern.
  • Operation 504 determining location information of the region of interest in the bitmap.
  • the location information corresponding to the region of interest included in the image to be uploaded may be determined in the bitmap.
  • the location information includes coordinates of the pixel, and the mobile terminal can determine the coordinates of all the pixels included in the region of interest in the bitmap according to the location information.
  • Operation 506 reading image content corresponding to the location information from the bitmap, and storing the image content in a preset format to obtain a captured image.
  • the mobile terminal can read the image content of each pixel included in the region of interest in the bitmap according to the location information of the region of interest in the bitmap.
  • the image content may include color information, transparency, and the like of the pixel.
  • the mobile terminal may extract each pixel included in the region of interest in the bitmap according to the coordinates of the pixel included in the location information, and store the read image content of each pixel as a preset format to obtain a captured image.
  • the preset format may be a picture format such as JPG or PNG, but is not limited thereto.
  • the mobile terminal extracts the region of interest from the bitmap and re-saves it as a preset image format, which can reduce the amount of data of the captured image.
  • Image clustering can reduce the amount of data transmitted and increase the transmission speed.
  • the operation uploads the captured image to the server, including the following operations:
  • Operation 602 obtaining an idle service list from the registration server every preset time period.
  • the mobile terminal may upload the generated one or more captured images to the first server, and the first server performs feature recognition and extraction on the intercepted image.
  • the first server may be a distributed first server cluster composed of multiple hosts, and the first server cluster includes multiple first servers, each of which may provide feature identification to the mobile terminal. Extract the service.
  • the registration server of the first server cluster can be built by ZooKeeper, etc., wherein ZooKeeper is an open source distributed application coordination service, and the registration server can be used for monitoring and monitoring the first servers included in the first server cluster, and monitoring the first Each of the first servers in the server cluster is in a busy state that is available or not available.
  • the unloading instruction may be sent to the registration server, and the registration server may delete the address information corresponding to the first server according to the uninstall command, and the first server no longer provides the service to the mobile terminal.
  • the registration command may be sent to the registration server, and the registration server stores the address information of the corresponding first server according to the registration instruction, and the first server may re-service the mobile terminal.
  • each of the first servers in the first server cluster may be configured with a processing amount upper limit value, and the processing amount upper limit value may be used to limit interception of the corresponding first server for feature recognition and extraction processing.
  • the number of images When the number of unprocessed captured images stored in the first server reaches the corresponding upper limit of the processing amount, the busy state is entered, and the unloading instruction may be sent to the registration server, and the intercepted image sent by the mobile terminal is no longer received.
  • Each first server can be configured with an idle value at the same time.
  • the available idle state is entered, and a registration command can be sent to the registration server, and the The registration server registers to receive the intercepted image sent by the mobile terminal.
  • the registration server can provide a unified detection interface to the mobile terminal, and the mobile terminal can invoke the detection interface every preset time period to obtain an idle service list from the registration server, and the idle service list can record the first server in the available idle state. Address information, etc. It can be understood that the preset time period can be set according to actual needs, for example, 5 minutes, 10 minutes, and the like.
  • the passive notification may also be adopted, the mobile terminal first sends a service request to the registration server, and when the registration server monitors the first server that is idle, the address information of the idle first server is obtained. Notify the mobile terminal.
  • Operation 604 when the idle service list is not empty, obtain the idle first server from the idle service list.
  • the mobile terminal obtains the idle service list from the registration server, and may first determine whether the idle service list is empty. If yes, it indicates that the first server is not currently available, and the intercepted image is not uploaded temporarily.
  • the mobile terminal may read address information and the like of the first server in an available idle state from the idle service list, and the address information may include an IP (Internet Protocol) address of the first server. , MAC (Media Access Control) address, etc.
  • IP Internet Protocol
  • MAC Media Access Control
  • the mobile terminal may randomly select one of the first servers as the upload, or directly read and arrange in the idle service list.
  • the address information of the first server, etc. may also store a server white list, where the address information of the legitimate server is recorded in the white list, and the address information of the first server in the idle service list may be filtered according to the white list, and the white list is not included. One server is excluded.
  • the whitelist is stored on the mobile terminal, which prevents the illegal user from tampering with the idle service list of the registration server, causing problems such as user information leakage.
  • Operation 606 uploading a clipped image to the idle first server, and transmitting an image recognition request, the image recognition request instructing the idle first server to identify the clipped image, and extracting features of the clipped image.
  • the mobile terminal may upload the intercepted image to the corresponding first server according to the address information of the first server read from the idle service list, and simultaneously send an image recognition request, where the image recognition request may carry the request for sending the request.
  • Mobile terminal identification account and other information.
  • the first server may identify the clipped image according to the image recognition request, and extract the feature of the clipped image.
  • the first server may encrypt the received intercepted image by using an encryption algorithm such as 3DES (Triple Data Encryption Algorithm) or RC5.
  • 3DES Triple Data Encryption Algorithm
  • the first server can cache the encrypted captured image into a file queue, and the file queue can be used to control the speed at which the first server recognizes the captured image, preventing the first server from being overloaded.
  • the mobile terminal can control the first server to recognize 100 intercepted images per second, and the first server can only read the buffered 100 intercepted images from the file queue for recognition processing per second.
  • the read captured image may be decrypted, and the intercepted image is identified according to the preset feature model, and the image features of each captured image are extracted, and the image feature may include a shape. , space, edges, colors, textures, etc. can be used to describe the information of the captured image.
  • the first server may extract feature points included in the captured image that can be used to describe the shape of the face and the shape, position, and the like of the facial features according to the preset feature model.
  • the first server may store the extracted features in association with the image information of the corresponding captured image, the mobile terminal identifier, and the account, and the image information, the mobile terminal identifier, and the account of the extracted feature and the corresponding captured image.
  • the information is reported to the second server, and the second server performs image clustering.
  • the mobile terminal uploads the captured image of the image to be uploaded to the first server, and the first server identifies the captured image, and extracts the captured image feature, and then reports the extracted feature to the second server, and the second server performs image clustering.
  • the mobile terminal directly extracts the image to be uploaded and sends it to the server for clustering, if the feature model changes, the mobile terminal does not need to re-extract the feature and upload again, which is more stable.
  • FIG. 7 is a block diagram of the first server in one embodiment.
  • a plurality of first servers 202 may be included in the first server cluster, and each of the first servers 202 may provide feature identification and extraction services to the mobile terminal 10.
  • the registration server 702 monitors a plurality of first servers 202 in the first server cluster. When the first server 202 is in a busy state that is unavailable, the unloading command may be sent to the registration server 702, and the registration server 702 may delete the address information corresponding to the first server 202 according to the uninstall command, and the first server 202 is no longer used.
  • the mobile terminal 10 is provided with a service.
  • the registration command may be sent to the registration server 702, and the registration server 702 stores the address information of the corresponding first server 202 or the like according to the registration instruction, and the first server 202 may re-direct the mobile terminal to the mobile terminal.
  • 10 provide services.
  • the mobile terminal 10 can acquire the idle service list from the registration server 702 every preset time period, and read the address information and the like of the first server 202 in the available idle state from the idle service list.
  • the mobile terminal 10 may upload a clipped image to the corresponding first server 202 based on the address information of the first server 202 read from the idle service list, and simultaneously transmit an image recognition request.
  • the first server 202 identifies the clipped image based on the image recognition request and extracts features of the clipped image.
  • the idle service list may be obtained from the registration server every preset time period, the idle first server uploads the intercepted image from the idle service list, and the image recognition request is sent to implement the balanced load of the server, thereby reducing the server. Processing pressure.
  • the method further includes: when receiving the received completion instruction returned by the first server, sending a clustering request to the second server according to the received instruction, and the clustering request indication
  • the second server clusters the features of the captured image by using a preset model, and assigns a corresponding label to the feature of the captured image according to the clustering result, and the feature of the captured image is reported to the second server by the first server.
  • the mobile terminal uploads one or more intercepted images to the first server, and when the first server receives all the received images, the mobile terminal may send a receiving complete instruction.
  • the mobile terminal may send a clustering request to the second server according to the received completion instruction, requesting clustering of the intercepted image.
  • the second server may be a distributed second server cluster composed of multiple hosts, and the second server cluster may include multiple second servers, each of which may provide an image to the mobile terminal. Clustering service.
  • the second server cluster may add the clustering request to the queue service, and allocate a clustering request to each second server in the second server cluster according to the queue service, by the allocation.
  • the second server to the clustering request performs image clustering.
  • Each clustering request included in the queue service may carry information such as an identifier, an account, and a sending moment of the corresponding mobile terminal that is sent.
  • the second server cluster may allocate a clustering request to the second server of the second server cluster according to the order of sending the clustering requests in the queue service.
  • the second server cluster may detect whether the queue service includes a clustering request that is sent by the same mobile terminal at different times according to the allocated clustering request, and when included, the clustering with the allocation may be performed.
  • the clustering requests sent by the same mobile terminal at different times are requested to be merged, and the merged clustering request is allocated to the second server.
  • the currently allocated clustering request is sent by the mobile terminal A at 6:00 on August 2, 2017, and the detected queue service further includes the cluster that the mobile terminal A sends at 7:00 on August 2, 2017.
  • the request and the clustering request sent by the mobile terminal A at 8:00 on August 2, 2017 may combine the above three clustering requests belonging to the mobile terminal A, and assign the combined clustering request to the first
  • the second server is uniformly processed by the second server.
  • the clustering request is allocated, it is also detected whether the queue service includes a clustering request sent by the same account as the allocated clustering request, and when included, the clustering request may belong to the same account and be moved differently.
  • the clustering request sent by the terminal is merged, and the merged clustering request is allocated to the second server.
  • the currently assigned clustering request is sent by the account X through the mobile terminal A at 6:00 on August 2, 2017, and it is detected that the queue service also includes the account X through the mobile terminal B on August 2, 2017 7
  • the clustering request sent by :00 can merge the two clustering requests belonging to the account X as described above, and allocate the merged clustering request to the second server, and the second server performs unified processing.
  • the first server identifies the captured image uploaded by the mobile terminal, and extracts the feature of the captured image, and reports the feature of the captured image, the corresponding image information, the mobile terminal identifier, and the account to the second server.
  • the second server may acquire the feature of the intercepted image corresponding to the clustering request according to the information of the mobile terminal identifier, the account, and the like, and corresponding to the clustering request by using the preset clustering model.
  • the features of the intercepted image are clustered.
  • the clustering model analyzes the features of the captured image and divides the captured images with similar features into the same category.
  • the second server may first search for a historical clustering data in the database according to the account corresponding to the clustering request, and if yes, perform the acquired features of the captured image and the historical clustering data.
  • the comparison determines whether the captured image has features similar to the respective categories in the historical clustering data.
  • the captured image has a feature similar to the category in the historical clustering data
  • the captured image is directly divided into corresponding categories, and the corresponding matched tag is assigned to the captured image.
  • the clustering may be performed again by the preset clustering model, and the captured images with similar features are segmented to generate a new category. And assign corresponding tags to the captured images belonging to the same category.
  • the second server receives the clustering request, and obtains the feature of the intercepted image corresponding to the clustering request according to the identifier, the account, and the like of the mobile terminal carried by the clustering request, and according to the account X corresponding to the clustering request,
  • the historical cluster data corresponding to the account X is found in the database.
  • the second server may compare the acquired features of each captured image with each face category in the historical clustering data, and determine whether there is a captured image belonging to the face category in the historical clustering data, and if so, intercept the image.
  • the image is divided into corresponding face categories, and labels of corresponding face categories are assigned to the captured images.
  • the clustering may be performed again by the preset clustering model, and the captured image with similar features is segmented to generate a new face category, and belongs to the same person.
  • the clipped image of the face category is assigned a corresponding label.
  • the second server may send the clustering result to the mobile terminal corresponding to the identifier of the mobile terminal according to the identifier of the mobile terminal carried in the clustering request, and the mobile terminal according to the image to be uploaded corresponding to the intercepted image included in the clustering result
  • the information such as the tag and the assigned tag distributes the image to be uploaded corresponding to the captured image to the category corresponding to the assigned tag.
  • the second server when the second server receives the merged clustering request, directly acquiring the features of the intercepted image corresponding to each clustering request included in the merged clustering request, and performing clustering Can improve the clustering efficiency of images.
  • the clustering request may be sent to the second server, where the clustering request instructs the second server to cluster the features of the captured image, and allocate corresponding labels according to the clustering result, and the mobile terminal may According to the clustering result, the images to be uploaded are displayed in categories, and the stored images can be intelligently clustered to improve browsing efficiency and improve user viscosity.
  • the method before the obtaining the image to be uploaded, the method further includes: acquiring a current power state, and if the power state meets the preset state, performing operation 410 to acquire an image to be uploaded.
  • the mobile terminal may acquire the current power state before uploading the image to the server.
  • the power state may include available power remaining, whether it is in a charging state, a power consumption speed, and the like.
  • the image to be uploaded is acquired, the region of interest in the image to be uploaded is intercepted, a captured image is generated, and the captured image is uploaded to the server.
  • the preset state may be that the available remaining power is greater than the preset percentage, or is in the charging state, or the available remaining power is greater than the preset percentage and the power consumption is less than the set value, etc., and is not limited thereto, and may be set according to actual needs. .
  • the mobile terminal may also preset a time period for uploading an image.
  • the image may be uploaded to the server, where the time period of uploading the image may be set in The time period in which the mobile terminal is used less, for example, from 2 am to 4 am in the morning.
  • the power state of the mobile terminal when the image is uploaded can be guaranteed, and the influence of the uploaded image on the use of the mobile terminal is reduced.
  • a data transmission method including the following operations:
  • Operation (1) obtaining the current power state of the mobile terminal.
  • Operation (2) when the power state meets the preset state, acquiring an image to be uploaded of the mobile terminal.
  • Operation (3) identifies the region of interest of the image to be uploaded.
  • Operation (4) converts the image to be uploaded into a bitmap.
  • Operation (5) determines location information of the region of interest in the bitmap.
  • Operation (6) reading the image content corresponding to the position information from the bitmap, and storing the image content as a preset format to obtain a clipped image.
  • Operation (7) obtaining an idle service list from the registration server every preset time period.
  • Operation (9) uploading a clipped image to the idle first server, and transmitting an image recognition request, the image recognition request instructing the idle first server to identify the clipped image, and extracting features of the clipped image.
  • Operation (10) when receiving the received completion instruction returned by the first server, sending a clustering request to the second server according to the received completion instruction, the clustering request instructing the second server to perform the feature of the intercepted image by using a preset model
  • the clustering is performed, and the corresponding label is assigned to the feature of the captured image according to the clustering result, and the feature of the captured image is reported by the first server to the second server.
  • the clustering result includes the identifier of the image to be uploaded corresponding to the captured image and the assigned label, and the image to be uploaded corresponding to the captured image is determined according to the identifier of the corresponding image to be uploaded, and the image to be uploaded is allocated to and The category corresponding to the label.
  • the region of interest of the image to be uploaded is identified, the captured image is generated according to the region of interest, and the captured image is uploaded to the server, and only the region of interest of the image to be uploaded is uploaded to the server for image clustering, which can be reduced.
  • the amount of data transferred to increase the transmission speed is reduced.
  • the operations in the flowchart of the method of the embodiment of the present application are sequentially displayed in accordance with the indication of the arrows, but the operations are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these operations is not strictly limited, and may be performed in other sequences. Moreover, at least a part of the operations in the method flowchart of the embodiment of the present application may include multiple sub-operations or multiple stages, which are not necessarily performed at the same time, but may be executed at different times. The order of execution is not necessarily performed sequentially, but may be performed alternately or alternately with at least a portion of the sub-operations or phases of other operations or other operations.
  • a data transmission apparatus 800 including an image acquisition module 810 , an identification module 820 , an interception module 830 , an upload module 840 , a receiving module 850 , and an allocation module 860 .
  • the image obtaining module 810 is configured to acquire an image to be uploaded of the mobile terminal.
  • the identification module 820 is configured to identify a region of interest of the image to be uploaded.
  • the intercepting module 830 is configured to generate a cut image according to the region of interest.
  • the uploading module 840 is configured to upload the captured image to the server.
  • the receiving module 850 is configured to receive a clustering result returned by the server, where the clustering result is obtained by clustering the intercepted image.
  • the allocating module 860 is configured to allocate an image of the mobile terminal to the corresponding category according to the clustering result.
  • the clustering result includes an identifier of the image to be uploaded corresponding to the captured image and an assigned label.
  • the distribution module 860 is further configured to determine an image to be uploaded corresponding to the captured image according to the identifier of the corresponding image to be uploaded, and assign the corresponding image to be uploaded to a category corresponding to the label.
  • the data transmission device identifies the region of interest of the image to be uploaded, generates a captured image according to the region of interest, and uploads the captured image to the server, and only intercepts the region of interest of the image to be uploaded and uploads it to the server for image clustering, thereby reducing transmission
  • the amount of data increases the transmission speed.
  • the intercepting module 830 includes a converting unit 832, a determining unit 834, and a storage unit 836.
  • the converting unit 832 is configured to convert the image to be uploaded into a bitmap.
  • the determining unit 834 is configured to determine location information of the region of interest in the bitmap.
  • the storage unit 836 is configured to read image content corresponding to the location information from the bitmap, and store the image content in a preset format to obtain a captured image.
  • Image clustering can reduce the amount of data transmitted and increase the transmission speed.
  • the uploading module 840 includes a list obtaining unit 842, a server obtaining unit 844, and an uploading unit 846.
  • the list obtaining unit 842 is configured to obtain an idle service list from the registration server every preset time period.
  • the server obtaining unit 844 is configured to obtain the idle first server from the idle service list when the idle service list is not empty.
  • the uploading unit 846 is configured to upload the intercepted image to the idle first server, and send an image recognition request, the image recognition request instructs the idle first server to identify the intercepted image, and extracts the feature of the intercepted image.
  • the idle service list may be obtained from the registration server every preset time period, the idle first server uploads the intercepted image from the idle service list, and the image recognition request is sent to implement the balanced load of the server, thereby reducing the server. Processing pressure.
  • the data transmission device 800 includes an image acquisition module 810, an identification module 820, an intercept module 830, an upload module 840, a receiving module 850, and an allocation module 860, and a transmitting module.
  • a sending module configured to send a clustering request to the second server according to the received complete instruction when the received receiving instruction returned by the first server, the clustering request instructing the second server to perform the feature of the captured image by using a preset model
  • the clustering is performed, and the corresponding label is allocated to the feature of the captured image according to the clustering result, and the feature of the captured image is reported to the second server by the first server.
  • the clustering request carries the identifier of the mobile terminal; the clustering result is sent by the second server to the mobile terminal according to the identifier of the mobile terminal.
  • the clustering request may be sent to the second server, where the clustering request instructs the second server to cluster the features of the captured image, and allocate corresponding labels according to the clustering result, and the mobile terminal may According to the clustering result, the images to be uploaded are displayed in categories, and the stored images can be intelligently clustered to improve browsing efficiency and improve user viscosity.
  • the data transmission device 800 includes an image acquisition module 810, an identification module 820, an interception module 830, an upload module 840, a receiving module 850, an allocation module 860, and a transmitting module, and a power state acquiring module.
  • the power state obtaining module is configured to obtain a current power state. If the power state meets the preset state, the image acquiring module 810 obtains an image to be uploaded.
  • the power state of the mobile terminal when the image is uploaded can be guaranteed, and the influence of the uploaded image on the use of the mobile terminal is reduced.
  • the various modules in the image processing apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof.
  • the above modules may be embedded in the hardware or independent of the processor in the server, or may be stored in the memory in the server in a software form, so that the processor calls the corresponding operations of the above modules.
  • the terms "component”, “module” and “system” and the like are intended to mean a computer-related entity, which may be hardware, a combination of hardware and software, software, or software in execution.
  • a component can be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and/or a computer.
  • an application running on a server and a server can be a component.
  • One or more components can reside within a process and/or executed thread, and the components can be located within one computer and/or distributed between two or more computers.
  • the embodiment of the present application further provides a mobile terminal.
  • a mobile terminal As shown in FIG. 11 , for the convenience of description, only the parts related to the embodiments of the present application are shown. For details that are not disclosed, refer to the method part of the embodiment of the present application.
  • the mobile terminal can be any mobile device, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), an on-board computer, a wearable device, or the like, and the mobile terminal is used as a mobile phone as an example. :
  • FIG. 11 is a block diagram showing a part of a structure of a mobile phone related to a mobile terminal provided by an embodiment of the present application.
  • the mobile phone includes: a radio frequency (RF) circuit 1110, a memory 1120, an input unit 1130, a display unit 1140, a sensor 1150, an audio circuit 1160, a WiFi module 1170, a processor 1180, and a power source 1190.
  • RF radio frequency
  • the structure of the handset shown in FIG. 11 does not constitute a limitation to the handset, and may include more or less components than those illustrated, or some components may be combined, or different components may be arranged.
  • the RF circuit 1110 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 1180.
  • 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 1110 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 GSM, General Packet Radio Service (GPRS), CDMA, Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (Long Term Evolution, LTE)), e-mail, Short Messaging Service (SMS), etc.
  • GSM Global System for Mobile Communications
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • SMS Short Messaging Service
  • the memory 1120 can be used to store software programs and modules, and the processor 1180 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 1120.
  • the memory 1120 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 1120 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 1130 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the handset 1100.
  • the input unit 1130 may include a touch panel 1132 and other input devices 1134.
  • the touch panel 1132 which may also be referred to as a touch screen, can collect touch operations on or near the user (such as a user using a finger, a stylus, or the like on the touch panel 1132 or near the touch panel 1132. Operation) and drive the corresponding connection device according to a preset program.
  • the touch panel 1132 can include two portions 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 1180 is provided and can receive commands from the processor 1180 and execute them.
  • the touch panel 1132 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 1130 may also include other input devices 1134.
  • other input devices 1134 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 1140 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 1140 can include a display panel 1142.
  • the display panel 1142 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the touch panel 1132 can cover the display panel 1142. When the touch panel 1132 detects a touch operation on or near it, the touch panel 1132 transmits to the processor 1180 to determine the type of the touch event, and then the processor 1180 is The type of touch event provides a corresponding visual output on display panel 1142.
  • touch panel 1132 and the display panel 1142 are used as two separate components to implement the input and input functions of the mobile phone in FIG. 11, in some embodiments, the touch panel 1132 can be integrated with the display panel 1142. Realize the input and output functions of the phone.
  • the handset 1100 can also include at least one sensor 1150, 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 1142 according to the brightness of the ambient light, and the proximity sensor may close the display panel 1142 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 1160, speaker 1162, and microphone 1164 can provide an audio interface between the user and the handset.
  • the audio circuit 1160 can transmit the converted electrical data of the received audio data to the speaker 1162, and convert it into a sound signal output by the speaker 1162; on the other hand, the microphone 1164 converts the collected sound signal into an electrical signal, by the audio circuit 1160. After receiving, it is converted into audio data, and then processed by the audio data output processor 1180, transmitted to another mobile phone via the RF circuit 1110, or outputted to the memory 1120 for subsequent processing.
  • WiFi is a short-range wireless transmission technology.
  • the mobile phone can help users to send and receive emails, browse web pages and access streaming media through the WiFi module 1170, which provides users with wireless broadband Internet access.
  • the processor 1180 is a control center for the handset, which connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 1120, and invoking data stored in the memory 1120, The phone's various functions and processing data, so that the overall monitoring of the phone.
  • processor 1180 can include one or more processing units.
  • the processor 1180 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 1180.
  • the mobile phone 1100 also includes a power source 1190 (such as a battery) for powering various components.
  • a power source 1190 (such as a battery) for powering various components.
  • the power source 1190 can be logically coupled to the processor 1180 through a power management system to manage functions such as charging, discharging, and power management through a power management system. .
  • the handset 1100 can also include a camera, a Bluetooth module, and the like.
  • the processor 1180 included in the mobile terminal implements the above data transmission method when executing computer readable instructions stored on the memory.
  • a computer readable storage medium having stored thereon computer executable instructions that, when executed by a processor, implement the data transfer method described above.
  • 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), Direct Memory Bus Dynamic RAM (DRDRAM), and Memory Bus Dynamic RAM (RDRAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种数据传输方法,包括:获取移动终端的待上传图像;识别所述待上传图像的感兴趣区域;根据所述感兴趣区域生成截取图像,并将所述截取图像上传至服务器;接收所述服务器返回的聚类结果,所述聚类结果为对所述截取图像进行聚类得到;及根据所述聚类结果将所述移动终端的图像分配到对应的类别。

Description

数据传输方法、移动终端及计算机可读存储介质
本申请要求于2017年09月15日提交中国专利局、申请号为2017108503093、发明名称为“数据传输方法、装置、移动终端及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及互联网技术领域,特别是涉及一种数据传输方法、移动终端及非易失性计算机可读存储介质。
背景技术
随着互联网技术的飞速发展,用户可在移动终端上存储大量的图片,可对移动终端上存储的大量的图片进行分类。在传统的方式中,当移动终端需要对存储的图片进行分类时,可将需要进行分类的图片全部上传至服务器,再由服务器进行分类,传输量大,传输速度慢。
发明内容
根据本申请的各种实施例提供一种数据传输方法、移动终端及非易失性计算机可读存储介质。
一种数据传输方法,应用于移动终端中,包括:
获取所述移动终端的待上传图像;
识别所述待上传图像的感兴趣区域;
根据所述感兴趣区域生成截取图像,并将所述截取图像上传至服务器;
接收所述服务器返回的聚类结果,所述聚类结果为对所述截取图像进行聚类得到;及
根据所述聚类结果将所述移动终端的图像分配到对应的类别。
在其中一个实施例中,所述截取所述感兴趣区域,生成截取图像,包括:
将所述待上传图像转换为位图;
确定所述感兴趣区域在所述位图中的位置信息;及
从所述位图中读取与所述位置信息对应的图像内容,并将所述图像内容存储为预设格式,得到截取图像。
在其中一个实施例中,所述聚类结果包括截取图像对应的待上传图像的标识及分配的标签;
所述根据所述图像聚类结果将所述移动终端的图像分配到对应的类别,包括:
根据所述对应的待上传图像的标识确定与所述截取图像对应的待上传图像,并将所述对应的待上传图像分配至与所述标签对应的类别。
在其中一个实施例中,所述将所述截取图像上传至服务器,包括:
每隔预设时间段从注册服务器获取空闲服务列表;
当所述空闲服务列表不为空时,则从所述空闲服务列表中获取空闲的第一服务器;及
向所述空闲的第一服务器上传所述截取图像,并发送图像识别请求,所述图像识别请求指示所述空闲的第一服务器对所述截取图像进行识别,并提取所述截取图像的特征。
在其中一个实施例中,在所述将所述截取图像上传至服务器之后,所述方法还包括:
当接收到的所述第一服务器返回的接收完毕指令时,根据所述接收完毕指令向第二服务器发送聚类请求,所述聚类请求指示所述第二服务器通过预设的模型对所述截取图像的特征进行聚类,并根据聚类结果为所述截取图像的特征分配对应的标签,所述截取图像的特征为所述第一服务器上报给所述第二服务器。
在其中一个实施例中,所述根据接收完毕指令向第二服务器发送聚类请求,还包括:
当队列服务中包含有与分配的聚类请求属于同一终端在不同时刻发送的聚类请求时,所述聚类请求还用于指示所述第二服务器集群将所述与分配的聚类请求属于同一移动终端在不同时刻发送的聚类请求进行合并,将合并后的聚类请求分配给所述第二服务器;所述队列服务用于添加所述移动终端发送的聚类请求。
在其中一个实施例中,所述聚类请求携带有所述移动终端的标识;
所述聚类结果为所述第二服务器根据所述移动终端的标识发送给所述移动终端。
在其中一个实施例中,在所述获取待上传图像之前,所述方法还包括:
获取当前的电源状态,若所述电源状态满足预设状态,则执行所述获取待上传图像。
在其中一个实施例中,所述识别所述待上传图像的感兴趣区域,包括:
当获取的所述待上传图像有多张时,检测多张所述待上传图像中是否包含重复的待上传图像;
当包含时,识别所述重复的待上传图像中质量最高的所述待上传图像的感兴趣区域。
一种移动终端,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行如下操作:
获取所述移动终端的待上传图像;
识别所述待上传图像的感兴趣区域;
根据所述感兴趣区域生成截取图像,并将所述截取图像上传至服务器;
接收所述服务器返回的聚类结果,所述聚类结果为对所述截取图像进行聚类得到;及
根据所述聚类结果将所述移动终端的图像分配到对应的类别。
一个或多个包含计算机可执行指令的非易失性计算机可执行存储介质,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行以下操作:
获取所述移动终端的待上传图像;
识别所述待上传图像的感兴趣区域;
根据所述感兴趣区域生成截取图像,并将所述截取图像上传至服务器;
接收所述服务器返回的聚类结果,所述聚类结果为对所述截取图像进行聚类得到;及
根据所述聚类结果将所述移动终端的图像分配到对应的类别。
通过获取移动终端的待上传图像,识别待上传图像的感兴趣区域,根据感兴趣区域生成截取图像,并将截取图像上传至服务器,仅截取待上传图像的感兴趣区域上传至服务器进行图像聚类,可以减少传输的数据量,提高传输速度。此外,可根据服务器返回的聚类结果将待上传图像分配到对应的类别中,将图像进行分类展示,更易于查找,方便快捷。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为一个实施例中数据传输方法的应用场景图;
图2为另一个实施例中数据传输方法的应用场景图;
图3为一个实施例中移动终端与第一服务器、第二服务器进行交互的时序图;
图4为一个实施例中数据传输方法的流程图;
图5为一个实施例中生成截取图像的流程图;
图6为一个实施例中向第一服务器上传截取图像的流程图;
图7为一个实施例中第一服务器的架构图;
图8为一个实施例中数据传输装置的框图;
图9为一个实施例中截取模块的框图;
图10为一个实施例中上传模块的框图;
图11为一个实施例中移动终端的框图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一客户端称为第二客户端,且类似地,可将第二客户端称为第一客户端。第一客户端和第二客户端两者都是客户端,但其不是同一客户端。
图1为一个实施例中数据传输方法的应用场景图。如图1所示,移动终端10可通过网络与服务器20建立通信连接。移动终端10获取待上传图像,识别待上传图像的感兴趣区域,截取识别的感兴趣区域,生成截取图像,并将截取图像上传至服务器20。服务器20可对截取图像进行图像聚类,并将聚类结果返回给移动终端10。移动终端10接收服务器20返回的聚类结果,可根据聚类结果将移动终端10上的图像分配到对应的类别。服务器20可以是单独的一个服务器,也可以是由多个服务器组成的服务器集群,或是服务器集群中的某一台服务器。
图2为另一个实施例中数据传输方法的应用场景图。如图2所示,移动终端10可通过网络分别与第一服务器202及第二服务器204建立通信连接。移动终端10获取待上传图像,识别待上传图像的感兴趣区域,根据识别的感兴趣区域生成截取图像。移动终端10可将截取图像上传至第一服务器202,并同时向第一服务器202发送图像识别请求。第一服务器202接收移动终端10发送的图像识别请求,可根据图像识别请求对截取图像进行识别,并提取截取图像的特征,再将截取图像的特征上报给第二服务器204。当第一服务器202接收完由移动终端10发送的截取图像时,可向移动终端10发送接收完毕指令。当移动终端10接收到第一服务器202返回的接收完毕指令时,可根据接收完毕指令向第二服务器204发送聚类请求。第二服务器204接收移动终端10发送的聚类请求,可根据聚类请求利用预设的模型对截取图像的特征进行聚类,并根据聚类结果为截取图像的特征分配对应的标签。移动终端10可接收由第二服务器204返回的聚类结果,聚类结果可包括截取图像对应的待上传图像的标识,以及分配的标签等信息,移动终端10根据截取图像对应的待上传图像的标识,确定与截取图像对应的待上传图像,并将该待上传图像分配至与标签对应的类别。可以理解地,第一服务器202可以是单独的一个服务器,也可以是由多个第一服务器组成的第一服务器集群,或是第一服务器集群中的某一台服务器;第二服务器204可以是单独的一个服务器,也可以是由多个第二服务器组成的第二服务器集群,或是第二服务器集群中的某一台服务器。
图3为一个实施例中移动终端与第一服务器、第二服务器进行交互的时序图。如图3所示,移动终端10与第一服务器202、第二服务器204的交互过程,主要可包括以下操作:
1.移动终端10根据待上传图像的感兴趣区域生成截取图像。
移动终端10可获取一张或多张待上传图像,并提取每张待上传图像的图像特征,根 据图像特征判断对应的待上传图像中是否包含感兴趣区域,当包含时,则可提取待上传图像的感兴趣区域,并生成对应的截取图像,其中,每个截取图像包含有图像信息,图像信息可包括截取图像的标识、对应的待上传图像的标识等。
2.移动终端10将截取图像上传至第一服务器202,并向第一服务器202发送图像识别请求。
移动终端10可将生成的一张或多张截取图像上传至第一服务器202,在一个实施例中,移动终端10可每隔预设时间段从注册服务器获取空闲服务列表,若空闲服务列表不为空,则从空闲服务列表中读取空闲的第一服务器202的地址信息。移动终端10可根据从空闲服务列表读取的空闲的第一服务器202的地址信息,向对应的第一服务器202上传截取图像,并同时发送图像识别请求,其中,图像识别请求可携带有发送该请求的移动终端10的标识、账户等信息。
3.第一服务器202对截取图像进行识别,并提取截取图像的特征。
第一服务器202接收移动终端10发送的图像识别请求及截取图像后,可根据图像识别请求识别截取图像,并提取截取图像的特征。在一个实施例中,第一服务器202可通过加密算法对接收的截取图像进行加密,并将加密的截取图像缓存到文件队列中。第一服务器202从文件队列中读取缓存的截取图像后,可对读取的各个截取图像进行解密,并根据预设的特征模型识别截取图像,提取各个截取图像的图像特征。
4.第一服务器202将截取图像的特征上报给第二服务器204。
第一服务器202识别移动终端10上传的截取图像,并提取截取图像的特征,可将截取图像的特征、对应的图像信息、移动终端标识及账户等信息上报给第二服务器204。
5.移动终端10向第二服务器204发送聚类请求。
移动终端10向第一服务器202上传一张或多张截取图像,当第一服务器202全部接收完毕时,可向移动终端10发送接收完毕指令。当移动终端10接收到第一服务器202返回的接收完毕指令时,可根据接收完毕指令向第二服务器204发送聚类请求,请求对截取图像进行聚类。移动终端10向第二服务器204发送聚类请求后,可将聚类请求添加到队列服务中,并根据队列服务分配聚类请求。
在一个实施例中,移动终端10可按照队列服务中各聚类请求的发送时刻的先后顺序,为第二服务器204分配聚类请求。移动终端10进行聚类请求分配时,可检测队列服务中是否包含有与分配的聚类请求属于同一移动终端在不同时刻发送的聚类请求,当包含时,则可将与分配的聚类请求属于同一移动终端在不同时刻发送的聚类请求进行合并,并将合并后的聚类请求分配给第二服务器204。
6.第二服务器204利用预设的模型对截取图像的特征进行聚类。
当第二服务器204接收到聚类请求后,可根据聚类请求的移动终端10的标识、账户等信息获取与聚类请求对应的截取图像的特征,并通过预设的聚类模型对与聚类请求对应的截取图像的特征进行聚类。第二服务器204可将包含有相似特征的截取图像分为一类,并可根据聚类结果为每个截取图像添加对应的标签,标签用于表示截取图像所属的类别。
7.第二服务器204向移动终端10返回聚类结果。
8.移动终端10根据聚类结果将移动终端10的图像分配至对应的类别。
第二服务器204可将聚类结果返回给移动终端10,聚类结果中可包含有各个截取图像的图像信息及分配的标签,移动终端10可根据聚类结果将待上传图像分配到对应的类别中,可从聚类结果中获取与各个截取图像对应的待上传图像的标识及分配的标签,并将与截取图像对应的待上传图像分配至与分配的标签对应的类别中。
如图4所示,在一个实施例中,提供一种数据传输方法,应用于移动终端,从移动终端的角度进行描述,包括以下操作:
操作410,获取移动终端的待上传图像。
具体地,移动终端可从内存等存储器中获取一张或多张待上传图像。待上传图像可以是用户在移动终端上拍摄的图像,也可以是从其他计算机设备上获取的图像。例如,待上传图像可以是其他移动终端发送的图像,也可以是用户通过移动终端浏览网页时保存的图像等。在本实施例中,待上传图像可以是照片,移动终端可向服务器上传待上传图像,并在服务器上进行聚类,从而生成相应的相册。
移动终端可获取存储时刻在上次向服务器上传图像的时刻至当前时刻之间的图像,作为待上传图像进行上传,也可由用户在界面中选取需要上传的图像,根据用户的选择操作获取待上传图像进行上传。
在一个实施例中,当获取的待上传图像有多张时,则移动终端可检测获取的多张待上传图像中是否包含重复图像,其中,重复图像指的是相似度大于阈值的多张图像,当包含时,则移动终端可从多张重复图像中选取质量最高的图像作为待上传图像进行上传,其他质量较差的图像则不进行上传。移动终端可根据重复的各个图像中的饱和度、清晰度、亮度等值确定图像质量,并从中选取质量最高的图像进行上传。
操作420,识别待上传图像的感兴趣区域。
具体地,移动终端可对获取的各个待上传图像进行识别,判断待上传图像中是否包含感兴趣区域,其中,感兴趣区域指的是用于图像聚类时待上传图像中关注的重点区域,感兴趣区域可与聚类方式关联,不同的聚类方式可能选择的感兴趣区域不同。例如,聚类方式为根据人脸进行聚类,则待上传图像的感兴趣区域可为人脸区域,聚类方式为根据场景进行聚类,则待上传图像的感兴趣区域可为背景区域等,但不限于此。
在一个实施例中,服务器可根据人脸对图像进行聚类,移动终端可分别对各个待上传图像进行人脸识别。移动终端可提取待上传图像的图像特征,并通过预设的人脸识别模型对图像特征进进行分析,判断对应的待上传图像中是否包含人脸。图像特征可包括形状特征、空间特征及边缘特征等,其中,形状特征指的是待上传图像中局部的形状,空间特征指的是待上传图像中分割出来的多个区域之间的相互的空间位置或相对方向关系,边缘特征指的是待上传图像中组成两个区域之间的边界像素等。在一个实施例中,人脸识别模型可以是预先通过机器学习构建的决策模型,构建人脸识别模型时,可获取大量的样本图像,样本图像中包含有人脸图像及无人图像,可根据每个样本图像是否包含人脸对样本图像进行标记,并将标记的样本图像作为人脸识别模型的输入,通过机器学习进行训练,得到人脸识别模型。
当待上传图像中包含人脸时,则可将人脸区域作为感兴趣区域,可以理解地,同一待上传图像中,可能包含有一个或多个感兴趣区域,感兴趣区域的数量可与待上传图像中包含的人脸的数量对应。
操作430,根据感兴趣区域生成截取图像,并将截取图像上传至服务器。
具体地,移动终端识别各个待上传图像的感兴趣区域后,可截取待上传图像的感兴趣区域,可采用抠图等方式将感兴趣区域从整张待上传图像中提取出来,并生成对应的截取图像。每个截取图像包含有图像信息,图像信息可包括截取图像的标识、截取时刻、对应的待上传图像的标识等,其中,标识可以是名称,或是图像编号等。移动终端可将生成的与各个待上传图像对应的截取图像上传至服务器。当移动终端需要上传的截取图像的数量较多时,可分批次向服务器上传截取图像,减少网络传输压力,保证数据传输速度。
操作440,接收服务器返回的聚类结果,聚类结果为对截取图像进行聚类得到。
服务器可对截取图像进行聚类,按照截取图像中包含的图像特征对截取图像进行分类,将包含有相似特征的截取图像分为一类。在一个实施例中,服务器可根据人脸对截取图像进行聚类,提取每个截取图像中包含的人脸的特征进行分析,并将包含有相似特征的截取图像划分为一类,也即,可将包含有相同的人脸的截取图像划分为一类。服务器可根 据聚类结果为每个截取图像添加对应的标签,标签用于表示截取图像所属的类别。
操作450,根据聚类结果将移动终端的图像分配到对应的类别。
服务器可将聚类结果返回给移动终端。聚类结果中可包含有各个截取图像的图像信息及分配的标签,移动终端可根据聚类结果将待上传图像分配到对应的类别中,从聚类结果中获取与各个截取图像对应的待上传图像的标识及分配的标签,并将与截取图像对应的待上传图像分配至与分配的标签对应的类别中。在一个实施例中,聚类结果也可包含有历史上传的其他截取图像的聚类结果,服务器可将本次待上传图像的截取图像与历史上传的其他截取图像重新进行聚类,并将聚类结果返回给移动终端。移动终端可根据聚类结果获取各个截取图像对应的图像标识及分配的标签,并将与截取图像对应的图像分配到与分配的标签对应的类别中。
在一个实施例中,移动终端可建立一个或多个相册,每个类别可分别对应一个相册,可将具有相同标签的截取图像对应的待上传图像放在同一个相册中进行展示。
上述数据传输方法,识别待上传图像的感兴趣区域,根据感兴趣区域生成截取图像,并将截取图像上传至服务器,仅截取待上传图像的感兴趣区域上传至服务器进行图像聚类,可以减少传输的数据量,提高传输速度。此外,可根据服务器返回的聚类结果将待上传图像分配到对应的类别中,将图像进行分类展示,更易于查找,方便快捷。
如图5所示,在一个实施例中,操作根据感兴趣区域生成截取图像,包括以下操作:
操作502,将待上传图像转换为位图。
具体地,移动终端获取一张或多张待上传图像,识别各个待上传图像的感兴趣区域后,可截取待上传图像中的感兴趣区域,生成截取图像。移动终端可将待上传图像转换为位图。位图(bitmap),也可称为点阵图像或绘制图像。位图是由像素的单个点组成的,像素可以进行不同的排列和染色以构成不同的图样。
操作504,确定感兴趣区域在位图中的位置信息。
具体地,移动终端将待上传图像转换为位图后,可确定待上传图像包含的感兴趣区域在位图中对应的位置信息。位置信息包含有像素点的坐标,移动终端根据位置信息可确定位图中感兴趣区域包含的所有像素点的坐标。
操作506,从位图中读取与位置信息对应的图像内容,并将图像内容存储为预设格式,得到截取图像。
具体地,移动终端可根据感兴趣区域在位图中的位置信息,读取位图中感兴趣区域包含的各个像素点的图像内容。图像内容可包括像素点的颜色信息、透明度等。移动终端可根据位置信息包含的像素点的坐标,提取位图中感兴趣区域包含的各个像素点,并将读取的各个像素点的图像内容存储为预设格式,得到截取图像。其中,预设格式可以是JPG或PNG等图片格式,但不限于此。移动终端将感兴趣区域从位图中提取出来后重新保存为预设的图片格式,可减少截取图像的数据量。
在本实施例中,将待上传图像转换为位图后,从位图中读取与感兴趣区域对应的图像内容进行存储,从而生成截取图像,仅截取待上传图像的感兴趣区域上传至服务器进行图像聚类,可以减少传输的数据量,提高传输速度。
如图6所示,在一个实施例中,操作将截取图像上传至服务器,包括以下操作:
操作602,每隔预设时间段从注册服务器获取空闲服务列表。
具体地,移动终端可将生成的一张或多张截取图像上传至第一服务器,由第一服务器对截取图像进行特征识别及提取。在一个实施例中,第一服务器可以是由多个主机构成的分布式第一服务器集群,第一服务器集群包含有多个第一服务器,每个第一服务器均可向移动终端提供特征识别及提取服务。可通过ZooKeeper等构建第一服务器集群的注册服务器,其中,ZooKeeper是一个开放源码的分布式应用程序协调服务,注册服务器可用于对第一服务器集群包含的各个第一服务器进行服务监控,监控第一服务器集群中的各个第一 服务器是处于可用的空闲状态还是不可用的繁忙状态。当第一服务器处于不可用的繁忙状态时,可向注册服务器发送下卸指令,注册服务器根据下卸指令可删除对应第一服务器的地址信息等,则该第一服务器不再向移动终端提供服务。当第一服务器处于可用的空闲状态时,可向注册服务器发送注册指令,注册服务器根据注册指令存储对应的第一服务器的地址信息等,则该第一服务器可重新向移动终端提供服务。
在一个实施例中,第一服务器集群中的每个第一服务器均可配置有处理量上限值,处理量上限值可用于限定对应的第一服务器最多可进行特征识别及提取处理的截取图像数量。当第一服务器中存储的未处理的截取图像的数量达到对应的处理量上限值时,则进入不可用的繁忙状态,可向注册服务器发送下卸指令,不再接收移动终端发送的截取图像。每个第一服务器可同时配置有空闲值,当第一服务器中存储的未处理的截取图像的数量小于或等于空闲值时,则进入可用的空闲状态,可向注册服务器发送注册指令,重新在注册服务器注册,可接收移动终端发送的截取图像。
注册服务器可向移动终端提供统一的检测接口,移动终端可每隔预设时间段调用检测接口,从注册服务器获取空闲服务列表,空闲服务列表中可记录有处于可用的空闲状态的第一服务器的地址信息等。可以理解地,预设时间段可根据实际需求进行设定,例如5分钟、10分钟等。
在其他的实施例中,也可采用被动通知的方式,移动终端先向注册服务器发送服务请求,当注册服务器监控到有空闲的第一服务器时,则将该空闲的第一服务器的地址信息等通知给移动终端。
操作604,当空闲服务列表不为空时,则从空闲服务列表中获取空闲的第一服务器。
具体地,移动终端从注册服务器获取空闲服务列表,可先判断空闲服务列表是否为空,当是时,则说明当前没有可用的第一服务器,暂时不上传截取图像。当空闲服务列表不为空时,则移动终端可从空闲服务列表读取处于可用的空闲状态的第一服务器的地址信息等,地址信息可包括第一服务器的IP(Internet Protocol,网际协议)地址、MAC(Media Access Control,介质访问控制层)地址等。
在一个实施例中,当空闲服务列表中包含有多个空闲的第一服务器时,移动终端可随机从中选取一个作为上传的第一服务器,也可直接读取排列在空闲服务列表中排列最前面的第一服务器的地址信息等。移动终端上还可存储有服务器白名单,白名单中记录有合法的服务器的地址信息,可根据白名单对空闲服务列表中的第一服务器的地址信息等进行筛选,将不属于白名单的第一服务器排除。在移动终端上存储白名单,可防止非法用户篡改注册服务器的空闲服务列表,造成用户信息泄露等问题。
操作606,向空闲的第一服务器上传截取图像,并发送图像识别请求,图像识别请求指示空闲的第一服务器对截取图像进行识别,并提取截取图像的特征。
具体地,移动终端可根据从空闲服务列表读取的第一服务器的地址信息,向对应的第一服务器上传截取图像,并同时发送图像识别请求,其中,图像识别请求可携带有发送该请求的移动终端的标识、账户等信息。第一服务器接收移动终端发送的图像识别请求及截取图像后,可根据图像识别请求识别截取图像,并提取截取图像的特征。在一个实施例中,第一服务器可通过3DES(Triple Data Encryption Algorithm,三重数据加密算法)、RC5等加密算法对接收的截取图像进行加密。第一服务器可将加密的截取图像缓存到文件队列中,文件队列可用于控制第一服务器识别截取图像的速度,防止第一服务器负载过重。例如,移动终端可控制第一服务器每秒识别100张截取图像,则第一服务器每秒仅能从文件队列中读取缓存的100张截取图像进行识别处理。第一服务器从文件队列中读取缓存的截取图像后,可对读取的各个截取图像进行解密,并根据预设的特征模型识别截取图像,提取各个截取图像的图像特征,图像特征可包括形状、空间、边缘、颜色及纹理等可用于描述截取图像的信息。在一个实施例中,第一服务器可根据预设的特征模型提取截取图像中 包含的可用于描述人脸形状及五官形状、位置等信息的特征点。第一服务器可将提取的特征与对应的截取图像的图像信息、移动终端标识及账户等信息关联存储在数据库中,并同时将提取的特征及对应的截取图像的图像信息、移动终端标识及账户等信息上报给第二服务器,由第二服务器进行图像聚类。
移动终端将待上传图像的截取图像上传到第一服务器,由第一服务器识别截取图像,并提取截取图像特征,再将提取的特征上报给第二服务器,由第二服务器进行图像聚类。相比起由移动终端直接提取待上传图像的特征发送至服务器进行聚类,若特征模型发生变化,无需移动终端重新提取特征再上传,更加稳定。
图7为一个实施例中第一服务器的架构图。如图7所示,第一服务器集群中可包括多个第一服务器202,每个第一服务器202均可向移动终端10提供特征识别及提取服务。注册服务器702对第一服务器集群中的多个第一服务器202进行监控。当第一服务器202处于不可用的繁忙状态时,可向注册服务器702发送下卸指令,注册服务器702根据下卸指令可删除对应第一服务器202的地址信息等,则该第一服务器202不再向移动终端10提供服务。当第一服务器202处于可用的空闲状态时,可向注册服务器702发送注册指令,注册服务器702根据注册指令存储对应的第一服务器202的地址信息等,则该第一服务器202可重新向移动终端10提供服务。移动终端10可每隔预设时间段从注册服务器702获取空闲服务列表,并从空闲服务列表读取处于可用的空闲状态的第一服务器202的地址信息等。移动终端10可根据从空闲服务列表读取的第一服务器202的地址信息,向对应的第一服务器202上传截取图像,并同时发送图像识别请求。第一服务器202根据图像识别请求识别截取图像,并提取截取图像的特征。
在本实施例中,可每隔预设时间段从注册服务器获取空闲服务列表,从空闲服务列表获取空闲的第一服务器上传截取图像,并发送图像识别请求,实现服务器的均衡负载,可减轻服务器的处理压力。
在一个实施例中,在操作将截取图像上传至服务器之后,还包括:当接收到的第一服务器返回的接收完毕指令时,根据接收完毕指令向第二服务器发送聚类请求,聚类请求指示第二服务器通过预设的模型对截取图像的特征进行聚类,并根据聚类结果为截取图像的特征分配对应的标签,截取图像的特征为第一服务器上报给第二服务器。
具体地,移动终端向第一服务器上传一张或多张截取图像,当第一服务器全部接收完毕时,可向移动终端发送接收完毕指令。当移动终端接收到第一服务器返回的接收完毕指令时,可根据接收完毕指令向第二服务器发送聚类请求,请求对截取图像进行聚类。在一个实施例中,第二服务器可以是由多个主机构成的分布式第二服务器集群,第二服务器集群中可包含有多个第二服务器,每个第二服务器均可向移动终端提供图像聚类服务。移动终端向第二服务器集群发送聚类请求后,第二服务器集群可将聚类请求添加到队列服务中,并根据队列服务为第二服务器集群中的各个第二服务器分配聚类请求,由分配到聚类请求的第二服务器进行图像聚类。队列服务中包含的每个聚类请求,均可携带有发送的对应移动终端的标识、账户、发送时刻等信息。
在一个实施例中,第二服务器集群可按照队列服务中各聚类请求的发送时刻的先后顺序,为第二服务器集群的第二服务器分配聚类请求。第二服务器集群进行聚类请求分配时,可检测队列服务中是否包含有与分配的聚类请求属于同一移动终端在不同时刻发送的聚类请求,当包含时,则可将与分配的聚类请求属于同一移动终端在不同时刻发送的聚类请求进行合并,并将合并后的聚类请求分配给第二服务器。例如,当前分配的聚类请求为移动终端A在2017年8月2号6:00发送的,检测到队列服务中还包含有移动终端A在2017年8月2号7:00发送的聚类请求以及移动终端A在2017年8月2号8:00发送的聚类请求,则可将上述同属于移动终端A的三个聚类请求进行合并,并将合并后的聚类请求分配给第二服务器,由该第二服务器进行统一处理。进行聚类请求分配时,还可检测队列服 务中是否包含有与分配的聚类请求属于同一账户发送的聚类请求,当包含时,则可将与分配的聚类请求属于同一账户在不同移动终端发送的聚类请求进行合并,并将合并后的聚类请求分配给第二服务器。例如,当前分配的聚类请求为账户X通过移动终端A在2017年8月2号6:00发送的,检测到队列服务中还包含有账户X通过移动终端B在2017年8月2号7:00发送的聚类请求,则可将上述同属于账户X的两个聚类请求进行合并,并将合并后的聚类请求分配给第二服务器,由该第二服务器进行统一处理。
第一服务器识别移动终端上传的截取图像,并提取截取图像的特征,可将截取图像的特征、对应的图像信息、移动终端标识及账户等信息上报给第二服务器。当第二服务器接收到聚类请求后,可根据聚类请求的移动终端标识、账户等信息获取与聚类请求对应的截取图像的特征,并通过预设的聚类模型对与聚类请求对应的截取图像的特征进行聚类。聚类模型可对截取图像的特征进行分析,并将具有相似特征的截取图像划分为同一个类别。在一个实施例中,第二服务器可先根据与聚类请求对应的账户,在数据库中查找是否有历史聚类数据,若有,则可将获取的各个截取图像的特征与历史聚类数据进行比对,判断截取图像是否具备与历史聚类数据中的各个类别相似的特征。当截取图像具备与历史聚类数据中的类别相似的特征时,则直接将该截取图像划分到对应的类别,并为该截取图像分配对应的类别匹配的标签。当截取图像不具备与历史聚类数据中的类别相似的特征或没有历史聚类数据时,则可通过预设的聚类模型重新进行聚类,将具有相似特征的截取图像划分生成新的类别,并为属于同一类别的截取图像分配对应的标签。
例如,第二服务器接收到聚类请求,可根据聚类请求携带的移动终端的标识、账户等信息获取与该聚类请求对应的截取图像的特征,并根据与聚类请求对应的账户X,在数据库中查找到有与账户X对应的历史聚类数据。第二服务器可将获取的各个截取图像的特征与历史聚类数据中的各个人脸类别进行比对,判断是否有属于历史聚类数据中的人脸类别的截取图像,若有,则将截取图像划分到对应的人脸类别,并为截取图像分配对应的人脸类别的标签。当截取图像不属于历史聚类数据中的人脸类别时,则可通过预设的聚类模型重新进行聚类,将具有相似特征的截取图像划分生成新的人脸类别,并为属于同一人脸类别的截取图像分配对应的标签。
第二服务器可根据聚类请求中携带的移动终端的标识,将聚类结果发送给与该移动终端的标识对应的移动终端,移动终端根据聚类结果中包含的截取图像对应的待上传图像的标识及分配的标签等信息,将与截取图像对应的待上传图像分配至与分配的标签对应的类别中。
在一个实施例中,当第二服务器接收到的是合并后的聚类请求时,则直接获取与合并后的聚类请求中包含的各聚类请求对应的截取图像的特征,并进行聚类,可提高图像的聚类效率。
在本实施例中,可向第二服务器发送聚类请求,聚类请求指示第二服务器对截取图像的特征进行聚类,并根据聚类结果为截取图像的特征分配对应的标签,移动终端可根据聚类结果分类别展示待上传图像,可以智能对存储的图像进行聚类,改善浏览效率,提高用户粘度。
在一个实施例中,在操作410获取待上传图像之前,还包括:获取当前的电源状态,若电源状态满足预设状态,则执行操作410获取待上传图像。
具体地,移动终端在向服务器上传图像之前,可先获取当前的电源状态。其中,电源状态可包括可用剩余电量、是否处于充电状态、用电速度等。当电源状态满足预设状态时,再获取待上传图像,截取待上传图像中的感兴趣区域,生成截取图像,并将截取图像上传至服务器。预设状态可以是可用剩余电量大于预设百分比,或是处于充电状态,或是可用剩余电量大于预设百分比且用电速度小于设定值等,并不限于此,可根据实际需求进行设定。
在其他的实施例中,移动终端也可预先设定上传图像的时间段,当当前的时刻处于上传图像的时间段时,则可向服务器上传图像,其中,上传图像的时间段可设定在较少使用移动终端的时间段,例如,凌晨的2点至4点等。
在本实施例中,当电源状态满足预设状态,再向服务器上传图像,可保证上传图像时移动终端的电源等状态,减少上传图像对移动终端的使用的影响。
在一个实施例中,提供一种数据传输方法,包括以下操作:
操作(1),获取移动终端当前的电源状态。
操作(2),当电源状态满足预设状态时,则获取移动终端的待上传图像。
操作(3),识别待上传图像的感兴趣区域。
操作(4),将待上传图像转换为位图。
操作(5),确定感兴趣区域在位图中的位置信息。
操作(6),从位图中读取与位置信息对应的图像内容,并将图像内容存储为预设格式,得到截取图像。
操作(7),每隔预设时间段从注册服务器获取空闲服务列表。
操作(8),当空闲服务列表不为空时,则从空闲服务列表中获取空闲的第一服务器。
操作(9),向空闲的第一服务器上传截取图像,并发送图像识别请求,图像识别请求指示空闲的第一服务器对截取图像进行识别,并提取截取图像的特征。
操作(10),当接收到的第一服务器返回的接收完毕指令时,根据接收完毕指令向第二服务器发送聚类请求,聚类请求指示第二服务器通过预设的模型对截取图像的特征进行聚类,并根据聚类结果为截取图像的特征分配对应的标签,截取图像的特征为第一服务器上报给所述第二服务器。
操作(11),接收第二服务器返回的聚类结果,该聚类结果为第二服务器根据移动终端的标识发送给移动终端。
操作(12),聚类结果包括截取图像对应的待上传图像的标识及分配的标签,根据对应的待上传图像的标识确定与截取图像对应的待上传图像,并将该待上传图像分配至与标签对应的类别。
在本实施例中,识别待上传图像的感兴趣区域,根据感兴趣区域生成截取图像,并将截取图像上传至服务器,仅截取待上传图像的感兴趣区域上传至服务器进行图像聚类,可以减少传输的数据量,提高传输速度。
本申请实施例的方法流程图中的各个操作按照箭头的指示依次显示,但是这些操作并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些操作的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,本申请实施例的方法流程图中的至少一部分操作可以包括多个子操作或者多个阶段,这些子操作或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他操作或者其他操作的子操作或者阶段的至少一部分轮流或者交替地执行。
如图8所示,在一个实施例中,提供一种数据传输装置800,包括图像获取模块810、识别模块820、截取模块830、上传模块840、接收模块850及分配模块860。
图像获取模块810,用于获取移动终端的待上传图像。
识别模块820,用于识别待上传图像的感兴趣区域。
截取模块830,用于根据感兴趣区域生成截取图像。
上传模块840,用于将截取图像上传至服务器。
接收模块850,用于接收服务器返回的聚类结果,聚类结果为对截取图像进行聚类得到。
分配模块860,用于根据聚类结果将移动终端的图像分配到对应的类别。
在一个实施例中,聚类结果包括截取图像对应的待上传图像的标识及分配的标签。分 配模块860,还用于根据对应的待上传图像的标识确定与截取图像对应的待上传图像,并将对应的待上传图像分配至与标签对应的类别。
上述数据传输装置,识别待上传图像的感兴趣区域,根据感兴趣区域生成截取图像,并将截取图像上传至服务器,仅截取待上传图像的感兴趣区域上传至服务器进行图像聚类,可以减少传输的数据量,提高传输速度。
如图9所示,在一个实施例中,截取模块830,包括转换单元832、确定单元834及存储单元836。
转换单元832,用于将待上传图像转换为位图。
确定单元834,用于确定感兴趣区域在位图中的位置信息。
存储单元836,用于从位图中读取与位置信息对应的图像内容,并将图像内容存储为预设格式,得到截取图像。
在本实施例中,将待上传图像转换为位图后,从位图中读取与感兴趣区域对应的图像内容进行存储,从而生成截取图像,仅截取待上传图像的感兴趣区域上传至服务器进行图像聚类,可以减少传输的数据量,提高传输速度。
如图10所示,在一个实施例中,上传模块840,包括列表获取单元842、服务器获取单元844及上传单元846。
列表获取单元842,用于每隔预设时间段从注册服务器获取空闲服务列表。
服务器获取单元844,用于当空闲服务列表不为空时,则从空闲服务列表中获取空闲的第一服务器。
上传单元846,用于向空闲的第一服务器上传截取图像,并发送图像识别请求,图像识别请求指示空闲的第一服务器对截取图像进行识别,并提取截取图像的特征。
在本实施例中,可每隔预设时间段从注册服务器获取空闲服务列表,从空闲服务列表获取空闲的第一服务器上传截取图像,并发送图像识别请求,实现服务器的均衡负载,可减轻服务器的处理压力。
在一个实施例中,上述数据传输装置800,除了包括图像获取模块810、识别模块820、截取模块830、上传模块840、接收模块850及分配模块860,还包括发送模块。
发送模块,用于当接收到的第一服务器返回的接收完毕指令时,根据接收完毕指令向第二服务器发送聚类请求,聚类请求指示第二服务器通过预设的模型对截取图像的特征进行聚类,并根据聚类结果为截取图像的特征分配对应的标签,截取图像的特征为所述第一服务器上报给第二服务器。
在一个实施例中,聚类请求携带有移动终端的标识;聚类结果为第二服务器根据移动终端的标识发送给移动终端。
在本实施例中,可向第二服务器发送聚类请求,聚类请求指示第二服务器对截取图像的特征进行聚类,并根据聚类结果为截取图像的特征分配对应的标签,移动终端可根据聚类结果分类别展示待上传图像,可以智能对存储的图像进行聚类,改善浏览效率,提高用户粘度。
在一个实施例中,上述数据传输装置800,除了包括图像获取模块810、识别模块820、截取模块830、上传模块840、接收模块850、分配模块860及发送模块,还包括电源状态获取模块。
电源状态获取模块,用于获取当前的电源状态,若电源状态满足预设状态,则通过图像获取模块810获取待上传图像。
在本实施例中,当电源状态满足预设状态,再向服务器上传图像,可保证上传图像时移动终端的电源等状态,减少上传图像对移动终端的使用的影响。
上述图像处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于服务器中的处理器中,也可以以软件形式存储于服务 器中的存储器中,以便于处理器调用执行以上各个模块对应的操作。如在本申请中所使用的,术语“组件”、“模块”和“系统”等旨在表示计算机相关的实体,它可以是硬件、硬件和软件的组合、软件、或者执行中的软件。例如,组件可以是但不限于是,在处理器上运行的进程、处理器、对象、可执行码、执行的线程、程序和/或计算机。作为说明,运行在服务器上的应用程序和服务器都可以是组件。一个或多个组件可以驻留在进程和/或执行的线程中,并且组件可以位于一个计算机内和/或分布在两个或更多的计算机之间。
本申请实施例还提供了一种移动终端。如图11所示,为了便于说明,仅示出了与本申请实施例相关的部分,具体技术细节未揭示的,请参照本申请实施例方法部分。该移动终端可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑、穿戴式设备等任意终端设备,以移动终端为手机为例:
图11为与本申请实施例提供的移动终端相关的手机的部分结构的框图。参考图11,手机包括:射频(Radio Frequency,RF)电路1110、存储器1120、输入单元1130、显示单元1140、传感器1150、音频电路1160、WiFi模块1170、处理器1180、以及电源1190等部件。本领域技术人员可以理解,图11所示的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
其中,RF电路1110可用于收发信息或通话过程中,信号的接收和发送,可将基站的下行信息接收后,给处理器1180处理;也可以将上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路1110还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于GSM、通用分组无线服务(General Packet Radio Service,GPRS)、CDMA、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE))、电子邮件、短消息服务(Short Messaging Service,SMS)等。
存储器1120可用于存储软件程序以及模块,处理器1180通过运行存储在存储器1120的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器1120可主要包括程序存储区和数据存储区,其中,程序存储区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能的应用程序、图像播放功能的应用程序等)等;数据存储区可存储根据手机的使用所创建的数据(比如音频数据、通讯录等)等。此外,存储器1120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
输入单元1130可用于接收输入的数字或字符信息,以及产生与手机1100的用户设置以及功能控制有关的键信号输入。具体地,输入单元1130可包括触控面板1132以及其他输入设备1134。触控面板1132,也可称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1132上或在触控面板1132附近的操作),并根据预先设定的程式驱动相应的连接装置。在一个实施例中,触控面板1132可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器1180,并能接收处理器1180发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1132。除了触控面板1132,输入单元1130还可以包括其他输入设备1134。具体地,其他输入设备1134可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)等中的一种或多种。
显示单元1140可用于显示由用户输入的信息或提供给用户的信息以及手机的各 种菜单。显示单元1140可包括显示面板1142。在一个实施例中,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板1142。在一个实施例中,触控面板1132可覆盖显示面板1142,当触控面板1132检测到在其上或附近的触摸操作后,传送给处理器1180以确定触摸事件的类型,随后处理器1180根据触摸事件的类型在显示面板1142上提供相应的视觉输出。虽然在图11中,触控面板1132与显示面板1142是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板1132与显示面板1142集成而实现手机的输入和输出功能。
手机1100还可包括至少一种传感器1150,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1142的亮度,接近传感器可在手机移动到耳边时,关闭显示面板1142和/或背光。运动传感器可包括加速度传感器,通过加速度传感器可检测各个方向上加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换)、振动识别相关功能(比如计步器、敲击)等;此外,手机还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器等。
音频电路1160、扬声器1162和传声器1164可提供用户与手机之间的音频接口。音频电路1160可将接收到的音频数据转换后的电信号,传输到扬声器1162,由扬声器1162转换为声音信号输出;另一方面,传声器1164将收集的声音信号转换为电信号,由音频电路1160接收后转换为音频数据,再将音频数据输出处理器1180处理后,经RF电路1110可以发送给另一手机,或者将音频数据输出至存储器1120以便后续处理。
WiFi属于短距离无线传输技术,手机通过WiFi模块1170可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。
处理器1180是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器1120内的软件程序和/或模块,以及调用存储在存储器1120内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。在一个实施例中,处理器1180可包括一个或多个处理单元。在一个实施例中,处理器1180可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等;调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1180中。
手机1100还包括给各个部件供电的电源1190(比如电池),优选的,电源1190可以通过电源管理系统与处理器1180逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
在一个实施例中,手机1100还可以包括摄像头、蓝牙模块等。
在本申请实施例中,该移动终端所包括的处理器1180执行存储在存储器上的计算机可读指令时实现上述数据传输方法。
在一个实施例中,提供一种计算机可读存储介质,其上存储有计算机可执行指令,该计算机可执行指令被处理器执行时实现上述数据传输方法。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机指令来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(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 (27)

  1. 一种数据传输方法,应用于移动终端中,包括:
    获取所述移动终端的待上传图像;
    识别所述待上传图像的感兴趣区域;
    根据所述感兴趣区域生成截取图像,并将所述截取图像上传至服务器;
    接收所述服务器返回的聚类结果,所述聚类结果为对所述截取图像进行聚类得到;及
    根据所述聚类结果将所述移动终端的图像分配到对应的类别。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述感兴趣区域生成截取图像,包括:
    将所述待上传图像转换为位图;
    确定所述感兴趣区域在所述位图中的位置信息;及
    从所述位图中读取与所述位置信息对应的图像内容,并将所述图像内容存储为预设格式,得到截取图像。
  3. 根据权利要求1所述的方法,其特征在于,所述聚类结果包括截取图像对应的待上传图像的标识及分配的标签;
    所述根据所述聚类结果将所述移动终端的图像分配到对应的类别,包括:
    根据所述对应的待上传图像的标识确定与所述截取图像对应的待上传图像,并将所述对应的待上传图像分配至与所述标签对应的类别。
  4. 根据权利要求1所述的方法,其特征在于,所述将所述截取图像上传至服务器,包括:
    每隔预设时间段从注册服务器获取空闲服务列表;
    当所述空闲服务列表不为空时,则从所述空闲服务列表中获取空闲的第一服务器;及
    向所述空闲的第一服务器上传所述截取图像,并发送图像识别请求,所述图像识别请求指示所述空闲的第一服务器对所述截取图像进行识别,并提取所述截取图像的特征。
  5. 根据权利要求4所述的方法,其特征在于,在所述将所述截取图像上传至服务器之后,还包括:
    当接收到的所述第一服务器返回的接收完毕指令时,根据所述接收完毕指令向第二服务器发送聚类请求,所述聚类请求指示所述第二服务器通过预设的模型对所述截取图像的特征进行聚类,并根据聚类结果为所述截取图像的特征分配对应的标签,所述截取图像的特征为所述第一服务器上报给所述第二服务器。
  6. 根据权利要求5所述的方法,其特征在于,所述根据接收完毕指令向第二服务器发送聚类请求,还包括:
    当队列服务中包含有与分配的聚类请求属于同一终端在不同时刻发送的聚类请求时,所述聚类请求还用于指示所述第二服务器集群将所述与分配的聚类请求属于同一移动终端在不同时刻发送的聚类请求进行合并,将合并后的聚类请求分配给所述第二服务器;所述队列服务用于添加所述移动终端发送的聚类请求。
  7. 根据权利要求5所述的方法,其特征在于,所述聚类请求携带有所述移动终端的标识;
    所述聚类结果为所述第二服务器根据所述移动终端的标识发送给所述移动终端。
  8. 根据权利要求1至7任一所述的方法,其特征在于,在所述获取待上传图像之前,还包括:
    获取当前的电源状态,若所述电源状态满足预设状态,则执行所述获取待上传图像。
  9. 根据权利要求1所述的方法,其特征在于,所述识别所述待上传图像的感兴趣区域,包括:
    当获取的所述待上传图像有多张时,检测多张所述待上传图像中是否包含重复的待上 传图像;
    当包含时,识别所述重复的待上传图像中质量最高的所述待上传图像的感兴趣区域。
  10. 一种移动终端,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器实现如下操作:
    获取所述移动终端的待上传图像;
    识别所述待上传图像的感兴趣区域;
    根据所述感兴趣区域生成截取图像,并将所述截取图像上传至服务器;
    接收所述服务器返回的聚类结果,所述聚类结果为对所述截取图像进行聚类得到;及
    根据所述聚类结果将所述移动终端的图像分配到对应的类别。
  11. 根据权利要求10所述的移动终端,其特征在于,所述根据所述感兴趣区域生成截取图像,包括:
    将所述待上传图像转换为位图;
    确定所述感兴趣区域在所述位图中的位置信息;及
    从所述位图中读取与所述位置信息对应的图像内容,并将所述图像内容存储为预设格式,得到截取图像。
  12. 根据权利要求10所述的移动终端,其特征在于,所述聚类结果包括截取图像对应的待上传图像的标识及分配的标签;
    所述根据所述聚类结果将所述移动终端的图像分配到对应的类别,包括:
    根据所述对应的待上传图像的标识确定与所述截取图像对应的待上传图像,并将所述对应的待上传图像分配至与所述标签对应的类别。
  13. 根据权利要求10所述的移动终端,其特征在于,所述将所述截取图像上传至服务器,包括:
    每隔预设时间段从注册服务器获取空闲服务列表;
    当所述空闲服务列表不为空时,则从所述空闲服务列表中获取空闲的第一服务器;及
    向所述空闲的第一服务器上传所述截取图像,并发送图像识别请求,所述图像识别请求指示所述空闲的第一服务器对所述截取图像进行识别,并提取所述截取图像的特征。
  14. 根据权利要求13所述的移动终端,其特征在于,在所述将所述截取图像上传至服务器之后,还包括:
    当接收到的所述第一服务器返回的接收完毕指令时,根据所述接收完毕指令向第二服务器发送聚类请求,所述聚类请求指示所述第二服务器通过预设的模型对所述截取图像的特征进行聚类,并根据聚类结果为所述截取图像的特征分配对应的标签,所述截取图像的特征为所述第一服务器上报给所述第二服务器。
  15. 根据权利要求14所述的移动终端,其特征在于,所述根据接收完毕指令向第二服务器发送聚类请求,还包括:
    当队列服务中包含有与分配的聚类请求属于同一终端在不同时刻发送的聚类请求时,所述聚类请求还用于指示所述第二服务器集群将所述与分配的聚类请求属于同一移动终端在不同时刻发送的聚类请求进行合并,将合并后的聚类请求分配给所述第二服务器;所述队列服务用于添加所述移动终端发送的聚类请求。
  16. 根据权利要求14所述的移动终端,其特征在于,所述聚类请求携带有所述移动终端的标识;
    所述聚类结果为所述第二服务器根据所述移动终端的标识发送给所述移动终端。
  17. 根据权利要求10至16任一所述的移动终端,其特征在于,在所述获取待上传图像之前,还包括:
    获取当前的电源状态,若所述电源状态满足预设状态,则执行所述获取待上传图像。
  18. 根据权利要求10所述的移动终端,其特征在于,所述识别所述待上传图像的感 兴趣区域,包括:
    当获取的所述待上传图像有多张时,检测多张所述待上传图像中是否包含重复的待上传图像;
    当包含时,识别所述重复的待上传图像中质量最高的所述待上传图像的感兴趣区域。
  19. 一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,其上存储有计算机可执行指令,其特征在于,所述计算机可执行指令被一个或多个处理器执行时实现如下操作:
    获取所述移动终端的待上传图像;
    识别所述待上传图像的感兴趣区域;
    根据所述感兴趣区域生成截取图像,并将所述截取图像上传至服务器;
    接收所述服务器返回的聚类结果,所述聚类结果为对所述截取图像进行聚类得到;及
    根据所述聚类结果将所述移动终端的图像分配到对应的类别。
  20. 根据权利要求19所述的非易失性计算机可读存储介质,其特征在于,所述根据所述感兴趣区域生成截取图像,包括:
    将所述待上传图像转换为位图;
    确定所述感兴趣区域在所述位图中的位置信息;及
    从所述位图中读取与所述位置信息对应的图像内容,并将所述图像内容存储为预设格式,得到截取图像。
  21. 根据权利要求19所述的非易失性计算机可读存储介质,其特征在于,所述聚类结果包括截取图像对应的待上传图像的标识及分配的标签;
    所述根据所述聚类结果将所述移动终端的图像分配到对应的类别,包括:
    根据所述对应的待上传图像的标识确定与所述截取图像对应的待上传图像,并将所述对应的待上传图像分配至与所述标签对应的类别。
  22. 根据权利要求19所述的非易失性计算机可读存储介质,其特征在于,所述将所述截取图像上传至服务器,包括:
    每隔预设时间段从注册服务器获取空闲服务列表;
    当所述空闲服务列表不为空时,则从所述空闲服务列表中获取空闲的第一服务器;及
    向所述空闲的第一服务器上传所述截取图像,并发送图像识别请求,所述图像识别请求指示所述空闲的第一服务器对所述截取图像进行识别,并提取所述截取图像的特征。
  23. 根据权利要求22所述的非易失性计算机可读存储介质,其特征在于,在所述将所述截取图像上传至服务器之后,还包括:
    当接收到的所述第一服务器返回的接收完毕指令时,根据所述接收完毕指令向第二服务器发送聚类请求,所述聚类请求指示所述第二服务器通过预设的模型对所述截取图像的特征进行聚类,并根据聚类结果为所述截取图像的特征分配对应的标签,所述截取图像的特征为所述第一服务器上报给所述第二服务器。
  24. 根据权利要求23所述的非易失性计算机可读存储介质,其特征在于,所述根据接收完毕指令向第二服务器发送聚类请求,还包括:
    当队列服务中包含有与分配的聚类请求属于同一终端在不同时刻发送的聚类请求时,所述聚类请求还用于指示所述第二服务器集群将所述与分配的聚类请求属于同一移动终端在不同时刻发送的聚类请求进行合并,将合并后的聚类请求分配给所述第二服务器;所述队列服务用于添加所述移动终端发送的聚类请求。
  25. 根据权利要求23所述的非易失性计算机可读存储介质,其特征在于,所述聚类请求携带有所述移动终端的标识;
    所述聚类结果为所述第二服务器根据所述移动终端的标识发送给所述移动终端。
  26. 根据权利要求19至25任一所述的非易失性计算机可读存储介质,其特征在于, 在所述获取待上传图像之前,还包括:
    获取当前的电源状态,若所述电源状态满足预设状态,则执行所述获取待上传图像。
  27. 根据权利要求19所述的非易失性计算机可读存储介质,其特征在于,所述识别所述待上传图像的感兴趣区域,包括:
    当获取的所述待上传图像有多张时,检测多张所述待上传图像中是否包含重复的待上传图像;
    当包含时,识别所述重复的待上传图像中质量最高的所述待上传图像的感兴趣区域。
PCT/CN2018/101570 2017-09-15 2018-08-21 数据传输方法、移动终端及计算机可读存储介质 WO2019052319A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710850309.3 2017-09-15
CN201710850309.3A CN107679532B (zh) 2017-09-15 2017-09-15 数据传输方法、装置、移动终端及计算机可读存储介质

Publications (1)

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

Family

ID=61136573

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/101570 WO2019052319A1 (zh) 2017-09-15 2018-08-21 数据传输方法、移动终端及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN107679532B (zh)
WO (1) WO2019052319A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110716778A (zh) * 2019-09-10 2020-01-21 阿里巴巴集团控股有限公司 应用兼容性测试方法、装置及系统
CN110750414A (zh) * 2019-09-06 2020-02-04 上海陆家嘴国际金融资产交易市场股份有限公司 移动数据监控分析方法、装置、计算机设备和存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107679532B (zh) * 2017-09-15 2019-12-03 Oppo广东移动通信有限公司 数据传输方法、装置、移动终端及计算机可读存储介质
CN110610164A (zh) * 2019-09-16 2019-12-24 爱动信息科技(深圳)有限公司 人脸图像处理方法、系统、服务器及可读存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103207870A (zh) * 2012-01-17 2013-07-17 华为技术有限公司 一种照片分类管理方法、服务器、装置及系统
CN105631404A (zh) * 2015-12-17 2016-06-01 小米科技有限责任公司 对照片进行聚类的方法及装置
CN107679532A (zh) * 2017-09-15 2018-02-09 广东欧珀移动通信有限公司 数据传输方法、装置、移动终端及计算机可读存储介质

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105913052A (zh) * 2016-06-08 2016-08-31 Tcl集团股份有限公司 一种照片分类管理的方法及其系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103207870A (zh) * 2012-01-17 2013-07-17 华为技术有限公司 一种照片分类管理方法、服务器、装置及系统
CN105631404A (zh) * 2015-12-17 2016-06-01 小米科技有限责任公司 对照片进行聚类的方法及装置
CN107679532A (zh) * 2017-09-15 2018-02-09 广东欧珀移动通信有限公司 数据传输方法、装置、移动终端及计算机可读存储介质

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110750414A (zh) * 2019-09-06 2020-02-04 上海陆家嘴国际金融资产交易市场股份有限公司 移动数据监控分析方法、装置、计算机设备和存储介质
CN110750414B (zh) * 2019-09-06 2023-03-21 未鲲(上海)科技服务有限公司 移动数据监控分析方法、装置、计算机设备和存储介质
CN110716778A (zh) * 2019-09-10 2020-01-21 阿里巴巴集团控股有限公司 应用兼容性测试方法、装置及系统
CN110716778B (zh) * 2019-09-10 2023-09-26 创新先进技术有限公司 应用兼容性测试方法、装置及系统

Also Published As

Publication number Publication date
CN107679532B (zh) 2019-12-03
CN107679532A (zh) 2018-02-09

Similar Documents

Publication Publication Date Title
CN107622117B (zh) 图像处理方法和装置、计算机设备、计算机可读存储介质
WO2019052432A1 (zh) 数据传输方法、移动终端及计算机可读存储介质
EP2868065B1 (en) Apparatus and method for selection of a device for content sharing operations
CN107729815B (zh) 图像处理方法、装置、移动终端及计算机可读存储介质
WO2019052319A1 (zh) 数据传输方法、移动终端及计算机可读存储介质
CN108536783B (zh) 数据处理方法和装置、终端、计算机可读存储介质
WO2019184705A1 (zh) 数据保护方法和装置、终端、计算机可读存储介质
WO2019052316A1 (zh) 图像处理方法、装置、计算机可读存储介质和移动终端
CN107995422B (zh) 图像拍摄方法和装置、计算机设备、计算机可读存储介质
WO2019052354A1 (zh) 图像处理方法和系统、计算机设备
CN107729889B (zh) 图像处理方法和装置、电子设备、计算机可读存储介质
WO2019052351A1 (zh) 图像处理方法和系统、计算机设备
US10824901B2 (en) Image processing of face sets utilizing an image recognition method
WO2019105457A1 (zh) 图像处理方法、计算机设备和计算机可读存储介质
WO2019051797A1 (zh) 图像处理方法和装置、计算机设备、计算机可读存储介质
WO2019056938A1 (zh) 图像处理方法和计算机设备、计算机可读存储介质
CN110555171B (zh) 一种信息处理方法、装置、存储介质及系统
WO2018049971A1 (zh) 热点网络切换方法及终端
WO2019184631A1 (zh) 信息处理方法和装置、计算机可读存储介质、终端
US11314803B2 (en) Method for image-processing and mobile terminal
WO2019052436A1 (zh) 图像处理方法、计算机可读存储介质和移动终端
CN112163194A (zh) 应用权限的授权方法、移动终端及计算机存储介质
WO2020083178A1 (zh) 数字图像展示方法、装置、电子设备及存储介质
CN109190064B (zh) 清单记录方法、终端及计算机可读存储介质
WO2019096207A1 (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: 18855576

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: 18855576

Country of ref document: EP

Kind code of ref document: A1