A method and storage medium for searching within an APP site
Through the image comparison engine and OCR recognition service, the similarity and offset between the candidate image and the image to be searched are automatically calculated, which enables efficient and accurate jump to the specified page during the search within the APP site, solves the problem of inaccurate user input of keywords in the existing technology, and improves the user experience.
Patent Information
- Application Number
- CN202310568948.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-19
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2043-05-19
AI Technical Summary
Existing APP site search methods have inaccuracies and operational complexity when users enter keywords, especially for users who are not familiar with typing or speak non-standard Mandarin, it is difficult to accurately jump to the specified page.
The image comparison engine is used to obtain a long screenshot of the page corresponding to the image to be searched, and the similarity between the candidate image and the image to be searched is calculated. The offset data is used to automatically jump to the business processing area of the specified page, and the title text is extracted in combination with the OCR recognition service to obtain the page configuration information.
It improves the accuracy and efficiency of in-app searches, reduces user operation difficulty, and optimizes user experience.
Smart Images

Figure CN116796061B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and storage medium for searching within an APP site. Background Art
[0002] For existing app site searches, operators first configure the correspondence between text keywords and activity page paths in the management backend. Each activity page has one or more keywords and a unique activity title. The user then enters keywords on the app's search page. These keywords can come from either the input method keyboard or text transcribed from the user's voice. The app sends the user-entered keywords to the web server to initiate a search request. The web server retrieves the correspondence between the keywords and activity pages and returns summary results of eligible pages, such as the activity title and page path, to the app. The app then displays the results list on the search interface, and the user selects which activity page to jump to.
[0003] Although this method can realize in-app search, the existing APP activity pages are rich and diverse, and it is not easy to summarize the content of an activity with only a few words of keywords. Keywords with similar meanings may correspond to different activity pages, such as "attracting new users" and "welcoming new users", which requires users to remember accurately. In addition, for users who are not familiar with mobile phone typing or whose Mandarin is not standard, the existing in-app keyword search function has many inconveniences. Summary of the Invention
[0004] The technical problem to be solved by the present invention is: the present invention provides a method and storage medium for searching within an APP site, which can improve the accuracy of searching within the APP site while automatically scrolling the page to a specified area to optimize the user experience.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0006] In a first aspect, the present invention provides a method for searching within an APP site, comprising:
[0007] The backend server obtains the image to be searched from the application end, obtains corresponding page configuration information according to the image to be searched, and sends the page configuration information and the image to be searched to the image comparison engine;
[0008] The image comparison engine obtains the corresponding long screenshot of the page and the offset data of each business handling area in the long screenshot of the page according to the page configuration information, and respectively extracts candidate images that are highly consistent with the image to be searched from the long screenshot of the page according to the offset data;
[0009] The image comparison engine calculates the similarity between each candidate image and the image to be searched, takes the candidate image with the highest similarity as the first candidate image, obtains the current offset distance of the first candidate image, calculates the final movement distance based on the current offset distance, and sends the final movement distance and the page configuration information to the application end. The final movement distance and the page configuration information are used to instruct the application end to automatically jump to the corresponding page and move to the corresponding business processing area.
[0010] The beneficial effects of the present invention are: obtaining a long screenshot of the page corresponding to the image to be searched through an image comparison engine, and then intercepting a candidate image that is highly consistent with the image to be searched based on the offset data of each business processing area in the long screenshot of the page, selecting the candidate image with the highest similarity as the first candidate image, and calculating the final moving distance with the current offset distance of the first candidate image, thereby improving the accuracy of the final moving distance calculation, and sending the final moving distance and page configuration information to the application end so that the application end can automatically jump to the corresponding page and move to the corresponding business processing area, thereby improving the efficiency and accuracy of the search within the APP site, lowering the user usage threshold, simplifying user operations, and optimizing user experience.
[0011] Optionally, the backend server acquiring corresponding page configuration information according to the image to be searched includes:
[0012] The backend server deletes the fixed area of the image to be searched to obtain the deleted image to be searched;
[0013] A title image is intercepted from the deleted images to be searched, and title recognition is performed on the title image through an OCR recognition service to obtain title text, and corresponding page configuration information is obtained according to the title text.
[0014] According to the above description, the title image is captured from the image to be searched after deleting the fixed area, avoiding interference from irrelevant factors and improving the accuracy of the title image, thereby improving the recognition results of the OCR recognition service and obtaining accurate title text and corresponding page configuration information.
[0015] Optionally, extracting a title image from the deleted images to be searched and performing title recognition on the title image through an OCR recognition service includes:
[0016] Binarizing the title image to obtain a grayscale title image, and obtaining a grayscale value of the grayscale title image;
[0017] When the grayscale value exceeds the grayscale threshold, the grayscale value is adjusted to a first grayscale standard; otherwise, the grayscale value is adjusted to a second grayscale standard to obtain an adjusted grayscale title picture;
[0018] The title recognition is performed on the grayscale title image through an OCR recognition service.
[0019] According to the above description, before performing title recognition on the title image, the title image is first binarized to obtain a grayscale title image, and different grayscale value adjustments are performed according to the grayscale value of the obtained grayscale title image, thereby improving the success rate and accuracy of OCR recognition.
[0020] Optionally, obtaining a current offset distance of the first candidate image, calculating a final movement distance according to the current offset distance, and sending the final movement distance and the page configuration information to the application end includes:
[0021] Taking the first candidate image as the starting point, obtaining the upward offset distance of the first business processing area above the first candidate image, calculating the upward offset difference between the current offset distance and the upward offset distance, and taking half of the upward offset difference as the upward movement distance;
[0022] Moving the long screenshot of the page according to the upward moving distance, and capturing a second candidate image having the same height as the image to be searched from the moved long screenshot of the page;
[0023] Calculating the similarity between the second candidate image and the image to be searched, and if the similarity reaches a similarity threshold, stopping the movement, taking the upward movement distance as the final movement distance, and sending the final movement distance and the page configuration information of the second candidate image to the application end;
[0024] Otherwise, the previous upward offset difference is used as the current offset distance and the upward movement distance is recalculated;
[0025] If the upward movement distance is less than the movement threshold, taking the first candidate image as the starting point, obtaining the downward offset distance of the first business processing area below the first candidate image, calculating the downward offset difference between the current offset distance and the downward offset distance, and taking half of the downward offset difference as the downward movement distance;
[0026] Moving the long screenshot of the page according to the downward movement distance, and capturing a third candidate image having the same height as the image to be searched from the moved long screenshot of the page;
[0027] Calculating the similarity between the third candidate image and the image to be searched, and if the similarity reaches a similarity threshold, stopping the movement, taking the downward movement distance as the final movement distance, and sending the final movement distance and the page configuration information of the third candidate image to the application end;
[0028] Otherwise, the previous downward offset difference is used as the current offset distance and the downward movement distance is recalculated.
[0029] According to the above description, the calculation of the final moving distance is to first calculate the upward moving distance with the first candidate image as the starting point. The upward movement stops when the similarity of the intercepted second candidate image reaches the similarity threshold or the upward movement distance is less than the movement threshold. When the upward movement distance is less than the movement threshold, it will move in the opposite direction, that is, move downward. Movement in different directions improves the flexibility and accuracy of the final moving distance calculation.
[0030] Optionally, sending the final movement distance to the application end further includes:
[0031] Taking the first candidate image as a starting point, respectively obtaining an upward offset distance of the first business processing zone upward and a downward offset distance of the first business processing zone downward of the first candidate image, and calculating an upward offset sum of the current offset distance and the upward offset distance, and a downward offset sum of the current offset distance and the downward offset distance;
[0032] Take out the historical offset distance between half of the upward offset value and half of the downward offset value, calculate the average value of the historical offset distance, and correct the offset data of each business processing area in the long screenshot of the page according to the average value.
[0033] According to the above description, after obtaining the final moving distance, the offset data of each business processing area in the long screenshot of the page will be corrected using the historical offset distance, thereby overcoming the inaccuracy of the offset data of each business processing area in the initial long screenshot of the page and improving the efficiency of the subsequent final moving distance calculation.
[0034] Optionally, the correcting the offset data of each business handling area in the long screenshot of the page according to the average value includes:
[0035] Using the average value as a correction value, respectively obtain the offset data of each business processing area in the long screenshot of the page;
[0036] Subtracting the offset data of the business processing area located above the first candidate image from the correction amount to obtain offset data after subtraction, and using the offset data as the corrected offset data of the business processing area;
[0037] The offset data of the business processing area located below the first candidate image is added to the correction amount to obtain added offset data, and the offset data is used as the corrected offset data of the business processing area.
[0038] According to the above description, it can be seen that the offset data of the business processing areas above and below the first candidate image are modified differently to improve the accuracy of the corrected offset data.
[0039] Optionally, the page configuration information includes a page path.
[0040] According to the above description, you can quickly jump to the corresponding page through the page path.
[0041] Optionally, the similarity threshold is 82% to 98%.
[0042] In a second aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed, the method for searching within an APP site described in the first aspect is implemented.
[0043] Among them, the computer-readable storage medium provided in the second aspect has the corresponding technical effect referring to the relevant description of the method for searching within an APP site provided in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A flowchart of a method for searching within an APP site provided by an embodiment of the present invention;
[0045] Figure 2 A flowchart of a method for searching within an APP site provided by an embodiment of the present invention;
[0046] Figure 3 These are the various business processing areas in the long screenshot of the page involved in the present invention. DETAILED DESCRIPTION
[0047] To better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. Instead, these embodiments are provided to enable a clearer and more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0048] Example 1
[0049] Please refer to Figures 1 to 3 The present invention provides a method for searching within an APP site, comprising the steps of:
[0050] S1. The backend server obtains a picture to be searched from the application end, obtains corresponding page configuration information according to the picture to be searched, and sends the page configuration information and the picture to be searched to the image comparison engine;
[0051] in, Figure 2 The WEB server in is the background server described in the present invention.
[0052] In this embodiment, if Figure 2 As shown, taking a mobile device as an example, the user opens the search interface of the mobile APP, which is the application end of the mobile device, and uploads a screenshot of an activity page. Figure 2 The user search screenshot in the, the screenshot here can be a screenshot taken by the user after browsing the activity page last time, or it can be a screenshot shared by others to the user. After the application end receives the user search picture, it will send the user search picture, that is, the picture to be searched as described in the present invention, to the background server.
[0053] At this time, the backend server in step S1 obtains the corresponding page configuration information according to the image to be searched, including:
[0054] S11, the backend server deletes a fixed area of the image to be searched to obtain the deleted image to be searched;
[0055] In this embodiment, the background server deletes a fixed area of the image to be searched, such as the status bar area at the top of the image to be searched and the task bar area at the bottom.
[0056] S12. Extract the title image from the deleted images to be searched, perform title recognition on the title image through an OCR recognition service to obtain title text, and obtain corresponding page configuration information according to the title text.
[0057] In this embodiment, the background server will cut out the title image from above the deleted image to be searched, perform title recognition through the OCR (Optical Character Recognition) recognition service, and obtain the title text. Since the operator has previously associated and saved the page configuration information corresponding to the title text to the database server, the corresponding page configuration information can be obtained based on the obtained title text. The page configuration information here includes but is not limited to the title text, page path, long screenshot of the page, and the offset data of each business processing area in the long screenshot of the page.
[0058] At this time, the step S12 of extracting the title image from the deleted image to be searched and performing title recognition on the title image through the OCR recognition service includes:
[0059] S121, binarizing the title image to obtain a grayscale title image, and acquiring a grayscale value of the grayscale title image;
[0060] S122: When the grayscale value exceeds the grayscale threshold, the grayscale value is adjusted to a first grayscale standard; otherwise, the grayscale value is adjusted to a second grayscale standard to obtain an adjusted grayscale title image;
[0061] In this embodiment, the title image is binarized to obtain a grayscale title image, and the grayscale value of the grayscale title image is obtained. When the grayscale value exceeds the grayscale threshold, the grayscale threshold is set to 80, that is, the grayscale value exceeds 80, and the grayscale value is adjusted to the first grayscale standard, and the first grayscale standard is set to 255, that is, the grayscale value is adjusted to 255. Conversely, when the grayscale value does not exceed 80, the grayscale value is adjusted to the second grayscale standard, and the second grayscale standard is set to 0, that is, the grayscale value is adjusted to 0.
[0062] S123: Perform title recognition on the grayscale title image through OCR recognition service.
[0063] S2. The image comparison engine obtains the corresponding long screenshot of the page and the offset data of each business handling area in the long screenshot of the page according to the page configuration information, and selects candidate images that are highly consistent with the image to be searched from the long screenshot of the page according to the offset data;
[0064] In this embodiment, the page screenshot is stored in a file server, such as Figure 3 As shown, the offset data of each business processing area in the long screenshot of the page includes the initial area offset D0 at the top of the long screenshot of the page, and when the initial area offset is 0, it means that the page cannot be moved, the offset distance of each business processing area in the long screenshot of the page, such as the offset distance of the life business processing area is Figure 3 The living area is offset by D1, and the offset distance of the travel business processing area is Figure 3 The appearance area offset D2 in the image is used, and candidate images that are highly consistent with the image to be searched are captured from the long screenshot of the page according to the offset distance of each business processing area.
[0065] S3. The image comparison engine calculates the similarity between each candidate image and the image to be searched, takes the candidate image with the highest similarity as the first candidate image, obtains the current offset distance of the first candidate image, calculates the final moving distance based on the current offset distance, and sends the final moving distance and the page configuration information to the application end. The final moving distance and the page configuration information are used to instruct the application end to automatically jump to the corresponding page and move to the corresponding business processing area.
[0066] In this embodiment, the image comparison engine calculates the similarity between each candidate image and the image to be searched by calling OpenCV in Python. The similarity value range here is (0, 1]. The larger the similarity value, the more similar it is. When the similarity value is 1, it means that the candidate image is exactly the same as the image to be searched.
[0067] At this time, the steps of obtaining the current offset distance of the first candidate image in step S3, calculating the final moving distance according to the current offset distance, and sending the final moving distance and the page configuration information to the application end include:
[0068] S31: Taking the first candidate image as a starting point, obtaining an upward offset distance of the first business processing area above the first candidate image, calculating an upward offset difference between the current offset distance and the upward offset distance, and taking half of the upward offset difference as an upward movement distance;
[0069] In this embodiment, the first candidate image is taken as the starting point and first moved upwards, that is, the upward offset distance of the first business processing area upwards of the first candidate image is obtained, such as Figure 3 As shown, when the starting point of the first candidate image is the living area offset D1, that is, the current offset distance of the first candidate image is D1, the first business processing area upward from D1 is the initial area offset D0, that is, the upward offset distance is D0, the upward offset difference = current offset distance - upward offset distance = D1-D0, and half of the upward offset difference, that is, (D1-D0) / 2, is taken as the upward moving distance.
[0070] S32, moving the long screenshot of the page according to the upward moving distance, and capturing a second candidate image having a height consistent with the image to be searched from the moved long screenshot of the page;
[0071] S33: Calculate the similarity between the second candidate image and the image to be searched. If the similarity reaches a similarity threshold, stop moving, use the upward moving distance as the final moving distance, and send the final moving distance and the page configuration information of the second candidate image to the application end.
[0072] At this time, the similarity threshold in step S33 is 82% to 98%. That is, when the similarity between the second candidate image and the image to be searched is between 82% and 98%, the movement stops, and the upward movement distance at this time, i.e., (D1-D0) / 2, is used as the final movement distance. Preferably, the similarity threshold can be set to 90%.
[0073] S34. Otherwise, the previous upward offset difference is used as the current offset distance, and the upward movement distance is recalculated;
[0074] In this embodiment, if the similarity between the second candidate image and the image to be searched does not reach the similarity threshold, the image continues to move upward, and the previous upward offset difference, i.e., D1-D0, is used as the current offset distance, and the upward offset difference and upward moving distance are recalculated.
[0075] S35. If the upward movement distance is less than the movement threshold, taking the first candidate image as the starting point, obtain the downward offset distance of the first business processing area below the first candidate image, calculate the downward offset difference between the current offset distance and the downward offset distance, and take half of the downward offset difference as the downward movement distance;
[0076] In this embodiment, if the upward movement distance is less than the movement threshold, the first candidate image is moved in the opposite direction as the starting point, that is, moved downward. Here, the movement threshold is set to 30, that is, the upward movement distance is less than 30, such as: (D1-D0) / 2<30, then the downward offset distance of the first business processing area below the first candidate image is obtained, such as Figure 3 As shown, when the starting point of the first candidate image is the living area offset D1, that is, the current offset distance of the first candidate image is D1, the first business processing area downward from D1 is the travel area offset D2, that is, the downward offset distance is D2, the downward offset difference = downward offset distance - current offset distance = D2-D1, and half of the downward offset difference, that is, (D2-D1) / 2, is taken as the downward moving distance.
[0077] S36, moving the long screenshot of the page according to the downward movement distance, and capturing a third candidate image having a height consistent with the image to be searched from the moved long screenshot of the page;
[0078] S37, calculating the similarity between the third candidate image and the image to be searched, and if the similarity reaches a similarity threshold, stopping the movement, taking the downward movement distance as the final movement distance, and sending the final movement distance and the page configuration information of the third candidate image to the application end;
[0079] S38. Otherwise, the previous downward offset difference is used as the current offset distance, and the downward movement distance is recalculated.
[0080] In this embodiment, the similarity threshold between the third candidate image and the image to be searched is consistent with that in step S33, and is between 82% and 98%. That is, when the similarity between the third candidate image and the image to be searched is between 82% and 98%, the movement stops, and the downward movement distance at that time, i.e., (D2-D1) / 2, is used as the final movement distance. Preferably, the similarity threshold can be set to 90%. If the similarity between the third candidate image and the image to be searched does not reach the similarity threshold, the downward movement continues, and the previous downward offset difference, i.e., D2-D1, is used as the current offset distance, and the downward offset difference and downward movement distance are recalculated.
[0081] At this time, sending the final moving distance to the application end in step S3 further includes:
[0082] S39. Taking the first candidate image as a starting point, respectively obtain an upward offset distance of the first business processing zone upward and a downward offset distance of the first business processing zone downward of the first candidate image, and calculate an upward offset sum of the current offset distance and the upward offset distance, and a downward offset sum of the current offset distance and the downward offset distance;
[0083] In a specific embodiment, Figure 3 As shown, when the current offset distance of the first candidate image is D1, that is, the living area offset D1, the upward offset distance of the first business processing area of the first candidate image, that is, the initial area offset D0, and the downward offset distance of the first business processing area, that is, the travel area offset D2, are obtained, and the upward offset sum D1+D0 of the current offset distance and the upward offset distance and the downward offset sum D1+D2 of the current offset distance and the downward offset distance are calculated.
[0084] S40. Take out the historical offset distance between half of the upward offset sum value and half of the downward offset sum value, calculate the average value of the historical offset distance, and correct the offset data of each business processing area in the long screenshot of the page according to the average value.
[0085] In this embodiment, the historical offset distance between half of the upward offset value and half of the downward offset value calculated in step S39, that is, the historical offset distance between (D1+D0) / 2 and (D1+D2) / 2 is taken out, and the average value of the historical offset distance is calculated. Based on the average value, the offset data of each business processing area in the long screenshot of the page is corrected.
[0086] At this time, the step S40 of correcting the offset data of each business handling area in the long screenshot of the page according to the average value includes:
[0087] S401: Using the average value as a correction value, respectively obtain the offset data of each business processing area in the long screenshot of the page;
[0088] S402: Subtract the offset data of the business processing area located above the first candidate image from the correction value to obtain offset data after subtraction, and use the offset data as the corrected offset data of the business processing area;
[0089] S403: Add the offset data of the business processing area located below the first candidate image to the correction amount to obtain added offset data, and use the offset data as the corrected offset data of the business processing area.
[0090] In this embodiment, the average value calculated in step S40 is used as the correction value to correct the offset data of each business processing area in the long screenshot of the page. For example, the average value is D - , the offset data of the business handling area located above the first candidate image is the initial area offset D0, and the corrected offset data, that is, the initial area offset, is D0-D - , the offset data of the business handling area located below the first candidate image is the travel area offset D2, and the corrected offset data is the travel area offset D - +D2.
[0091] Example 2
[0092] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed, the steps in the above-mentioned embodiment 1 are implemented.
[0093] Since the systems / devices described in the above embodiments of the present invention are systems / devices used to implement the methods of the above embodiments of the present invention, those skilled in the art will be able to understand the specific structures and variations of these systems / devices based on the methods described in the above embodiments of the present invention, and thus will not be described in detail here. All systems / devices used in the methods of the above embodiments of the present invention are within the scope of protection of the present invention.
[0094] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0095] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions.
[0096] It should be noted that, in the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In claims enumerating several means, several of these means may be embodied by one and the same hardware. The use of the words first, second, third etc. is for convenience only and does not indicate any order. These words may be understood as part of the component name.
[0097] In addition, it should be noted that, in the description of this specification, the description of the terms "one embodiment", "some embodiments", "embodiment", "example", "specific example" or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.
[0098] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments after learning the basic creative concept. Therefore, the claims should be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0099] Obviously, those skilled in the art may make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if such modifications and variations fall within the scope of the claims and their equivalents, the present invention shall also include such modifications and variations.
Claims
1. A method for searching within an APP site, characterized in that: include: The backend server obtains the image to be searched from the application end, obtains corresponding page configuration information according to the image to be searched, and sends the page configuration information and the image to be searched to the image comparison engine; The image comparison engine obtains the corresponding long screenshot of the page and the offset data of each business handling area in the long screenshot of the page according to the page configuration information, and respectively extracts candidate images that are highly consistent with the image to be searched from the long screenshot of the page according to the offset data; The image comparison engine calculates the similarity between each candidate image and the image to be searched, takes the candidate image with the highest similarity as the first candidate image, obtains the current offset distance of the first candidate image, calculates the final movement distance based on the current offset distance, and sends the final movement distance and the page configuration information to the application end. The final movement distance and the page configuration information are used to instruct the application end to automatically jump to the corresponding page and move to the corresponding business processing area.
2. A method for searching within an APP site according to claim 1, characterized in that: The backend server obtains corresponding page configuration information according to the image to be searched, including: The backend server deletes the fixed area of the image to be searched to obtain the deleted image to be searched; A title image is intercepted from the deleted images to be searched, and title recognition is performed on the title image through an OCR recognition service to obtain title text, and corresponding page configuration information is obtained according to the title text.
3. A method for searching within an APP site according to claim 2, characterized in that: The step of extracting a title image from the deleted image to be searched and performing title recognition on the title image through an OCR recognition service includes: Binarizing the title image to obtain a grayscale title image, and obtaining a grayscale value of the grayscale title image; When the grayscale value exceeds the grayscale threshold, the grayscale value is adjusted to a first grayscale standard; otherwise, the grayscale value is adjusted to a second grayscale standard to obtain an adjusted grayscale title picture; The title recognition is performed on the grayscale title image through an OCR recognition service.
4. A method for searching within an APP site according to claim 1, characterized in that: The obtaining of the current offset distance of the first candidate image, calculating the final movement distance according to the current offset distance, and sending the final movement distance and the page configuration information to the application end includes: Taking the first candidate image as the starting point, obtaining the upward offset distance of the first business processing area above the first candidate image, calculating the upward offset difference between the current offset distance and the upward offset distance, and taking half of the upward offset difference as the upward movement distance; Moving the long screenshot of the page according to the upward moving distance, and capturing a second candidate image having the same height as the image to be searched from the moved long screenshot of the page; Calculating the similarity between the second candidate image and the image to be searched, and if the similarity reaches a similarity threshold, stopping the movement, taking the upward movement distance as the final movement distance, and sending the final movement distance and the page configuration information of the second candidate image to the application end; Otherwise, the previous upward offset difference is used as the current offset distance and the upward movement distance is recalculated; If the upward movement distance is less than the movement threshold, taking the first candidate image as the starting point, obtaining the downward offset distance of the first business processing area below the first candidate image, calculating the downward offset difference between the current offset distance and the downward offset distance, and taking half of the downward offset difference as the downward movement distance; Moving the long screenshot of the page according to the downward movement distance, and capturing a third candidate image having the same height as the image to be searched from the moved long screenshot of the page; Calculating the similarity between the third candidate image and the image to be searched, and if the similarity reaches a similarity threshold, stopping the movement, taking the downward movement distance as the final movement distance, and sending the final movement distance and the page configuration information of the third candidate image to the application end; Otherwise, the previous downward offset difference is used as the current offset distance and the downward movement distance is recalculated.
5. The method for searching within an APP site as claimed in claim 1, wherein: The sending of the final movement distance to the application terminal further includes: Taking the first candidate image as a starting point, respectively obtaining an upward offset distance of the first business processing zone upward and a downward offset distance of the first business processing zone downward of the first candidate image, and calculating an upward offset sum of the current offset distance and the upward offset distance, and a downward offset sum of the current offset distance and the downward offset distance; Take out the historical offset distance between half of the upward offset value and half of the downward offset value, calculate the average value of the historical offset distance, and correct the offset data of each business processing area in the long screenshot of the page according to the average value.
6. A method for searching within an APP site according to claim 5, characterized in that: The correcting of the offset data of each business handling area in the long screenshot of the page according to the average value includes: Using the average value as a correction value, respectively obtain the offset data of each business processing area in the long screenshot of the page; Subtracting the offset data of the business processing area located above the first candidate image from the correction amount to obtain offset data after subtraction, and using the offset data as the corrected offset data of the business processing area; The offset data of the business processing area located below the first candidate image is added to the correction amount to obtain added offset data, and the offset data is used as the corrected offset data of the business processing area.
7. The method for searching within an APP site according to claim 1, wherein: The page configuration information includes a page path.
8. The method in an APP station according to claim 4, characterized in that: The similarity threshold is between 82% and 98%.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Method for directly realizing personalized search, device for realizing method, and search server
CN102521251A
Visual difference detection method, device and equipment based on page graph
CN115731406A