Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Webpage label text positioning method

A technology of text positioning and webpage labeling, which is applied in the fields of instruments, electronic digital data processing, hardware monitoring, etc., can solve problems such as inconvenient direct access, difficulty, and troublesome process, and achieve easy understanding, small amount of calculation, and less amount of calculation Effect

Pending Publication Date: 2022-02-08
SHANGHAI YISAIQI SOFTWARE CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] For web controls, the label of the button is generally placed inside the button node and can be directly extracted, but the lists of controls such as edit boxes and selection boxes are often outside the control node and adjacent to the absolute position of the page. There is no clear relationship in the DOM tree of the web page, so it is inconvenient to obtain directly
If there is no label indicating semantics, only the positioning information of the control is used to represent the control. Although the RPA process can be executed correctly, it will be difficult for people to understand these processes. It is often necessary to manually reposition these controls on the page to find them. Corresponding semantic information, since there may be a lot of operations in a process, it is very troublesome to use the whole process
When users read the RPA process, if they want to know the meaning of these controls, they need to manually reposition them, which is very inconvenient

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Webpage label text positioning method
  • Webpage label text positioning method
  • Webpage label text positioning method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0051] A webpage label text positioning method, the operation scene of the method is as follows figure 1 As shown, the scene includes a user and an electronic device, where the electronic device may be a terminal with display shielding such as a desktop computer, a notebook computer, a tablet computer, a mobile phone, and a vehicle-mounted terminal. A user can open a webpage by using a browser of an electronic device, and perform operations on the webpage. figure 2 It is a sample diagram of the browser interface. In a typical web page, elements such as labels, edit boxes, and buttons are included. In general, the label is on the left and right of the edit box, indicating the content to be entered in the edit box. image 3 It is a schematic diagram of a DOM tree, which represents the internal data of a web page. In a typical web page, there are head and body nodes, and the general information of the web page is stored in the head node, such as the title, the size of the web ...

Embodiment 2

[0067]上述实施例一是最简方案,可以达到80%准确率。为了进一步提高准确率,实施例一中的S300可以做一些加强,请参阅图5b,改进后的S300包括:

[0068]S301:在DOM树上定位按钮,获得它在DOM树的位置即在当前节点层级序号N,以及其在页面上的绝对位置(包括x,y,w,h,其中x,y为控件的左上角坐标,w,h分别表示控件的宽和高),执行S302;

[0069]S302:判断当前序号N是否大于零,若大于零则执行S303,否则执行S307;

[0070]S303:获取同一层级序号为N-1的结点,及其绝对位置,执行S304;

[0071]S304:判断该层级序号为N-1的结点是否为包含有效文本信息的对应结点,若该层级序号为N-1的结点为包含有效文本信息的对应结点则执行S305,否则执行S306;

[0072]S305:判断包含有效文本信息的对应结点数量是否达标,若达标则执行S309,否则执行S306;

[0073]S306:基于该层级序号为N-1的结点作为层级序号为N的结点,重新执行S302;

[0074]S307:寻找当前操作控件所在结点的父结点,获取其层级序号N,执行S308;

[0075]S308:判断该父节点是否为根节点,若非根节点则基于该父结点的层级序号N,重新执行S302,若是根节点则执行S309;

[0076]S309:判断控件左边是否存在包含有效文本信息的对应结点,若存在则执行S310,否则执行S311;

[0077]S310:返回重叠面积最大的结点;

[0078]S311:判断控件上边是否存在包含有效文本信息的对应结点,若存在则执行S312,否则执行S313;

[0079]S312:返回重叠面积最大的结点;

[0080]S313:返回空。

[0081]其中,S305中包含有效文本信息的对应结点数量标准最多为五个包含有效文本信息的结点。

Embodiment 3

[0083]本发明实施例还提供了一种网页标签文本定位装置,包括处理器及存储介质;

[0084]所述存储介质用于存储指令;

[0085]所述处理器用于根据所述指令进行操作以执行下述方法的步骤:

[0086]响应于用户操作网页产生网页事件时,向网页DOM树中插入事件监控器;

[0087]响应于用户操作网页控件时,于网页DOM树中定位当前操作控件所在结点;

[0088]基于当前操作控件所在结点查找包含有效文本信息的结点;

[0089]响应于查找到包含有效文本信息的结点后,将结点信息及标签发送至指定位置。

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a webpage label text positioning method in the technical field of webpage label positioning. The method comprises the following steps of inserting an event monitor into a webpage DOM (Document Object Model) tree in response to a webpage event generated when a user operates a webpage; when the user operates the webpage control, a node where the current operation control is located being positioned in the webpage DOM tree; searching a node containing effective text information based on a node where the current operation control is located; and after the node containing the effective text information is found in response, sending the node information and the label to a specified position. The method is simple and effective, the label text corresponding to the operation control is automatically positioned, the label text is used for representing the operation control in the RPA process, more semantic information is added, and user understanding is facilitated.

Description

technical field [0001] The invention relates to a web page label text positioning method, which belongs to the technical field of web page label positioning. Background technique [0002] Each step in the RPA process includes two aspects, namely, positioning controls and performing corresponding operations. For web page controls, it can generally be located by xpath or cssselector. Because xpath or cssselector only contains the positioning information of the control, but does not contain the semantic information of the control, although it can be used for precise positioning, it is not convenient for people to understand. Therefore, when designing web pages, text labels are generally used to represent the semantic information of controls, and users locate and operate corresponding controls according to the labels when operating the page. The text label and the actual control are two controls, adjacent in position. [0003] For web controls, the label of the button is gene...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F11/30G06F11/34
CPCG06F11/3065G06F11/3093G06F11/302G06F11/3438G06F2201/865G06F2201/86
Inventor 唐琦松林平吴鑫靳志业张磊
Owner SHANGHAI YISAIQI SOFTWARE CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products