Slice acquisition method and system, electronic equipment, vehicle and storage medium

By downloading images from the web page, performing regional connectivity analysis and template matching, and automatically obtaining target slices, it solves the problem of low slice acquisition efficiency in vehicle UI design, and improves the efficiency and quality of interactive interface design.

CN118567641APending Publication Date: 2024-08-30CHINA FAW CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410562896.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-08
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

In the context of the continuous improvement of the level of automobile intelligence, vehicle UI design has become more and more cumbersome. Designers need to face the design requirements of various functional interfaces, involving different slices and modular designs, resulting in low design efficiency.

Method used

By filtering and downloading images from web pages, performing regional connectivity analysis and template matching, target slices are automatically obtained and used to generate interactive interfaces, achieving automatic acquisition of slices and improving the efficiency of interactive interface design.

Benefits of technology

Automatic acquisition of slices is realized, which significantly improves the efficiency of interactive interface design, reduces the designer's workload, and improves the efficiency and quality of UI design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567641A
    Figure CN118567641A
Patent Text Reader

Abstract

The invention discloses a slice acquisition method and system, electronic equipment, a vehicle and a storage medium, and the method comprises the steps: screening and downloading a first picture from a webpage according to a target object; performing region connectivity analysis on the first picture to obtain a slice set corresponding to the first picture; screening each slice in the slice set through template matching to obtain a target slice; the target slice is used for generating an interactive interface, and the target slice is a slice containing the target object. According to the embodiment of the invention, automatic acquisition of the slices can be realized, and the efficiency of interactive interface design is improved. The method can be widely applied to the technical field of computers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a slice acquisition method and system, electronic equipment, a vehicle and a storage medium. Background Art

[0002] With the continuous improvement of the level of automobile intelligence, in-vehicle UI design has become increasingly important in the automotive industry. As the main interface for customers to interact with vehicles, the quality of UI design is directly related to the user's first impression and overall experience of automotive products. However, with the continuous increase in various intelligent functions of automobiles, UI design work has become increasingly cumbersome. Designers need to face the design requirements of various functional interfaces, which involve different slicing and modular designs. In related technologies, designers usually design slicing and modular programs separately for different pictures, which is inefficient and brings them a heavy workload. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to provide an efficient slice acquisition method and system, electronic equipment, vehicle and storage medium.

[0004] To achieve the above-mentioned purpose, one aspect of an embodiment of the present application proposes a slice acquisition method, the method comprising: screening and downloading a first image from a web page according to a target object; performing a regional connectivity analysis on the first image to obtain a slice set corresponding to the first image; screening and processing each slice in the slice set by template matching to obtain a target slice; the target slice is used to generate an interactive interface, and the target slice is a slice containing the target object. An embodiment of the present application downloads a first image from a web page according to a target object, obtains a slice set by performing a regional connectivity analysis on the first image; and then performs template matching on the slice set to obtain a target slice. An embodiment of the present application can realize automatic acquisition of slices and improve the efficiency of interactive interface design.

[0005] In some embodiments, the method provided in the embodiments of the present application, performing a region connectivity analysis on the first image to obtain a slice set corresponding to the first image includes:

[0006] Determine the seed point and assign the first label to the current seed point;

[0007] Push the foreground pixels adjacent to the current seed point into the stack;

[0008] Pop the top pixel of the stack and assign the first label to the current top pixel of the stack;

[0009] The foreground pixel adjacent to the current stack top pixel is pushed into the stack, the popped stack top pixel is returned, and the first label is assigned to the current stack top pixel, and this step is repeated until the stack is empty.

[0010] In some embodiments, the method provided by the embodiments of the present application further includes:

[0011] Scan the first image, take pixel points with a pixel value of 1 as seed points in sequence, and return to the step of determining the seed point and assigning the first label to the current seed point;

[0012] A slice set corresponding to the first picture is determined according to the first label.

[0013] In some embodiments, the method provided by the embodiments of the present application, wherein the screening process is performed on each slice in the slice set by template matching to obtain a target slice, comprises:

[0014] Get the target template corresponding to the target object;

[0015] Perform matching estimation on each slice in the slice set and the target template to determine a matching score for each slice;

[0016] A target slice is determined according to the matching score and a preset score threshold.

[0017] In some embodiments, the method provided by the embodiments of the present application, wherein the first image is screened and downloaded from the web page according to the target object, comprises:

[0018] According to the target object, obtain the source code of the web page;

[0019] Parsing the webpage source code to locate the image tag corresponding to the image;

[0020] A download link of the picture is extracted according to the picture tag, and the first picture is downloaded through the download link.

[0021] In some embodiments, the method provided in the embodiments of the present application pre-processes the first image by the following steps:

[0022] Performing grayscale processing on the first picture to determine first data;

[0023] Performing image enhancement processing on the first data to determine second data;

[0024] Performing region segmentation processing on the second data to obtain a first picture that has been preprocessed and updated.

[0025] To achieve the above object, another aspect of an embodiment of the present application provides a slice acquisition system, the system comprising:

[0026] The first module is used to filter and download a first picture from a web page according to a target object;

[0027] A second module is used to perform a region connectivity analysis on the first image to obtain a slice set corresponding to the first image;

[0028] The third module is used to screen each slice in the slice set through template matching to obtain a target slice; the target slice is used to generate an interactive interface, and the target slice is a slice containing the target object.

[0029] To achieve the above objective, another aspect of an embodiment of the present application provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above method when executing the computer program.

[0030] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides a vehicle, comprising the above-mentioned slice acquisition system or the above-mentioned electronic device.

[0031] To achieve the above objective, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.

[0032] The embodiments of the present application include at least the following beneficial effects: The method provided in the embodiments of the present application includes: filtering and downloading a first image from a web page according to a target object; performing a regional connectivity analysis on the first image to obtain a slice set corresponding to the first image; filtering and processing each slice in the slice set by template matching to obtain a target slice; the target slice is used to generate an interactive interface, and the target slice is a slice containing the target object. The embodiments of the present application download a first image from a web page according to a target object, obtain a slice set by performing a regional connectivity analysis on the first image; and then perform template matching on the slice set to obtain a target slice. The embodiments of the present application can realize automatic acquisition of slices and improve the efficiency of interactive interface design. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 is a flow chart of an embodiment of the slice acquisition method provided by the present application;

[0034] Figure 2 is a flow chart of an embodiment of the regional connectivity analysis provided by the present application;

[0035] Figure 3 is a flow chart of another embodiment of the regional connectivity analysis provided by the present application;

[0036] Figure 4 is a flowchart of an embodiment of a slice acquisition process provided by the present application;

[0037] Figure 5is a flow chart of an embodiment of the template matching process provided by the present application;

[0038] Figure 6 is a flowchart of an embodiment of downloading a first picture provided by the present application;

[0039] Figure 7 is a flowchart of another embodiment of downloading a first picture provided by the present application;

[0040] Figure 8 is a flowchart of an embodiment of the image preprocessing process provided by the present application;

[0041] Fig. 9 is a structural schematic diagram of a slice acquisition system provided in an embodiment of the present application;

[0042] Fig.10 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.

[0044] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".

[0045] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.

[0046] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0047] Before describing the embodiments of the present application in detail, some nouns and terms involved in the embodiments of the present application are first described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.

[0048] User Interface (UI), also known as user interface, refers to the overall design of the software's human-computer interaction, operating logic, and aesthetic interface. A good UI design not only makes the software personalized and tasteful, but also makes the software's operation comfortable, simple, free, and fully reflects the software's positioning and characteristics. UI is the medium for interaction and information exchange between the system and the user. It realizes the conversion between the internal form of information and the form acceptable to humans. The user interface is software designed between the user and the hardware for interaction and communication between them. The purpose is to enable users to operate the hardware conveniently and efficiently to achieve two-way interaction and complete the work they want to do with the help of the hardware. The definition of the user interface is broad, including human-computer interaction and graphical user interface. User interfaces exist in all fields involving information exchange between humans and machines.

[0049] Web front-end development evolved from web page production, and the name has obvious characteristics of the times. In the evolution of the Internet, web page production is a product of the Web 1.0 era. The main content of early websites was static, mainly pictures and text, and users mainly browsed the website. With the development of Internet technology and the application of HTML5 and CSS3, modern web pages are more beautiful, interactive, and powerful. HTML is the carrier of web page content. Content is the information that web page creators put on the page for users to browse, which can include text, pictures, videos, etc.

[0050] Hyper Text Markup Language (HTML) is not a programming language, but a markup language. A markup language is a set of markup tags. HTML uses markup tags to describe web pages. HTML tags are keywords surrounded by angle brackets, such as<htm l> HTML tags usually appear in pairs. The first tag in the tag pair is the start tag, and the second tag is the end tag. An HTML file has its own fixed structure, as shown below:

[0051]

[0052] in:

[0053] <htm l>< / htm l> Called the root tag, all web page tags are in<htm l>< / htm l> middle.

[0054] The tag is used to define the document's header, which is a container for all header elements. The header element has<t it le> ,<scr i pt> ,<sty l e> ,<l i nk> , <meta> etc. tags.

[0055] The content between the and tags is the main content of the web page, such as <h1>、 , , Web page content tags, the content in the tags here will be displayed in the browser.

[0056] With the continuous improvement of the level of automobile intelligence, in-vehicle UI design has become increasingly important in the automotive industry. As the main interface for users to interact with vehicles, the quality of UI design is directly related to the user's first impression and overall experience of automotive products. However, with the continuous increase in various automotive intelligent functions, UI design work has become increasingly cumbersome. Designers need to face the design requirements of various functional interfaces, which involve different slicing and modular designs, which brings them a heavy workload. Therefore, finding an automated method to assist designers in completing UI design work has become a key challenge in the current design of automotive intelligent cockpit products.

[0057] The slice acquisition method provided in the embodiment of the present application relates to the field of computer technology. The slice acquisition method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server, or can be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured to provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms and other basic cloud computing services. The server can also be a node server in the blockchain network; the software can be an application that implements the slice acquisition method, etc., but is not limited to the above forms.

[0058] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0059] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.

[0060] Figure 1 is an optional flow chart of the slice acquisition method provided in an embodiment of the present application; Figure 1 The method may include but is not limited to steps S100 to S300.

[0061] Step S100, screening and downloading a first picture from a web page according to a target object;

[0062] Step S200, performing a region connectivity analysis on the first image to obtain a slice set corresponding to the first image;

[0063] Step S300, screening each slice in the slice set through template matching to obtain a target slice; the target slice is used to generate an interactive interface, and the target slice is a slice containing a target object.

[0064] The embodiment of the present application proposes a method for obtaining slices. First, the image is obtained from an online website, but when obtaining, the function items corresponding to the image are retained, the obtained image is sliced, and finally the data is analyzed. Specifically, through regional connectivity analysis, several slices are obtained, template matching is performed on the slices, and the target slices are determined to facilitate the design of the interactive interface. The embodiment of the present application can obtain image content information based on the function, and obtain single slice information through an automated method to help interactive designers complete interface design.

[0065] In some embodiments, reference Figure 2 The method provided in the embodiment of the present application performs a region connectivity analysis on the first image to obtain a slice set corresponding to the first image, including:

[0066] Step S210, determining a seed point, and assigning a first label to the current seed point;

[0067] Step S220, pushing the foreground pixels adjacent to the current seed point into the stack;

[0068] Step S230, popping the top pixel of the stack and assigning the first label to the current top pixel of the stack;

[0069] Step S240, pushing the foreground pixels adjacent to the current top pixel of the stack into the stack, returning to the step of popping the top pixel of the stack, and assigning the first label to the current top pixel of the stack, until the stack is empty.

[0070] In some embodiments, reference Figure 3 , the method provided in the embodiment of the present application further includes:

[0071] Step S250, scanning the first image, taking pixels with a pixel value of 1 as seed points in sequence, and returning to the step of determining the seed point and assigning the first label to the current seed point;

[0072] Step S260: Determine a slice set corresponding to the first image according to the first tag.

[0073] In some possible implementations, refer to Figure 4 As shown, this application can perform regional connectivity analysis by the following methods:

[0074] S41, select seed point: select an appropriate seed point in the image, which should usually be located in the target area and cover the entire target area as much as possible.

[0075] S42, seed filling: starting from the selected seed point, applying the seed filling algorithm to mark and segment the connected areas connected to the seed point. This process will generate a single slice.

[0076] (1) Scan the image until the current pixel B(x,y) == 1:

[0077] a. Take B(x,y) as the seed (pixel position) and assign it a label, then push all foreground pixels adjacent to the seed (this is a four-neighborhood or eight-neighborhood) into the stack;

[0078] b. Pop the top pixel of the stack, assign it the same label, and then push all foreground pixels adjacent to the top pixel into the stack;

[0079] c. Repeat step b until the stack is empty;

[0080] At this point, a connected region in image B is found, and the pixel values ​​in the region are marked as l abe l;

[0081] (2) Repeat step (1) until the scan is completed;

[0082] After scanning, all connected areas in image B can be obtained;

[0083] S43, post-processing: as needed, the acquired single slice can be post-processed, and the corresponding functional description items when crawling the image can be noted.

[0084] In some embodiments, reference Figure 5 The method provided in the embodiment of the present application screens each slice in the slice set through template matching to obtain a target slice, including:

[0085] Step S310, obtaining a target template corresponding to the target object;

[0086] Step S320, performing matching estimation on each slice in the slice set and the target template to determine the matching score of each slice;

[0087] Step S330: determining the target slice according to the matching score and a preset score threshold.

[0088] In some possible implementations, the embodiments of the present application acquire the target slice through template matching. Specifically, the target slice can be determined by comparing the matching score with a preset score threshold.

[0089] For example, for the template of the air conditioner slice, a picture containing the air conditioner control panel can be manually made, and then processed using the functions in the image processing library (such as OpenCV), the contour of the air conditioner control panel is extracted, and the template of the air conditioner slice is generated.

[0090] For each slice, template matching is required to determine whether the slice contains the air conditioner control panel. Template matching can be performed using the cv2.matchTemp l ate() function in the image processing library (such as OpenCV). This function searches for areas in the image that match the template. The matching results can be filtered by setting a threshold, and slices with a similarity higher than a certain threshold are retained.

[0091] Specifically, the first step is the separation of slices. This step can be completed using image processing technology. The specific implementation can be divided into the following steps:

[0092] Load the original image: First, you need to load the original image that needs to be sliced ​​and separated.

[0093] Grayscale: Grayscale the original image to reduce the dimension of the image data, thereby reducing the amount of calculation.

[0094] Image enhancement: Perform image enhancement processing on grayscale images to improve image clarity and contrast, making subsequent image processing more accurate.

[0095] Image segmentation: Segment the enhanced image and extract the required area.

[0096] Slice separation: Slice the segmented area and save each slice as a separate image file.

[0097] These steps can be implemented using common image processing libraries, such as OpenCV. Grayscale and image enhancement can be done using OpenCV's image processing functions, and image segmentation can use threshold-based segmentation methods, such as the OTSU algorithm, to binarize the image and extract the required area. Slice separation can be done using OpenCV's slicing function, saving each slice as a separate image file.

[0098] The second step is to slice all the images and then filter out the slices related to air conditioning.

[0099] Slicing: First, you need to cut all the images into small pieces, which is called slicing. This has been achieved based on the previous step.

[0100] Air conditioner slice screening: Next, you need to screen out slices related to air conditioners. This can be achieved in the following ways:

[0101] Predefined template matching: By defining template slices related to air conditioners, template matching is performed on all slices. Slices with matching scores higher than the threshold can be considered as slices related to air conditioners. Here, the OpenCV library in Python can be used, and the matchTemp l ate() function can be used to implement it. The following is a simple example:

[0102]

[0103] In this example, we first use the cv2.imread() function to load the template slices related to the air conditioner and the pictures to be screened, and then use the cv2.matchTemp l ate() function to match the template to get the matching score between each slice and the template. Then we set the matching threshold to 0.8, filter out the slice positions with scores higher than the threshold, and print them out.

[0104] In the third step, the template and the slice need to be matched to determine whether the slice contains the air conditioning interface.

[0105] Specifically, the template matching method in the OpenCV library can be used to implement it. The implementation steps are as follows:

[0106] First, you need to load the template image and the slice image to be matched. You can use the cv2.imread() method in OpenCV to load the image.

[0107] Next, you need to use the cv2.matchTemp l ate() method to perform template matching. The input parameters of this method include the slice image to be matched, the template image to be matched, and the matching method to be used. The output result is a matching result image, in which each pixel represents the matching score of the corresponding position.

[0108] Next, a threshold needs to be determined to determine whether the match is successful. The match can be determined by comparing the maximum value in the matching score image with the set threshold. If the maximum value is greater than the threshold, it means the match is successful, otherwise it means the match fails.

[0109] In some embodiments, reference Figure 6 The method provided in the embodiment of the present application, according to the target object, filters and downloads the first picture from the web page, including:

[0110] Step S110, obtaining the webpage source code according to the target object;

[0111] Step S120, parsing the webpage source code to locate the image tag corresponding to the image;

[0112] Step S130, extracting a download link of the picture according to the picture tag, and downloading the first picture through the download link.

[0113] In some possible implementations, refer to Figure 7 As shown, the download process of the first picture is as follows:

[0114] Step S71, use Requests to obtain the source code of the web page: First, use the Requests library to send an HTTP request to obtain the source code of the target web page.

[0115] Step S72, using Beautiful Soup to parse the web page: passing the acquired web page source code into the Beautiful Soup library, and creating a Beautiful Soup object to facilitate subsequent parsing operations.

[0116] Step S73, locate the image tag: use the search method provided by Beautiful Soup (such as find_all()) to locate the tag containing the image. Usually the image tag is Label.

[0117] Step S74, extracting the image link: extracting the URL link of the image from the image tag. The URL of the image is usually stored in the src attribute, and the description item corresponding to the image is retained.

[0118] Step S75, downloading pictures: using Python file operations to download pictures. Using the extracted picture link as a parameter, sending an HTTP request and saving it to a local folder.

[0119] In some embodiments, reference Figure 8 The method provided in the embodiment of the present application pre-processes the first image by the following steps:

[0120] Step S140, performing grayscale processing on the first image to determine first data;

[0121] Step S150, performing image enhancement processing on the first data to determine second data;

[0122] Step S160, performing region segmentation processing on the second data to obtain a first picture that has been preprocessed and updated.

[0123] The method provided in the embodiment of the present application includes: according to the target object, filtering and downloading the first image from the web page; performing regional connectivity analysis on the first image to obtain a slice set corresponding to the first image; filtering and processing each slice in the slice set by template matching to obtain a target slice; the target slice is used to generate an interactive interface, and the target slice is a slice containing the target object. According to the embodiment of the present application, the first image is downloaded from the web page according to the target object, and a slice set is obtained by regional connectivity analysis on the first image; and then template matching is performed on the slice set to obtain the target slice. The embodiment of the present application can realize the automatic acquisition of slices and improve the efficiency of interactive interface design.

[0124] See also Fig. 9 The embodiment of the present application further provides a slice acquisition system, which can implement the above-mentioned slice acquisition method, and the system includes:

[0125] The first module 810 is used to filter and download a first picture from a web page according to a target object;

[0126] The second module 820 is used to perform a region connectivity analysis on the first image to obtain a slice set corresponding to the first image;

[0127] The third module 830 is used to screen each slice in the slice set through template matching to obtain a target slice; the target slice is used to generate an interactive interface, and the target slice is a slice containing a target object.

[0128] In some embodiments, the system provided by the embodiments of the present application further includes a fourth module, which is used to perform grayscale processing on the first image to determine the first data;

[0129] Performing image enhancement processing on the first data to determine second data;

[0130] Performing region segmentation processing on the second data to obtain a first picture that has been preprocessed and updated.

[0131] It can be understood that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0132] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned slice acquisition method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0133] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0134] See also Fig.10 , Fig.10 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0135] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0136] The memory 902 may be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 may store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the slice acquisition method of the embodiment of this application;

[0137] Input / output interface 903, used to implement information input and output;

[0138] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WI FI, Bluetooth, etc.);

[0139] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);

[0140] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .

[0141] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the above-mentioned slice acquisition method is implemented.

[0142] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0143] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0144] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0145] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0146] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0147] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0148] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0149] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or plural.

[0150] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0151] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0152] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0153] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0154] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention. < / h1>

Claims

1. A slice acquisition method, It is characterized in that The method comprises: Filter and download the first picture from the web page according to the target object; Performing a region connectivity analysis on the first image to obtain a slice set corresponding to the first image; Each slice in the slice set is screened by template matching to obtain a target slice; the target slice is used to generate an interactive interface, and the target slice is a slice containing the target object.

2. The method according to claim 1, It is characterized in that The performing a region connectivity analysis on the first picture to obtain a slice set corresponding to the first picture includes: Determine the seed point and assign the first label to the current seed point; Push the foreground pixels adjacent to the current seed point into the stack; Pop the top pixel of the stack and assign the first label to the current top pixel of the stack; The foreground pixel adjacent to the current stack top pixel is pushed into the stack, the popped stack top pixel is returned, and the first label is assigned to the current stack top pixel, and this step is repeated until the stack is empty.

3. The method according to claim 2, It is characterized in that The method further comprises: Scan the first image, take pixel points with a pixel value of 1 as seed points in sequence, and return to the step of determining the seed point and assigning the first label to the current seed point; A slice set corresponding to the first picture is determined according to the first label.

4. The method according to claim 1, It is characterized in that The step of screening each slice in the slice set by template matching to obtain a target slice includes: Get the target template corresponding to the target object; Perform matching estimation on each slice in the slice set and the target template to determine a matching score for each slice; A target slice is determined according to the matching score and a preset score threshold.

5. The method according to claim 1, It is characterized in that The step of screening and downloading the first picture from the webpage according to the target object includes: According to the target object, obtain the source code of the web page; Parsing the webpage source code to locate the image tag corresponding to the image; A download link of the picture is extracted according to the picture tag, and the first picture is downloaded through the download link.

6. The method according to claim 1, It is characterized in that The method preprocesses the first image by the following steps: Performing grayscale processing on the first picture to determine first data; Performing image enhancement processing on the first data to determine second data; Performing region segmentation processing on the second data to obtain a first picture that has been preprocessed and updated.

7. A slice acquisition system, It is characterized in that The system comprises: The first module is used to filter and download a first picture from a web page according to a target object; A second module is used to perform a region connectivity analysis on the first image to obtain a slice set corresponding to the first image; The third module is used to screen each slice in the slice set through template matching to obtain a target slice; the target slice is used to generate an interactive interface, and the target slice is a slice containing the target object.

8. An electronic device, It is characterized in that The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 6 when executing the computer program.

9. A vehicle, It is characterized in that The vehicle comprises the slice acquisition system of claim 7 or the electronic device of claim 8.

10. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.