Buried point processing method, electronic device, and storage medium
By performing image recognition and optical character recognition on the preset page layout diagram, component location and type are determined, and a buried point list is generated to efficiently bury user data acquisition points, the problem of inefficient burial in the existing technology is solved and user data acquisition is realized accuracy and accuracy.
Patent Information
- Application Number
- CN202210439531.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2042-04-25
AI Technical Summary
During the design process of Internet products, manual retelling leads to inefficient burial of user data collection points, which easily misses the underlying data burial and data indicator requirements. Different developers have different text descriptions of events, which affects the accuracy and decision-making of data indicators. Objectivity of the layer.
By obtaining the preset page layout diagram for image recognition, determine the component location and type in the page to be buried, so as to accurately and efficiently bury the user data acquisition point in the page, and use optical character recognition and three primary color arrays to divide and Identify and generate a list of buried points to achieve user data collection.
It improves the accuracy and efficiency of user data collection points, reduces the time and errors of manual reposting, and ensures the accuracy of data indicators and the objectivity of decision-making levels.
Smart Images

Figure CN114782955B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a buried point processing method, electronic equipment, and storage medium. Background Art
[0002] With the development of the times, the business significance of data tracking is becoming more and more important, that is, to help define and obtain the business data and accompanying information that analysts really need. In different scenarios, business personnel may focus on different information and angles. Typical application scenarios include analysis in the field of digital marketing and analysis in the field of product operations. The former focuses on source channels and advertising effects, while the latter is more concerned with the optimization of the product's own processes and experience. The two have their own emphases, and there may be some overlap. Therefore, different tracking solutions should be designed for different projects and analysis purposes.
[0003] In the usual design process of Internet products, related technologies still use manual retelling to convey the relevant information of components that need to be buried to front-end designers, so it is easy to miss the needs of underlying data burial points and data indicators. In addition, manual retelling takes a relatively long time and is generally inefficient. On the premise of obtaining the user's permission or consent, how to bury reasonable user data collection points in the client or server to help collect user data accurately and efficiently, while complying with the relevant laws, regulations and standards of relevant countries and regions, has become an urgent problem for industry insiders to solve. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention provides a method for processing buried points, an electronic device, and a storage medium, which can accurately and efficiently arrange user data collection points.
[0005] A method for processing buried points according to an embodiment of the first aspect of the present invention includes:
[0006] Obtain a preset page layout diagram, wherein the preset page layout diagram reflects the component layout of the page to be embedded;
[0007] Perform image recognition on the preset page layout diagram to obtain the component embedding position and component embedding type in the page to be embedded;
[0008] According to the component embedding position and the component embedding type, a user data collection point is embedded in the page to be embedded.
[0009] Optionally, according to some embodiments of the present invention, performing image recognition on the preset page layout diagram to obtain the component embedding position and component embedding type in the page to be embedded includes:
[0010] Dividing the preset page layout diagram into regions based on the color distribution of the pixels in the preset page layout diagram to obtain color blocks to be identified;
[0011] Performing optical character recognition on the color block to be identified to obtain color block type information of the color block to be identified;
[0012] According to the color block type information, the component embedding type in the page to be embedded is obtained.
[0013] Optionally, according to some embodiments of the present invention, dividing the preset page layout diagram into regions based on the color distribution of pixels in the preset page layout diagram to obtain color blocks to be identified includes:
[0014] Describing the color of each pixel in the preset page layout diagram by using a three-primary color array;
[0015] Based on the three primary color arrays corresponding to each of the pixel points, counting the positions of each of the pixel points whose colors are in the same color gamut;
[0016] According to the positions of the respective pixel points, the position intervals between the respective pixel points whose colors are in the same color gamut are obtained;
[0017] The pixel points in the same color gamut and whose position intervals are less than a preset distance are classified into the same area, and the preset page layout diagram is divided into areas to obtain the color blocks to be identified.
[0018] Optionally, according to some embodiments of the present invention, performing optical character recognition on the color block to be identified to obtain color block type information of the color block to be identified includes:
[0019] Perform optical character recognition on the color block to be identified, and obtain the shape and text information of the color block to be identified in the color block type information.
[0020] Optionally, according to some embodiments of the present invention, obtaining the component embedding type in the page to be embedded according to the color block type information includes:
[0021] According to the shape and text information of the color block to be identified, the component embedding type corresponding to the color block to be identified is obtained by matching from a component type database.
[0022] Optionally, according to some embodiments of the present invention, embedding a user data collection point in the page to be embedded according to the component embedding position and the component embedding type includes:
[0023] According to the component embedding type, obtaining embedding point preset data corresponding to the component embedding type;
[0024] A burying point list is generated according to the preset burying point data, and user data collection points are buried based on the burying point list.
[0025] Optionally, according to some embodiments of the present invention, generating a burying point list according to the preset burying point data, and burying user data collection points based on the burying point list includes:
[0026] Generate a burying point code snippet corresponding to the burying point preset data according to the burying point list;
[0027] Based on the embedding code snippet, the user data collection point is embedded in the page to be embedded.
[0028] Optionally, according to some embodiments of the present invention, generating a burying point code snippet corresponding to the burying point preset data according to the burying point list includes:
[0029] According to the burying point list, the burying point preset data in the burying point list is defined and assigned, and incorporated into the burying point code snippet.
[0030] In a second aspect, an embodiment of the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements a method for processing a buried point as described in any one of the embodiments of the first aspect of the present invention.
[0031] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement a point-of-interest processing method as described in any one of the embodiments of the first aspect of the present invention.
[0032] The buried point processing method, electronic device, and storage medium of the present invention have at least the following beneficial effects:
[0033] The method for processing buried points in the embodiment of the present invention needs to first obtain a preset page layout diagram that reflects the layout of the components of the page to be buried, and then perform image recognition on the preset page layout diagram to further obtain the component buried positions and component buried types in the page to be buried, so as to bury user data collection points in the page to be buried according to the component buried positions and component buried types. The present invention determines the component buried types that need to be buried in the page to be buried, and determines the positions where the components need to be buried in the page to be buried by means of image recognition, thereby helping to convey the relevant information required to bury the user data collection points, so as to accurately and efficiently lay out the user data collection points.
[0034] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0036] Figure 1 A flow chart provided according to an embodiment of the present invention;
[0037] Figure 2 Another flow chart provided according to an embodiment of the present invention;
[0038] Figure 3 Another flow chart provided according to an embodiment of the present invention;
[0039] Figure 4 Another flow chart provided according to an embodiment of the present invention;
[0040] Figure 5 Another flow chart provided according to an embodiment of the present invention;
[0041] Figure 6 Another flow chart provided according to an embodiment of the present invention;
[0042] Figure 7 Another flow chart provided according to an embodiment of the present invention;
[0043] Figure 8 A schematic diagram of an electronic device for implementing the buried point processing method of the present invention is provided according to an embodiment of the present invention. DETAILED DESCRIPTION
[0044] Embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0045] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0046] In the description of the present invention, it should be understood that descriptions involving orientation, such as up, down, left, right, front, back, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0047] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", 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 representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0048] In the description of the present invention, it should be noted that, unless otherwise clearly defined, the terms such as setting, installing, connecting, etc. should be understood in a broad sense, and the technical personnel in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention in combination with the specific content of the technical solution. In addition, the identification of specific steps below does not represent a limitation on the order of steps and execution logic, and the execution order and execution logic between steps should be understood and inferred with reference to the corresponding illustrative expressions.
[0049] 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 the relevant laws, regulations, and standards of the relevant countries and regions. 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.
[0050] With the development of the times, the data records generated by users' use of Internet products have a profound impact on industry personnel, so that monitoring and analysis work based on user usage data has become an important part of the work of Internet practitioners.
[0051] "Buying data" is a term in the field of data collection (especially user behavior data collection), which refers to the relevant technologies and implementation processes for capturing, processing and sending specific user behaviors or events.
[0052] The essence of tracking technology is to first monitor the events during the operation of the software application, judge and capture the events that need attention when they occur, then obtain the necessary context information, and finally send the information to the server after sorting. The monitored events are usually provided by platforms such as operating systems, browsers, and APP frameworks. You can also customize the trigger conditions based on basic events (such as clicking a specific button). Generally, tracking can be implemented through programming using the SDK provided by the monitoring and analysis tool.
[0053] The business significance of tracking data is obvious, which is to help define and obtain the business data and accompanying information that analysts really need. In different scenarios, business personnel may focus on different information and angles. Typical application scenarios include analysis in the field of digital marketing and analysis in the field of product operations. The former focuses on source channels and advertising effects, while the latter is more concerned with the optimization of the product's own processes and experience. The two have their own emphases and may also have some overlaps. Therefore, different tracking solutions should be designed for different projects and analysis purposes.
[0054] In the usual design process of Internet products, related technologies still use manual retelling to convey the relevant information of components that need to be buried to front-end designers. Most of them rely on product managers to enumerate them one by one in the requirements document, and developers then report the corresponding events to the data burial interface, which is prone to misreporting and omissions, so that it is easy to miss the requirements of front-end development projects such as applications and websites for the underlying data burial and data indicators. In addition, manual retelling takes a relatively long time and is generally inefficient. In addition, since different developers may have different understandings of the text description of the same event, especially the different timing of burial reporting will result in different results of data indicator feedback, it may affect the accuracy of the indicator, thereby affecting the objectivity of the decision-making layer's evaluation of the product launch effect. How to bury reasonable user data collection points on the client or server to help accurately and efficiently collect user data has become an urgent problem for industry insiders to solve.
[0055] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention provides a method for processing buried points, an electronic device, and a storage medium, which can accurately and efficiently arrange user data collection points.
[0056] The embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0057] Reference Figure 1 According to the first aspect of the present invention, the buried point processing method includes:
[0058] Step S101, obtaining a preset page layout diagram reflecting the layout of the page components to be embedded;
[0059] It should be noted that the preset page layout diagram reflects the layout of the components of the page to be buried, where the page to be buried refers to the target page where the user data collection point needs to be buried. According to some embodiments of the present invention, the preset page layout diagram can be designed by a user interface designer (User Interface Designer, UI designer) according to the needs of burying user data collection points, or it can be downloaded from the network. It should be understood that in some embodiments provided by the present invention, the page layout refers to the combination of text, graphics, colors, tables or other elements displayed on the front-end page in the application software, H5 applets, various websites or other terminal applications with front-end pages, and the layout of the page components to be buried refers to the combination of text, graphics, colors, tables or other elements displayed in the front-end page and related to the page components to be buried. It should be emphasized that the purpose of obtaining the preset page layout diagram is to clarify the needs of burying user data collection points, so as to obtain the component burying position and component burying type in the page to be buried according to the preset page layout diagram.
[0060] According to some more specific embodiments of the present invention, the layout of the page components to be buried reflected by the preset page layout diagram may include the following contents: distance specifications between components (such as combining the annotation lines to indicate the horizontal spacing step S10pt and the vertical spacing 40pt of the two components), component alignment (such as alignment at both ends, center alignment), point burying requirement annotation (such as when leaving page A, if a new message is received, an unread red dot or prompt box is displayed), the setting of the page switching component, and the feedback prompt when a certain component is triggered (such as the change of the mouse pattern, the highlighting of the font corresponding to the component). Since the purpose of obtaining the preset page layout diagram is to clarify the need to bury the user data collection point, so as to obtain the component burying position and component burying type in the page to be buried according to the preset page layout diagram. Therefore, the content of the layout of the page components to be buried reflected by the preset page layout diagram is diverse, and the presentation form includes but is not limited to: text, graphics, color, table or other elements. It should be emphasized that the information contained in the preset page layout diagram of the present invention is not limited to the above-mentioned several types of embodiments.
[0061] Step S102, performing image recognition on the preset page layout diagram to obtain the component embedding position and component embedding type in the page to be embedded;
[0062] It should be noted that the component embedding position refers to the position of the component corresponding to the user data collection point embedded in the page to be embedded, and the component embedding type refers to the type of the component corresponding to the user data collection point embedded in the page to be embedded. It should be understood that the image recognition of the preset page layout diagram is to obtain the component embedding position and component embedding type in the page to be embedded, and further clarify the need for embedding user data collection points, so as to facilitate the subsequent embedding work. In some embodiments of the present invention, image recognition of the preset page layout diagram can be achieved in a variety of ways, including but not limited to: image recognition of the preset page layout diagram through a neural network image recognition model, and image recognition of the preset page layout diagram through an optical character recognition (Optical Character Recognition, OCR) model. Considering that the component embedding position and component embedding type in the page to be embedded are identified from the preset page layout diagram, there are no very strict requirements for the recognition accuracy. Therefore, in order to save computing power resources, a more preferred embodiment of the present invention uses an OCR model to perform image recognition on the preset page layout diagram to obtain the component embedding position and component embedding type in the page to be embedded.
[0063] It should be understood that there are many ways to perform image recognition on the preset page layout diagram and obtain the component embedding type based on the recognition result, including but not limited to matching from a preset component type database. In addition, in the process of front-end development, it is necessary to follow the front-end specifications that meet industry standards, some of which include pre-set component types and trigger actions and fields that match them. In some embodiments provided by the present invention, after performing image recognition on the preset page layout diagram, the corresponding component embedding type can be matched from the front-end specifications based on the recognition result. It should be understood that in addition to using industry standard front-end specifications, other specifications commonly agreed upon by industry insiders can also be used to perform image recognition on the preset page layout diagram and obtain the component embedding type based on the recognition result.
[0064] Step S103, embedding user data collection points in the page to be embedded according to the component embedding position and component embedding type.
[0065] It should be noted that the embedding point refers to the collection of information at a specific user data collection point in an application software, H5 applet, website or other application with a front-end page, which is used to track the user's use of the application, so as to further optimize the product or provide data support for operations, including the number of visits (Visits), the number of visitors (Visitor), the length of stay (Time On Site), the number of page views (Page Views) and the bounce rate (Bounce Rate). It should be understood that in the front-end development process of the application software, H5 applet, website or other application with a front-end page, the embedding of the user data collection point requires the application or website's requirements for the underlying data embedding points and data indicators to be written into the underlying code of the front-end page to layout the components in the embedding point page. In some embodiments of the present invention, the requirements of the application or website for the underlying data embedding points and data indicators are clarified by means of a preset page layout diagram, and then the preset page layout diagram is further image-recognized to obtain the component embedding position and component embedding type in the page to be embedded, and then the user data collection point is embedded in the page to be embedded based on the component embedding position and component embedding type in the page to be embedded. By embedding user data collection points in the above manner, it is possible to solve the problem of inefficient communication of underlying data collection points and data indicator requirements by front-end development projects such as applications and websites during the retelling process.
[0066] The method for processing buried points in the embodiment of the present invention needs to first obtain a preset page layout diagram that reflects the layout of the components of the page to be buried, and then perform image recognition on the preset page layout diagram to further obtain the component buried positions and component buried types in the page to be buried, so as to bury user data collection points in the page to be buried according to the component buried positions and component buried types. The present invention determines the component buried types that need to be buried in the page to be buried, and determines the positions where the components need to be buried in the page to be buried by means of image recognition, thereby helping to convey the relevant information required to bury the user data collection points, so as to accurately and efficiently lay out the user data collection points.
[0067] Reference Figure 2 According to some embodiments of the present invention, image recognition is performed on a preset page layout diagram to obtain component embedding positions and component embedding types in the page to be embedded, including:
[0068] Step S201, dividing the preset page layout diagram into regions based on the color distribution of the pixels in the preset page layout diagram to obtain color blocks to be identified;
[0069] It should be noted that the preset page layout diagram contains the component layout of the page to be buried, and the various components arranged in the page to be buried can be distinguished by the text, graphics, colors, tables or other elements they possess. Therefore, in the process of image recognition of the preset page layout diagram, it is often necessary to perform image processing based on the text, graphics, colors, tables or other elements in the preset page layout diagram. Since the various colors presented by the image pixels can be represented by the three primary colors (Red Green Blue, RGB) array, therefore, in some embodiments provided by the present invention, the preset page layout diagram is divided into regions based on the color distribution of the pixels in the preset page layout diagram to obtain the color blocks to be identified, and then the color blocks to be identified are used as the processing objects to distinguish the color block type information corresponding to the color blocks, so as to use the component type corresponding to the color blocks to be identified as the component embedding type. Among them, the color block to be identified refers to the image color block whose color type is to be identified, which is obtained by regional division based on the color distribution of the pixels in the preset page layout diagram. It should be understood that the regional division of the preset page layout diagram based on the color distribution of the pixels in the preset page layout diagram can be performed in the OCR model or outside the OCR model. It should be emphasized that in addition to the above-mentioned image processing based on the colors in the preset page layout diagram, the present invention also includes an embodiment of performing image recognition processing based on text, graphics, tables or other elements in the preset page layout diagram to obtain component embedding positions and component embedding types.
[0070] Step S202, performing optical character recognition on the color block to be identified, and obtaining color block type information of the color block to be identified;
[0071] It should be noted that Optical Character Recognition (OCR) refers to the process of analyzing and identifying image files of text materials to obtain text and layout information, that is, recognizing the text in the image and returning it in the form of text. It should be understood that OCR technology processing can recognize the text in the image, and can also recognize and classify the colors in the image by processing the image pixels. The typical OCR technology route includes but is not limited to the following links: input, image preprocessing, image detection, content recognition, and output.
[0072] It should be noted that image preprocessing is usually to correct the imaging problems of the image. Common preprocessing includes but is not limited to: geometric transformation (perspective, distortion, rotation, etc.), distortion correction, blur removal, image enhancement and light correction. Traditional OCR processes and extracts features from images based on digital image processing and traditional machine learning methods. The commonly used binarization process is conducive to enhancing the text information of simple scenes, but has little effect on binarization of complex backgrounds. The traditional method uses the Histogram of Oriented Gradient (HOG) to extract features from images. However, HOG has poor robustness to problems such as image blur and distortion, and poor generalization ability for complex scenes. Due to the rapid development of deep learning, neural networks based on Convolutional Neural Networks (CNN) are now widely used as feature extraction methods. Thanks to the powerful learning ability of CNN, the robustness of feature extraction can be enhanced with a large amount of data, and good robustness can be shown in the face of image problems such as blur, distortion, distortion, complex background and unclear light.
[0073] Image detection is to detect the position and range of each element of the image and its layout. Image detection usually also includes layout analysis, text line detection, etc. The main problem to be solved by image detection is the position of each element in the image and how large the range of each element in the image is. Content recognition is to identify the content of each element in the image on the basis of image detection, such as converting text information in the image into text information and deriving corresponding color block type information according to the color information of the color block in the image. The main problem to be solved by content recognition is what information is contained in each element in the image. The recognized content usually needs to be checked again to ensure its correctness. Content correction is also considered to belong to this link. In some embodiments provided by the present invention, optical character recognition is performed on the color block to be recognized, and obtaining the color block type information of the color block to be recognized includes processing the color block to be recognized in the preset page layout diagram through the content recognition link in the OCR model, and further obtaining the color block type information of the color block to be recognized.
[0074] Step S203, obtaining the component embedding type in the page to be embedded according to the color block type information.
[0075] It should be noted that the color block type information refers to information reflecting the color type of the color block to be identified. In some embodiments provided by the present invention, the color block type information may be an array of three primary colors corresponding to the color type of the color block to be identified, and the color type corresponding to the color block type information includes but is not limited to: a pure color type of a certain color, a gradient type of multiple colors, a color composition pattern or a shading type. According to some embodiments of the present invention, the component embedding type corresponding to the color block type information can be obtained by matching from a pre-set component type database, or from a front-end specification that meets industry standards, or by other means.
[0076] Reference Figure 3 According to some embodiments of the present invention, the method for processing embedded points further includes: identifying the embedded type of components in the embedded point page by optical characters, specifically including:
[0077] Step S301, inputting a preset page layout diagram into an OCR model, and performing image preprocessing on the preset page layout diagram;
[0078] It should be noted that image preprocessing is usually performed to correct imaging problems of an image. Image preprocessing of a preset page layout includes but is not limited to: geometric transformation (perspective, distortion, rotation, etc.), distortion correction, blur removal, image enhancement, and light correction.
[0079] Step S302, performing image detection on the preset page layout after image preprocessing, and dividing to obtain color blocks to be identified in the preset page layout;
[0080] It should be noted that image detection is to detect the position, range and layout of each element that makes up the image. Image detection of the preset page layout diagram after image preprocessing includes identifying the color blocks to be identified with the same or similar colors in the preset page layout diagram, the position of each color block to be identified in the preset page layout diagram, and the area ratio occupied by each color block to be identified in the preset page layout diagram.
[0081] Step S303, performing content recognition on the color block to be recognized, and obtaining color block type information of the color block to be recognized;
[0082] It should be noted that content recognition is based on image detection, and the content of each element in the image is recognized. Content recognition of the color block to be recognized and obtaining the color block type information of the color block to be recognized can be to recognize and obtain the three-primary color array of each color block to be recognized in the preset page layout. In some embodiments provided by the present invention, content recognition of the color block to be recognized and obtaining the color block type information of the color block to be recognized also includes correcting the obtained color block type information.
[0083] Step S304, obtaining the component embedding type in the page to be embedded based on the color block type information obtained by content recognition.
[0084] According to some embodiments of the present invention, the component embedding type corresponding to the color block type information can be obtained by matching from a preset component type database, or from a front-end specification that complies with industry standards, or by other means.
[0085] Reference Figure 4 According to some embodiments of the present invention, the preset page layout diagram is divided into regions based on the color distribution of the pixels in the preset page layout diagram to obtain the color blocks to be identified, including:
[0086] Step S401, describing the color of each pixel in the preset page layout diagram by using a three-primary color array;
[0087] It should be noted that the three-primary color array is an RGB array, which can describe the color of the pixel based on the three-primary color principle, such as black (0, 0, 0), yellow (255, 255, 0), white (255, 255, 0), and sky blue (135, 206, 235). The color classification corresponding to the three-primary color array can be obtained from the RGB color spectrum table. It should be understood that the description of the color of each pixel in the preset page layout diagram by the three-primary color array is to convert the color into data form, so as to facilitate the subsequent steps of dividing the preset page layout diagram into regions.
[0088] Step S402, based on the three primary color array corresponding to each pixel, counting the positions of each pixel whose color is in the same color gamut;
[0089] It should be noted that in computer graphics processing, a color gamut is a complete subset of colors, such as a given color space or the area range corresponding to a certain three-primary color array set in the RGB color spectrum. Specifically, for example, light pink (255, 182, 193), pink (255, 192, 203) and dark pink (255, 20, 147) are the same or similar colors as pink and are classified into one color gamut, or pure blue (0, 0, 255), sky blue (135, 206, 235) and light steel blue (176, 196, 222) are the same or similar colors as blue and are classified into another color gamut. The critical array between color gamuts can be determined according to the applicable scenario and scope. In some embodiments provided by the present invention, counting the positions of each pixel point whose color is in the same color gamut refers to using a pre-defined color gamut as a comparison basis, and describing the color of each pixel point in a preset page layout diagram through a three-primary color array in step S401, wherein the three-primary color array used to describe the color of each pixel point in the preset page layout diagram is compared with the pre-defined color gamut to distinguish the color areas composed of various types of pixel points that are respectively blocked in the preset page layout diagram.
[0090] Step S403, according to the positions of the pixels, the position intervals between the pixels whose colors are in the same color gamut are obtained;
[0091] According to some embodiments of the present invention, after distinguishing the color areas composed of various types of pixel points that are respectively blocked in the preset page layout diagram, the distance between the color areas composed of various types of pixel points in the preset page layout diagram is measured, so that subsequent steps can further distinguish whether the color areas composed of two pieces of pixel points belong to the same color block to be identified.
[0092] Step S404 , classifying the pixels in the same color gamut and with a position interval less than a preset distance into the same area, dividing the preset page layout into regions, and obtaining color blocks to be identified.
[0093] It should be noted that the preset distance refers to the distance between pixels that is pre-set according to the application scenario and is sufficient to determine that each pixel should be classified as the same area. The preset distance can include the distance between individual pixels and the average distance between pixels in different areas. When two color areas belong to the same color gamut and the position interval between the two color areas is less than the preset distance, it can be determined that the two color areas are highly correlated, and then the color areas composed of the above two pixels are integrated and classified as the same area. After the color areas composed of all the pixels in the preset page layout are integrated and classified, various types of color blocks to be identified in the preset page layout can be obtained.
[0094] It should be understood that according to some embodiments provided by the present invention, before obtaining the color block to be identified, it is necessary to first obtain the color area under each color gamut in the preset page layout diagram, for example: all the pixels in the preset page layout diagram that are in the same color gamut as sky blue (135, 206, 235) are marked, and all the pixels in the preset page layout diagram that are in the same color gamut as pink (255, 192, 203) are also marked, and all the pixels in the preset page layout diagram that are in the same color gamut as yellow (255, 255, 0) are also marked, so that the entire preset page layout diagram is identified as three types of color areas, namely, sky blue color gamut, pink color gamut, and yellow color gamut. Further, the position interval of the three types of color areas, namely, sky blue color gamut, pink color gamut, and yellow color gamut, is determined, and the same type of color areas whose position interval is less than the preset distance are integrated and classified, and determined to be the same area. For example: color areas in the preset page layout that are in the same color gamut as pink (255, 192, 203) and whose position intervals are less than a preset distance are integrated and classified as a whole block; color areas in the preset page layout that are in the same color gamut as yellow (255, 255, 0) and whose position intervals are less than a preset distance are integrated and classified as a whole block; color areas in the preset page layout that are in the same color gamut as sky blue (135, 206, 235) and whose position intervals are less than a preset distance are integrated and classified as a whole block. It should be noted that the purpose of integrating and classifying similar color areas whose position intervals are less than a preset distance and determining them as the same area is to avoid color areas that actually belong to the same component being determined as different color blocks to be identified.
[0095] By dividing the preset page layout diagram into regions in the above manner, a reliable recognition basis can be provided for content recognition in the subsequent optical character recognition step. In this way, the preset page layout diagram can be reasonably divided into regions, thereby obtaining color blocks to be recognized that are sufficient for content recognition in the optical character recognition model.
[0096] Reference Figure 5 According to some embodiments of the present invention, performing optical character recognition on a color block to be identified and obtaining color block type information of the color block to be identified includes:
[0097] Step S501, performing optical character recognition on the color block to be recognized, and obtaining the shape and text information of the color block to be recognized in the color block type information.
[0098] It should be noted that in traditional technologies, text recognition is classified by means of template matching. However, for a text line, the final content of the text line can only be determined by recognizing each character. Therefore, character segmentation can be performed on the text line to obtain individual characters. In this method, over-segmentation-dynamic programming is the most common segmentation method. Since a single character may have multiple recognition results due to the segmentation position. For example, the character "如" may be segmented into "女_口" when segmented improperly. Therefore, it is necessary to over-segment the candidate characters to make them sufficiently fragmented, and then merge the segmented fragments through dynamic programming to obtain the optimal combination. This process requires manual design of a loss function. There is another method, which is to match each possible character through a sliding window. The accuracy of this method depends on the sliding window size of the sliding window. If the sliding window size is too large, information will be lost, while if it is too small, the computing power requirement will increase significantly. Therefore, introducing context information has become the key to improving the accuracy of entries. In some relatively preferred embodiments of the present invention, from the perspective of deep learning, introducing context sequence information, recurrent neural networks (RNN) or long short-term memory (LSTM) and other neural networks that rely on temporal relationships is the most ideal choice.
[0099] According to some specific embodiments provided by the present invention, step S501 performs optical character recognition on the color block to be recognized, and obtains the shape and text information of the color block to be recognized in the color block type information, specifically including: performing content recognition on the color block to be recognized, obtaining the shape of the color block to be recognized according to the border contour of the color block to be recognized, and reading the text information presented by the color block to be recognized through text recognition. For example: performing content recognition on the color block to be recognized, according to the border contour of the color block to be recognized, determining that the color block to be recognized is a rounded rectangle, and the component with the border contour of the rounded rectangle type is a button component, then the preset type of the component corresponding to the color block to be recognized can be determined. In addition, reading the text information presented by the color block to be recognized through text recognition can be considered together with the border contour of the color block to be recognized as a determination basis. For example: performing content recognition on the color block to be recognized, according to the border contour of the color block to be recognized, determining that the color block to be recognized is a rounded rectangle, and the component with the border contour of the rounded rectangle type is a text box component, and then reading the text information presented by the color block to be recognized through text recognition, obtaining the text information "Username:", "Password:", then combining the text box component, the text information "Username:" and "Password:", it can be further determined that the component is a text box for the login interface, and thus the preset type of the component can be further confirmed.
[0100] It should be noted that the component layout of the page to be embedded as reflected in the preset page layout diagram can contain a variety of information. Therefore, content recognition of the color block to be identified can also include the recognition of multiple elements. It should be understood that the main problem solved by content recognition is what information is contained in each element in the image. In some embodiments provided by the present invention, the information contained in the color block to be identified includes but is not limited to: text, graphics, color, table or other elements. It should be emphasized that the information contained in the color block to be identified in the present invention is not limited to the above-mentioned categories. In addition, the identified content usually needs to be checked again to ensure its correctness. Therefore, in some embodiments provided by the present invention, performing optical character recognition on the color block to be identified and obtaining the color block type information of the color block to be identified also includes the setting of a link for correcting the shape and text information in the color block to be identified.
[0101] Step S502: According to the shape and text information of the color block to be identified, the component embedding type corresponding to the color block to be identified is matched from the component type database.
[0102] According to some embodiments of the present invention, the component type database refers to a pre-set database containing various types of components, and the types of components can be advertising positions, quick replies, buttons, and text boxes. It should be understood that in addition to various types of components, the component type database may also contain other content related to the component. Other content related to the component may be various types of trigger actions, such as: login, logout, click trigger, release the mouse button trigger, change attributes, etc. Other content related to the component may also be the conditions for triggering the buried point, for example: when the account password is correct, the system login is completed, the calculation of the browsing volume is triggered after entering the homepage after login, and the number of clicks on the button is updated after clicking the "navigation" button. Other content related to the component may also be the field types of various components, such as: userId, time, label, number, content, isHistory, etc. Other content related to the component may also be the event name corresponding to each type of component after being triggered, such as: completion of system login, homepage exposure, navigation menu bar being clicked, etc. It should be emphasized that the component type database is used to match the color block to be identified for the component buried type and its related information, so as to help the buried point processing method of the present invention accurately and efficiently arrange the user data collection points.
[0103] Reference Figure 6 According to some embodiments of the present invention, according to the component embedding position and the component embedding type, embedding the user data collection point in the page to be embedded includes:
[0104] Step S601, according to the component embedding type, obtaining the preset embedding point data corresponding to the component embedding type;
[0105] It should be noted that the preset data for buried points refers to the trigger action of the component to be buried, the trigger condition of the component to be buried, the field type of the component to be buried, the event name corresponding to the trigger of the component to be buried, and other contents related to the component to be buried, which are needed to bury the user data collection point and match the type of the component to be buried. Among them, the trigger action of the component to be buried may include: login, logout, click trigger, release the mouse button trigger, change properties and other contents; the trigger condition of the component to be buried may include: when the account password is correct, the system login is completed, the calculation of the browsing volume is triggered after entering the homepage after login, and the number of clicks of the button is updated after clicking the "navigation" button; the field type of the component to be buried may include: userId, time, label, number, content, isHistory and other contents. The event name corresponding to the trigger of the component to be buried may include: completion of system login, homepage exposure, navigation menu bar being clicked and other contents. It should be emphasized that the preset data for buried points is used to match the component burying type of the component to be buried and its related information, so as to help the buried point processing method of the present invention to accurately and efficiently lay out the user data collection points.
[0106] Acquiring the preset data of the buried points corresponding to the component burying type according to the component burying type can be achieved in a variety of ways, including but not limited to matching from a preset component type database. In addition, in the process of front-end development, it is necessary to follow the front-end specifications that meet industry standards, and some of these front-end specifications include pre-set preset data of the buried points. In some embodiments provided by the present invention, after clarifying the type of component burying that needs to be buried, the corresponding preset data of the buried points can be matched from the front-end specifications according to the component burying type. It should be understood that in addition to adopting the front-end specifications of industry standards, other specifications commonly agreed upon by industry insiders can also be adopted to obtain the preset data of the buried points corresponding to the component burying type according to the component burying type.
[0107] According to some embodiments provided by the present invention, the layout of the page component to be embedded reflected by the preset page layout diagram may also include multiple types of fields. The basic fields in the field type refer to the fields that need to be reported by default, such as terminal information, network information, user information, time information, etc., while the individual fields in the field type need to be reported one by one according to the information contained in the component. According to some specific embodiments provided by the present invention, the basic information in the basic field of the preset data of the buried point corresponding to the component buried type includes but is not limited to the following types of information: system information (such as iOS / Android / Web / H5), application software version number, application software installation package name (such as XXX-XXX.apk), current device identification (such as device ID, brand, model, network type, IP address); user information in the basic field of the preset data of the buried point corresponding to the component buried type includes but is not limited to the following types of information: buried point number, user identification (such as userid / openid / um / work number), user mobile phone number, user action time, page stay time; extended information in the personalized field of the preset data of the buried point corresponding to the component buried type includes but is not limited to the following types of information: element id (activity id / content id / product id / script id), channel identification (newly allocated as needed), element position (if the same element appears in multiple positions on the page, it can be distinguished by defining the element position), ABtest identification, merchant number. It should be noted that the personalized field of the preset data of the buried point corresponding to the component buried type can be set according to the content required to be presented by the buried user data collection point, and can be flexibly adjusted.
[0108] Step S602, generating a burying point list according to the preset burying point data, and burying user data collection points based on the burying point list.
[0109] According to some embodiments of the present invention, burying user data collection points is to convert the component layout of the page to be buried in the preset page layout diagram into the component layout in the actual front-end page, and bury the corresponding user data collection points in the underlying code of the component layout in the actual front-end page. It should be noted that the buried point list contains the component buried type that needs to be clarified for burying the user data collection point and the trigger action of the component to be buried that matches the component buried type in the buried point preset data, the trigger condition of the component to be buried, the field type of the component to be buried, the event name corresponding to the trigger of the component to be buried, and other contents related to the component to be buried. It should be understood that the buried point list can be presented in the form of a table, a document, etc. Since the table can more clearly indicate the corresponding relationship between the component buried type and the matching trigger action of the component to be buried, the trigger condition of the component to be buried, the field type of the component to be buried, the event name corresponding to the trigger of the component to be buried, etc., therefore, a more preferred embodiment of the present invention uses a table to generate the buried point list. It should be emphasized that burying user data collection points based on the burying point list can accurately and efficiently deploy user data collection points. According to some embodiments provided by the present invention, generating a burying point list based on the preset burying point data also helps to carry out the correction work. Before burying user data collection points based on the burying point list, it can also include content proofreading of the burying point list. When the burying point list meets the requirements of the front-end development projects such as applications and websites for the underlying data burying points and data indicators, the user data collection points are further buried based on the burying point list to achieve accurate and efficient deployment of user data collection points.
[0110] Reference Figure 7 According to some embodiments of the present invention, a point embedding list is generated according to preset point embedding data, and user data collection points are embedded based on the point embedding list, including:
[0111] Step S701, according to the burying point list, define and assign the burying point preset data in the burying point list, and generate a burying point code snippet corresponding to the burying point preset data;
[0112] It should be noted that burying the user data collection point is to convert the component layout of the page to be buried in the preset page layout diagram into the component layout in the actual front-end page, and bury the corresponding user data collection point in the underlying code of the component layout in the actual front-end page. The buried point code snippet refers to the code snippet in the underlying code that can be incorporated into the component layout in the actual front-end page, and the content reflected by the buried point code snippet includes: the component burying type required for burying the user data collection point and the matching trigger action of the to-be-buried component, the trigger condition of the to-be-buried component, the field type of the to-be-buried component, the event name corresponding to the trigger of the to-be-buried component, etc. It should be understood that the purpose of generating the buried point code snippet is to provide the materials required for programming for the development process of the underlying code of the actual front-end page, so as to facilitate the burying of the user data collection point in the to-be-buried page. According to some embodiments provided by the present invention, generating a buried point code snippet corresponding to the buried point preset data includes but is not limited to defining and assigning the buried point preset data in the buried point list. Among them, the preset data of the tracking point in the tracking point list are defined and assigned. For example, according to the tracking point list, the following code snippets are generated: Event = homepageShow, Title = Knowledge Kit Home Page, From = wx, Uid = 1234567890, etc.
[0113] Step S702, based on the embedding code snippet, embed the user data collection point in the page to be embedded.
[0114] Since the buried point list contains the component burying type that needs to be clarified for burying the user data collection point, as well as the trigger action of the component to be buried that matches the component burying type in the preset data of the buried point, the trigger condition of the component to be buried, the field type of the component to be buried, the event name corresponding to the trigger of the component to be buried, and other contents related to the component to be buried; and the buried point list makes the correspondence between the component burying type and the matching trigger action of the component to be buried, the trigger condition of the component to be buried, the field type of the component to be buried, the event name corresponding to the trigger of the component to be buried, and other contents clear and explicit. Therefore, the buried point code snippet generated based on the buried point list can help the buried point processing method of the present invention to accurately and efficiently lay out the user data collection point.
[0115] Figure 8 The electronic device 800 provided by the embodiment of the present invention is shown. The electronic device 800 includes: a processor 801, a memory 802, and a computer program stored in the memory 802 and executable on the processor 801, and the computer program is used to execute the above-mentioned buried point processing method when it is executed.
[0116] The processor 801 and the memory 802 may be connected via a bus or other means.
[0117] The memory 802 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs and non-transitory computer executable programs, such as the tracking point processing method described in the embodiment of the present invention. The processor 801 implements the above tracking point processing method by running the non-transitory software programs and instructions stored in the memory 802.
[0118] The memory 802 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function. The data storage area may store and execute the above-mentioned point-of-use processing method. In addition, the memory 802 may include a high-speed random access memory 802, and may also include a non-volatile memory 802, such as at least one storage device storage device, a flash memory device or other non-volatile solid-state storage device. In some embodiments, the memory 802 may optionally include a memory 802 remotely arranged relative to the processor 801, and these remote memories 802 may be connected to the electronic device 800 via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network and combinations thereof.
[0119] The non-transient software program and instructions required to implement the above-mentioned embedding processing method are stored in the memory 802. When executed by one or more processors 801, the above-mentioned embedding processing method is executed, for example, Figure 1 Steps S101 to S103 of the method, Figure 2 Steps S201 to S203 of the method, Figure 3 Steps S301 to S304 of the method, Figure 4 Steps S401 to S404 of the method, Figure 5 Steps S501 to S502 of the method, Figure 6 Steps S601 to S602 of the method, Figure 7 Method steps S701 to S702.
[0120] The processor 801 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0121] The memory 802 may be an internal storage unit of the electronic device 800, such as a hard disk or memory of the electronic device 800. The memory 802 may also be an external storage device of the electronic device 800, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (FlashCard), etc. equipped on the electronic device 800. Further, the memory 802 may also include both an internal storage unit of the electronic device 800 and an external storage device. The memory 802 is used to store computer programs and other programs and data required by the computer device. The memory 802 may also be used to temporarily store data that has been output or is to be output.
[0122] An embodiment of the present invention further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the above-mentioned point embedding processing method.
[0123] In one embodiment, the computer readable storage medium stores computer executable instructions, which are executed by one or more control processors, for example, Figure 1 Steps S101 to S103 of the method, Figure 2 Steps S201 to S203 of the method, Figure 3 Steps S301 to S304 of the method, Figure 4 Steps S401 to S404 of the method, Figure 5 Steps S501 to S502 of the method, Figure 6 Steps S601 to S602 of the method, Figure 7 Method steps S701 to S702.
[0124] The electronic device embodiments and 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.
[0125] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, storage device storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. In addition, it is well known to those skilled in the art that communication media generally include computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium. It should also be understood that the various implementations provided in the embodiments of the present invention can be arbitrarily combined to achieve different technical effects.
[0126] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above-mentioned implementation mode. Technical personnel familiar with the field can also make various equivalent deformations or substitutions under the shared conditions without violating the spirit of the present invention. These equivalent deformations or substitutions are all included in the scope defined by the claims of the present invention.
[0127] Technical personnel in the relevant field can clearly understand that, for the convenience and conciseness of description, the specific working processes of the above-described buried point processing method, electronic device, and storage medium can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0128] In the several embodiments provided by the present invention, it should be understood that the disclosed buried point processing method, electronic device, and storage medium can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, 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.
[0129] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for processing buried points, characterized in that: include: Obtaining a preset page layout diagram, wherein the preset page layout diagram reflects the layout of components in the page to be embedded; wherein the preset page layout diagram is designed according to the requirements of embedding user data collection points; Dividing the preset page layout diagram into regions based on the color distribution of the pixels in the preset page layout diagram to obtain color blocks to be identified; Performing optical character recognition on the color block to be identified to obtain the shape and text information of the color block to be identified; According to the shape and text information of the color block to be identified, matching and obtaining the component embedding type corresponding to the color block to be identified from the component type database; According to the component embedding type, obtaining embedding point preset data corresponding to the component embedding type; Generate a tracking point list according to the tracking point preset data; According to the burying point list, define and assign values to the burying point preset data in the burying point list; Generate a tracking code snippet based on the tracking preset data after definition and assignment; Based on the embedding code snippet, the user data collection point is embedded in the page to be embedded.
2. The method for processing buried points according to claim 1, characterized in that: The step of dividing the preset page layout diagram into regions based on the color distribution of the pixels in the preset page layout diagram to obtain the color blocks to be identified comprises: Obtaining the three primary color array of each pixel in the preset page layout; Based on the three primary color arrays corresponding to each of the pixel points, counting the positions of each of the pixel points whose colors are in the same color gamut; According to the positions of the respective pixel points, the position intervals between the respective pixel points whose colors are in the same color gamut are obtained; The pixel points in the same color gamut and whose position intervals are less than a preset distance are classified into the same area, and the preset page layout diagram is divided into areas to obtain the color blocks to be identified.
3. The method for processing buried points according to claim 1, characterized in that: The step of matching the component embedding type corresponding to the color block to be identified from a component type database according to the shape and text information of the color block to be identified includes: According to the text information in the color block to be identified, matching a field type corresponding to the text information from the component type database; The component embedding type corresponding to the color block to be identified is obtained according to the matched field type.
4. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program, and the processor implements the buried point processing method as described in any one of claims 1 to 3 when executing the computer program.
5. A computer-readable storage medium, characterized in that: The storage medium stores a program, and the program is executed by a processor to implement the buried point processing method as described in any one of claims 1 to 3.
