WO2021227951A1 - Naming of front-end page element - Google Patents

Naming of front-end page element Download PDF

Info

Publication number
WO2021227951A1
WO2021227951A1 PCT/CN2021/092136 CN2021092136W WO2021227951A1 WO 2021227951 A1 WO2021227951 A1 WO 2021227951A1 CN 2021092136 W CN2021092136 W CN 2021092136W WO 2021227951 A1 WO2021227951 A1 WO 2021227951A1
Authority
WO
WIPO (PCT)
Prior art keywords
target page
page element
name
image
naming
Prior art date
Application number
PCT/CN2021/092136
Other languages
French (fr)
Chinese (zh)
Inventor
谢杨易
崔恒斌
Original Assignee
支付宝(杭州)信息技术有限公司
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 支付宝(杭州)信息技术有限公司 filed Critical 支付宝(杭州)信息技术有限公司
Publication of WO2021227951A1 publication Critical patent/WO2021227951A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/55Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/5866Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using information manually generated, e.g. tags, keywords, comments, manually generated location and time information
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/58Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the field of computer network technology, and in particular to a method, device and electronic equipment for naming front-end page elements.
  • front-end page development work in order to help improve the readability of the front-end page code and the convenience of maintaining the code in the later stage, developers usually need to name the front-end page elements.
  • This application proposes a method for naming front-end page elements.
  • the above method includes: when the target page element is an image element, calculating the similarity between the target page element and each image in the preset image library; determining the calculated The maximum similarity in the above-mentioned similarity; the name of the image in the above-mentioned preset image library corresponding to the calculation of the above-mentioned maximum similarity is determined as the name of the target page element.
  • calculating the similarity between the target page element and each image in the preset image library includes: inputting the element data of the target page element into a pre-trained classification model for calculation , Obtain the classification result of the target page element, the classification model is a neural network model trained based on a number of samples labeled with the classification result; search for an image that is the same as the classification result of the target page element from the preset image library; Calculate the similarity between the above-mentioned target page elements and the searched images.
  • the above method further includes: when the target page element is a text element, inputting the element data of the target page element into a pre-trained translation model for calculation to obtain the English language corresponding to the target page element String; the above-mentioned English string is determined as the name of the above-mentioned target page element.
  • the above method further includes: converting the traditional characters in the target page elements into simplified characters based on a pre-built mapping algorithm.
  • determining the above-mentioned English character string as the name of the target page element includes: inputting the above-mentioned English character string into a pre-trained keyword extraction model for calculation, and obtaining the same as the above-mentioned English character string.
  • Corresponding keywords; the above keywords are determined as the names of the above target page elements.
  • the above method further includes: if the target page element is a container element, adding an identifier indicating that the target page element is a container element to the name of the target page element.
  • adding an identifier indicating that the target page element is a container element to the name of the target page element includes: extracting keywords from the names of each element in the container element; Words are combined to obtain the name of the target page element; an identifier indicating that the target page element is a container element is added to the name.
  • This application also proposes a device for naming front-end page elements, including: a calculation module, when the target page element is an image element, calculate the similarity between the target page element and each image in the preset image library; first The determining module determines the maximum similarity among the calculated similarities; the second determining module determines the name of the image in the preset image library corresponding to the calculation of the maximum similarity as the name of the target page element.
  • the calculation module includes: inputting the element data of the target page element into a pre-trained classification model for calculation to obtain the classification result of the target page element, and the classification model is based on a number of labeled The neural network model obtained by training the sample of the classification result; searching for the image that is the same as the classification result of the target page element from the preset image library; calculating the similarity between the target page element and the searched images.
  • the above-mentioned device further includes: a model calculation module, when the target page element is a text element, the element data of the above-mentioned target page element is input into a pre-trained translation model for calculation, and the result is the same as that of the above-mentioned target page.
  • the English character string corresponding to the element; the third determining module determines the above English character string as the name of the target page element.
  • the above device further includes: a conversion module, which converts the traditional characters in the target page elements into simplified characters based on a pre-built mapping algorithm.
  • the third determining module includes: inputting the English character string into a pre-trained keyword extraction model for calculation to obtain keywords corresponding to the English character string; Determine the name of the above target page element.
  • the above-mentioned apparatus further includes: an adding module, if the above-mentioned target page element is a container element, add an identifier indicating that the above-mentioned target page element is a container element to the name of the above-mentioned target page element.
  • the above-mentioned adding module includes: extracting keywords from the names of each element in the above-mentioned container element; combining the various keywords to obtain the name of the above-mentioned target page element; adding to the above-mentioned name The identifier indicating that the above target page element is a container element.
  • the above system can calculate the similarity between the target page element and each image in the preset image library, and combine the preset image library with The name of the image corresponding to the maximum similarity in the calculated similarity is determined as the name of the target page element.
  • the above-mentioned system can extract keywords from the above-mentioned text element, and use the extracted keywords as the name of the above-mentioned text element.
  • the above-mentioned system may add an identifier indicating that the above-mentioned target page element is a container element to the name of the above-mentioned target page element, so as to realize the naming of the above-mentioned container element.
  • the element naming method disclosed in this application can realize automatic naming of elements, thereby improving element naming efficiency, element naming standardization, and correctness, avoiding low naming efficiency due to manual participation and failing to strictly comply with naming conventions when naming. Problems such as naming errors.
  • FIG. 1 is a method flowchart of a method for naming front-end page elements shown in this application;
  • FIG. 2 is a method flowchart of the text element naming method shown in this application.
  • FIG. 3 is a method flowchart of the container element naming method shown in this application.
  • FIG. 4 is a structural diagram of a device for naming front-end page elements shown in this application.
  • Fig. 5 is a hardware structure diagram of a naming device for front-end page elements shown in this application.
  • This application aims to propose a method for naming front-end page elements, so that when determining the name of the page element, the page element name determination system realizes the naming of different types of page elements, thereby avoiding low naming efficiency due to manual participation , The naming cannot strictly abide by the naming convention, naming errors and other issues.
  • FIG. 1 is a method flowchart of a method for naming front-end page elements shown in this application. Applied to the page element naming system. As shown in Figure 1, the above method includes:
  • S106 Determine the name of the image in the preset image library corresponding to the calculation of the maximum similarity as the name of the target page element.
  • the above-mentioned page element naming system (hereinafter referred to as the "system") may specifically be a piece of logic code carried in a terminal device.
  • the above-mentioned page element naming system needs to provide computing power through its equipped terminal device when executing the above-mentioned element extraction method as the execution subject.
  • the above system can provide an interactive platform for interacting with developers.
  • developers can provide the page elements that need to be named to the above system, and initiate related instructions for naming the page elements to the above system; on the other hand, when the page elements are named, the above The system can output the named page elements to developers.
  • the above-mentioned front-end page image is specifically a page image designed by a page image designer.
  • a developer develops a front-end page, he usually needs to refer to the page image designed by the page image designer for development, so that the display effect of the final developed front-end page can be the same as the above-mentioned page image.
  • front-end page elements specifically constitute the main components of the front-end page, which may include image elements, text elements, and container elements.
  • the above-mentioned image element specifically refers to an element whose content is an image.
  • the above text element specifically refers to an element whose content is text.
  • the above-mentioned characters may include traditional or simplified characters.
  • the aforementioned container element specifically refers to a collection of elements composed of several elements.
  • several image elements can form a container element.
  • Several text elements can form a container element.
  • Several text elements and several image elements can also form a container element together.
  • the developer when a developer needs to name a certain element, the developer can provide the above-mentioned element and the element type of the element to the above-mentioned system through the interactive platform provided by the above-mentioned system.
  • the aforementioned interactive platform may provide a window for the developer to input the element type of the element to be named.
  • the developer can also input the element type of the aforementioned element in the aforementioned window for the aforementioned system to identify the element type.
  • the above-mentioned system can automatically identify the element type of the above-mentioned element.
  • the above-mentioned system may first perform OCR recognition on the element data corresponding to the above-mentioned element to obtain the recognition result corresponding to the above-mentioned element, and then determine each element according to the above-mentioned recognition result.
  • the element type may be first perform OCR recognition on the element data corresponding to the above-mentioned element to obtain the recognition result corresponding to the above-mentioned element, and then determine each element according to the above-mentioned recognition result.
  • this application Before introducing the specific steps, this application first introduces the principle of determining element types through OCR identification.
  • OCR Optical Character Recognition, Optical Character Recognition
  • OCR Optical Character Recognition, Optical Character Recognition
  • the principle is to compare the image features of the target image with the image features of Chinese characters in the existing Chinese character library, and output the Chinese character that most matches the image features of the target image as the recognition result, and the recognition confidence of the above recognition result.
  • the recognition confidence level may indicate to a certain extent the similarity between the image feature of the target image and the recognition result.
  • the recognition confidence of the recognition result obtained after the OCR detection will be relatively high.
  • the specific content of the target image is a pattern similar to the Chinese character " ⁇ ”.
  • the specific content included in the above target image is only similar to Chinese characters. Therefore, the above-mentioned recognition confidence will be relatively low.
  • the element type of the above element is determined by OCR recognition, after OCR recognition is performed on the element image of the element, it is possible to determine whether the recognition confidence corresponding to the recognition result reaches a preset threshold.
  • Element type The above-mentioned preset threshold may be specifically set by the developer based on experience or trained through a large number of samples, which is not limited here.
  • the recognition confidence level reaches the preset threshold, the element type of the element is determined to be a text element; otherwise, the element type of the element is determined to be an image element.
  • the above-mentioned element is a collection of several text elements or image elements. At this time, it can be determined that the above-mentioned element is a container element.
  • the above system when determining the element type of the element, may input the element data corresponding to the element into a pre-trained classifier for calculation, and determine the element type of the element based on the calculation result.
  • the above-mentioned classifier may be specifically obtained by training based on a number of element image samples marked with element types; the above-mentioned element types include image elements, text elements, and container elements.
  • the above-mentioned classifier may be a multi-classifier constructed based on a neural network.
  • the aforementioned image library may specifically be a pre-configured image library.
  • the aforementioned image library can usually include several named images (images named according to naming conventions).
  • the images included in the above-mentioned image library can be classified and stored.
  • the above-mentioned image library can be divided into several storage spaces; among them, each storage space can store images of the same image type.
  • developers can obtain an image collection that includes several common element images. Then, the developer can name each image in the above-mentioned image collection according to the naming convention, classify the named images (either manually or through a classifier), and save them in the storage space corresponding to the above-mentioned image library.
  • the configured image library can be duplicated and used repeatedly, and it does not need to be configured every time the target element is named. Of course, the configured image library can be updated. For example, adding a new image or updating the name of an existing image, etc.
  • the foregoing system may execute S102 to calculate the similarity between the foregoing target element and each image in the preset image library.
  • the system when calculating the similarity between the target element and each image in the preset image library, the system may first organize the element data of the target element into the form of a feature vector, so as to facilitate similarity. ⁇ Calculation.
  • the above-mentioned system may first extract the image features of the above-mentioned target elements (for example, Harris corner points or SIFT features), and form corresponding feature vectors.
  • the image features of the above-mentioned target elements for example, Harris corner points or SIFT features
  • the foregoing system may execute the following steps S1022-S1026 for each image in the foregoing preset image library:
  • the Euclidean distance between the feature vector included in the target element and the feature vector is less than a preset reference threshold, and the preset mapping algorithm (for example, normalization or standardization algorithm) is used. , The above-mentioned quantity is mapped to the similarity between the above-mentioned image and the above-mentioned target element.
  • the preset mapping algorithm for example, normalization or standardization algorithm
  • the method for calculating the similarity is not limited in this application.
  • the above method for calculating similarity can also be calculated by calculating the cosine distance, Manhattan distance, Mahalanobis distance between feature vectors.
  • the system After completing the above steps for each image in the preset image library, the system will obtain the similarity between the target element and each image, as well as the similarity, and the corresponding relationship with each image.
  • the system can execute S104-S106 to determine the maximum similarity among the calculated similarities, and determine the name of the image in the preset image library corresponding to the calculation of the maximum similarity as the target page element The name.
  • the above-mentioned system in order to improve the efficiency of determining the above-mentioned maximum similarity, can push the obtained above-mentioned similarity into the big top pile (the value corresponding to each parent node in the big top pile is greater than or equal to its left and right children). The value corresponding to the node). Then, the system can read the similarity stored in the root node of the big top pile, and determine the read similarity as the maximum similarity.
  • the root node of the big top heap records the maximum value maintained in the above big top heap . It can be seen that the similarity stored in the root node of the above-mentioned large top pile is the maximum similarity among the obtained similarities.
  • the system can determine the image corresponding to the maximum similarity from the recorded correspondence. After determining the image, the system may determine the name of the image as the name of the target element.
  • the above system when naming front-end page elements, can calculate the similarity between the target page element and each image in the preset image library, and combine the preset image library with The name of the image corresponding to the maximum similarity in the calculated similarity is determined as the name of the target page element mentioned above. Therefore, it is possible to automatically name the element, thereby improving the efficiency of element naming, the standardization of element naming, and the correctness, avoiding The naming efficiency is low due to manual participation, the naming cannot be strictly abided by the naming convention, naming errors and other issues.
  • the element data of the target page element may be first Input the pre-trained classification model for calculation, and obtain the classification result of the target page element.
  • the above classification model is a neural network model obtained by training based on a number of samples labeled with classification results.
  • a number of sample data marked with classification results can be obtained first. After obtaining several sample data, the above sample data can be input into the classification model, and iterative training can be performed until the above classification model converges. At this time, the convergent classification model can be used as the trained classification model.
  • the system can search for images that are the same as the classification result of the target page element from the preset image library, and then calculate the target page element to be similar to the searched images Spend.
  • the system may directly read the image recorded in the storage space corresponding to the classification result.
  • the system may input the image data of each image in the preset image library into the classification model for calculation, thereby obtaining the image data of each image.
  • Image type After that, the above-mentioned system may determine an image whose image type is the same as the image type of the above-mentioned target element as an image with the same classification result of the above-mentioned target page element.
  • the system can continue to execute S104-S106 to determine the maximum similarity among the calculated similarities; the preset image corresponding to the maximum similarity will be calculated
  • the name of the image in the library is determined as the name of the above-mentioned target page element (for detailed steps, please refer to the foregoing content, which will not be described in detail here).
  • FIG. 2 is a method flowchart of the text element naming method shown in this application.
  • the above-mentioned system can first convert the text content of the above-mentioned text element into traditional and simplified form.
  • the above-mentioned system can be equipped with a mapping algorithm for converting traditional characters to simplified characters in advance. Through this mapping algorithm, the above-mentioned system can convert traditional characters in text elements into simplified characters.
  • the above-mentioned mapping algorithm may be an algorithm for converting traditional characters to simplified characters constructed based on the hanlp tool.
  • the algorithm can first segment the above text content according to the text, and then detect whether the divided text is a traditional Chinese character one by one, and if it is, it will be converted to the corresponding simplified character for output; if Otherwise, output the divided text directly.
  • the above algorithm can recombine the output simplified characters into the text content of the above text element.
  • the system can input the element data of the target page element into a pre-trained translation model for calculation to obtain the English character string corresponding to the target page element.
  • the above-mentioned system can be pre-loaded with a trained translation model.
  • the input Chinese text content can be converted into English text content.
  • the aforementioned translation model may be an NLP (Natural Language Processing) model based on seq2seq.
  • NLP Natural Language Processing
  • the model can first segment the text content according to the text, and then use the segmented text as input for semantic encoding to obtain the vector corresponding to the text content.
  • the above-mentioned vector can be decoded into English text content based on the above-mentioned semantic coding and the English word library.
  • the system can select several keywords from the English text content as the name of the text element.
  • the above-mentioned system can be equipped with a keyword extraction model in advance.
  • keywords can be extracted from the input English text content.
  • the above keyword extraction model may be a model constructed based on the TF-IDF algorithm. After receiving the English text content of the text element, the model can first segment each word in the above-mentioned English text, and then count the occurrence frequency (TF, Term Frequency, word frequency) of the segmented word in the text. After calculating the frequency of each word in this text, you can combine the frequency of each word in other English texts (IDF, Inverse Documnet Frequency, inverse document frequency), sort the words, and rank them in the top N Bit words are used as keywords; among them, N is a positive integer preset based on experience.
  • TF Term Frequency, word frequency
  • the keyword extraction model may be an NLP model based on textRank. After receiving the English text content of the text element, the model can first segment each word in the above-mentioned English text. After obtaining the divided words, the above system can combine two adjacent divided words in pairs to obtain all possible combinations, and then calculate the connection weights between the words in the combination. After calculating the connection weights between words in each combination, the above-mentioned system can calculate the sum of the connection weights corresponding to each word, and sort the words in the above-mentioned English text according to the size of the above-mentioned sum. At this time, the above system can use the top N words as keywords; where N is a positive integer preset based on experience.
  • the system may determine the keyword as the name of the text element.
  • the foregoing system may add an identifier indicating that the target page element is a container element to the name of the target page element.
  • FIG. 3 is a method flowchart of the container element naming method shown in this application.
  • the above-mentioned system can first determine the element type of each element included in the above-mentioned container element.
  • the above system can use the method for determining element types disclosed in this application to determine the element types of the above elements one by one.
  • the above-mentioned system can use the naming method for text elements disclosed in this application to name the text element in the above-mentioned container element. After the naming is completed, the system may add an identifier indicating that the target page element is a container element to the name of the text element as the name of the container element. For example, add the characters "contarner" before the name of the above text element.
  • the system may first determine the text element for naming from the container element. Then, the above-mentioned system can use the naming method for text elements disclosed in this application to name the determined text elements. After the naming is completed, the system may add an identifier indicating that the target page element is a container element to the name of the text element as the name of the container element.
  • the aforementioned system may determine the first (last) text element in the aforementioned container element as the text element for naming, and perform subsequent naming.
  • the foregoing system may determine the text element with the largest amount of data among the foregoing container elements as the text element for naming, and perform subsequent naming.
  • the above text element carries an identifier indicating the importance of the above text element (the larger the value indicated by the identifier, the higher the importance of the above text element).
  • the foregoing system may determine the text element with the largest value of the foregoing identifier carried in the foregoing container element as the text element for naming, and perform subsequent naming.
  • the method for determining the text element used for naming can be set according to the actual situation, which is not limited here.
  • the above-mentioned system may first use the method for naming text elements disclosed in this application to extract the keywords of each text element. Then, the above-mentioned system may combine the keywords to obtain the combined keywords, and add an identifier indicating that the target page element is a container element to the combined keywords as the name of the container element.
  • the above-mentioned system may first use the method for naming text elements disclosed in this application to extract the keywords of each text element. Then, the system can determine the most important keyword among the proposed keywords, and add an identifier indicating that the target page element is a container element to the most important keyword as the name of the container element.
  • the above-mentioned system may input each keyword into the keyword extraction model described in this application for calculation, and then use the calculation result as the above-mentioned most important keyword.
  • the aforementioned system can use the naming method for image elements disclosed in this application to name the text element in the aforementioned container element. After the naming is completed, the system may add an identifier indicating that the target page element is a container element to the name of the image element as the name of the container element. For example, add the characters "contarner" before the name of the above text element.
  • the system may first determine the image element used for naming from the container elements. Then, the above system can use the naming method for text elements disclosed in this application to name the determined image elements. After the naming is completed, the system may add an identifier indicating that the target page element is a container element to the name of the image element as the name of the container element.
  • the above-mentioned system may determine the first (last) image element among the above-mentioned container elements as the image element for naming, and perform subsequent naming.
  • the foregoing system may determine the image element with the largest amount of data among the foregoing container elements as the image element for naming, and perform subsequent naming.
  • the above-mentioned image element carries an identifier indicating the importance of the above-mentioned image element (the larger the value indicated by the identifier, the higher the importance of the above-mentioned image element).
  • the above-mentioned system may determine the image element with the largest value of the above-mentioned identifier carried in the above-mentioned container element as the image element for naming, and perform subsequent naming.
  • the method for determining the image element used for naming can be set according to the actual situation, which is not limited here.
  • the aforementioned system may first use the method for naming image elements disclosed in this application to determine the name of each image element. Then, the above system may combine the names of the image elements to obtain a combined name, and add an identifier indicating that the target page element is a container element to the combined name as the name of the container element.
  • the aforementioned system may first use the method for naming image elements disclosed in this application to determine the name of each image element. Then, the above-mentioned system may extract keywords from the determined names of each image element, and add an identifier indicating that the target page element is a container element to the above-mentioned keywords as the name of the container element.
  • the above-mentioned system may input the name of each image element into the keyword extraction model described in this application for calculation, and then use the calculation result as the above-mentioned keyword.
  • the naming method of the aforementioned container element can refer to the aforementioned content, which will not be described in detail here.
  • the system may combine the identifier indicating that the target page element is the container element with the assigned sequence number of the container element, and use the combined result as the name of the container element.
  • sequence numbers assigned to the above-mentioned container elements may be assigned according to actual conditions, which are not limited here.
  • the sequence number to which the above-mentioned container elements are assigned may indicate the order in which the above-mentioned container elements are created.
  • the sequence number assigned to the above-mentioned container element may be a sequence number assigned manually.
  • the above system can calculate the similarity between the target page element and each image in the preset image library, and combine the preset image library with The name of the image corresponding to the maximum similarity in the calculated similarity is determined as the name of the target page element.
  • the above-mentioned system can extract keywords from the above-mentioned text element, and use the extracted keywords as the name of the above-mentioned text element.
  • the above-mentioned system may add an identifier indicating that the above-mentioned target page element is a container element to the name of the above-mentioned target page element, so as to realize the naming of the above-mentioned container element.
  • the element naming method disclosed in this application can realize automatic naming of elements, thereby improving element naming efficiency, element naming standardization, and correctness, avoiding low naming efficiency due to manual participation and failing to strictly comply with naming conventions when naming. Problems such as naming errors.
  • this application also proposes a device for naming front-end page elements.
  • FIG. 4 is a structural diagram of a device for naming front-end page elements shown in this application.
  • the foregoing apparatus 400 may include:
  • the calculation module 410 when the target page element is an image element, calculates the similarity between the target page element and each image in the preset image library;
  • the first determining module 420 determines the maximum similarity among the calculated similarities
  • the second determining module 430 determines the name of the image in the preset image library corresponding to the calculation of the maximum similarity as the name of the target page element.
  • the calculation module 410 includes: inputting the element data of the target page element into a pre-trained classification model for calculation to obtain the classification result of the target page element; wherein, the classification model is based on A neural network model trained by a number of samples labeled with classification results; from a preset image library, search for images that are the same as the classification results of the target page elements; calculate the difference between the target page elements and the searched images Similarity.
  • the above-mentioned device 400 further includes: a model calculation module, when the target page element is a text element, the element data of the above-mentioned target page element is input into a pre-trained translation model for calculation, and the result is the same as the above-mentioned target page element.
  • the English character string corresponding to the page element; the third determining module determines the above-mentioned English character string as the name of the above-mentioned target page element.
  • the device 400 further includes a conversion module, which converts the traditional characters in the target page elements into simplified characters based on a pre-built mapping algorithm.
  • the third determining module includes: inputting the English character string into a pre-trained keyword extraction model for calculation to obtain keywords corresponding to the English character string; Determine the name of the above target page element.
  • the apparatus 400 further includes: an adding module, if the target page element is a container element, add an identifier indicating that the target page element is a container element to the name of the target page element.
  • the above-mentioned adding module includes: extracting keywords from the names of each element in the above-mentioned container element; combining the various keywords to obtain the name of the above-mentioned target page element; adding to the above-mentioned name The identifier indicating that the above target page element is a container element.
  • the embodiment of the device for naming front-end page elements shown in this application can be applied to a device for naming front-end page elements.
  • the device embodiments can be implemented by software, or can be implemented by hardware or a combination of software and hardware. Taking software implementation as an example, as a logical device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory through the processor of the electronic device where it is located.
  • the hardware structure diagram of a naming device for front-end page elements shown in this application except for the processor, memory, network interface, and non-volatile memory shown in Figure 5
  • the electronic device in which the device is located in the embodiment usually includes other hardware according to the actual function of the electronic device, which will not be repeated here.
  • the device includes: a processor; and a memory for storing executable instructions of the processor.
  • the above-mentioned processor is configured to call the executable instructions stored in the above-mentioned memory to implement any one of the above-mentioned methods for naming front-end page elements.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • Multimedia (AREA)
  • Evolutionary Computation (AREA)
  • Human Computer Interaction (AREA)
  • Library & Information Science (AREA)
  • Computing Systems (AREA)
  • Medical Informatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A front-end page element naming method and apparatus, and an electronic device. The method comprises: if a target page element is an image element, calculating the similarity between the target page element and each image in a preset image database (S102); determining the maximum similarity in the calculated similarities (S104); and determining the name of the image in the preset image database corresponding to the calculated maximum similarity as the name of the target page element (S106).

Description

前端页面元素的命名Naming of front-end page elements 技术领域Technical field
本申请涉及计算机网络技术领域,尤其涉及一种前端页面元素的命名方法、装置及电子设备。This application relates to the field of computer network technology, and in particular to a method, device and electronic equipment for naming front-end page elements.
背景技术Background technique
在前端页面开发作业中,为了有助于提高前端页面代码的可读性,以及后期维护代码的便利性,开发人员通常需要针对前端页面元素进行命名。In the front-end page development work, in order to help improve the readability of the front-end page code and the convenience of maintaining the code in the later stage, developers usually need to name the front-end page elements.
目前,在对页面元素进行命名时,开发人员通常需要通过人工进行命名。而由于元素的命名有严格的规范,并且前端开发中包括的页面元素数量众多,因此,通过人工命名元素的方式,将可能出现命名效率低,命名时不能严格遵守命名规范,命名错误等问题。Currently, when naming page elements, developers usually need to manually name them. However, because element naming has strict specifications, and the number of page elements included in front-end development is large, the manual naming of elements may lead to low naming efficiency, failure to strictly abide by naming conventions, and naming errors.
发明内容Summary of the invention
本申请提出一种前端页面元素的命名方法,上述方法包括:当目标页面元素为图像元素时,计算上述目标页面元素,与预设图像库中的各图像之间的相似度;确定计算出的上述相似度中的最大相似度;将计算上述最大相似度时对应的上述预设图像库中的图像的名称,确定为上述目标页面元素的名称。This application proposes a method for naming front-end page elements. The above method includes: when the target page element is an image element, calculating the similarity between the target page element and each image in the preset image library; determining the calculated The maximum similarity in the above-mentioned similarity; the name of the image in the above-mentioned preset image library corresponding to the calculation of the above-mentioned maximum similarity is determined as the name of the target page element.
在示出的一实施例中,上述计算上述目标页面元素,与预设图像库中的各图像之间的相似度,包括:将上述目标页面元素的元素数据输入预先训练的分类模型中进行计算,得到上述目标页面元素的分类结果,上述分类模型为基于若干被标注了分类结果的样本训练得到的神经网络模型;从预设图像库中,查找与上述目标页面元素的分类结果相同的图像;计算上述目标页面元素,与查找出的各图像之间的相似度。In the illustrated embodiment, calculating the similarity between the target page element and each image in the preset image library includes: inputting the element data of the target page element into a pre-trained classification model for calculation , Obtain the classification result of the target page element, the classification model is a neural network model trained based on a number of samples labeled with the classification result; search for an image that is the same as the classification result of the target page element from the preset image library; Calculate the similarity between the above-mentioned target page elements and the searched images.
在示出的一实施例中,上述方法还包括:当目标页面元素为文本元素时,将上述目标页面元素的元素数据输入预先训练的翻译模型中进行计算,得到与上述目标页面元素对应的英文字符串;将上述英文字符串,确定为上述目标页面元素的名称。In the illustrated embodiment, the above method further includes: when the target page element is a text element, inputting the element data of the target page element into a pre-trained translation model for calculation to obtain the English language corresponding to the target page element String; the above-mentioned English string is determined as the name of the above-mentioned target page element.
在示出的一实施例中,上述方法还包括:基于预先构建的映射算法,将上述目标页面元素中的繁体字转换为简体字。In the illustrated embodiment, the above method further includes: converting the traditional characters in the target page elements into simplified characters based on a pre-built mapping algorithm.
在示出的一实施例中,上述将上述英文字符串,确定为上述目标页面元素的名称,包括:将上述英文字符串输入预先训练的关键词提取模型中进行计算,得到 与上述英文字符串对应的关键词;将上述关键词,确定为上述目标页面元素的名称。In the illustrated embodiment, determining the above-mentioned English character string as the name of the target page element includes: inputting the above-mentioned English character string into a pre-trained keyword extraction model for calculation, and obtaining the same as the above-mentioned English character string. Corresponding keywords; the above keywords are determined as the names of the above target page elements.
在示出的一实施例中,上述方法还包括:如果上述目标页面元素为容器元素,则在上述目标页面元素的名称中添加指示上述目标页面元素为容器元素的标识。In the illustrated embodiment, the above method further includes: if the target page element is a container element, adding an identifier indicating that the target page element is a container element to the name of the target page element.
在示出的一实施例中,上述在上述目标页面元素的名称中添加指示上述目标页面元素为容器元素的标识,包括:从上述容器元素中各元素的名称中,提取关键词;将各关键词进行组合,得到上述目标页面元素的名称;在上述名称中添加指示上述目标页面元素为容器元素的标识。In the illustrated embodiment, adding an identifier indicating that the target page element is a container element to the name of the target page element includes: extracting keywords from the names of each element in the container element; Words are combined to obtain the name of the target page element; an identifier indicating that the target page element is a container element is added to the name.
本申请还提出一种前端页面元素的命名装置,包括:计算模块,当目标页面元素为图像元素时,计算上述目标页面元素,与预设图像库中的各图像之间的相似度;第一确定模块,确定计算出的上述相似度中的最大相似度;第二确定模块,将计算上述最大相似度时对应的上述预设图像库中的图像的名称,确定为上述目标页面元素的名称。This application also proposes a device for naming front-end page elements, including: a calculation module, when the target page element is an image element, calculate the similarity between the target page element and each image in the preset image library; first The determining module determines the maximum similarity among the calculated similarities; the second determining module determines the name of the image in the preset image library corresponding to the calculation of the maximum similarity as the name of the target page element.
在示出的一实施例中,上述计算模块,包括:将上述目标页面元素的元素数据输入预先训练的分类模型中进行计算,得到上述目标页面元素的分类结果,上述分类模型为基于若干被标注了分类结果的样本训练得到的神经网络模型;从预设图像库中,查找与上述目标页面元素的分类结果相同的图像;计算上述目标页面元素,与查找出的各图像之间的相似度。In the illustrated embodiment, the calculation module includes: inputting the element data of the target page element into a pre-trained classification model for calculation to obtain the classification result of the target page element, and the classification model is based on a number of labeled The neural network model obtained by training the sample of the classification result; searching for the image that is the same as the classification result of the target page element from the preset image library; calculating the similarity between the target page element and the searched images.
在示出的一实施例中,上述装置还包括:模型计算模块,当目标页面元素为文本元素时,将上述目标页面元素的元素数据输入预先训练的翻译模型中进行计算,得到与上述目标页面元素对应的英文字符串;第三确定模块,将上述英文字符串,确定为上述目标页面元素的名称。In the illustrated embodiment, the above-mentioned device further includes: a model calculation module, when the target page element is a text element, the element data of the above-mentioned target page element is input into a pre-trained translation model for calculation, and the result is the same as that of the above-mentioned target page. The English character string corresponding to the element; the third determining module determines the above English character string as the name of the target page element.
在示出的一实施例中,上述装置还包括:转换模块,基于预先构建的映射算法,将上述目标页面元素中的繁体字转换为简体字。In the illustrated embodiment, the above device further includes: a conversion module, which converts the traditional characters in the target page elements into simplified characters based on a pre-built mapping algorithm.
在示出的一实施例中,上述第三确定模块,包括:将上述英文字符串输入预先训练的关键词提取模型中进行计算,得到与上述英文字符串对应的关键词;将上述关键词,确定为上述目标页面元素的名称。In the illustrated embodiment, the third determining module includes: inputting the English character string into a pre-trained keyword extraction model for calculation to obtain keywords corresponding to the English character string; Determine the name of the above target page element.
在示出的一实施例中,上述装置还包括:添加模块,如果上述目标页面元素为容器元素,则在上述目标页面元素的名称中添加指示上述目标页面元素为容器元素的标识。In the illustrated embodiment, the above-mentioned apparatus further includes: an adding module, if the above-mentioned target page element is a container element, add an identifier indicating that the above-mentioned target page element is a container element to the name of the above-mentioned target page element.
在示出的一实施例中,上述添加模块,包括:从上述容器元素中各元素的名称中,提取关键词;将各关键词进行组合,得到上述目标页面元素的名称;在上述名称中添加指示上述目标页面元素为容器元素的标识。In the illustrated embodiment, the above-mentioned adding module includes: extracting keywords from the names of each element in the above-mentioned container element; combining the various keywords to obtain the name of the above-mentioned target page element; adding to the above-mentioned name The identifier indicating that the above target page element is a container element.
由上述技术方案可知,一方面,当元素为图像元素时,上述系统可以计算上 述目标页面元素,与预设图像库中的各图像之间的相似度,并将上述预设图像库中,与计算出的相似度中的最大相似度对应的图像的名称,确定为上述目标页面元素的名称。It can be seen from the above technical solution that, on the one hand, when the element is an image element, the above system can calculate the similarity between the target page element and each image in the preset image library, and combine the preset image library with The name of the image corresponding to the maximum similarity in the calculated similarity is determined as the name of the target page element.
另一方面,当元素为文本元素时,上述系统可以从上述文本元素中提取关键词,并将提取的关键词作为上述文本元素的名称。On the other hand, when the element is a text element, the above-mentioned system can extract keywords from the above-mentioned text element, and use the extracted keywords as the name of the above-mentioned text element.
再一方面,当元素为容器元素时,上述系统可以在上述目标页面元素的名称中添加指示上述目标页面元素为容器元素的标识,从而实现针对上述容器元素的命名。On the other hand, when the element is a container element, the above-mentioned system may add an identifier indicating that the above-mentioned target page element is a container element to the name of the above-mentioned target page element, so as to realize the naming of the above-mentioned container element.
因此,本申请公开的元素命名方法可以实现自动为元素命名,从而提升元素命名效率,元素命名规范度,以及正确性,避免由于人工参与而导致的命名效率低,命名时不能严格遵守命名规范,命名错误等问题。Therefore, the element naming method disclosed in this application can realize automatic naming of elements, thereby improving element naming efficiency, element naming standardization, and correctness, avoiding low naming efficiency due to manual participation and failing to strictly comply with naming conventions when naming. Problems such as naming errors.
附图说明Description of the drawings
图1为本申请示出的一种前端页面元素的命名方法的方法流程图;FIG. 1 is a method flowchart of a method for naming front-end page elements shown in this application;
图2为本申请示出的文本元素命名方法的方法流程图;FIG. 2 is a method flowchart of the text element naming method shown in this application;
图3为本申请示出的容器元素命名方法的方法流程图;FIG. 3 is a method flowchart of the container element naming method shown in this application;
图4为本申请示出的一种前端页面元素的命名装置的结构图;FIG. 4 is a structural diagram of a device for naming front-end page elements shown in this application;
图5为本申请示出的一种前端页面元素的命名设备的硬件结构图。Fig. 5 is a hardware structure diagram of a naming device for front-end page elements shown in this application.
具体实施方式Detailed ways
下面将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的设备和方法的例子。The exemplary embodiments will be described in detail below, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present application. Rather, they are merely examples of devices and methods consistent with some aspects of the application as detailed in the appended claims.
在本申请使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请和所附权利要求书中所使用的单数形式的“一种”、“上述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。还应当理解,本文中所使用的词语“如果”,取决于语境,可以被解释成为“在……时”或“当……时”或“响应于确定”。The terms used in this application are only for the purpose of describing specific embodiments, and are not intended to limit the application. The singular forms of "a", "above" and "the" used in this application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and/or" as used herein refers to and includes any or all possible combinations of one or more associated listed items. It should also be understood that the word "if" used herein, depending on the context, can be interpreted as "when" or "when" or "in response to determination".
本申请旨在提出一种前端页面元素的命名方法,以使在确定页面元素名称时,由页面元素名称确定系统实现针对不同类型的页面元素进行命名,从而避免由 于人工参与而导致的命名效率低,命名时不能严格遵守命名规范,命名错误等问题。This application aims to propose a method for naming front-end page elements, so that when determining the name of the page element, the page element name determination system realizes the naming of different types of page elements, thereby avoiding low naming efficiency due to manual participation , The naming cannot strictly abide by the naming convention, naming errors and other issues.
以下结合具体实施例对本申请公开的技术方案进行说明。The technical solutions disclosed in the present application will be described below in conjunction with specific embodiments.
请参见图1,图1为本申请示出的一种前端页面元素的命名方法的方法流程图。应用于页面元素命名系统。如图1所示,上述方法包括:Please refer to FIG. 1. FIG. 1 is a method flowchart of a method for naming front-end page elements shown in this application. Applied to the page element naming system. As shown in Figure 1, the above method includes:
S102,当目标页面元素为图像元素时,计算上述目标页面元素,与预设图像库中的各图像之间的相似度。S102: When the target page element is an image element, calculate the similarity between the target page element and each image in the preset image library.
S104,确定计算出的上述相似度中的最大相似度。S104: Determine the maximum similarity among the calculated similarities.
S106,将计算上述最大相似度时对应的上述预设图像库中的图像的名称,确定为上述目标页面元素的名称。S106: Determine the name of the image in the preset image library corresponding to the calculation of the maximum similarity as the name of the target page element.
上述页面元素命名系统(以下简称“系统”),具体可以是搭载在终端设备中的一段逻辑代码。上述页面元素命名系统在作为执行主体执行上述元素提取方法时,需要通过其搭载的终端设备提供算力。The above-mentioned page element naming system (hereinafter referred to as the "system") may specifically be a piece of logic code carried in a terminal device. The above-mentioned page element naming system needs to provide computing power through its equipped terminal device when executing the above-mentioned element extraction method as the execution subject.
在实际应用中,上述系统可以提供一个与开发人员进行交互的交互平台。通过该交互平台,一方面,开发人员可以将需要待命名的页面元素提供至上述系统,并向上述系统发起针对页面元素进行命名的相关指令;另一方面,当针对页面元素命名完毕后,上述系统可以将命名后的页面元素向开发人员输出。In practical applications, the above system can provide an interactive platform for interacting with developers. Through this interactive platform, on the one hand, developers can provide the page elements that need to be named to the above system, and initiate related instructions for naming the page elements to the above system; on the other hand, when the page elements are named, the above The system can output the named page elements to developers.
上述前端页面图像,具体是由页面图像设计师设计的页面图像。在实际情形中,开发人员在进行前端页面开发时,通常需要参照页面图像设计师设计的页面图像来进行开发,从而使最终开发的前端页面的展示效果可以与上述页面图像相同。The above-mentioned front-end page image is specifically a page image designed by a page image designer. In actual situations, when a developer develops a front-end page, he usually needs to refer to the page image designed by the page image designer for development, so that the display effect of the final developed front-end page can be the same as the above-mentioned page image.
上述前端页面元素(以下简称“元素”),具体是构成前端页面的主要组成部分,其可以包括图像元素、文本元素和容器元素。The above-mentioned front-end page elements (hereinafter referred to as "elements") specifically constitute the main components of the front-end page, which may include image elements, text elements, and container elements.
上述图像元素,具体是指包括的内容为图像的元素。The above-mentioned image element specifically refers to an element whose content is an image.
上述文本元素,具体是指包括的内容为文字的元素。其中,上述文字可能包括繁体字或简体字。The above text element specifically refers to an element whose content is text. Among them, the above-mentioned characters may include traditional or simplified characters.
上述容器元素,具体是指有若干元素的组成的元素集合。在实际应用中,若干图像元素可以组成一个容器元素。若干文本元素可以组成一个容器元素。若干文本元素和若干图像元素也可以共同组成一个容器元素。The aforementioned container element specifically refers to a collection of elements composed of several elements. In practical applications, several image elements can form a container element. Several text elements can form a container element. Several text elements and several image elements can also form a container element together.
可以理解的是,在实际应用中,不同类型的元素的命名规范也不一样。因此,在进行元素命名时,需要确定元素的元素类型。It is understandable that in practical applications, the naming conventions for different types of elements are different. Therefore, when naming elements, you need to determine the element type of the element.
在一实施例中,当开发人员需要针对某一元素进行命名时,开发人员可以通过上述系统提供的交互平台,将上述元素,以及该元素的元素类型提供至上述系统。In one embodiment, when a developer needs to name a certain element, the developer can provide the above-mentioned element and the element type of the element to the above-mentioned system through the interactive platform provided by the above-mentioned system.
例如,上述交互平台可以提供一个窗口,用于为开发人员输入待命名元素的元素类型。当开发人员将上述元素的元素数据提供至上述系统时,开发人员还可以在上述窗口中,输入上述元素的元素类型,以供上述系统进行元素类型的识别。For example, the aforementioned interactive platform may provide a window for the developer to input the element type of the element to be named. When the developer provides the element data of the aforementioned element to the aforementioned system, the developer can also input the element type of the aforementioned element in the aforementioned window for the aforementioned system to identify the element type.
在另一实施例中,为了提高元素命名效率,以及正确率。当开发人员需要针对某一元素进行命名时,开发人员可以通过上述系统提供的交互平台,仅将上述元素提供至上述系统即可。In another embodiment, in order to improve the efficiency and accuracy of element naming. When a developer needs to name an element, the developer can only provide the aforementioned element to the aforementioned system through the interactive platform provided by the aforementioned system.
在上述情形下,上述系统可以自动识别上述元素的元素类型。In the above-mentioned situation, the above-mentioned system can automatically identify the element type of the above-mentioned element.
在一种实现方式中,在识别上述元素的元素类型时,上述系统可以通过先针对上述元素对应的元素数据进行OCR识别,得到与上述元素对应的识别结果,然后再根据上述识别结果确定各元素的元素类型。In one implementation, when identifying the element type of the above-mentioned element, the above-mentioned system may first perform OCR recognition on the element data corresponding to the above-mentioned element to obtain the recognition result corresponding to the above-mentioned element, and then determine each element according to the above-mentioned recognition result. The element type.
在介绍具体步骤前,本申请先介绍通过OCR识别确定元素类型的原理。Before introducing the specific steps, this application first introduces the principle of determining element types through OCR identification.
OCR(Optical Character Recognition,光学字符识别)技术,具体是将图像、照片上的文字内容,直接转换为可编辑文本的技术。其原理为,将目标图像的图像特征与已有的汉字库中的汉字的图像特征进行比较,并输出与目标图像的图像特征最匹配的汉字作为识别结果,以及上述识别结果的识别置信度。其中,上述识别置信度可以在一定程度上指示上述目标图像的图像特征与识别结果的相似程度。OCR (Optical Character Recognition, Optical Character Recognition) technology is specifically a technology that directly converts text content on images and photos into editable text. The principle is to compare the image features of the target image with the image features of Chinese characters in the existing Chinese character library, and output the Chinese character that most matches the image features of the target image as the recognition result, and the recognition confidence of the above recognition result. Wherein, the recognition confidence level may indicate to a certain extent the similarity between the image feature of the target image and the recognition result.
例如,假如目标图像包括的文字内容为汉字“中”,此时由于上述目标图像包括的确实是一个汉字,因此经过OCR检测后得到的识别结果的识别置信度将会比较高。而假设目标图像包括的具体内容为一个类似汉字“中”的图案,此时在针对目标图像进行OCR识别后,虽然可以得到相应识别结果,但是由于上述目标图像包括的具体内容仅是类似汉字的图案,因此,上述识别置信度则会相对较低。For example, if the text content included in the target image is the Chinese character "中", at this time, since the target image does include a Chinese character, the recognition confidence of the recognition result obtained after the OCR detection will be relatively high. Suppose that the specific content of the target image is a pattern similar to the Chinese character "中". At this time, after OCR recognition is performed on the target image, although the corresponding recognition result can be obtained, the specific content included in the above target image is only similar to Chinese characters. Therefore, the above-mentioned recognition confidence will be relatively low.
可见,在通过OCR识别的方式确定上述元素的元素类型时,可以在针对元素的元素图像进行OCR识别后,通过判断与该次识别结果对应的识别置信度是否达到预设阈值来确定上述元素的元素类型。其中,上述预设阈值,具体可以是开发人员根据经验设置,或通过大量的样本训练出的,在此不作限定。当上述识别置信度达到上述预设阈值,则确定上述元素的元素类型为文本元素;反之,则确定上述元素的元素类型为图像元素。It can be seen that when the element type of the above element is determined by OCR recognition, after OCR recognition is performed on the element image of the element, it is possible to determine whether the recognition confidence corresponding to the recognition result reaches a preset threshold. Element type. The above-mentioned preset threshold may be specifically set by the developer based on experience or trained through a large number of samples, which is not limited here. When the recognition confidence level reaches the preset threshold, the element type of the element is determined to be a text element; otherwise, the element type of the element is determined to be an image element.
可以理解的是,在上述情形中,如果针对上述元素经过OCR识别后得到若干个识别结果,则说明上述元素为若干个文本元素或图像元素的集合,此时可以确定上述元素为容器元素。It is understandable that, in the above-mentioned situation, if several recognition results are obtained after OCR recognition for the above-mentioned element, it means that the above-mentioned element is a collection of several text elements or image elements. At this time, it can be determined that the above-mentioned element is a container element.
在另一种实施方式中,上述系统在确定元素的元素类型时,可以将上述元素对应的元素数据输入预先训练的分类器进行计算,并基于计算结果确定上述元素的元素类型。In another embodiment, when determining the element type of the element, the above system may input the element data corresponding to the element into a pre-trained classifier for calculation, and determine the element type of the element based on the calculation result.
其中,上述分类器,具体可以是基于若干被标记了元素类型的元素图像样本进行训练得到的;上述元素类型包括图像元素,文本元素,容器元素。Among them, the above-mentioned classifier may be specifically obtained by training based on a number of element image samples marked with element types; the above-mentioned element types include image elements, text elements, and container elements.
在此需要说明的是,上述分类器的结构和类型在此不作限定。上述分类器可以是基于神经网络构建的多分类器。It should be noted here that the structure and type of the above-mentioned classifier are not limited here. The above-mentioned classifier may be a multi-classifier constructed based on a neural network.
上述图像库,具体可以是预先配置好的图像库。上述图像库通常可以包括若干张已命名的图像(根据命名规范命名的图像)。The aforementioned image library may specifically be a pre-configured image library. The aforementioned image library can usually include several named images (images named according to naming conventions).
在实际应用中,为了规范存储图像,以及提升命名精确度,上述图像库包括的图像可以进行分类存储。例如,上述图像库可以被分为若干存储空间;其中,每一存储空间可以存储同一图像类型的图像。In practical applications, in order to standardize the storage of images and improve the accuracy of naming, the images included in the above-mentioned image library can be classified and stored. For example, the above-mentioned image library can be divided into several storage spaces; among them, each storage space can store images of the same image type.
在一种配置图像库的方式中,开发人员可以获取包括若干常用元素图像的图像集合。然后,开发人员可以根据命名规范为上述图像集合中的各图像进行命名,并将命名好的图像进行分类(人工分类或通过分类器进行分类),存至上述图像库对应的存储空间。可以理解的是,配置好的图像库是可以被重复复制使用的,并非每次在为目标元素进行命名时均需要进行配置的。当然,配置好的图像库是可以被更新的。例如,添加新图像或更新已有图像的名称等。In a way of configuring the image library, developers can obtain an image collection that includes several common element images. Then, the developer can name each image in the above-mentioned image collection according to the naming convention, classify the named images (either manually or through a classifier), and save them in the storage space corresponding to the above-mentioned image library. It is understandable that the configured image library can be duplicated and used repeatedly, and it does not need to be configured every time the target element is named. Of course, the configured image library can be updated. For example, adding a new image or updating the name of an existing image, etc.
当确定出目标元素为图像元素时,上述系统可以执行S102,计算上述目标元素,与预设图像库中的各图像之间的相似度。When it is determined that the target element is an image element, the foregoing system may execute S102 to calculate the similarity between the foregoing target element and each image in the preset image library.
在一实施例中,在计算上述目标元素,与预设图像库中的各图像之间的相似度时,上述系统可以先将上述目标元素的元素数据整理为特征向量的形式,从而便于进行相似度计算。In an embodiment, when calculating the similarity between the target element and each image in the preset image library, the system may first organize the element data of the target element into the form of a feature vector, so as to facilitate similarity.度Calculation.
例如,上述系统可以先提取上述目标元素的图像特征(例如,Harris角点或SIFT特征),并形成相应的特征向量。For example, the above-mentioned system may first extract the image features of the above-mentioned target elements (for example, Harris corner points or SIFT features), and form corresponding feature vectors.
之后,上述系统可以针对上述预设图像库中的各图像执行以下步骤S1022-S1026:After that, the foregoing system may execute the following steps S1022-S1026 for each image in the foregoing preset image library:
S1022,提取上述图像的图像特征,形成特征向量。S1022: Extract image features of the aforementioned image to form a feature vector.
S1024,在提取上述特征向量后,计算上述图像对应的各特征向量,与上述目标元素对应的各特征向量之间的欧式距离,并统计欧式距离小于预设基准阈值的特征向量的数量。S1024: After extracting the feature vector, calculate the Euclidean distance between each feature vector corresponding to the image and each feature vector corresponding to the target element, and count the number of feature vectors whose Euclidean distance is less than a preset reference threshold.
S1026,将统计的上述图像包括的特征向量中,与上述目标元素包括的特征向量之间的欧式距离小于预设基准阈值的数量,通过预设的映射算法(例如,归一化或标准化算法),将上述数量映射为上述图像与上述目标元素之间的相似度。S1026: In the statistical feature vectors included in the image, the Euclidean distance between the feature vector included in the target element and the feature vector is less than a preset reference threshold, and the preset mapping algorithm (for example, normalization or standardization algorithm) is used. , The above-mentioned quantity is mapped to the similarity between the above-mentioned image and the above-mentioned target element.
S1028,记录映射的上述相似度,与上述图像的对应关系。S1028: Record the above-mentioned similarity of the mapping and the corresponding relationship with the above-mentioned image.
在此,需要说明的是,在本申请不对计算相似度的方法进行限定。例如,上述计算相似度的方法还可以通过计算特征向量之间的余弦距离、曼哈顿距离、马氏距离等方式。Here, it should be noted that the method for calculating the similarity is not limited in this application. For example, the above method for calculating similarity can also be calculated by calculating the cosine distance, Manhattan distance, Mahalanobis distance between feature vectors.
当针对上述预设图像库中的各图像完成上述步骤后,上述系统将会得到上述目标元素与上述各图像之间的相似度,以及上述相似度,与上述各图像的对应关系。After completing the above steps for each image in the preset image library, the system will obtain the similarity between the target element and each image, as well as the similarity, and the corresponding relationship with each image.
然后,上述系统可以执行S104-S106,确定计算出的上述相似度中的最大相似度,并将计算上述最大相似度时对应的上述预设图像库中的图像的名称,确定为上述目标页面元素的名称。Then, the system can execute S104-S106 to determine the maximum similarity among the calculated similarities, and determine the name of the image in the preset image library corresponding to the calculation of the maximum similarity as the target page element The name.
在一实施例中,为了提升确定上述最大相似度的效率,上述系统可以将得到的上述相似度推入大顶堆(大顶堆中的每个父节点对应的值都大于或等于其左右子节点对应的值)中。然后,上述系统可以读取上述大顶堆的根节点中存储的相似度,并将读取的上述相似度确定为最大相似度。In one embodiment, in order to improve the efficiency of determining the above-mentioned maximum similarity, the above-mentioned system can push the obtained above-mentioned similarity into the big top pile (the value corresponding to each parent node in the big top pile is greater than or equal to its left and right children). The value corresponding to the node). Then, the system can read the similarity stored in the root node of the big top pile, and determine the read similarity as the maximum similarity.
不难理解,由于大顶堆的特性为每个父节点对应的值都大于或等于其左右子节点对应的值,因此,大顶堆的根节点记录的是上述大顶堆中维护的最大值。可见,上述大顶堆的根节点中存储的相似度,则为得到的各相似度中的最大相似度。It is not difficult to understand that because the characteristic of the big top heap is that the value corresponding to each parent node is greater than or equal to the value corresponding to its left and right child nodes, therefore, the root node of the big top heap records the maximum value maintained in the above big top heap . It can be seen that the similarity stored in the root node of the above-mentioned large top pile is the maximum similarity among the obtained similarities.
当确定最大相似度后,上述系统可以从记录的上述对应关系中,确定与上述最大相似度对应的图像。在确定上述图像后,上述系统可以将上述图像的名称确定为上述目标元素的名称。After determining the maximum similarity, the system can determine the image corresponding to the maximum similarity from the recorded correspondence. After determining the image, the system may determine the name of the image as the name of the target element.
至此,上述系统则完成了针对目标元素的命名。At this point, the above system has completed the naming of the target element.
由上述技术方案可知,由于在对前端页面元素进行命名时,上述系统可以计算上述目标页面元素,与预设图像库中的各图像之间的相似度,并将上述预设图像库中,与计算出的相似度中的最大相似度对应的图像的名称,确定为上述目标页面元素的名称,因此,可以实现自动为元素命名,从而提升元素命名效率,元素命名规范度,以及正确性,避免由于人工参与而导致的命名效率低,命名时不能严格遵守命名规范,命名错误等问题。It can be seen from the above technical solution that, when naming front-end page elements, the above system can calculate the similarity between the target page element and each image in the preset image library, and combine the preset image library with The name of the image corresponding to the maximum similarity in the calculated similarity is determined as the name of the target page element mentioned above. Therefore, it is possible to automatically name the element, thereby improving the efficiency of element naming, the standardization of element naming, and the correctness, avoiding The naming efficiency is low due to manual participation, the naming cannot be strictly abided by the naming convention, naming errors and other issues.
在一实施例中,为了提升命名精确度,上述系统在执行S102,计算上述目标页面元素,与预设图像库中的各图像之间的相似度时,可以先将上述目标页面元素的元素数据输入预先训练的分类模型中进行计算,得到上述目标页面元素的分类结果。In one embodiment, in order to improve the naming accuracy, when the system executes S102 to calculate the similarity between the target page element and each image in the preset image library, the element data of the target page element may be first Input the pre-trained classification model for calculation, and obtain the classification result of the target page element.
其中,上述分类模型为基于若干被标注了分类结果的样本训练得到的神经网络模型。Among them, the above classification model is a neural network model obtained by training based on a number of samples labeled with classification results.
在训练上述分类模型时,可以先获取若干被标注了分类结果的样本数据。在获取若干样本数据后,可以将上述样本数据输入分类模型中,进行迭代训练,直至 上述分类模型收敛。此时,收敛的分类模型可以作为训练完毕的分类模型。When training the above classification model, a number of sample data marked with classification results can be obtained first. After obtaining several sample data, the above sample data can be input into the classification model, and iterative training can be performed until the above classification model converges. At this time, the convergent classification model can be used as the trained classification model.
当确定上述目标元素的图像类型后,上述系统可以从预设图像库中,查找与上述目标页面元素的分类结果相同的图像,然后计算上述目标页面元素,与查找出的各图像之间的相似度。After determining the image type of the target element, the system can search for images that are the same as the classification result of the target page element from the preset image library, and then calculate the target page element to be similar to the searched images Spend.
在一种方式中,在查找与上述目标页面元素的分类结果相同的图像时,上述系统可以直接读取与上述分类结果对应的存储空间所记录的图像。In one manner, when searching for an image that is the same as the classification result of the target page element, the system may directly read the image recorded in the storage space corresponding to the classification result.
在另一种方式中,在查找与上述目标页面元素的分类结果相同的图像时,上述系统可以将上述预设图像库中的各图像的图像数据输入上述分类模型进行计算,从而得到各图像的图像类型。之后,上述系统可以将图像类型与上述目标元素的图像类型相同的图像,确定为与上述目标页面元素的分类结果相同的图像。In another way, when searching for images that are the same as the classification result of the target page element, the system may input the image data of each image in the preset image library into the classification model for calculation, thereby obtaining the image data of each image. Image type. After that, the above-mentioned system may determine an image whose image type is the same as the image type of the above-mentioned target element as an image with the same classification result of the above-mentioned target page element.
在确定上述目标元素与各图像之间的相似度后,上述系统可以继续执行S104-S106,确定计算出的上述相似度中的最大相似度;将计算上述最大相似度时对应的上述预设图像库中的图像的名称,确定为上述目标页面元素的名称(详细步骤可以参照前述内容,在此不作详述)。After determining the similarity between the target element and each image, the system can continue to execute S104-S106 to determine the maximum similarity among the calculated similarities; the preset image corresponding to the maximum similarity will be calculated The name of the image in the library is determined as the name of the above-mentioned target page element (for detailed steps, please refer to the foregoing content, which will not be described in detail here).
在本实施例中,由于上述系统是在与目标元素的图像类型相同的图像中,确定与上述目标元素最相似的图像,并将上述最相似的图像的名称作为上述目标元素的名称,因此,可以提升元素命名精确度。In this embodiment, because the system described above determines the image that is most similar to the target element among the images of the same type as the target element, and uses the name of the most similar image as the name of the target element, therefore, Can improve the accuracy of element naming.
请参见图2,图2为本申请示出的文本元素命名方法的方法流程图。Please refer to FIG. 2. FIG. 2 is a method flowchart of the text element naming method shown in this application.
当确定出目标元素为文本元素时,如图2所示,上述系统可以先将上述文本元素的文本内容进行繁简转换。When it is determined that the target element is a text element, as shown in FIG. 2, the above-mentioned system can first convert the text content of the above-mentioned text element into traditional and simplified form.
在实际应用中,上述系统中可以预先搭载繁体字转换为简体字的映射算法。通过该映射算法,上述系统可以将文本元素中的繁体字转为简体字。In practical applications, the above-mentioned system can be equipped with a mapping algorithm for converting traditional characters to simplified characters in advance. Through this mapping algorithm, the above-mentioned system can convert traditional characters in text elements into simplified characters.
例如,上述映射算法可以是基于hanlp工具构建的繁体字转换为简体字的算法。当接收到文本元素的文本内容后,该算法可以先将上述文本内容按照文字进行分割,然后逐一检测分割后的文字是否为繁体字,如果是,则将其转换为对应的简体字进行输出;如果否,则直接将该分割后的文字进行输出。当针对每一分割后的分组进行繁简转换后,上述算法可以将上述输出的简体字重新组合为上述文本元素的文本内容。For example, the above-mentioned mapping algorithm may be an algorithm for converting traditional characters to simplified characters constructed based on the hanlp tool. After receiving the text content of the text element, the algorithm can first segment the above text content according to the text, and then detect whether the divided text is a traditional Chinese character one by one, and if it is, it will be converted to the corresponding simplified character for output; if Otherwise, output the divided text directly. After the traditional and simplified conversion is performed for each divided group, the above algorithm can recombine the output simplified characters into the text content of the above text element.
在此,需要说明的是,本申请不对上述映射算法进行限定。Here, it should be noted that this application does not limit the foregoing mapping algorithm.
当获取到经过繁简转换后的上述文本元素后,上述系统可以将上述目标页面元素的元素数据输入预先训练的翻译模型中进行计算,得到与上述目标页面元素对应的英文字符串。After obtaining the text element that has been converted from traditional to simplified, the system can input the element data of the target page element into a pre-trained translation model for calculation to obtain the English character string corresponding to the target page element.
在实际应用中,上述系统可以预先搭载训练好的翻译模型。通过该翻译模型可以将输入的中文文本内容,转换为英文文本内容。In practical applications, the above-mentioned system can be pre-loaded with a trained translation model. Through this translation model, the input Chinese text content can be converted into English text content.
例如,上述翻译模型可以是基于seq2seq的NLP(Natural Language Processing,自然语言处理)模型。当接收到文本元素的文本内容后,该模型可以先将上述文本内容按照文字进行分割,然后将分割后的文字作为输入进行语义编码,得到与上述文本内容对应的向量。在完成语义编码后,可以基于上述语义编码,以及英文单词库,将上述向量解码为英文文本内容。For example, the aforementioned translation model may be an NLP (Natural Language Processing) model based on seq2seq. After receiving the text content of the text element, the model can first segment the text content according to the text, and then use the segmented text as input for semantic encoding to obtain the vector corresponding to the text content. After the semantic coding is completed, the above-mentioned vector can be decoded into English text content based on the above-mentioned semantic coding and the English word library.
在此,需要说明的是,本申请不对上述翻译模型进行限定。Here, it should be noted that this application does not limit the above-mentioned translation model.
当将上述文本元素的文本内容转化为英文文本内容(由英文字符串构成文本内容)后,上述系统可以从上述英文文本内容中选取出若干关键字,作为是文本元素的名称。After the text content of the text element is converted into English text content (the text content is composed of English strings), the system can select several keywords from the English text content as the name of the text element.
在实际应用中,上述系统可以预先搭载关键词提取模型。通过该关键词提取模型可以在输入的英文文本内容中,提取出关键词。In practical applications, the above-mentioned system can be equipped with a keyword extraction model in advance. Through the keyword extraction model, keywords can be extracted from the input English text content.
例如,上述关键词提取模型可以是基于TF-IDF算法构建的模型。当接收到文本元素的英文文本内容后,该模型可以先将上述英文文本中的各单词进行分割,然后统计分割后的单词在该文本中的出现频率(TF,Term Frequency,词频)。在统计出各单词的在本文本中出现的频率后,可以结合各单词在其他英文文本中出现的频率(IDF,Inverse Documnet Frequency,逆文档频率),将各单词进行排序,并且排在前N位的单词作为关键词;其中,N为根据经验预设的正整数。For example, the above keyword extraction model may be a model constructed based on the TF-IDF algorithm. After receiving the English text content of the text element, the model can first segment each word in the above-mentioned English text, and then count the occurrence frequency (TF, Term Frequency, word frequency) of the segmented word in the text. After calculating the frequency of each word in this text, you can combine the frequency of each word in other English texts (IDF, Inverse Documnet Frequency, inverse document frequency), sort the words, and rank them in the top N Bit words are used as keywords; among them, N is a positive integer preset based on experience.
再例如,是关键词提取模型可以是基于textRank的NLP模型。当接收到文本元素的英文文本内容后,该模型可以先将上述英文文本中的各单词进行分割。在得到分割完毕后的单词后,上述系统可以将相邻两个分割后的单词进行两两组合,得到所有可能的组合,然后计算组合内的单词之间的连接权重。当计算出各组合内单词之间的连接权重后,上述系统可以计算每个单词对应的连接权重的和,并按照上述和的大小,对上述英文文本中的各单词进行排序。此时,上述系统可以将排在前N位的单词作为关键词;其中,N为根据经验预设的正整数。For another example, the keyword extraction model may be an NLP model based on textRank. After receiving the English text content of the text element, the model can first segment each word in the above-mentioned English text. After obtaining the divided words, the above system can combine two adjacent divided words in pairs to obtain all possible combinations, and then calculate the connection weights between the words in the combination. After calculating the connection weights between words in each combination, the above-mentioned system can calculate the sum of the connection weights corresponding to each word, and sort the words in the above-mentioned English text according to the size of the above-mentioned sum. At this time, the above system can use the top N words as keywords; where N is a positive integer preset based on experience.
在此,需要说明的是,本申请不对上述关键词提取模型进行限定。Here, it should be noted that this application does not limit the above-mentioned keyword extraction model.
在从上述文本元素的英文文本内容中确定出关键词后,上述系统可以将上述关键词确定为上述文本元素的名称。After the keyword is determined from the English text content of the text element, the system may determine the keyword as the name of the text element.
当确定出目标元素为容器元素时,上述系统可以在上述目标页面元素的名称中添加指示上述目标页面元素为容器元素的标识。When it is determined that the target element is a container element, the foregoing system may add an identifier indicating that the target page element is a container element to the name of the target page element.
请参见图3,图3为本申请示出的容器元素命名方法的方法流程图。Please refer to FIG. 3, which is a method flowchart of the container element naming method shown in this application.
当确定出目标元素为容器元素时,如图3所示,上述系统可以先确定上述容 器元素中包括的各元素的元素类型。When it is determined that the target element is a container element, as shown in Figure 3, the above-mentioned system can first determine the element type of each element included in the above-mentioned container element.
在实际应用中,上述系统可以使用本申请中公开的确定元素类型的方法,逐一确定上述各元素的元素类型。In practical applications, the above system can use the method for determining element types disclosed in this application to determine the element types of the above elements one by one.
当上述容器元素中仅包括唯一本文元素时,上述系统可以使用本申请中公开的针对文本元素的命名方法,对上述容器元素中的文本元素进行命名。等到命名完成后,上述系统可以在上述文本元素的名称中添加指示上述目标页面元素为容器元素的标识,作为上述容器元素的名称。例如,在上述文本元素的名称前添加字符“contarner”。When the above-mentioned container element only includes the only text element, the above-mentioned system can use the naming method for text elements disclosed in this application to name the text element in the above-mentioned container element. After the naming is completed, the system may add an identifier indicating that the target page element is a container element to the name of the text element as the name of the container element. For example, add the characters "contarner" before the name of the above text element.
当上述容器元素中包括若干本文元素时,在一实施例中,上述系统可以先从上述容器元素中,确定出用于命名的文本元素。然后,上述系统可以使用本申请中公开的针对文本元素的命名方法,对确定出的文本元素进行命名。等到命名完成后,上述系统可以在上述文本元素的名称中添加指示上述目标页面元素为容器元素的标识,作为上述容器元素的名称。When the container element includes several text elements, in one embodiment, the system may first determine the text element for naming from the container element. Then, the above-mentioned system can use the naming method for text elements disclosed in this application to name the determined text elements. After the naming is completed, the system may add an identifier indicating that the target page element is a container element to the name of the text element as the name of the container element.
例如,上述系统可以将上述容器元素中处于首位(末位)的文本元素确定为用于命名的文本元素,并进行后续的命名。For example, the aforementioned system may determine the first (last) text element in the aforementioned container element as the text element for naming, and perform subsequent naming.
再例如,上述系统可以将上述容器元素中数据量最大的文本元素确定为用于命名的本文元素,并进行后续的命名。For another example, the foregoing system may determine the text element with the largest amount of data among the foregoing container elements as the text element for naming, and perform subsequent naming.
还例如,上述文本元素中携带指示上述文本元素重要性的标识(标识指示的数值越大,上述文本元素重要性越高)。上述系统可以将上述容器元素中携带的上述标识的数值最大的文本元素确定为用于命名的本文元素,并进行后续的命名。For another example, the above text element carries an identifier indicating the importance of the above text element (the larger the value indicated by the identifier, the higher the importance of the above text element). The foregoing system may determine the text element with the largest value of the foregoing identifier carried in the foregoing container element as the text element for naming, and perform subsequent naming.
在此,需要说明的是,确定用于命名的文本元素的方法可以根据实际情形进行设置,在此不作限定。Here, it should be noted that the method for determining the text element used for naming can be set according to the actual situation, which is not limited here.
在另一实施例中,上述系统可以先使用本申请中公开的针对文本元素进行命名的方法,提取出各文本元素的关键词。然后,上述系统可以将各关键词进行组合得到组合后的关键词,并在组合后的关键词中添加指示上述目标页面元素为容器元素的标识,作为上述容器元素的名称。In another embodiment, the above-mentioned system may first use the method for naming text elements disclosed in this application to extract the keywords of each text element. Then, the above-mentioned system may combine the keywords to obtain the combined keywords, and add an identifier indicating that the target page element is a container element to the combined keywords as the name of the container element.
在另一实施例中,上述系统可以先使用本申请中公开的针对文本元素进行命名的方法,提取出各文本元素的关键词。然后,上述系统可在提出的各关键词中,确定最重要的关键词,并在上述最重要的关键词中添加指示上述目标页面元素为容器元素的标识,作为上述容器元素的名称。In another embodiment, the above-mentioned system may first use the method for naming text elements disclosed in this application to extract the keywords of each text element. Then, the system can determine the most important keyword among the proposed keywords, and add an identifier indicating that the target page element is a container element to the most important keyword as the name of the container element.
例如,在确定上述最重要的关键词时,上述系统可以将各关键词输入本申请记载的关键词提取模型中进行计算,然后,将计算结果作为上述最重要的关键词。For example, when determining the above-mentioned most important keywords, the above-mentioned system may input each keyword into the keyword extraction model described in this application for calculation, and then use the calculation result as the above-mentioned most important keyword.
当上述容器元素中仅包括唯一图像元素时,上述系统可以使用本申请中公开 的针对图像元素的命名方法,对上述容器元素中的文本元素进行命名。等到命名完成后,上述系统可以在上述图像元素的名称中添加指示上述目标页面元素为容器元素的标识,作为上述容器元素的名称。例如,在上述文本元素的名称前添加字符“contarner”。When the aforementioned container element only includes a unique image element, the aforementioned system can use the naming method for image elements disclosed in this application to name the text element in the aforementioned container element. After the naming is completed, the system may add an identifier indicating that the target page element is a container element to the name of the image element as the name of the container element. For example, add the characters "contarner" before the name of the above text element.
当上述容器元素中包括若干图像元素时,在一实施例中,上述系统可以先从上述容器元素中,确定出用于命名的图像元素。然后,上述系统可以使用本申请中公开的针对文本元素的命名方法,对确定出的图像元素进行命名。等到命名完成后,上述系统可以在上述图像元素的名称中添加指示上述目标页面元素为容器元素的标识,作为上述容器元素的名称。When the container element includes several image elements, in one embodiment, the system may first determine the image element used for naming from the container elements. Then, the above system can use the naming method for text elements disclosed in this application to name the determined image elements. After the naming is completed, the system may add an identifier indicating that the target page element is a container element to the name of the image element as the name of the container element.
例如,上述系统可以将上述容器元素中处于首位(末位)的图像元素确定为用于命名的图像元素,并进行后续的命名。For example, the above-mentioned system may determine the first (last) image element among the above-mentioned container elements as the image element for naming, and perform subsequent naming.
再例如,上述系统可以将上述容器元素中数据量最大的图像元素确定为用于命名的图像元素,并进行后续的命名。For another example, the foregoing system may determine the image element with the largest amount of data among the foregoing container elements as the image element for naming, and perform subsequent naming.
还例如,上述图像元素中携带指示上述图像元素重要性的标识(标识指示的数值越大,上述图像元素重要性越高)。上述系统可以将上述容器元素中携带的上述标识的数值最大的图像元素确定为用于命名的图像元素,并进行后续的命名。For another example, the above-mentioned image element carries an identifier indicating the importance of the above-mentioned image element (the larger the value indicated by the identifier, the higher the importance of the above-mentioned image element). The above-mentioned system may determine the image element with the largest value of the above-mentioned identifier carried in the above-mentioned container element as the image element for naming, and perform subsequent naming.
在此,需要说明的是,确定用于命名的图像元素的方法可以根据实际情形进行设置,在此不作限定。Here, it should be noted that the method for determining the image element used for naming can be set according to the actual situation, which is not limited here.
在另一实施例中,上述系统可以先使用本申请中公开的针对图像元素进行命名的方法,确定各图像元素的名称。然后,上述系统可以将各图像元素的名称进行组合得到组合后的名称,并在组合后的名称中添加指示上述目标页面元素为容器元素的标识,作为上述容器元素的名称。In another embodiment, the aforementioned system may first use the method for naming image elements disclosed in this application to determine the name of each image element. Then, the above system may combine the names of the image elements to obtain a combined name, and add an identifier indicating that the target page element is a container element to the combined name as the name of the container element.
在另一实施例中,上述系统可以先使用本申请中公开的针对图像元素进行命名的方法,确定各图像元素的名称。然后,上述系统可在确定的各图像元素的名称中,提取出关键词,并在上述关键词中添加指示上述目标页面元素为容器元素的标识,作为上述容器元素的名称。In another embodiment, the aforementioned system may first use the method for naming image elements disclosed in this application to determine the name of each image element. Then, the above-mentioned system may extract keywords from the determined names of each image element, and add an identifier indicating that the target page element is a container element to the above-mentioned keywords as the name of the container element.
例如,在提取上述关键词时,上述系统可以将各图像元素的名称输入本申请记载的关键词提取模型中进行计算,然后,将计算结果作为上述关键词。For example, when extracting the above-mentioned keywords, the above-mentioned system may input the name of each image element into the keyword extraction model described in this application for calculation, and then use the calculation result as the above-mentioned keyword.
需要说明的是,当上述容器元素既包括文本元素,也包括图像元素时,针对上述容器元素的命名方法可以参照前述内容,在此不作详述。It should be noted that when the aforementioned container element includes both text elements and image elements, the naming method of the aforementioned container element can refer to the aforementioned content, which will not be described in detail here.
当上述容器元素不包括任意元素时,上述系统可以将指示上述目标页面元素为容器元素的标识,与上述容器元素被分配的序号进行组合,并将组合后的结果作为上述容器元素的名称。When the container element does not include any element, the system may combine the identifier indicating that the target page element is the container element with the assigned sequence number of the container element, and use the combined result as the name of the container element.
需要说明的是,上述容器元素被分配的序号,可以是根据实际情形进行分配的,在此不作限定。例如,在一种情形中,上述容器元素被分配的序号,可以指示上述容器元素被创建的顺序。在另一种情形中,上述容器元素被分配的序号,可以是人工分配的序号。It should be noted that the sequence numbers assigned to the above-mentioned container elements may be assigned according to actual conditions, which are not limited here. For example, in one situation, the sequence number to which the above-mentioned container elements are assigned may indicate the order in which the above-mentioned container elements are created. In another case, the sequence number assigned to the above-mentioned container element may be a sequence number assigned manually.
由上述技术方案可知,一方面,当元素为图像元素时,上述系统可以计算上述目标页面元素,与预设图像库中的各图像之间的相似度,并将上述预设图像库中,与计算出的相似度中的最大相似度对应的图像的名称,确定为上述目标页面元素的名称。It can be seen from the above technical solution that, on the one hand, when the element is an image element, the above system can calculate the similarity between the target page element and each image in the preset image library, and combine the preset image library with The name of the image corresponding to the maximum similarity in the calculated similarity is determined as the name of the target page element.
另一方面,当元素为文本元素时,上述系统可以从上述文本元素中提取关键词,并将提取的关键词作为上述文本元素的名称。On the other hand, when the element is a text element, the above-mentioned system can extract keywords from the above-mentioned text element, and use the extracted keywords as the name of the above-mentioned text element.
再一方面,当元素为容器元素时,上述系统可以在上述目标页面元素的名称中添加指示上述目标页面元素为容器元素的标识,从而实现针对上述容器元素的命名。On the other hand, when the element is a container element, the above-mentioned system may add an identifier indicating that the above-mentioned target page element is a container element to the name of the above-mentioned target page element, so as to realize the naming of the above-mentioned container element.
因此,本申请公开的元素命名方法可以实现自动为元素命名,从而提升元素命名效率,元素命名规范度,以及正确性,避免由于人工参与而导致的命名效率低,命名时不能严格遵守命名规范,命名错误等问题。Therefore, the element naming method disclosed in this application can realize automatic naming of elements, thereby improving element naming efficiency, element naming standardization, and correctness, avoiding low naming efficiency due to manual participation and failing to strictly comply with naming conventions when naming. Problems such as naming errors.
相应地,本申请还提出一种前端页面元素的命名装置。请参见图4,图4为本申请示出的一种前端页面元素的命名装置的结构图。Correspondingly, this application also proposes a device for naming front-end page elements. Please refer to FIG. 4, which is a structural diagram of a device for naming front-end page elements shown in this application.
如图4所示,上述装置400可以包括:As shown in FIG. 4, the foregoing apparatus 400 may include:
计算模块410,当目标页面元素为图像元素时,计算上述目标页面元素,与预设图像库中的各图像之间的相似度;The calculation module 410, when the target page element is an image element, calculates the similarity between the target page element and each image in the preset image library;
第一确定模块420,确定计算出的上述相似度中的最大相似度;The first determining module 420 determines the maximum similarity among the calculated similarities;
第二确定模块430,将计算上述最大相似度时对应的上述预设图像库中的图像的名称,确定为上述目标页面元素的名称。The second determining module 430 determines the name of the image in the preset image library corresponding to the calculation of the maximum similarity as the name of the target page element.
在示出的一实施例中,上述计算模块410,包括:将上述目标页面元素的元素数据输入预先训练的分类模型中进行计算,得到上述目标页面元素的分类结果;其中,上述分类模型为基于若干被标注了分类结果的样本训练得到的神经网络模型;从预设图像库中,查找与上述目标页面元素的分类结果相同的图像;计算上述目标页面元素,与查找出的各图像之间的相似度。In the illustrated embodiment, the calculation module 410 includes: inputting the element data of the target page element into a pre-trained classification model for calculation to obtain the classification result of the target page element; wherein, the classification model is based on A neural network model trained by a number of samples labeled with classification results; from a preset image library, search for images that are the same as the classification results of the target page elements; calculate the difference between the target page elements and the searched images Similarity.
在示出的一实施例中,上述装置400还包括:模型计算模块,当目标页面元素为文本元素时,将上述目标页面元素的元素数据输入预先训练的翻译模型中进行计算,得到与上述目标页面元素对应的英文字符串;第三确定模块,将上述英文字符串,确定为上述目标页面元素的名称。In the illustrated embodiment, the above-mentioned device 400 further includes: a model calculation module, when the target page element is a text element, the element data of the above-mentioned target page element is input into a pre-trained translation model for calculation, and the result is the same as the above-mentioned target page element. The English character string corresponding to the page element; the third determining module determines the above-mentioned English character string as the name of the above-mentioned target page element.
在示出的一实施例中,上述装置400还包括转换模块,基于预先构建的映射算法,将上述目标页面元素中的繁体字转换为简体字。In the illustrated embodiment, the device 400 further includes a conversion module, which converts the traditional characters in the target page elements into simplified characters based on a pre-built mapping algorithm.
在示出的一实施例中,上述第三确定模块,包括:将上述英文字符串输入预先训练的关键词提取模型中进行计算,得到与上述英文字符串对应的关键词;将上述关键词,确定为上述目标页面元素的名称。In the illustrated embodiment, the third determining module includes: inputting the English character string into a pre-trained keyword extraction model for calculation to obtain keywords corresponding to the English character string; Determine the name of the above target page element.
在示出的一实施例中,上述装置400还包括:添加模块,如果上述目标页面元素为容器元素,则在上述目标页面元素的名称中添加指示上述目标页面元素为容器元素的标识。In the illustrated embodiment, the apparatus 400 further includes: an adding module, if the target page element is a container element, add an identifier indicating that the target page element is a container element to the name of the target page element.
在示出的一实施例中,上述添加模块,包括:从上述容器元素中各元素的名称中,提取关键词;将各关键词进行组合,得到上述目标页面元素的名称;在上述名称中添加指示上述目标页面元素为容器元素的标识。In the illustrated embodiment, the above-mentioned adding module includes: extracting keywords from the names of each element in the above-mentioned container element; combining the various keywords to obtain the name of the above-mentioned target page element; adding to the above-mentioned name The identifier indicating that the above target page element is a container element.
本申请示出的前端页面元素的命名装置的实施例可以应用于前端页面元素的命名设备上。装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在电子设备的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,如图5所示,为本申请示出的一种前端页面元素的命名设备的硬件结构图,除了图5所示的处理器、内存、网络接口、以及非易失性存储器之外,实施例中装置所在的电子设备通常根据该电子设备的实际功能,还可以包括其他硬件,对此不再赘述。The embodiment of the device for naming front-end page elements shown in this application can be applied to a device for naming front-end page elements. The device embodiments can be implemented by software, or can be implemented by hardware or a combination of software and hardware. Taking software implementation as an example, as a logical device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory through the processor of the electronic device where it is located. From a hardware perspective, as shown in Figure 5, the hardware structure diagram of a naming device for front-end page elements shown in this application, except for the processor, memory, network interface, and non-volatile memory shown in Figure 5 In addition to the memory, the electronic device in which the device is located in the embodiment usually includes other hardware according to the actual function of the electronic device, which will not be repeated here.
请参考图5所示的一种前端页面元素的命名设备,上述设备包括:处理器;用于存储处理器可执行指令的存储器。其中,上述处理器被配置为调用上述存储器中存储的可执行指令,实现任一上述的前端页面元素的命名方法。Please refer to a device for naming front-end page elements shown in FIG. 5. The device includes: a processor; and a memory for storing executable instructions of the processor. The above-mentioned processor is configured to call the executable instructions stored in the above-mentioned memory to implement any one of the above-mentioned methods for naming front-end page elements.
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权限要求来限制。It should be understood that the present application is not limited to the precise structure that has been described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is only limited by the attached authority requirements.
以上上述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。The above are only preferred embodiments of this application, and are not intended to limit this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in the protection of this application. Within the range.

Claims (15)

  1. 前端页面元素的命名方法,包括:The naming methods of front-end page elements include:
    当目标页面元素为图像元素时,计算所述目标页面元素,与预设图像库中的各图像之间的相似度;When the target page element is an image element, calculating the similarity between the target page element and each image in the preset image library;
    确定计算出的所述相似度中的最大相似度;Determining the maximum similarity among the calculated similarities;
    将计算所述最大相似度时对应的所述预设图像库中的图像的名称,确定为所述目标页面元素的名称。The name of the image in the preset image library corresponding to the calculation of the maximum similarity is determined as the name of the target page element.
  2. 根据权利要求1所述的方法,所述计算所述目标页面元素,与预设图像库中的各图像之间的相似度,包括:The method according to claim 1, wherein the calculating the similarity between the target page element and each image in a preset image library comprises:
    将所述目标页面元素的元素数据输入预先训练的分类模型中进行计算,得到所述目标页面元素的分类结果;其中,所述分类模型为基于若干被标注了分类结果的样本训练得到的神经网络模型;Input the element data of the target page element into a pre-trained classification model for calculation to obtain the classification result of the target page element; wherein, the classification model is a neural network trained based on a number of samples labeled with classification results Model;
    从预设图像库中,查找与所述目标页面元素的分类结果相同的图像;Search for an image that is the same as the classification result of the target page element from the preset image library;
    计算所述目标页面元素,与查找出的各图像之间的相似度。Calculate the similarity between the target page element and the found images.
  3. 根据权利要求1所述的方法,还包括:The method according to claim 1, further comprising:
    当目标页面元素为文本元素时,将所述目标页面元素的元素数据输入预先训练的翻译模型中进行计算,得到与所述目标页面元素对应的英文字符串;When the target page element is a text element, input the element data of the target page element into a pre-trained translation model for calculation to obtain an English character string corresponding to the target page element;
    将所述英文字符串,确定为所述目标页面元素的名称。The English character string is determined as the name of the target page element.
  4. 根据权利要求3所述的方法,还包括:The method according to claim 3, further comprising:
    基于预先构建的映射算法,将所述目标页面元素中的繁体字转换为简体字。Based on a pre-built mapping algorithm, the traditional characters in the target page elements are converted into simplified characters.
  5. 根据权利要求3所述的方法,所述将所述英文字符串,确定为所述目标页面元素的名称,包括:The method according to claim 3, wherein the determining the English character string as the name of the target page element includes:
    将所述英文字符串输入预先训练的关键词提取模型中进行计算,得到与所述英文字符串对应的关键词;Input the English character string into a pre-trained keyword extraction model for calculation to obtain keywords corresponding to the English character string;
    将所述关键词,确定为所述目标页面元素的名称。The keyword is determined as the name of the target page element.
  6. 根据权利要求1-5任一所述的方法,还包括:The method according to any one of claims 1-5, further comprising:
    如果所述目标页面元素为容器元素,则在所述目标页面元素的名称中添加指示所述目标页面元素为容器元素的标识。If the target page element is a container element, an identifier indicating that the target page element is a container element is added to the name of the target page element.
  7. 根据权利要求6所述的方法,所述在所述目标页面元素的名称中添加指示所述目标页面元素为容器元素的标识,包括:The method according to claim 6, wherein the adding an identifier indicating that the target page element is a container element to the name of the target page element comprises:
    从所述容器元素中各元素的名称中,提取关键词;Extract keywords from the names of each element in the container element;
    将各关键词进行组合,得到所述目标页面元素的名称;Combine the keywords to obtain the name of the target page element;
    在所述名称中添加指示所述目标页面元素为容器元素的标识。An identifier indicating that the target page element is a container element is added to the name.
  8. 前端页面元素的命名装置,包括:The naming device of front-end page elements includes:
    计算模块,当目标页面元素为图像元素时,计算所述目标页面元素,与预设图像库中的各图像之间的相似度;A calculation module, when the target page element is an image element, calculate the similarity between the target page element and each image in the preset image library;
    第一确定模块,确定计算出的所述相似度中的最大相似度;The first determining module determines the maximum similarity among the calculated similarities;
    第二确定模块,将计算所述最大相似度时对应的所述预设图像库中的图像的名称,确定为所述目标页面元素的名称。The second determining module determines the name of the image in the preset image library corresponding to the calculation of the maximum similarity as the name of the target page element.
  9. 根据权利要求8所述的装置,所述计算模块,包括:The device according to claim 8, the calculation module comprising:
    将所述目标页面元素的元素数据输入预先训练的分类模型中进行计算,得到所述目标页面元素的分类结果;其中,所述分类模型为基于若干被标注了分类结果的样本训练得到的神经网络模型;Input the element data of the target page element into a pre-trained classification model for calculation to obtain the classification result of the target page element; wherein, the classification model is a neural network trained based on a number of samples labeled with classification results Model;
    从预设图像库中,查找与所述目标页面元素的分类结果相同的图像;Search for an image that is the same as the classification result of the target page element from the preset image library;
    计算所述目标页面元素,与查找出的各图像之间的相似度。Calculate the similarity between the target page element and the found images.
  10. 根据权利要求8所述的装置,还包括:The device according to claim 8, further comprising:
    模型计算模块,当目标页面元素为文本元素时,将所述目标页面元素的元素数据输入预先训练的翻译模型中进行计算,得到与所述目标页面元素对应的英文字符串;A model calculation module, when the target page element is a text element, input the element data of the target page element into a pre-trained translation model for calculation to obtain an English character string corresponding to the target page element;
    第三确定模块,将所述英文字符串,确定为所述目标页面元素的名称。The third determining module determines the English character string as the name of the target page element.
  11. 根据权利要求10所述的装置,还包括:The device according to claim 10, further comprising:
    转换模块,基于预先构建的映射算法,将所述目标页面元素中的繁体字转换为简体字。The conversion module converts the traditional characters in the target page elements into simplified characters based on a pre-built mapping algorithm.
  12. 根据权利要求10所述的装置,所述第三确定模块,包括:The device according to claim 10, the third determining module comprises:
    将所述英文字符串输入预先训练的关键词提取模型中进行计算,得到与所述英文字符串对应的关键词;Input the English character string into a pre-trained keyword extraction model for calculation to obtain keywords corresponding to the English character string;
    将所述关键词,确定为所述目标页面元素的名称。The keyword is determined as the name of the target page element.
  13. 根据权利要求8-12任一所述的装置,还包括:The device according to any one of claims 8-12, further comprising:
    添加模块,如果所述目标页面元素为容器元素,则在所述目标页面元素的名称中添加指示所述目标页面元素为容器元素的标识。An adding module, if the target page element is a container element, add an identifier indicating that the target page element is a container element to the name of the target page element.
  14. 根据权利要求13所述的装置,所述添加模块,包括:The device according to claim 13, wherein the adding module comprises:
    从所述容器元素中各元素的名称中,提取关键词;Extract keywords from the names of each element in the container element;
    将各关键词进行组合,得到所述目标页面元素的名称;Combine the keywords to obtain the name of the target page element;
    在所述名称中添加指示所述目标页面元素为容器元素的标识。An identifier indicating that the target page element is a container element is added to the name.
  15. 前端页面元素的命名设备,包括:The naming device for front-end page elements, including:
    处理器;processor;
    用于存储所述处理器可执行指令的存储器;A memory for storing executable instructions of the processor;
    其中,所述处理器被配置为调用所述存储器中存储的可执行指令,实现权利要求1至14中任一项所述的前端页面元素的命名方法。Wherein, the processor is configured to call executable instructions stored in the memory to implement the method for naming front-end page elements according to any one of claims 1 to 14.
PCT/CN2021/092136 2020-05-09 2021-05-07 Naming of front-end page element WO2021227951A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010384139.6A CN111291208B (en) 2020-05-09 2020-05-09 Front-end page element naming method and device and electronic equipment
CN202010384139.6 2020-05-09

Publications (1)

Publication Number Publication Date
WO2021227951A1 true WO2021227951A1 (en) 2021-11-18

Family

ID=71021032

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/092136 WO2021227951A1 (en) 2020-05-09 2021-05-07 Naming of front-end page element

Country Status (2)

Country Link
CN (2) CN112307235B (en)
WO (1) WO2021227951A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112307235B (en) * 2020-05-09 2024-02-20 支付宝(杭州)信息技术有限公司 Naming method and device of front-end page element and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140289325A1 (en) * 2013-03-20 2014-09-25 Palo Alto Research Center Incorporated Ordered-element naming for name-based packet forwarding
CN106339479A (en) * 2016-08-30 2017-01-18 深圳市金立通信设备有限公司 Picture naming method and terminal
CN107463683A (en) * 2017-08-09 2017-12-12 上海壹账通金融科技有限公司 The naming method and terminal device of code element
CN109992266A (en) * 2017-12-29 2019-07-09 阿里巴巴集团控股有限公司 A kind for the treatment of method and apparatus of interface element
CN110399586A (en) * 2019-07-31 2019-11-01 深圳前海微众银行股份有限公司 Automatic processing method, device, equipment and the medium of web interface element
CN111291208A (en) * 2020-05-09 2020-06-16 支付宝(杭州)信息技术有限公司 Front-end page element naming method and device and electronic equipment

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140189642A1 (en) * 2013-01-03 2014-07-03 International Business Machines Corporation Native Language IDE Code Assistance
CN107291430A (en) * 2016-03-31 2017-10-24 富士通株式会社 Naming method and naming system
JP6881990B2 (en) * 2017-01-30 2021-06-02 キヤノン株式会社 Image processing device, its control method, and program
CN107239490B (en) * 2017-04-24 2021-01-15 北京小米移动软件有限公司 Method and device for naming face image and computer readable storage medium
AU2019346440A1 (en) * 2018-09-26 2021-05-27 Leverton Holding Llc Named entity recognition with convolutional networks
CN109543516A (en) * 2018-10-16 2019-03-29 深圳壹账通智能科技有限公司 Signing intention judgment method, device, computer equipment and storage medium
CN109508191B (en) * 2018-11-22 2022-03-22 北京腾云天下科技有限公司 Code generation method and system
CN109828748A (en) * 2018-12-15 2019-05-31 深圳壹账通智能科技有限公司 Code naming method, system, computer installation and computer readable storage medium
CN109933528A (en) * 2019-03-11 2019-06-25 恒生电子股份有限公司 A kind of method and device of automatized script encapsulation

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140289325A1 (en) * 2013-03-20 2014-09-25 Palo Alto Research Center Incorporated Ordered-element naming for name-based packet forwarding
CN106339479A (en) * 2016-08-30 2017-01-18 深圳市金立通信设备有限公司 Picture naming method and terminal
CN107463683A (en) * 2017-08-09 2017-12-12 上海壹账通金融科技有限公司 The naming method and terminal device of code element
CN109992266A (en) * 2017-12-29 2019-07-09 阿里巴巴集团控股有限公司 A kind for the treatment of method and apparatus of interface element
CN110399586A (en) * 2019-07-31 2019-11-01 深圳前海微众银行股份有限公司 Automatic processing method, device, equipment and the medium of web interface element
CN111291208A (en) * 2020-05-09 2020-06-16 支付宝(杭州)信息技术有限公司 Front-end page element naming method and device and electronic equipment

Also Published As

Publication number Publication date
CN112307235B (en) 2024-02-20
CN111291208A (en) 2020-06-16
CN112307235A (en) 2021-02-02
CN111291208B (en) 2020-11-10

Similar Documents

Publication Publication Date Title
US11544459B2 (en) Method and apparatus for determining feature words and server
WO2017107566A1 (en) Retrieval method and system based on word vector similarity
WO2023060795A1 (en) Automatic keyword extraction method and apparatus, and device and storage medium
US20200081899A1 (en) Automated database schema matching
CN113011533A (en) Text classification method and device, computer equipment and storage medium
US11645475B2 (en) Translation processing method and storage medium
CN109446885B (en) Text-based component identification method, system, device and storage medium
CN109815336B (en) Text aggregation method and system
WO2021068683A1 (en) Method and apparatus for generating regular expression, server, and computer-readable storage medium
CN110162771B (en) Event trigger word recognition method and device and electronic equipment
CN110334209B (en) Text classification method, device, medium and electronic equipment
WO2021051864A1 (en) Dictionary expansion method and apparatus, electronic device and storage medium
CN103678684A (en) Chinese word segmentation method based on navigation information retrieval
WO2020114100A1 (en) Information processing method and apparatus, and computer storage medium
CN112632226B (en) Semantic search method and device based on legal knowledge graph and electronic equipment
CN109063184B (en) Multi-language news text clustering method, storage medium and terminal device
WO2020199595A1 (en) Long text classification method and device employing bag-of-words model, computer apparatus, and storage medium
CN109857957B (en) Method for establishing label library, electronic equipment and computer storage medium
US11790174B2 (en) Entity recognition method and apparatus
WO2024109619A1 (en) Sensitive data identification method and apparatus, device, and computer storage medium
US8224642B2 (en) Automated identification of documents as not belonging to any language
CN111723192A (en) Code recommendation method and device
WO2021227951A1 (en) Naming of front-end page element
CN111325033A (en) Entity identification method, entity identification device, electronic equipment and computer readable storage medium
JP2004355224A (en) Apparatus, method and program for extracting parallel translation expression

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21803862

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21803862

Country of ref document: EP

Kind code of ref document: A1