CN109684005A - Component similarity determines method and device in graphical interfaces - Google Patents

Component similarity determines method and device in graphical interfaces Download PDF

Info

Publication number
CN109684005A
CN109684005A CN201811510141.2A CN201811510141A CN109684005A CN 109684005 A CN109684005 A CN 109684005A CN 201811510141 A CN201811510141 A CN 201811510141A CN 109684005 A CN109684005 A CN 109684005A
Authority
CN
China
Prior art keywords
assembly
component
similarity
assembly element
projected area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811510141.2A
Other languages
Chinese (zh)
Other versions
CN109684005B (en
Inventor
贺三元
张桀宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Koubei Network Technology Co Ltd
Original Assignee
Zhejiang Koubei Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Koubei Network Technology Co Ltd filed Critical Zhejiang Koubei Network Technology Co Ltd
Priority to CN201811510141.2A priority Critical patent/CN109684005B/en
Publication of CN109684005A publication Critical patent/CN109684005A/en
Application granted granted Critical
Publication of CN109684005B publication Critical patent/CN109684005B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses component similarities in a kind of graphical interfaces to determine method and device.Wherein, method includes: to obtain first assembly and the second component, and determine the first assembly element that first assembly includes, and determine the second component element that the second component includes;For each first assembly element, according to the projection of the first assembly element in the second component, it determines the second component element corresponding with the first assembly element, and calculates the element similarity between the first assembly element the second component element corresponding with the first assembly element;According to the element similarity of first assembly element and corresponding second component element each at least one first assembly element, the component similarity between first assembly and the second component is determined.This programme can rapidly and accurately determine the component similarity between first assembly and the second component, also, implementation process is simple and easy by the projection relation between first assembly and the second component, be suitable for extensive implementation and application.

Description

Component similarity determines method and device in graphical interfaces
Technical field
The present invention relates to field of computer technology, and in particular to component similarity determines method and dress in a kind of graphical interfaces It sets.
Background technique
Graphical interfaces is to adopt graphically to show user interface, compared with the interfaces such as order line, tool There is the features such as operation is succinct, interface hommization and user experience are high, to be widely used.Currently, to be convenient for the user to operate and Showing interface effect is promoted, has generally comprised one or more components in graphical interfaces.
With the continuous development of science and technology, the quantity of various components is also continuously increased, to improve component in graphical interfaces The difficulty of classification and component recognition.Now, for the component in graphic interface is identified or classified, two groups need to usually be obtained Similarity between part, so that further component is classified or be identified based on the similarity between component.
The prior art during obtaining component similarity, generally use be as application publication number be CN105550540A Chinese patent application provided by method, i.e., to application program carry out code decompiling processing after, the correlation for obtaining application is matched File is set, and m-cosine similarity between the two-dimensional array after converting by configuration file determines between two components Similarity.However, this method need to carry out code decompiling to application, and directly by remaining between the two-dimensional array of configuration file String vector similarity determines the similarity between two components, thus reduce the accuracy of the component similarity of acquisition, and Component similarity acquisition process is complicated, is unfavorable for large-scale application.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind It states component similarity in the graphical interfaces of problem and determines method and device.
According to an aspect of the invention, there is provided component similarity determines method in a kind of graphical interfaces, comprising:
First assembly and the second component are obtained respectively, and determine at least one first assembly member that the first assembly includes Element, and determine at least one second component element that second component includes;
For each first assembly element at least one described first assembly element, existed according to the first assembly element Projection in second component determines the second component element corresponding with the first assembly element, and calculates this first group Element similarity between part element the second component element corresponding with the first assembly element;
According to each first assembly element at least one described first assembly element and corresponding second component element Element similarity, determine the component similarity between the first assembly and second component.
Optionally, between described calculating first assembly element the second component element corresponding with the first assembly element Element similarity further comprise: when determining that the first assembly element is projected to second component, the first assembly element The lap area of the second component element corresponding with the first assembly element;According to the first assembly element corresponding One projected area accounting and/or the second projected area accounting, it is corresponding with the first assembly element to calculate the first assembly element The second component element between element similarity;Wherein, the first projected area accounting be the lap area with The ratio of the area of the first assembly element;The second projected area accounting is the lap area and the first assembly The ratio of the area of the corresponding second component element of element.
Optionally, between described calculating first assembly element the second component element corresponding with the first assembly element Element similarity further comprise: according to the corresponding first projected area accounting of the first assembly element and/or second project Element content phase between area accounting and the first assembly element the second component element corresponding with the first assembly element Like degree, the element similarity between the first assembly element the second component element corresponding with the first assembly element is calculated.
Optionally, between described calculating first assembly element the second component element corresponding with the first assembly element Element similarity further comprise: the element type of the first assembly element is determined, using the member with the first assembly element The corresponding calculation method of plain type, calculates the first assembly element the second component element corresponding with the first assembly element Between element similarity.
Optionally, if the first assembly element is Container Type;Then the first assembly element and the first assembly element phase Element content similarity between corresponding second component element is container background color similarity;
The then member calculated between the first assembly element the second component element corresponding with the first assembly element Plain similarity further comprises: according to the corresponding first projected area accounting of the first assembly element, the first assembly element with The container background color similarity of the corresponding second component element of the first assembly element, and/or, the first assembly element Container area accounting determines the element between the first assembly element the second component element corresponding with the first assembly element Similarity.
Optionally, if the first assembly element is picture type;Then the first assembly element and the first assembly element phase Element content similarity between corresponding second component element is diagram form similarity and/or MD5 value similarity;
The then member calculated between the first assembly element the second component element corresponding with the first assembly element Plain similarity further comprises: determining between the first assembly element the second component element corresponding with the first assembly element Whether diagram form similarity and/or MD5 value similarity meet default similarity requirement;If satisfied, then according to first assembly member The corresponding first projected area accounting of element, determines the first assembly element the second component metadata corresponding with the first assembly element Element similarity between element.;If not satisfied, then according to the corresponding first projected area accounting of the first assembly element and Two projected area accountings determine the member between the first assembly element the second component element corresponding with the first assembly element Plain similarity.
Optionally, if the first assembly element is literal type;Then the first assembly element and the first assembly element phase Element content similarity between corresponding second component element is character background color similarity, text foreground color similarity And/or word content similarity;
The then member calculated between the first assembly element the second component element corresponding with the first assembly element Plain similarity further comprises: according to the corresponding first projected area accounting of the first assembly element, the first assembly element with Character background color similarity, text foreground color similarity between the corresponding second component element of the first assembly element And/or word content similarity, determine the first assembly element the second component element corresponding with the first assembly element it Between element similarity.
Optionally, the projection according to the first assembly element in second component, the determining and first assembly The corresponding second component element of element further comprises: determining the projection of the first assembly element in the second component;By position In second component element of the first assembly element in the projection in the second component, it is determined as opposite with the first assembly element The the second component element answered.
Optionally, if it is multiple for being located at second component element of the first assembly element in the projection in the second component;
The then projection according to the first assembly element in second component, determination and the first assembly element phase Corresponding second component element further comprises: being directed to be located at the first assembly element in the projection in the second component respectively Each second component element, obtains the overlapping area of the second component element and the first assembly element;Calculate second component The overlapping area of element and the first assembly element accounts for the area accounting of the area of the first assembly element;It is being located at this first group Part element selects highest second group of corresponding area accounting in multiple second component elements in the projection in the second component Part element is as the second component element corresponding with the first assembly element.
Optionally, the element class of the described first assembly element the second component element corresponding with the first assembly element It is not identical.
Optionally, at least one first assembly element that the determination first assembly includes, and determine described the At least one second component element that two components include further comprises: determining the first assembly relative to second component Scaling;According to the scaling, the first assembly and/or second component are zoomed in and out, and according to contracting First assembly and/or the second component after putting determine at least one first assembly element that first assembly is included, and determine At least one second component element that second component is included.
Optionally, described to obtain first assembly and the second component respectively, and determine that the first assembly is included at least One first assembly element, and at least one the second component element for determining that second component is included further comprises: The corresponding first assembly picture of first assembly is obtained, the first assembly picture is converted into corresponding first tree structure and is retouched File is stated, file is described according to first tree structure, determines at least one component element that first assembly is included;From pre- If obtaining the second component in Component Gallery, and file is described according to corresponding second tree structure of the second component, determines described At least one second component element that two components are included.
According to another aspect of the present invention, component similarity determining device in a kind of graphical interfaces is provided, comprising:
Module is obtained, is suitable for obtaining first assembly and the second component respectively, and determines that the first assembly includes at least One first assembly element, and determine at least one second component element that second component includes;
Similar component element determining module, suitable for for each first assembly at least one described first assembly element Element determines corresponding with the first assembly element the according to projection of the first assembly element in second component Two component elements;
Element similarity determining module is suitable for calculating the first assembly element and the first assembly element corresponding second Element similarity between component element;
Component similarity determining module is suitable for according to each first assembly element at least one described first assembly element With the element similarity of corresponding second component element, the component phase between the first assembly and second component is determined Like degree.
Optionally, the element similarity determining module is further adapted for: determining that the first assembly element is projected to described When the second component, the lap area of the first assembly element the second component element corresponding with the first assembly element; According to the corresponding first projected area accounting of the first assembly element and/or the second projected area accounting, the first assembly is calculated Element similarity between element the second component element corresponding with the first assembly element;
Wherein, the first projected area accounting is the ratio of the lap area and the area of the first assembly element Value;The second projected area accounting is the lap area the second component element corresponding with the first assembly element Area ratio.
Optionally, the element similarity determining module is further adapted for: according to the first assembly element corresponding first Projected area accounting and/or the second projected area accounting and the first assembly element corresponding with the first assembly element Element content similarity between two component elements calculates the first assembly element and the first assembly element corresponding second Element similarity between component element.
Optionally, the element similarity determining module is further adapted for: determine the element type of the first assembly element, Using calculation method corresponding with the element type of the first assembly element, the first assembly element and the first assembly are calculated Element similarity between the corresponding second component element of element.
Optionally, if the first assembly element is Container Type;Then the first assembly element and the first assembly element phase Element content similarity between corresponding second component element is container background color similarity;
The element similarity determining module is further adapted for: according to corresponding first projected area of the first assembly element Accounting, the container background color similarity of the first assembly element the second component element corresponding with the first assembly element, And/or the container area accounting of the first assembly element, determine that the first assembly element is corresponding with the first assembly element Element similarity between second component element.
Optionally, if the first assembly element is picture type;Then the first assembly element and the first assembly element phase Element content similarity between corresponding second component element is diagram form similarity and/or MD5 value similarity;The member Plain similarity determining module is further adapted for: determining the first assembly element the second component metadata corresponding with the first assembly element Whether diagram form similarity and/or MD5 value similarity between element meet default similarity requirement;If satisfied, then according to The corresponding first projected area accounting of one component element determines the first assembly element corresponding with the first assembly element Element similarity between two component elements;If not satisfied, then being accounted for according to corresponding first projected area of the first assembly element Than and the second projected area accounting, determine the first assembly element the second component element corresponding with the first assembly element Between element similarity.
Optionally, if the first assembly element is literal type;Then the first assembly element and the first assembly element phase Element content similarity between corresponding second component element is character background color similarity, text foreground color similarity And/or word content similarity;
The element similarity determining module is further adapted for: according to corresponding first projected area of the first assembly element Accounting, the character background color between the first assembly element the second component element corresponding with the first assembly element are similar Degree, text foreground color similarity and/or word content similarity, determine the first assembly element and the first assembly element phase Element similarity between corresponding second component element.
Optionally, the similar component element determining module further comprises: determining the first assembly element at second group Projection in part;Second component element of the first assembly element in the projection in the second component will be located at, be determined as and be somebody's turn to do The corresponding second component element of first assembly element.
Optionally, if it is multiple for being located at second component element of the first assembly element in the projection in the second component;
Then the similar component element determining module is further adapted for: being directed to be located at the first assembly element second respectively Each of projection in component the second component element, obtains the faying surface of the second component element and the first assembly element Product;The area for the area that the overlapping area for calculating the second component element and the first assembly element accounts for the first assembly element accounts for Than;It is being located at the first assembly element in multiple second component elements in the projection in the second component, is selecting corresponding face The product highest second component element of accounting is as the second component element corresponding with the first assembly element.
Optionally, the element class of the described first assembly element the second component element corresponding with the first assembly element It is not identical.
Optionally, the acquisition module is further adapted for: determining contracting of the first assembly relative to second component Put ratio;According to the scaling, the first assembly and/or second component are zoomed in and out, and according to scaling after First assembly and/or the second component, determine at least one first assembly element that first assembly is included, and determine second At least one second component element that component is included.
Optionally, the acquisition module is further adapted for: the corresponding first assembly picture of first assembly is obtained, by described the One component picture is converted to corresponding first tree structure and describes file, describes file according to first tree structure, really Determine at least one component element that first assembly is included;The second component is obtained from description components library, and according to the second component Corresponding second tree structure describes file, determines at least one second component element that second component is included.
According to another aspect of the invention, provide a kind of calculating equipment, comprising: processor, memory, communication interface and Communication bus, the processor, the memory and the communication interface complete mutual communication by the communication bus;
For the memory for storing an at least executable instruction, it is above-mentioned that the executable instruction executes the processor Component similarity determines the corresponding operation of method in a kind of graphical interfaces.
In accordance with a further aspect of the present invention, provide a kind of computer storage medium, be stored in the storage medium to A few executable instruction, the executable instruction make processor execute component similarity determination side in a kind of such as above-mentioned graphical interfaces The corresponding operation of method.
Component similarity determines method and device in the graphical interfaces provided according to the present invention, first acquisition first assembly and Second component, and determine the first assembly element that first assembly includes, and determine the second component element that the second component includes;Into One step is directed to each first assembly element, according to the projection of the first assembly element in the second component, determines and this first group The corresponding second component element of part element, and it is second group corresponding with the first assembly element to calculate the first assembly element Element similarity between part element;Finally according to first assembly element each at least one first assembly element with it is corresponding The second component element element similarity, determine the component similarity between first assembly and the second component.This programme passes through Projection relation between first assembly and the second component can rapidly and accurately determine the group between first assembly and the second component Part similarity, also, implementation process is simple and easy, is suitable for extensive implementation and application.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows the stream that component similarity in a kind of graphical interfaces that according to embodiments of the present invention one provides determines method Journey schematic diagram;
Component similarity determines the stream of method in a kind of graphical interfaces provided Fig. 2 shows according to embodiments of the present invention two Journey schematic diagram;
Fig. 3 shows a kind of first assembly and the second component diagram that according to embodiments of the present invention three provide;
Fig. 4 shows the stream that component similarity in a kind of graphical interfaces that according to embodiments of the present invention three provide determines method Journey schematic diagram;
Fig. 5 shows the function of component similarity determining device in a kind of graphical interfaces that according to embodiments of the present invention four provide It can structural schematic diagram;
Fig. 6 shows a kind of structural schematic diagram for calculating equipment that according to embodiments of the present invention six provide.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
Embodiment one
Fig. 1 shows the stream that component similarity in a kind of graphical interfaces that according to embodiments of the present invention one provides determines method Journey schematic diagram.As shown in Figure 1, this method comprises:
Step S110 obtains first assembly and the second component respectively, and determine that first assembly includes at least one first Component element, and determine at least one second component element that the second component includes.
Component similarity determines that method is mainly used for determining first assembly and the in graphical interfaces provided by the present embodiment Similarity between two components.Optionally, first assembly can be component to be detected, can cut from a certain graphical interfaces Figure etc., and the second component can be the component being stored in description components library.To first assembly determining through this embodiment With the similarity between the second component, the component to match in budget Component Gallery with first assembly can be determined, to be the Classification of one component etc. provides basis.
In actual implementation process, a component is usually made of one or more components element, which can Think container class component element, picture category component element and/or text class component element.First group then finally determined for raising The accuracy of component similarity between part and the second component, this step further determine at least one that first assembly includes At least one second component element that first assembly element and the second component include.
Step S120, for each first assembly element at least one first assembly element, according to the first assembly Projection of the element in the second component determines corresponding with the first assembly element the second component element, and calculate this first Element similarity between component element the second component element corresponding with the first assembly element.
The each first assembly element being directed at least one first assembly element that first assembly includes, determine this Projection of the one component element in the second component determines the second component metadata corresponding with the first assembly element according to the projection Element.And the first assembly element the second component element corresponding with the first assembly element further can be calculated according to the projection Between element similarity.
Step S130, according to first assembly element each at least one first assembly element and corresponding second component The element similarity of element determines the component similarity between first assembly and second component.
It can get each first assembly at least one first assembly element that first assembly includes by step S120 The element similarity of element and corresponding second component element, so as to by calculate at least one first assembly element with The summation of the element similarity of corresponding second component element determines that the component between first assembly and the second component is similar Degree.
It can be seen that this implementation obtains first assembly and the second component first, and determine first group that first assembly includes Part element, and determine the second component element that the second component includes;Further directed to each first assembly element, according to this first Projection of the component element in the second component determines the second component element corresponding with the first assembly element, and calculating should Element similarity between first assembly element the second component element corresponding with the first assembly element;Final basis is at least The element similarity of each first assembly element and corresponding second component element, determines first in one first assembly element Component similarity between component and the second component.This programme, can by the projection relation between first assembly and the second component Rapidly and accurately determine the component similarity between first assembly and the second component, also, implementation process is simple and easy, is suitable for It is extensive to implement and apply.
Embodiment two
Component similarity determines the stream of method in a kind of graphical interfaces provided Fig. 2 shows according to embodiments of the present invention two Journey schematic diagram.As shown in Fig. 2, this method comprises:
Step S210 obtains first assembly and the second component respectively, and determine that first assembly includes at least one first Component element, and determine at least one second component element that the second component includes.
The present embodiment specifically can describe file and the second component institute based on corresponding first tree structure of first assembly Corresponding second tree structure describes file, to obtain the component similarity between first assembly and the second component.To this reality It applies example to be not necessarily to inversely compile application or interface, so that it may determine the similarity of the component in the pictures such as interface screenshot.
Specifically, obtaining the corresponding first assembly picture of first assembly first, which can be with source Mr. Yu One graphical interfaces screenshot.And first assembly picture is further converted into corresponding first tree structure and describes file.Wherein, First assembly picture is converted to corresponding first tree structure describing file can be realized by following steps: to first assembly Picture carries out image recognition, determines the various components element for including in first assembly picture, and obtain and wrap in first assembly picture (wherein, attribute information may include location information, dimension information and/or color letter to the various components attribute of an element information contained Breath etc.);So as to according to various components attribute of an element information, determine the incidence relation between various components element (as side by side Relationship, inclusion relation etc.);According to the incidence relation and various components attribute of an element information between component element, generate First tree structure describes file.Specifically, according to the location information and dimension information of component element, various components element is determined Between hierarchical relationship, so that tree structure frame is constructed according to hierarchical relationship, and further according to the category of various components element Property information, building formed the first tree structure file is described.First tree structure is described comprising each node in file, each Node can correspond to a component element, and the first tree structure describes also to include that the related of component element is believed in file Breath, such as location information, dimension information and/or colouring information.
Similarly, it can be used and be converted to the method that the first tree structure describes file with first assembly picture, by the second component Picture is converted to corresponding second tree structure and describes file, and is stored in description components library.To determine first group During similarity between part and the second component, the second component and corresponding second tree-like can be obtained from description components library Structure description file.Optionally, the first tree structure file described and the second tree structure to describe file can be JSON structure.
In a kind of optional embodiment, for convenient for subsequent file and the second tree can be described based on the first tree structure Shape structure description file accurately obtains the component similarity between first assembly and the second component.Obtaining the first tree structure After description file and/or the second tree structure describe file, file and/or second further can be described to the first tree structure Tree structure describes file and is pre-processed.Specifically, file and/or are described into the first tree structure with hierarchical structure Two tree structures describe file and carry out flaky process.For example, the first tree structure is described file and/or the second tree structure Certain component elements in description file are converted to absolute coordinate relative to the relative coordinate of another component element, calculate picture category The Base64 of component element is encoded and/or MD5 value, and the placeholder in text class component element is removed, and/or, calculate container The container area accounting of class component element, wherein container area accounting is specially other groups carried inside 1- Container elements Area/Container elements gross area of part element.
Further, file is described according to the first tree structure, determines at least one component element that first assembly is included; And file is described according to corresponding second tree structure of the second component, determine that the second component included at least one second Component element.Specifically, it is determined that at least one first assembly element and each first assembly element that first assembly is included Attribute information (such as location information, dimension information, and/or colouring information);Similarly, determine the second component included to A few second component element and each first assembly attribute of an element information (such as location information, dimension information, and/or face Color information etc.).
It optionally, is the accuracy for improving component similarity between the first assembly finally obtained and the second component, it can be into One step determines scaling of the first assembly relative to the second component;According to scaling, to first assembly and/or the second component Zoom in and out, and according to the first assembly and/or the second component after scaling, determine that first assembly is included at least one first Component element, and determine at least one second component element that the second component is included.Finally obtained in the present embodiment Component similarity between first assembly and the second component be based on scaling after first assembly and/or the second component and obtain 's.Such as, however, it is determined that the width of first assembly is 100, and the width of the second component is 50, then the height of first assembly can be kept wide Than consistent, and make first assembly reduce one times after, determine the information etc. for the first assembly element that the first assembly is included.
Step S220 determines the first assembly for each first assembly element at least one first assembly element Projection of the element in the second component will be located at second component metadata of the first assembly element in the projection in the second component Element is determined as the second component element corresponding with the first assembly element.
The each first assembly element at least one first assembly element for including for first assembly, determine this first Projection of the component element in the second component will be located at second component of the first assembly element in the projection in the second component Element is determined as the second component element corresponding with the first assembly element.
Optionally, if be located at second component element of the first assembly element in the projection in the second component be it is multiple, Then respectively for the second component element of each of the projection of the first assembly element in the second component is located at, obtain this second The overlapping area of component element and the first assembly element;And it is overlapping with the first assembly element to calculate the second component element Area accounts for the area accounting of the area of the first assembly element;Finally it is being located at the throwing of the first assembly element in the second component In multiple second component elements in shadow, select the corresponding highest second component element of area accounting as with the first assembly The corresponding second component element of element.As shown in figure 3, first assembly is component A, the second component is component B, if first assembly Element is component element A1, then when component element A1 is projected to component B, positioned at component element A1 in the projection of component B the Two component elements are component element B1 and component element B3, and computation module element B 1 and the overlapping area of component element A1 account for group The accounting Q1 and computation module element B 3 of 1 area of part elements A and the overlapping area of component element A1 account for component element A1 area Accounting Q2, and compare the size (Q1 be greater than Q2) of Q1 and Q2, the corresponding component element B1 of final choice Q1 is component element A1 Corresponding second component element.
Further, the element type phase of the first assembly element the second component element corresponding with the first assembly element Together.The element type of the second component element of i.e. each first assembly element corresponding thereto is identical.Wherein, element type includes Container Type, picture type, and/or literal type etc..In actual implementation process, to search and the first assembly element phase Corresponding second component element can search the second component element identical with the element type of the first assembly element, according to looking into The the second component element identical with the element type of the first assembly element found, further according to first assembly element Projection in two components will be located at identical second component metadata of type of the first assembly element in the projection in the second component Element is determined as the second component element corresponding with the first assembly element.
Step S230 is accounted for according to the corresponding first projected area accounting of the first assembly element and/or the second projected area Than calculating the element similarity between the first assembly element the second component element corresponding with the first assembly element.
Specifically, it is determined that when the first assembly element is projected to the second component, the first assembly element and the first assembly The lap area of the corresponding second component element of element.And it calculates corresponding first projected area of first assembly element and accounts for Than and/or the second projected area accounting.Wherein, the first projected area accounting is overlapping area and the first assembly element The ratio of area;Second projected area accounting is overlapping area the second component element corresponding with the first assembly element Area ratio.
As shown in figure 3, if first assembly element is component element A1, the second component element corresponding with component element A1 For component element B1, it is determined that the lap area S0 of component element A1 and component element B1, and calculate lap area The ratio S0/S1 of S0 and component element A1 area S1, ratio S0/S1 are that corresponding first projected area of component element A1 accounts for Than;Similarly, the ratio S0/S2 of lap area S0 and component element B1 area S2 are calculated, ratio S0/S2 is component metadata The corresponding second projected area accounting of plain A1.If component element A1 is completely coincident with component element B1, component element A1 institute is right The the first projected area accounting and the second projected area accounting answered are 1.
Further accounted for according to the corresponding first projected area accounting of the first assembly element of acquisition and/or the second projected area Than calculating the element similarity between the first assembly element the second component element corresponding with the first assembly element.Example Such as, can by the corresponding first projected area accounting of first assembly element directly as the first assembly element corresponding thereto Element similarity between two component elements;The corresponding first projected area accounting of first assembly element can also be thrown with second The product of shadow area accounting is as the element similarity between the first assembly element the second component element corresponding thereto.
Wherein, if the second component element corresponding with first assembly element is not present in the second component, that is, first is determined The corresponding second component element of component element is sky, then can determine first assembly element and corresponding second component element it Between element similarity be 0.
By this step, the element that can get between each first assembly element and corresponding second component element is similar Degree.
Step S240, according to first assembly element each at least one first assembly element and corresponding second component The element similarity of element determines the component similarity between first assembly and the second component.
Specifically, each first assembly element and phase at least one first assembly element that first assembly includes can be calculated The summation of the element similarity of corresponding second component element determines first group according to the summation for calculating the element similarity obtained Component similarity between part and the second component.
Wherein, since the present embodiment is in the element similarity for determining first assembly element with corresponding second component element It is and the first projected area accounting and/or according to the first projected area accounting and/or the second projected area accounting in the process Two projected area accountings can characterize the size and location similarity of first assembly element with corresponding second component element, thus Component similarity between the first assembly that the present embodiment finally obtains and the second component can characterize first assembly and the second component Similarity in structure.
It can be seen that the present embodiment be based on the first tree structure corresponding with first assembly and the second component describe file and Second tree structure describes file to obtain the relevant information of component element in first assembly and the second component, without to boundary Face or application are inversely compiled, and can be obtained the similarity between first assembly and the second component;Obtain first assembly and During second component similarity, it for first assembly each of is included first group that the present embodiment, which is specifically according to sciagraphy, Part element determines its corresponding second component element, and the element class of first assembly element and corresponding second component element Type is identical, and according to the first of the features such as the position and size that can be characterized between first assembly element and the second component element the projection Area accounting and/or the second projected area accounting determine first assembly element and corresponding second component element similarity, from And it can be according to the element phase of first assembly element and corresponding second component element each at least one first assembly element Like degree, the similarity between first assembly and the second component in structure is determined.Also, the component similarity accuracy obtained Height, implementation process is simple and easy, is suitable for extensive implementation and application.
Embodiment three
Fig. 4 shows the stream that component similarity in a kind of graphical interfaces that according to embodiments of the present invention three provide determines method Journey schematic diagram.As shown in figure 4, this method comprises:
Step S410 obtains first assembly and the second component respectively, and determine that first assembly includes at least one first Component element, and determine at least one second component element that the second component includes.
Step S420 determines the first assembly for each first assembly element at least one first assembly element Projection of the element in the second component will be located at second component metadata of the first assembly element in the projection in the second component Element is determined as the second component element corresponding with the first assembly element.
Step S430 is accounted for according to the corresponding first projected area accounting of the first assembly element and/or the second projected area Than and corresponding with the first assembly element the second component element of the first assembly element between element content similarity, Calculate the element similarity between the first assembly element the second component element corresponding with the first assembly element.
Specifically, the element similarity between the first assembly element and corresponding second component element to improve acquisition Accuracy, the first assembly element of different element types can be directed to, using different similarity calculating methods.Specifically, The element type for determining the first assembly element, using calculation method corresponding with the element type of the first assembly element, Calculate the element similarity between the first assembly element the second component element corresponding with the first assembly element.
In one embodiment, if the first assembly element is Container Type;Then the first assembly element and this first Element content similarity between the corresponding second component element of component element is container background color similarity.Then specific During element similarity calculation, the container back between the first assembly element and corresponding second component element is calculated first Scape color similarity, wherein the present embodiment to the calculation method of specific container background color similarity without limitation, this field Technical staff can voluntarily select suitable color similarity to determine method according to actual demand.And further according to this first group The corresponding first projected area accounting of part element, the first assembly element the second component metadata corresponding with the first assembly element The container background color similarity of element, and/or, the container area accounting of the first assembly element determines the first assembly element Corresponding element similarity.For example, can be by the corresponding first projected area accounting of the first assembly element, first assembly member The container background color similarity and the first assembly element of element the second component element corresponding with the first assembly element Container area accounting product as the element content phase between the first assembly element and corresponding second component element Like degree.
In another embodiment, if the first assembly element is picture type;Then the first assembly element and this Element content similarity between the corresponding second component element of one component element is diagram form similarity and/or MD5 value phase Like degree.Specifically, the member between the first assembly element the second component element corresponding with the first assembly element is being calculated During plain similarity, it is first determined between the first assembly element the second component element corresponding with the first assembly element Whether diagram form (i.e. icontype) similarity and/or MD5 value similarity meet default similarity requirement;If satisfied, then root According to the corresponding first projected area accounting of first assembly element, the corresponding element similarity of the first assembly element is determined;If It is unsatisfactory for, then according to the corresponding first projected area accounting of the first assembly element and the second projected area accounting, determining should The corresponding element similarity of first assembly element.For example, if first assembly element and the first assembly element corresponding second The diagram form and/or MD5 value of component element are different, then the first assembly element is second group corresponding with the first assembly element Diagram form similarity and/or MD5 value similarity between part element are unsatisfactory for default similarity requirement, then by the first assembly The product of element corresponding first projected area accounting and the second projected area accounting is determined as the first assembly element and opposite The element similarity between the second component element answered;And if first assembly element is second group corresponding with the first assembly element The diagram form and/or MD5 value of part element are identical, then show the first assembly element and the first assembly element corresponding second Diagram form similarity and/or MD5 value similarity between component element meet default similarity requirement, then by the first assembly The corresponding first projected area accounting of element is determined as the member between the first assembly element and corresponding second component element Plain similarity.
In yet another embodiment, if the first assembly element is literal type;Then the first assembly element and this Element content similarity between the corresponding second component element of one component element is character background color similarity, text prospect Color similarity and/or word content similarity.Then in calculating, the first assembly element is corresponding with the first assembly element During element similarity between second component element, it can be accounted for according to corresponding first projected area of the first assembly element Than the character background color between the first assembly element the second component element corresponding with the first assembly element is similar Degree, text foreground color similarity and/or word content similarity, determine the first assembly element and corresponding second component Element similarity between element.Further, can be according to the corresponding first projected area accounting of the first assembly element, it should Character background color similarity, text between first assembly element the second component element corresponding with the first assembly element Foreground color similarity and/or word content similarity and corresponding weighted value determine that the first assembly element is corresponding Element similarity.For example, can first determine that between first assembly element the second component element corresponding with the first assembly element The total content similarity of element, such as according to 0.4+0.2*bgColorSimilarity+0.2*ColorSimilarity+0.2* The element that StrSimilarity is calculated between first assembly element the second component element corresponding with the first assembly element is always interior Hold similarity, wherein 0.4 and 0.2 is weighted value, bgColorSimilarity is character background color similarity, ColorSimilarity is text foreground color similarity, and StrSimilarity is word content similarity.And further root According to the corresponding first projected area accounting of the first assembly element and the first assembly element and corresponding second component element The total content similarity of element product, determine the first assembly element the second component metadata corresponding with the first assembly element Element similarity between element.
Step S440, according to first assembly element each at least one first assembly element and corresponding second component The element similarity of element determines the component similarity between first assembly and the second component.
Wherein, step S410, S420 and S440 can refer to corresponding portion in Fig. 2 or embodiment illustrated in fig. 1 in the present embodiment Description, this will not be repeated here for the present embodiment.
It can be seen that the present embodiment be based on the first tree structure corresponding with first assembly and the second component describe file and Second tree structure describes file to obtain the relevant information of component element in first assembly and the second component, without to boundary Face or application are inversely compiled, and can be obtained the similarity between first assembly and the second component;Obtain first assembly and During second component similarity, it for first assembly each of is included first group that the present embodiment, which is specifically according to sciagraphy, Part element determines its corresponding second component element, and the element class of first assembly element and corresponding second component element Type is identical, and according to the first of the features such as the position and size that can be characterized between first assembly element and the second component element the projection Area accounting and/or the second projected area accounting and the first assembly element are second group corresponding with the first assembly element Element content similarity between part element, to determine first assembly element and corresponding second component element similarity, from And the component similarity between the first assembly finally obtained and the second component is made to be based on modular construction and component content Similarity is conducive to the raising of component similarity accuracy.Also, implementation process is simple and easy, suitable for implementing on a large scale and answering With.
Example IV
Fig. 5 shows the function of component similarity determining device in a kind of graphical interfaces that according to embodiments of the present invention four provide It can structural schematic diagram.As shown in figure 5, the device includes: that obtain module 51, similar component element determining module 52, element similar Spend determining module 53 and component similarity determining module 54.
Obtain module 51, be suitable for obtaining first assembly and the second component respectively, and determine the first assembly include to A few first assembly element, and determine at least one second component element that second component includes;
Similar component element determining module 52, suitable for for first group of each of at least one described first assembly element Part element, according to projection of the first assembly element in second component, determination is corresponding with the first assembly element Second component element;
Element similarity determining module 53 is suitable for calculating the first assembly element corresponding with the first assembly element the Element similarity between two component elements;
Component similarity determining module 54 is suitable for according to first assembly member each at least one described first assembly element It is plain with the element similarity of corresponding second component element, determine the component between the first assembly and second component Similarity.
Optionally, element similarity determining module 53 is further adapted for:
When determining that the first assembly element is projected to second component, the first assembly element and the first assembly element The lap area of corresponding second component element;
According to the corresponding first projected area accounting of the first assembly element and/or the second projected area accounting, calculating should Element similarity between first assembly element the second component element corresponding with the first assembly element;
Wherein, the first projected area accounting is the ratio of the lap area and the area of the first assembly element Value;The second projected area accounting is the lap area the second component element corresponding with the first assembly element Area ratio.
Optionally, element similarity determining module 53 is further adapted for:
According to the corresponding first projected area accounting of the first assembly element and/or the second projected area accounting, and should Element content similarity between first assembly element the second component element corresponding with the first assembly element, calculate this first Element similarity between component element the second component element corresponding with the first assembly element.
Optionally, element similarity determining module 53 is further adapted for: being determined the element type of the first assembly element, is adopted With calculation method corresponding with the element type of the first assembly element, the first assembly element and first assembly member are calculated Element similarity between the corresponding second component element of element.
Optionally, if the first assembly element is Container Type;Then the first assembly element and the first assembly element phase Element content similarity between corresponding second component element is container background color similarity;
Element similarity determining module 53 is further adapted for: being accounted for according to corresponding first projected area of the first assembly element Than, the container background color similarity of the first assembly element the second component element corresponding with the first assembly element, and/ Or, the container area accounting of the first assembly element, determines the first assembly element corresponding with the first assembly element Element similarity between two component elements.
Optionally, if the first assembly element is picture type;Then the first assembly element and the first assembly element phase Element content similarity between corresponding second component element is diagram form similarity and/or MD5 value similarity;
Element similarity determining module 53 is further adapted for: determining that the first assembly element is corresponding with the first assembly element The second component element between diagram form similarity and/or MD5 value similarity whether meet the requirement of default similarity;
If satisfied, then according to the corresponding first projected area accounting of first assembly element, determine the first assembly element with Element similarity between the corresponding second component element of the first assembly element.;
If not satisfied, then being accounted for according to the corresponding first projected area accounting of the first assembly element and the second projected area Than determining the element similarity between the first assembly element the second component element corresponding with the first assembly element.
Optionally, if the first assembly element is literal type;Then the first assembly element and the first assembly element phase Element content similarity between corresponding second component element is character background color similarity, text foreground color similarity And/or word content similarity;
Element similarity determining module 53 is further adapted for:
According to the corresponding first projected area accounting of the first assembly element, the first assembly element and first assembly member In character background color similarity, text foreground color similarity and/or text between the corresponding second component element of element Hold similarity, determines that the element between the first assembly element the second component element corresponding with the first assembly element is similar Degree.
Optionally, similar component element determining module 52 further comprises: determining the first assembly element in the second component In projection;Second component element of the first assembly element in the projection in the second component will be located at, be determined as with this The corresponding second component element of one component element.
Optionally, if it is multiple for being located at second component element of the first assembly element in the projection in the second component;
Then similar component element determining module 52 is further adapted for:
Respectively for the second component element of each of the projection of the first assembly element in the second component is located at, obtain The overlapping area of the second component element and the first assembly element;
The overlapping area for calculating the second component element and the first assembly element accounts for the area of the first assembly element Area accounting;
It is being located at the first assembly element in multiple second component elements in the projection in the second component, selection corresponds to The highest second component element of area accounting as the second component element corresponding with the first assembly element.
Optionally, the element class of the described first assembly element the second component element corresponding with the first assembly element It is not identical.
Optionally, module 51 is obtained to be further adapted for:
Determine scaling of the first assembly relative to second component;
According to the scaling, the first assembly and/or second component are zoomed in and out, and according to scaling after First assembly and/or the second component, determine at least one first assembly element that first assembly is included, and determine second At least one second component element that component is included.
Optionally, module 51 is obtained to be further adapted for:
The corresponding first assembly picture of first assembly is obtained, the first assembly picture is converted into corresponding first tree Shape structure description file describes file according to first tree structure, determines at least one component that first assembly is included Element;
The second component is obtained from description components library, and text is described according to corresponding second tree structure of the second component Part determines at least one second component element that second component is included.
It can be seen that this implementation obtains first assembly and the second component first, and determine first group that first assembly includes Part element, and determine the second component element that the second component includes;Further directed to each first assembly element, according to this first Projection of the component element in the second component determines the second component element corresponding with the first assembly element, and calculating should Element similarity between first assembly element the second component element corresponding with the first assembly element;Final basis is at least The element similarity of each first assembly element and corresponding second component element, determines first in one first assembly element Component similarity between component and the second component.This programme, can by the projection relation between first assembly and the second component Rapidly and accurately determine the component similarity between first assembly and the second component, also, implementation process is simple and easy, is suitable for It is extensive to implement and apply.
Embodiment five
According to embodiments of the present invention five provide a kind of nonvolatile computer storage media, the computer storage medium It is stored with an at least executable instruction, which can be performed the graphical interfaces in above-mentioned any means embodiment Middle component similarity determines method.
Embodiment six
Fig. 6 shows a kind of structural schematic diagram for calculating equipment that according to embodiments of the present invention six provide, and the present invention is specific Embodiment does not limit the specific implementation for calculating equipment.
As shown in fig. 6, the calculating equipment may include: processor (processor) 602, communication interface (Communications Interface) 604, memory (memory) 606 and communication bus 608.
Wherein:
Processor 602, communication interface 604 and memory 606 complete mutual communication by communication bus 608.
Communication interface 604, for being communicated with the network element of other equipment such as client or other servers etc..
Processor 602 can specifically execute component similarity determination side in above-mentioned graphical interfaces for executing program 610 Correlation step in method embodiment.
Specifically, program 610 may include program code, which includes computer operation instruction.
Processor 602 may be central processor CPU or specific integrated circuit ASIC (Application Specific Integrated Circuit), or be arranged to implement the integrated electricity of one or more of the embodiment of the present invention Road.The one or more processors that equipment includes are calculated, can be same type of processor, such as one or more CPU;It can also To be different types of processor, such as one or more CPU and one or more ASIC.
Memory 606, for storing program 610.Memory 606 may include high speed RAM memory, it is also possible to further include Nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.
Program 610 specifically can be used for so that processor 602 executes following operation:
First assembly and the second component are obtained respectively, and determine at least one first assembly member that the first assembly includes Element, and determine at least one second component element that second component includes;
For each first assembly element at least one described first assembly element, existed according to the first assembly element Projection in second component determines the second component element corresponding with the first assembly element, and calculates this first group Element similarity between part element the second component element corresponding with the first assembly element;
According to each first assembly element at least one described first assembly element and corresponding second component element Element similarity, determine the component similarity between the first assembly and second component.
In a kind of optional embodiment, program 610 specifically can be used for so that processor 602 executes following operation:
When determining that the first assembly element is projected to second component, the first assembly element and the first assembly element The lap area of corresponding second component element;
According to the corresponding first projected area accounting of the first assembly element and/or the second projected area accounting, calculating should Element similarity between first assembly element the second component element corresponding with the first assembly element;
Wherein, the first projected area accounting is the ratio of the lap area and the area of the first assembly element Value;The second projected area accounting is the lap area the second component element corresponding with the first assembly element Area ratio.
In a kind of optional embodiment, program 610 specifically can be used for so that processor 602 executes following operation:
According to the corresponding first projected area accounting of the first assembly element and/or the second projected area accounting, and should Element content similarity between first assembly element the second component element corresponding with the first assembly element, calculate this first Element similarity between component element the second component element corresponding with the first assembly element.
In a kind of optional embodiment, program 610 specifically can be used for so that processor 602 executes following operation:
The element type for determining the first assembly element, using meter corresponding with the element type of the first assembly element Calculation method, the element calculated between the first assembly element the second component element corresponding with the first assembly element are similar Degree.
In a kind of optional embodiment, if the first assembly element is Container Type;Then the first assembly element with Element content similarity between the corresponding second component element of the first assembly element is container background color similarity;
Program 610 specifically can be used for so that processor 602 executes following operation:
The then member calculated between the first assembly element the second component element corresponding with the first assembly element Plain similarity further comprises:
According to the corresponding first projected area accounting of the first assembly element, the first assembly element and first assembly member The container background color similarity of the corresponding second component element of element, and/or, the container area of the first assembly element accounts for Than determining the element similarity between the first assembly element the second component element corresponding with the first assembly element.
In a kind of optional embodiment, if the first assembly element is picture type;Then the first assembly element with Element content similarity between the corresponding second component element of the first assembly element be diagram form similarity and/or MD5 value similarity;
Program 610 specifically can be used for so that processor 602 executes following operation:
Determine the diagram form phase between the first assembly element the second component element corresponding with the first assembly element Whether meet default similarity requirement like degree and/or MD5 value similarity;
If satisfied, then according to the corresponding first projected area accounting of first assembly element, determine the first assembly element with Element similarity between the corresponding second component element of the first assembly element;
If not satisfied, then being accounted for according to the corresponding first projected area accounting of the first assembly element and the second projected area Than determining the element similarity between the first assembly element the second component element corresponding with the first assembly element.
In a kind of optional embodiment, if the first assembly element is literal type;Then the first assembly element with Element content similarity between the corresponding second component element of the first assembly element is character background color similarity, text Word foreground color similarity and/or word content similarity;
Program 610 specifically can be used for so that processor 602 executes following operation:
According to the corresponding first projected area accounting of the first assembly element, the first assembly element and first assembly member In character background color similarity, text foreground color similarity and/or text between the corresponding second component element of element Hold similarity, determines that the element between the first assembly element the second component element corresponding with the first assembly element is similar Degree.
In a kind of optional embodiment, program 610 specifically can be used for so that processor 602 executes following operation:
Determine the projection of the first assembly element in the second component;
Will be located at second component element of the first assembly element in the projection in the second component, be determined as with this first The corresponding second component element of component element.
In a kind of optional embodiment, if being located at second of the first assembly element in the projection in the second component Component element is multiple;
Program 610 specifically can be used for so that processor 602 executes following operation:
Respectively for the second component element of each of the projection of the first assembly element in the second component is located at, obtain The overlapping area of the second component element and the first assembly element;
The overlapping area for calculating the second component element and the first assembly element accounts for the area of the first assembly element Area accounting;
It is being located at the first assembly element in multiple second component elements in the projection in the second component, selection corresponds to The highest second component element of area accounting as the second component element corresponding with the first assembly element.
In a kind of optional embodiment, the described first assembly element and the first assembly element corresponding second The element category of component element is identical.
In a kind of optional embodiment, program 610 specifically can be used for so that processor 602 executes following operation:
Determine scaling of the first assembly relative to second component;
According to the scaling, the first assembly and/or second component are zoomed in and out, and according to scaling after First assembly and/or the second component, determine at least one first assembly element that first assembly is included, and determine second At least one second component element that component is included.
In a kind of optional embodiment, program 610 specifically can be used for so that processor 602 executes following operation:
The corresponding first assembly picture of first assembly is obtained, the first assembly picture is converted into corresponding first tree Shape structure description file describes file according to first tree structure, determines at least one component that first assembly is included Element;
The second component is obtained from description components library, and text is described according to corresponding second tree structure of the second component Part determines at least one second component element that second component is included.
Algorithm and display are not inherently related to any particular computer, virtual system, or other device provided herein. Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of system Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects, Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself All as a separate embodiment of the present invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention Within the scope of and form different embodiments.For example, in detail in the claims, embodiment claimed it is one of any Can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice Component similarity is true in graphical interfaces according to an embodiment of the present invention to realize for microprocessor or digital signal processor (DSP) Determine some or all functions of some or all components in device.The present invention is also implemented as executing institute here Some or all device or device programs of the method for description are (for example, computer program and computer program produce Product).It is such to realize that program of the invention can store on a computer-readable medium, or can have one or more The form of signal.Such signal can be downloaded from an internet website to obtain, and perhaps be provided on the carrier signal or to appoint What other forms provides.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame Claim.

Claims (10)

1. component similarity determines method in a kind of graphical interfaces, comprising:
First assembly and the second component are obtained respectively, and determine at least one first assembly element that the first assembly includes, And determine at least one second component element that second component includes;
For each first assembly element at least one described first assembly element, according to the first assembly element described Projection in second component determines the second component element corresponding with the first assembly element, and calculates first assembly member Element similarity between element the second component element corresponding with the first assembly element;
According to the member of each first assembly element and corresponding second component element at least one described first assembly element Plain similarity determines the component similarity between the first assembly and second component.
2. according to the method described in claim 1, wherein, described calculating first assembly element is opposite with the first assembly element The element similarity between the second component element answered further comprises:
When determining that the first assembly element is projected to second component, the first assembly element is opposite with the first assembly element The lap area for the second component element answered;
According to the corresponding first projected area accounting of the first assembly element and/or the second projected area accounting, calculate this first Element similarity between component element the second component element corresponding with the first assembly element;
Wherein, the first projected area accounting is the ratio of the lap area and the area of the first assembly element; The second projected area accounting is the lap area the second component element corresponding with the first assembly element The ratio of area.
3. according to the method described in claim 2, wherein, described calculating first assembly element is opposite with the first assembly element The element similarity between the second component element answered further comprises:
According to the corresponding first projected area accounting of the first assembly element and/or the second projected area accounting and this first Element content similarity between component element the second component element corresponding with the first assembly element, calculates the first assembly Element similarity between element the second component element corresponding with the first assembly element.
4. according to the method described in claim 3, wherein, described calculating first assembly element is opposite with the first assembly element The element similarity between the second component element answered further comprises:
The element type for determining the first assembly element, using calculating side corresponding with the element type of the first assembly element Method calculates the element similarity between the first assembly element the second component element corresponding with the first assembly element.
5. according to the method described in claim 4, wherein, if the first assembly element is Container Type;Then first assembly member Element content similarity between element the second component element corresponding with the first assembly element is that container background color is similar Degree;
The then element phase calculated between the first assembly element the second component element corresponding with the first assembly element Further comprise like degree:
According to the corresponding first projected area accounting of the first assembly element, the first assembly element and the first assembly element phase The container background color similarity of corresponding second component element, and/or, the container area accounting of the first assembly element, really Element similarity between the fixed first assembly element the second component element corresponding with the first assembly element.
6. according to the method described in claim 4, wherein, if the first assembly element is picture type;Then first assembly member Element content similarity between corresponding with the first assembly element the second component element of element be diagram form similarity and/ Or MD5 value similarity;
The then element phase calculated between the first assembly element the second component element corresponding with the first assembly element Further comprise like degree:
Determine the diagram form similarity between the first assembly element the second component element corresponding with the first assembly element And/or whether MD5 value similarity meets default similarity requirement;
If satisfied, then according to the corresponding first projected area accounting of first assembly element, determine the first assembly element and this Element similarity between the corresponding second component element of one component element;
If not satisfied, then according to the corresponding first projected area accounting of the first assembly element and the second projected area accounting, Determine the element similarity between the first assembly element the second component element corresponding with the first assembly element.
7. according to the method described in claim 4, wherein, if the first assembly element is literal type;Then first assembly member Element content similarity between element the second component element corresponding with the first assembly element is that character background color is similar Degree, text foreground color similarity and/or word content similarity;
The then element phase calculated between the first assembly element the second component element corresponding with the first assembly element Further comprise like degree:
According to the corresponding first projected area accounting of the first assembly element, the first assembly element and the first assembly element phase Character background color similarity, text foreground color similarity and/or word content phase between corresponding second component element Like degree, the element similarity between the first assembly element the second component element corresponding with the first assembly element is determined.
8. component similarity determining device in a kind of graphical interfaces, comprising:
At least one for obtaining module, being suitable for obtaining first assembly and the second component respectively, and determine that the first assembly includes First assembly element, and determine at least one second component element that second component includes;
Similar component element determining module, suitable for for each first assembly member at least one described first assembly element Element determines and the first assembly element corresponding second according to projection of the first assembly element in second component Component element;
Element similarity determining module is suitable for calculating the first assembly element the second component corresponding with the first assembly element Element similarity between element;
Component similarity determining module is suitable for according to each first assembly element and phase at least one described first assembly element The element similarity of corresponding second component element determines that the component between the first assembly and second component is similar Degree.
9. a kind of calculating equipment, comprising: processor, memory, communication interface and communication bus, the processor, the storage Device and the communication interface complete mutual communication by the communication bus;
The memory executes the processor as right is wanted for storing an at least executable instruction, the executable instruction Component similarity in graphical interfaces described in any one of 1-7 is asked to determine the corresponding operation of method.
10. a kind of computer storage medium, an at least executable instruction, the executable instruction are stored in the storage medium Execute processor as component similarity determines the corresponding behaviour of method in graphical interfaces of any of claims 1-7 Make.
CN201811510141.2A 2018-12-11 2018-12-11 Method and device for determining similarity of components in graphical interface Active CN109684005B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811510141.2A CN109684005B (en) 2018-12-11 2018-12-11 Method and device for determining similarity of components in graphical interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811510141.2A CN109684005B (en) 2018-12-11 2018-12-11 Method and device for determining similarity of components in graphical interface

Publications (2)

Publication Number Publication Date
CN109684005A true CN109684005A (en) 2019-04-26
CN109684005B CN109684005B (en) 2021-08-24

Family

ID=66186666

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811510141.2A Active CN109684005B (en) 2018-12-11 2018-12-11 Method and device for determining similarity of components in graphical interface

Country Status (1)

Country Link
CN (1) CN109684005B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112215881A (en) * 2020-10-12 2021-01-12 北京大学深圳研究生院 Point cloud completion evaluation method for measuring coverage of missing point cloud
CN113963197A (en) * 2021-09-29 2022-01-21 北京百度网讯科技有限公司 Image recognition method and device, electronic equipment and readable storage medium
CN114020397A (en) * 2021-11-24 2022-02-08 北京字节跳动网络技术有限公司 Interface component state identification method and device, computer equipment and storage medium
CN115297042A (en) * 2022-08-01 2022-11-04 明阳产业技术研究院(沈阳)有限公司 Method for detecting consistency of web pages under different networks and related equipment
CN116188802A (en) * 2023-04-21 2023-05-30 青岛创新奇智科技集团股份有限公司 Data labeling method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090217309A1 (en) * 2008-02-27 2009-08-27 Accenture Global Services Gmbh Graphical user interface application comparator
CN104932773A (en) * 2015-06-12 2015-09-23 联想(北京)有限公司 Information processing method and electronic equipment
CN105391566A (en) * 2014-09-04 2016-03-09 ***通信集团黑龙江有限公司 Dynamic network equipment configuration comparison method and device
CN106776267A (en) * 2015-11-25 2017-05-31 富士通株式会社 Web application compatibility test method and web application compatibility test equipment
CN107526683A (en) * 2017-08-23 2017-12-29 北京小米移动软件有限公司 Detection method, device and the storage medium of function of application redundancy
CN108665490A (en) * 2018-04-02 2018-10-16 浙江大学 A kind of Graphic Pattern Matching method based on more attribute codings and changeable weight
CN108898013A (en) * 2018-06-14 2018-11-27 南京大学 A kind of Android application interface similarity-rough set method dividing feature vector based on layout

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090217309A1 (en) * 2008-02-27 2009-08-27 Accenture Global Services Gmbh Graphical user interface application comparator
CN105391566A (en) * 2014-09-04 2016-03-09 ***通信集团黑龙江有限公司 Dynamic network equipment configuration comparison method and device
CN104932773A (en) * 2015-06-12 2015-09-23 联想(北京)有限公司 Information processing method and electronic equipment
CN106776267A (en) * 2015-11-25 2017-05-31 富士通株式会社 Web application compatibility test method and web application compatibility test equipment
CN107526683A (en) * 2017-08-23 2017-12-29 北京小米移动软件有限公司 Detection method, device and the storage medium of function of application redundancy
CN108665490A (en) * 2018-04-02 2018-10-16 浙江大学 A kind of Graphic Pattern Matching method based on more attribute codings and changeable weight
CN108898013A (en) * 2018-06-14 2018-11-27 南京大学 A kind of Android application interface similarity-rough set method dividing feature vector based on layout

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112215881A (en) * 2020-10-12 2021-01-12 北京大学深圳研究生院 Point cloud completion evaluation method for measuring coverage of missing point cloud
WO2022077561A1 (en) * 2020-10-12 2022-04-21 北京大学深圳研究生院 Point cloud completion evaluation method for measuring coverage of incomplete point cloud
CN113963197A (en) * 2021-09-29 2022-01-21 北京百度网讯科技有限公司 Image recognition method and device, electronic equipment and readable storage medium
CN114020397A (en) * 2021-11-24 2022-02-08 北京字节跳动网络技术有限公司 Interface component state identification method and device, computer equipment and storage medium
CN114020397B (en) * 2021-11-24 2023-11-07 北京字节跳动网络技术有限公司 Interface component state identification method, device, computer equipment and storage medium
CN115297042A (en) * 2022-08-01 2022-11-04 明阳产业技术研究院(沈阳)有限公司 Method for detecting consistency of web pages under different networks and related equipment
CN116188802A (en) * 2023-04-21 2023-05-30 青岛创新奇智科技集团股份有限公司 Data labeling method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN109684005B (en) 2021-08-24

Similar Documents

Publication Publication Date Title
CN109684005A (en) Component similarity determines method and device in graphical interfaces
Hurter et al. Graph bundling by kernel density estimation
US20220392144A1 (en) Image rendering method and apparatus, electronic device, and storage medium
JP7343963B2 (en) Dataset for learning functions that take images as input
Hu et al. Capturing braided hairstyles
US7663622B2 (en) Unified framework based on extensible styles for 3D non-photorealistic rendering and method of configuring the same
Stahl et al. Globally optimal grouping for symmetric closed boundaries by combining boundary and region information
Wolff OpenGL 4 shading language cookbook
Sammer et al. From visual input to visual output in textual programming
Frey et al. Progressive direct volume-to-volume transformation
Wolff OpenGL 4 Shading Language Cookbook: Build high-quality, real-time 3D graphics with OpenGL 4.6, GLSL 4.6 and C++ 17
US8564594B2 (en) Similar shader search apparatus and method using image feature extraction
Ghayour et al. Real-time 3D graphics with WebGL 2: build interactive 3D applications with JavaScript and WebGL 2 (OpenGL ES 3.0)
US9171401B2 (en) Conservative partitioning for rendering a computer-generated animation
Marelli et al. SfM Flow: A comprehensive toolset for the evaluation of 3D reconstruction pipelines
Mata et al. Standardsim: A synthetic dataset for retail environments
Weber et al. Editable indoor lighting estimation
US11748935B2 (en) Bounding volume hierarchy traversal
Duckworth et al. Parallel processing for real-time 3D reconstruction from video streams
Camporesi et al. Computing shortest path maps with GPU shaders
CN112015714A (en) Database-based data model generation method and device
US20230046431A1 (en) System and method for generating 3d objects from 2d images of garments
US20190244403A1 (en) Paint reflection around a curvilinear path
CN105224649A (en) A kind of data processing method and device
Mukherjee et al. Immersion and embedding of self-crossing loops

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant