Image processing method and device, electronic equipment and computer readable medium

By receiving image processing requests, extracting and calculating the similarity between images and text, and determining the compatibility results with weights, the problem of poor accuracy of image compatibility judgment in the prior art is solved, and fast and accurate compatibility judgment is achieved.

CN119006854APending Publication Date: 2024-11-22BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202310582833.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-22
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

The existing software interface design automation framework has a lot of interference and poor accuracy when judging image compatibility.

Method used

By receiving image processing requests, obtaining machine identification, extracting feature values ​​and text of comparison and experimental diagrams, calculating the similarity between images and text, determining the compatibility results based on the similarity, combining overall and local weights for weighting, and outputting compatible results.

Benefits of technology

It realizes rapid and accurate determination of whether the image is compatible on each experimental machine, and improves the accuracy of compatibility judgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119006854A_ABST
    Figure CN119006854A_ABST
Patent Text Reader

Abstract

The invention discloses an image processing method and device, electronic equipment and a computer readable medium, and relates to the technical field of software testing, one specific embodiment comprises the steps of receiving an image processing request, obtaining a corresponding machine identifier, obtaining a comparison graph according to the machine identifier, and obtaining an experiment graph based on the comparison graph; respectively extracting a first image feature value of the comparison image and a second image feature value of the experiment image, and calculating a first similarity between the first image feature value and the second image feature value; respectively extracting a first character of the comparison diagram and a second character of the experiment diagram, and calculating a second similarity between the first character and the second character; and according to the first similarity and the second similarity, determining compatible result data of the comparison graph on each machine corresponding to the machine identifier, and outputting the compatible result data. According to the embodiment of the invention, whether the image can be compatible on each experimental machine or not can be quickly and accurately judged through the first similarity based on the image and the second similarity based on the character.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software testing technology, and in particular to an image processing method, device, electronic device and computer-readable medium. Background Art

[0002] The compatibility test of an image can be understood as determining whether the image can be displayed normally on each experimental machine as on the comparison machine through similarity, that is, whether the image can be output and displayed on each experimental machine with a loss lower than the preset threshold as on the comparison machine, so as to determine whether the image is compatible with each experimental machine. At present, there are two main methods for compatibility testing, the most common of which is manual and the other is automated. Among them, the manual method mainly determines whether there is a compatibility problem manually, while the automated method uses a certain tool and writes corresponding code to complete the compatibility test. The automated testing framework determines whether the images are the same through image recognition, which is a way to calculate image similarity. The existing automated framework for software interface design to determine image similarity has many interferences and poor accuracy when determining compatibility. Summary of the invention

[0003] In view of this, the embodiments of the present application provide an image processing method, device, electronic device and computer-readable medium, which can solve the problem that the existing automated framework for software interface design to determine image similarity has many interferences and poor accuracy when determining compatibility.

[0004] To achieve the above object, according to one aspect of an embodiment of the present application, there is provided an image processing method, comprising:

[0005] Receive an image processing request, obtain a corresponding machine ID, obtain a comparison chart according to the machine ID, and obtain an experimental chart based on the comparison chart;

[0006] Extracting the first image feature value of the comparison image and the second image feature value of the experimental image respectively, and calculating the first similarity between the first image feature value and the second image feature value;

[0007] Extract the first text of the comparison image and the second text of the experimental image respectively, and calculate the second similarity between the first text and the second text;

[0008] According to the first similarity and the second similarity, compatible result data of the comparison graph on each machine corresponding to the machine identifier is determined and output.

[0009] Optionally, a comparison chart is obtained according to the machine identification, including:

[0010] Get the landing page corresponding to the machine ID;

[0011] The user demand data carried in the image processing request is obtained, and then the corresponding comparison chart is intercepted from the landing page based on the user demand data.

[0012] Optionally, obtaining an experimental graph based on the comparison graph includes:

[0013] Call the sliding window and slide it on the comparison image to capture a partial image;

[0014] Each local map is determined as an experimental map.

[0015] Optionally, the first similarity includes overall image similarity and local image similarity, and calculating the first similarity between the first image feature value and the second image feature value includes:

[0016] Calculate the overall similarity between the second image feature value corresponding to the overall image composed of the experimental images and the first image feature value corresponding to the overall comparison image;

[0017] Calculate the local similarity between the second image feature value corresponding to the local image and the first image feature value corresponding to the local image in the comparison image;

[0018] Based on the overall similarity and the local similarity, a first similarity is determined.

[0019] Optionally, determining the first similarity based on the overall similarity and the local similarity includes:

[0020] Get the overall weight and local weight;

[0021] A first similarity is determined according to the overall weight, the overall similarity, the local weight and the local similarity.

[0022] Optionally, calculating the second similarity between the first character and the second character includes:

[0023] Segmenting the first word to obtain the first word segmentation, and segmenting the second word to obtain the second word segmentation;

[0024] The similarity between each first word segment and each second word segment is calculated to obtain a second similarity.

[0025] Optionally, determining, according to the first similarity and the second similarity, the compatible result data of the comparison graph on each machine corresponding to the machine identifier includes:

[0026] Get image weight and text weight;

[0027] Calculate a first product of the image weight and the first similarity, and calculate a second product of the text weight and the second similarity;

[0028] According to the first product and the second product, the compatible result data of the comparison chart on each machine corresponding to the machine identifier is determined.

[0029] In addition, the present application also provides an image processing device, comprising:

[0030] A receiving unit is configured to receive an image processing request, obtain a corresponding machine identification, obtain a comparison chart according to the machine identification, and obtain an experimental chart based on the comparison chart;

[0031] A first calculation unit is configured to extract a first image feature value of the comparison image and a second image feature value of the experimental image, respectively, and calculate a first similarity between the first image feature value and the second image feature value;

[0032] A second calculation unit is configured to extract the first text of the comparison image and the second text of the experimental image respectively, and calculate a second similarity between the first text and the second text;

[0033] The output unit is configured to determine and output the compatible result data of the comparison graph on each machine corresponding to the machine identifier according to the first similarity and the second similarity.

[0034] Optionally, the receiving unit is further configured to:

[0035] Get the landing page corresponding to the machine ID;

[0036] The user demand data carried in the image processing request is obtained, and then the corresponding comparison chart is intercepted from the landing page based on the user demand data.

[0037] Optionally, the receiving unit is further configured to:

[0038] Call the sliding window and slide it on the comparison image to capture a partial image;

[0039] Each local map is determined as an experimental map.

[0040] Optionally, the first computing unit is further configured to:

[0041] Calculate the overall similarity between the second image feature value corresponding to the overall image composed of the experimental images and the first image feature value corresponding to the overall comparison image;

[0042] Calculate the local similarity between the second image feature value corresponding to the local image and the first image feature value corresponding to the local image in the comparison image;

[0043] Based on the overall similarity and the local similarity, a first similarity is determined.

[0044] Optionally, the first computing unit is further configured to:

[0045] Get the overall weight and local weight;

[0046] A first similarity is determined according to the overall weight, the overall similarity, the local weight and the local similarity.

[0047] Optionally, the second computing unit is further configured to:

[0048] Segmenting the first word to obtain the first word segmentation, and segmenting the second word to obtain the second word segmentation;

[0049] The similarity between each first word segment and each second word segment is calculated to obtain a second similarity.

[0050] Optionally, the output unit is further configured to:

[0051] Get image weight and text weight;

[0052] Calculate a first product of the image weight and the first similarity, and calculate a second product of the text weight and the second similarity;

[0053] According to the first product and the second product, the compatible result data of the comparison chart on each machine corresponding to the machine identifier is determined.

[0054] In addition, the present application also provides an image processing electronic device, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the one or more processors implement the image processing method as described above.

[0055] In addition, the present application also provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the image processing method as described above is implemented.

[0056] An embodiment of the above invention has the following advantages or beneficial effects: the present application receives an image processing request, obtains the corresponding machine identification, obtains a comparison image according to the machine identification, and obtains an experimental image based on the comparison image; extracts the first image feature value of the comparison image and the second image feature value of the experimental image respectively, and calculates the first similarity of the first image feature value and the second image feature value; extracts the first text of the comparison image and the second text of the experimental image respectively, and calculates the second similarity of the first text and the second text; determines and outputs the compatibility result data of the comparison image on each machine corresponding to the machine identification based on the first similarity and the second similarity. The present application embodiment can quickly and accurately determine whether the image is compatible on each experimental machine by using the first similarity based on the image and the second similarity based on the text.

[0057] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] The accompanying drawings are used to better understand the present application and do not constitute an improper limitation on the present application.

[0059] Figure 1 is a schematic diagram of the main process of an image processing method provided according to an embodiment of the present application;

[0060] Figure 2 is a schematic diagram of the main process of an image processing method provided according to an embodiment of the present application;

[0061] Figure 3 is a schematic diagram of an application scenario of an image processing method provided according to an embodiment of the present application;

[0062] Figure 4 is a schematic diagram of main units of an image processing device according to an embodiment of the present application;

[0063] Figure 5 is an exemplary system architecture diagram to which the embodiments of the present application can be applied;

[0064] Figure 6 It is a structural diagram of a computer system of a terminal device or server suitable for implementing an embodiment of the present application. DETAILED DESCRIPTION

[0065] The following is an explanation of the exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description. It should be noted that in the technical solution of the present disclosure, the collection, collection, update, analysis, processing, use, transmission, storage and other aspects of user personal information involved are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Take necessary measures for user personal information to prevent illegal access to user personal information data and maintain user personal information security, network security and national security.

[0066] Figure 1 is a schematic diagram of the main process of the image processing method provided according to an embodiment of the present application, such as Figure 1 As shown, the image processing method includes:

[0067] Step S101, receiving an image processing request, obtaining a corresponding machine identification, obtaining a comparison chart according to the machine identification, and obtaining an experimental chart based on the comparison chart.

[0068] In this embodiment, the execution subject of the image processing method (for example, it can be a server) can receive the image processing request by wired connection or wireless connection. The image processing request can be, for example, a request to determine the similarity of the image. After receiving the image processing request, the execution subject can obtain the machine identification carried in the request. The machine identification can include a comparison machine identification and an experimental machine identification. The number of experimental machine identifications can be one or more. The embodiment of the present application does not specifically limit the experimental machine identification and the number of experimental machine identifications. Specifically, a comparison chart can be obtained by recording the corresponding landing page according to the comparison machine identification. The landing page of the embodiment of the present application is a web page that jumps to the user after the user simulates a click operation to obtain the corresponding image. For the acquisition of the comparison chart, according to the recording rules of the platform, a machine (for example, a comparison machine identification corresponding to the obtained machine identification) is selected for the recording function, and the key area of ​​the image is intercepted during the recording process, which is the comparison chart. The recording process will be used as a template for playback, that is, the execution path. For the acquisition of experimental images, the playback function is performed according to the template obtained by recording. During the playback process, the corresponding landing page can be obtained. In the landing page, the key area is intercepted by the comprehensive image recognition algorithm and the comparison image. This area is the experimental image. Specifically, the number of experimental images corresponding to each experimental machine identifier can be one or more.

[0069] Step S102 , respectively extracting the first image feature value of the comparison image and the second image feature value of the experimental image, and calculating the first similarity between the first image feature value and the second image feature value.

[0070] Through a sliding window, that is, based on a fixed window, the entire image is traversed, and a local image is obtained each time the traversal is performed. The feature extraction model is called to extract the first image feature value corresponding to the local image of the comparison image and the second image feature value corresponding to the local image of the experimental image, and the first similarity between the first image feature value and the second image feature value is calculated. For the same experimental image (corresponding to the same experimental machine), the number of first similarities can be one or more. If the number of first similarities is multiple, the average can be taken as the final first similarity.

[0071] Step S103 , extracting the first text of the comparison image and the second text of the experimental image respectively, and calculating the second similarity between the first text and the second text.

[0072] The convolutional neural network is called to extract the text of the image to extract the first text corresponding to the partial image of the comparison image and the second text corresponding to the partial image of the experimental image. The second similarity between the first text and the second text is calculated, such as cosine similarity. For the same experimental image (corresponding to the same experimental machine), the number of second similarities can be one or more. If the number of second similarities is multiple, the average can be taken as the final second similarity.

[0073] Step S104: determining and outputting the compatible result data of the comparison graph on each machine corresponding to the machine identifier according to the first similarity and the second similarity.

[0074] The compatibility result data of the comparison graph corresponding to the comparison machine identifier on each experimental machine corresponding to the experimental machine identifier is comprehensively determined by the corresponding first similarity and second similarity. Through the compatibility result data, it can be determined whether the comparison graph corresponding to the comparison machine identifier is output and displayed with a loss lower than a preset threshold on the experimental machine corresponding to the experimental machine identifier. If so, it indicates that the comparison graph is compatible with each experimental machine. If not, it indicates that the comparison graph is incompatible with each experimental machine. The embodiment of the present application can quickly and accurately determine whether an image is compatible on each experimental machine by using the first similarity based on the image and the second similarity based on the text.

[0075] Specifically, the first similarity and the second similarity may be added, and the sum may be compared with a preset threshold. When the sum is greater than or equal to the preset threshold, the compatible result data is determined to be compatible; when the sum is less than the preset threshold, the compatible result data is determined to be incompatible.

[0076] This embodiment receives an image processing request, obtains the corresponding machine identification, obtains a comparison chart according to the machine identification, and obtains an experimental chart based on the comparison chart; extracts the first image feature value of the comparison chart and the second image feature value of the experimental chart respectively, and calculates the first similarity between the first image feature value and the second image feature value; extracts the first text of the comparison chart and the second text of the experimental chart respectively, and calculates the second similarity between the first text and the second text; determines and outputs the compatible result data of the comparison chart on each machine corresponding to the machine identification based on the first similarity and the second similarity. The embodiment of the present application can quickly and accurately determine whether an image is compatible on each experimental machine by using the first similarity based on the image and the second similarity based on the text.

[0077] Figure 2 is a schematic diagram of the main flow of an image processing method provided according to an embodiment of the present application, such as Figure 2 As shown, the image processing method includes:

[0078] Step S201, receiving an image processing request, obtaining a corresponding machine identification, and obtaining a comparison image according to the machine identification.

[0079] Specifically, obtaining a comparison chart according to a machine identifier includes: obtaining a landing page corresponding to the machine identifier; obtaining user demand data carried in an image processing request, and then intercepting a corresponding comparison chart from the landing page based on the user demand data.

[0080] The user demand data may be, for example, image data that the user wants to capture. The image processing request may carry a location identifier of the image data that the user wants to capture, and the image data that the user wants to capture is captured according to the location identifier.

[0081] Step S202, calling the sliding window, sliding on the comparison image to capture a local image.

[0082] Step S203, determining each local image as an experimental image.

[0083] Based on a fixed window (i.e. sliding window), the entire graph is traversed, and each traversal will obtain a local graph, which is then compared. The size of the specific sliding window can be set manually, and the size of the window can be set according to different scenarios.

[0084] Step S204 , extracting the first image feature value of the comparison image and the second image feature value of the experimental image respectively, and calculating the first similarity between the first image feature value and the second image feature value.

[0085] The first image feature value refers to the image feature value of the comparison image, and the second image feature value refers to the image feature value of the experimental image. The first similarity can be, for example, the cosine similarity of the first image feature value and the second image feature value. The embodiment of the present application does not specifically limit the type of the first similarity.

[0086] Specifically, the first similarity includes the overall image similarity and the local image similarity, and calculating the first similarity of the first image feature value and the second image feature value includes: calculating the overall similarity of the second image feature value corresponding to the overall image composed of the experimental image and the first image feature value corresponding to the overall comparison image; calculating the local similarity of the second image feature value corresponding to the local image and the first image feature value of the local image corresponding to the comparison image; and determining the first similarity based on the overall similarity and the local similarity.

[0087] The feature values ​​of the whole image and the local image of the comparison image are respectively calculated with the feature values ​​of the whole image and the local image of the experimental image to obtain the whole similarity of the whole image of the comparison image and the whole image of the experimental image, and the local similarity of the local image of the comparison image and the local image of the experimental image. The whole similarity and the local similarity are weighted averaged according to the preset weights to obtain the first similarity.

[0088] Specifically, based on the overall similarity and the local similarity, the first similarity is determined, including: obtaining an overall weight (e.g., k1) and a local weight (e.g., k2); according to the overall weight, the overall similarity (e.g., a1), the local weight and the local similarity (e.g., a2), determining the first similarity s1, for example, s1=k1*a1+k2*a2.

[0089] Step S205 , extracting the first characters of the comparison image and the second characters of the experimental image respectively, and calculating the second similarity between the first characters and the second characters.

[0090] Specifically, calculating the second similarity between the first character and the second character includes: segmenting the first character to obtain a first character segmentation, segmenting the second character to obtain a second character segmentation; and calculating the similarity between each first character segmentation and each second character segmentation to obtain the second similarity.

[0091] Specifically, the word segmentation model can be called to perform word segmentation processing on the first character and the second character based on the context semantics to obtain the first character word segmentation and the second character word segmentation respectively. The cosine similarity between the first character word segmentation and the second character word segmentation is calculated as the second similarity.

[0092] Step S206: According to the first similarity and the second similarity, the compatible result data of the comparison graph on each machine corresponding to the machine identifier is determined and output.

[0093] Specifically, based on the first similarity and the second similarity, the compatibility result data of the comparison image on each machine corresponding to the machine identification is determined, including: obtaining image weight and text weight; calculating a first product of the image weight and the first similarity, and calculating a second product of the text weight and the second similarity; based on the first product and the second product, determining the compatibility result data of the comparison image on each machine corresponding to the machine identification. The compatibility result data can determine whether the comparison image corresponding to the comparison machine identification is output and displayed with a loss lower than a preset threshold on the experimental machine corresponding to the experimental machine identification. If so, it indicates that the comparison image is compatible with each experimental machine. If not, it indicates that the comparison image is incompatible with each experimental machine. The embodiment of the present application can quickly and accurately determine whether the image is compatible on each experimental machine by combining the first similarity based on the image and the second similarity based on the text.

[0094] For example, the image weight is x1, the text weight is x2, the first similarity is y1, and the second similarity is y2. Then the compatible result data j can be x1*y1+x2*y2.

[0095] The embodiment of the present application can improve the accuracy of judging the compatibility results of images on various experimental machines by combining image similarity and text similarity.

[0096] Figure 3 It is a schematic diagram of the application scenario of the image processing method provided according to an embodiment of the present application. The image processing method of the embodiment of the present application can be applied to the scenario of compatibility judgment of images in different machines. In the embodiment of the present application, the structural similarity index metric (SSIM) is used to evaluate the similarity level between two images. Histograms are divided into grayscale histograms and RGB histograms. The calculation of grayscale image histograms is very simple. Just initialize a histogram array H of size 256, and then complete the frequency distribution statistics based on the pixel values. Sliding window, set a window size, and traverse the graph. Dimensionlessness, also known as data normalization, refers to the fact that different indicators are not comparable due to different dimensions. Therefore, the indicators must be dimensionless first, and the dimension effect must be eliminated before the next analysis. Such as Figure 3As shown, the embodiment of the present application integrates script recording and playback, sliding window similarity calculation and classification algorithm to identify image compatibility problems. First, the method requires the user to simulate a click operation to obtain the corresponding image, then use the sliding window to block the image, use hashing, structural similarity, histogram and other methods to calculate the similarity between the images, and finally, use the value of each similarity as the input value of the classification algorithm, that is, the feature value of the model. According to the input of these features, a model that can distinguish images is learned. This invention solves the problem that the prior art requires users to write scripts, manually set thresholds, and potential interference from local noise. First, data acquisition is performed: for example, the acquisition of experimental images and comparison images, and the comparison images and experimental images are obtained using the script recording and playback function. For the acquisition of the comparison image, according to the recording rules of the platform, a device is selected for the recording function, and the key area of ​​the image is intercepted during the recording process, which is the comparison image. The recording process will be used as a template for playback, that is, the execution path. For the acquisition of experimental images, the playback function is performed according to the template obtained by recording. During the playback process, the corresponding landing page can be obtained. In this landing page, the image recognition algorithm in the comprehensive image comparison model intercepts the key area from the comparison image, which is the experimental image, to obtain the experimental image. Data preprocessing: For script recording and playback, the recording process needs to intercept the image that the user wants to compare. There may be image loss during the interception process, resulting in noise interference during the playback process. Therefore, it is necessary to perform image enhancement processing on the recorded comparison image to improve the accuracy of the experimental image obtained by playback. The playback is to obtain the experimental image on models with different resolutions. This process will cause the size of the obtained experimental image to be different. Therefore, it is necessary to compare the size of the experimental image and the comparison image, and compress the larger size according to the smaller size. Compressed images are more likely to retain the clarity of the image than enlarged images. After obtaining the experimental image, the experimental image can be enhanced, converted to grayscale, denoised, and other operations before performing compatible experiments. The use of the model, the embodiment of the present application is based on a sliding window, a combination of multiple similarity calculations and logistic regression algorithms to conduct experiments, the purpose is to improve the image comparison speed, while eliminating the interference caused by local area noise on the overall image area as much as possible. The specific implementation method is as follows: The implementation method of the sliding window is based on a fixed window to traverse the entire image, each traversal will obtain a local image, and then the local image will be compared. The size of the specific window can be set manually, and setting the size of the window according to different scenarios is more in line with the actual situation. The acquisition and processing of the eigenvalues, using mean hashing (aHash), difference hashing (dHash), perceptual hashing (pHash), single-channel histogram, three-channel histogram and SSIM algorithms to calculate the similarity value of each block of comparison images obtained by the sliding window, and then perform overall and local comparisons to obtain comparison results. The similarity value of each block of comparison images obtained is the eigenvalue, and then the relevant features are obtained, and relevant data preprocessing operations need to be performed on it, including deletion of dirty data, interpolation, normalization, etc.The purpose of feature normalization is to make it dimensionless and reduce the risk of a larger eigenvalue causing a greater reliance on the model's weights.

[0097] The embodiment of the present application uses logistic regression for image classification. In the logistic regression analysis, the dependent variable (label) is a binary variable, and its value Y=1 and Y=0 represent the same image and different image respectively. The independent variable is each similarity value, which can be expressed as X1, X2, ..., Xn. The conditional probability under the action of the independent variable is expressed as P=P(Y=1|X1, X2, ..., Xn), then the logistic regression model (i.e., classification model) can be expressed as:

[0098] z i =w0+w1X i1 +…+w n x in

[0099]

[0100] Among them, z i is the intermediate variable, w is the weight, and P is the model.

[0101] In the process of conducting compatibility experiments, in order to solve the impact of text truncation and missing, the embodiment of the present application uses a convolutional neural network (such as a text recognition model) to extract text from the image. First, the acquired text is segmented and vectorized, and then similarity is calculated. Finally, the compatibility is determined to be successful based on the image similarity (i.e., classification result) and the text similarity comprehensive result. If the image classification result is the same image classification and the text similarity is greater than the preset threshold, it is determined that the compatibility is passed. If the image classification result is different image classification and / or the text similarity is less than the preset threshold, it is determined that the compatibility is not passed.

[0102] The embodiment of the present application can achieve the effect of automated compatibility testing without the need for the user to write scripts. The threshold of image similarity is set by statistical methods, without human intervention, which is more convincing. Local annotation can improve the accuracy of classification model recognition, and can improve the accuracy of image compatibility judgment through text recognition.

[0103] Figure 4 is a schematic diagram of the main units of the image processing device according to an embodiment of the present application. Figure 4 As shown, the image processing device 400 includes a receiving unit 401 , a first calculating unit 402 , a second calculating unit 403 and an output unit 404 .

[0104] The receiving unit 401 is configured to receive an image processing request, obtain a corresponding machine identification, obtain a comparison chart according to the machine identification, and obtain an experimental chart based on the comparison chart.

[0105] The first calculation unit 402 is configured to extract the first image feature value of the comparison image and the second image feature value of the experimental image respectively, and calculate a first similarity between the first image feature value and the second image feature value.

[0106] The second calculation unit 403 is configured to extract the first text of the comparison image and the second text of the experimental image respectively, and calculate the second similarity between the first text and the second text.

[0107] The output unit 404 is configured to determine and output the compatible result data of the comparison graph on each machine corresponding to the machine identifier according to the first similarity and the second similarity.

[0108] In some embodiments, the receiving unit 401 is further configured to: obtain a landing page corresponding to the machine identifier; obtain user demand data carried in the image processing request, and then intercept a corresponding comparison image from the landing page based on the user demand data.

[0109] In some embodiments, the receiving unit 401 is further configured to: call a sliding window to slide on the comparison image to capture a local image; and determine each local image as an experimental image.

[0110] In some embodiments, the first calculation unit 402 is further configured to: calculate the overall similarity between the second image feature value corresponding to the overall image of the experimental image and the first image feature value corresponding to the overall comparison image; calculate the local similarity between the second image feature value corresponding to the local image and the first image feature value corresponding to the local image in the comparison image; and determine the first similarity based on the overall similarity and the local similarity.

[0111] In some embodiments, the first calculation unit 402 is further configured to: obtain the overall weight and the local weight; and determine the first similarity according to the overall weight, the overall similarity, the local weight and the local similarity.

[0112] In some embodiments, the second computing unit 403 is further configured to: segment the first text to obtain first text segments, segment the second text to obtain second text segments; and calculate the similarity between each first text segment and each second text segment to obtain a second similarity.

[0113] In some embodiments, the output unit 404 is further configured to: obtain image weight and text weight; calculate a first product of the image weight and the first similarity, and calculate a second product of the text weight and the second similarity; and determine the compatible result data of the comparison image on each machine corresponding to the machine identifier based on the first product and the second product.

[0114] It should be noted that the image processing method and the image processing device of the present application have a corresponding relationship in terms of specific implementation contents, so the repeated contents will not be described again.

[0115] Figure 5 An exemplary system architecture 500 to which the image processing method or image processing apparatus according to the embodiments of the present application can be applied is shown.

[0116] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0117] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0118] The terminal devices 501 , 502 , and 503 may be various electronic devices having an image processing screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0119] Server 505 can be a server that provides various services, such as a background management server that provides support for image processing requests submitted by users using terminal devices 501, 502, and 503 (only as an example). The background management server can receive an image processing request, obtain a corresponding machine identification, obtain a comparison chart based on the machine identification, and obtain an experimental chart based on the comparison chart; respectively extract the first image feature value of the comparison chart and the second image feature value of the experimental chart, and calculate the first similarity of the first image feature value and the second image feature value; respectively extract the first text of the comparison chart and the second text of the experimental chart, and calculate the second similarity of the first text and the second text; based on the first similarity and the second similarity, determine and output the compatibility result data of the comparison chart on each machine corresponding to the machine identification. The embodiment of the present application can quickly and accurately determine whether an image is compatible on each experimental machine by using the first similarity based on the image and the second similarity based on the text.

[0120] It should be noted that the image processing method provided in the embodiment of the present application is generally executed by the server 505 , and accordingly, the image processing device is generally arranged in the server 505 .

[0121] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0122] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present application. Figure 6 The terminal device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0123] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the computer system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0124] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0125] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present application are executed.

[0126] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. Computer-readable storage media may include, for example, but are not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0127] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0128] The units involved in the embodiments described in the present application may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes a receiving unit, a first computing unit, a second computing unit, and an output unit. The names of these units do not constitute limitations on the units themselves in some cases.

[0129] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device receives an image processing request, obtains a corresponding machine identification, obtains a comparison chart according to the machine identification, and obtains an experimental chart based on the comparison chart; extracts the first image feature value of the comparison chart and the second image feature value of the experimental chart respectively, and calculates the first similarity between the first image feature value and the second image feature value; extracts the first text of the comparison chart and the second text of the experimental chart respectively, and calculates the second similarity between the first text and the second text; and determines and outputs the compatible result data of the comparison chart on each machine corresponding to the machine identification according to the first similarity and the second similarity.

[0130] According to the technical solution of the embodiment of the present application, whether the image is compatible on various experimental machines can be quickly and accurately determined through the first similarity based on the image and the second similarity based on the text.

[0131] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. An image processing method, characterized in that: include: receiving an image processing request, obtaining a corresponding machine identification, obtaining a comparison chart according to the machine identification, and obtaining an experimental chart based on the comparison chart; Extracting a first image feature value of the comparison image and a second image feature value of the experimental image respectively, and calculating a first similarity between the first image feature value and the second image feature value; extracting the first characters of the comparison image and the second characters of the experimental image respectively, and calculating the second similarity between the first characters and the second characters; According to the first similarity and the second similarity, compatible result data of the comparison chart on each machine corresponding to the machine identifier is determined and output.

2. The method according to claim 1, characterized in that The obtaining of the comparison chart according to the machine identification includes: Obtain a landing page corresponding to the machine identifier; The user demand data carried in the image processing request is obtained, and then a corresponding comparison chart is intercepted from the landing page based on the user demand data.

3. The method according to claim 1, characterized in that The step of obtaining the experimental graph based on the comparison graph comprises: Calling a sliding window to slide on the comparison image to capture a local image; Each of the local images is determined as an experimental image.

4. The method according to claim 1, characterized in that: The first similarity includes overall image similarity and local image similarity, and the calculating the first similarity between the first image feature value and the second image feature value includes: Calculate the overall similarity between the second image feature value corresponding to the overall image composed of the experimental images and the first image feature value corresponding to the overall comparison image; Calculate the local similarity between the second image feature value corresponding to the local image and the first image feature value corresponding to the local image in the comparison image; Based on the overall similarity and the local similarity, a first similarity is determined.

5. The method according to claim 4, characterized in that The determining of the first similarity based on the overall similarity and the local similarity includes: Get the overall weight and local weight; A first similarity is determined according to the overall weight, the overall similarity, the local weight and the local similarity.

6. The method according to claim 1, characterized in that The calculating the second similarity between the first character and the second character includes: Segmenting the first character to obtain first character segmentation, and segmenting the second character to obtain second character segmentation; The similarity between each of the first text segmentations and each of the second text segmentations is calculated to obtain a second similarity.

7. The method according to claim 1, characterized in that The determining, according to the first similarity and the second similarity, the compatibility result data of the comparison graph on each machine corresponding to the machine identifier includes: Get image weight and text weight; Calculating a first product of the image weight and the first similarity, and calculating a second product of the text weight and the second similarity; Compatibility result data of the comparison chart on each machine corresponding to the machine identifier is determined according to the first product and the second product.

8. An image processing device, characterized in that: include: A receiving unit is configured to receive an image processing request, obtain a corresponding machine identification, obtain a comparison chart according to the machine identification, and obtain an experimental chart based on the comparison chart; A first calculation unit is configured to extract a first image feature value of the comparison image and a second image feature value of the experimental image, respectively, and calculate a first similarity between the first image feature value and the second image feature value; A second calculation unit is configured to extract the first text of the comparison image and the second text of the experimental image respectively, and calculate a second similarity between the first text and the second text; The output unit is configured to determine and output the compatibility result data of the comparison chart on each machine corresponding to the machine identifier according to the first similarity and the second similarity.

9. The device according to claim 8, characterized in that The receiving unit is further configured to: Obtain a landing page corresponding to the machine identifier; The user demand data carried in the image processing request is obtained, and then a corresponding comparison chart is intercepted from the landing page based on the user demand data.

10. The device according to claim 8, characterized in that The receiving unit is further configured to: Calling a sliding window to slide on the comparison image to capture a local image; Each of the local images is determined as an experimental image.

11. An image processing electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

12. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Document display effect evaluation method and device and computer readable storage medium

    CN111079037A

  • Image search method, device, equipment and computer readable medium

    CN111782841A

  • Method and device for monitoring webpage

    CN112306793A

  • UI data testing method and device

    CN115373920A

  • Browser interface processing method and device, processor and electronic equipment

    CN115690467A