CN115237289B - Hot zone range determining method, device, equipment and storage medium - Google Patents

Hot zone range determining method, device, equipment and storage medium Download PDF

Info

Publication number
CN115237289B
CN115237289B CN202210774034.0A CN202210774034A CN115237289B CN 115237289 B CN115237289 B CN 115237289B CN 202210774034 A CN202210774034 A CN 202210774034A CN 115237289 B CN115237289 B CN 115237289B
Authority
CN
China
Prior art keywords
line segment
hot zone
horizontal
target line
zone range
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210774034.0A
Other languages
Chinese (zh)
Other versions
CN115237289A (en
Inventor
邹才华
庄有楷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Tuya Information Technology Co Ltd
Original Assignee
Hangzhou Tuya Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Tuya Information Technology Co Ltd filed Critical Hangzhou Tuya Information Technology Co Ltd
Priority to CN202210774034.0A priority Critical patent/CN115237289B/en
Publication of CN115237289A publication Critical patent/CN115237289A/en
Application granted granted Critical
Publication of CN115237289B publication Critical patent/CN115237289B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a method, a device, equipment and a storage medium for determining a hot zone range. The method comprises the following steps: when a target line segment drawn in a canvas interface is detected, acquiring a first starting point coordinate and a first end point coordinate of the target line segment; determining a horizontal hot zone range corresponding to the target line segment according to the first starting point coordinate and the first end point coordinate; and determining the target hot zone range of the target line segment according to the horizontal hot zone range. The embodiment of the invention improves the accuracy of determining the hot zone range of the target line segment.

Description

Hot zone range determining method, device, equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for determining a hot zone range.
Background
In Android (Android) custom View (View) development, a Path method is often used for drawing line segments, and in requirements development such as drawing boards, a selection function of the line segments needs to be processed. The hot area range of the line segment is required to be calculated to realize the selection of the line segment, and whether the current line segment is selected is judged by calculating whether the clicking position of the line segment is in the hot area range or not.
In the existing method for determining the hot zone range of the line segment, a rectangular range is usually drawn by taking the starting point to the end point of the line segment as a diagonal line, and the rectangular range is taken as the hot zone range of the line segment. When the line segments have inclination angles, the hot area range determined by the method is large, and when the line segments are more, the problems of overlapping hot area ranges and the like are easy to occur. When the line segment is in a horizontal or vertical position, the starting point and the ending point are in the same direction, so that the range of the hot zone becomes a straight line, the range of the hot zone is too small, the line segment is difficult to select, and the like, and the operation experience of related technicians is reduced.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for determining a hot zone range, which are used for improving the accuracy of determining the hot zone range of a target line segment.
According to an aspect of the present invention, there is provided a hot zone range determining method, the method comprising:
when a target line segment drawn in a canvas interface is detected, acquiring a first start point coordinate and a first end point coordinate of the target line segment;
determining a horizontal hot zone range corresponding to the target line segment according to the first starting point coordinate and the first end point coordinate;
and determining the target hot zone range of the target line segment according to the horizontal hot zone range.
According to another aspect of the present invention, there is provided a hot zone range determining apparatus, the apparatus comprising:
the coordinate acquisition module is used for acquiring a first starting point coordinate and a first end point coordinate of a target line segment drawn in the canvas interface when the target line segment is detected;
the horizontal hot zone range determining module is used for determining a horizontal hot zone range corresponding to the target line segment according to the first starting point coordinate and the first end point coordinate;
and the target hot zone range determining module is used for determining the target hot zone range of the target line segment according to the horizontal hot zone range.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the hot zone range determination method of any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the hot zone range determination method according to any one of the embodiments of the present invention when executed.
According to the scheme, when the target line segment drawn in the canvas interface is detected, the first starting point coordinate and the first end point coordinate of the target line segment are obtained; determining a horizontal hot zone range corresponding to the target line segment according to the first starting point coordinate and the first end point coordinate; and determining the target hot zone range of the target line segment according to the horizontal hot zone range. According to the scheme, the horizontal hot zone range of the target line segment in the horizontal direction is determined, and the accuracy of determining the target hot zone range of the target line segment is improved in a mode of determining the target hot zone range according to the horizontal hot zone range. According to the method and the device, the calculation rule of the target hot zone is redefined, the dynamic control of the hot zone range is realized, the situation that the hot zone ranges are overlapped due to the fact that the hot zone ranges corresponding to the target line segments are overlarge when the target line segments are angled is avoided, the situation that the hot zone ranges corresponding to the target line segments are too small to cause difficult selection when the target line segments are horizontal or vertical is avoided, the situation that the target line segments are extensible and good operation experience feeling is brought to related personnel using the line segment selection function is obtained.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1A is a schematic diagram of a prior art line segment hot zone range determination;
FIG. 1B is a flow chart of a method for determining a range of a hot zone according to a first embodiment of the present invention;
FIG. 1C is a schematic view of a horizontal hot zone range of a horizontal segment according to a first embodiment of the present invention;
FIG. 1D is a schematic diagram illustrating a determination of a target hot zone range according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a method for determining a range of a hot zone according to a second embodiment of the present invention;
FIG. 3 is a schematic view of a thermal zone range determining apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device implementing a method for determining a range of a hot zone according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
When the View interface implements the selection of a line segment, it is generally necessary to calculate the hot zone range of the line segment. And judging whether the current line segment is selected or not by calculating whether the click point is in the hot zone range or not. In determining the line segment hot zone range in the prior art, the following method is generally adopted for determination: the Path class method provided by Android (Android) system API (Application Programming Interface) returns to the hot zone range. However, the hot zone range is a rectangular range drawn with the start point to the end point of the line segment as a diagonal line, and as shown in fig. 1A, a rectangular dotted line box indicates the hot zone ranges corresponding to the line segments ab, bc, and cd. The range of the hot zone of the angular line segment determined in the method can become large, so that experience problems such as overlapping of the hot zones can occur. The determined hot zone range of the horizontal and vertical line segments is in the same direction because the starting point and the ending point can lead the hot zone range to become a straight line, so that the hot zone range is too small, and experience problems such as difficulty in selection and the like exist.
Example 1
Fig. 1B is a flowchart of a method for determining a range of a thermal zone according to an embodiment of the present invention, where the method may be performed by a device for determining a range of a thermal zone of a line segment, and the device for determining a range of a thermal zone may be implemented in hardware and/or software, and the device for determining a range of a thermal zone may be configured in an electronic device. As shown in fig. 1A, the method includes:
s110, when a target line segment drawn in the canvas interface is detected, acquiring a first start point coordinate and a first end point coordinate of the target line segment.
The canvas interface may be a View interface in the process of Android custom interface development. The target line segment may be a line segment drawn by the relevant person in the View interface.
Illustratively, when it is detected that a target line segment is drawn in the View interface, a first start point coordinate and a first end point coordinate of the target line segment are obtained. The first endpoint coordinate may be a position coordinate when the coordinate of the initial clicking point is dragged to stop at the endpoint position. A line segment with a specific length and angle is formed by the first start point coordinate and the first end point coordinate.
S120, determining a horizontal hot zone range corresponding to the target line segment according to the first starting point coordinate and the first end point coordinate.
The horizontal hot zone range may be a hot zone range of a horizontal line segment in a horizontal direction corresponding to the target line segment.
In an alternative embodiment, determining the horizontal hot zone range corresponding to the target line segment according to the first start point coordinate and the first end point coordinate includes: determining a horizontal line segment of the target line segment in the horizontal direction according to the first starting point coordinate and the first ending point coordinate; and determining the horizontal hot zone range of the horizontal line segment according to the coordinate points on the horizontal line segment.
The determining manner of the horizontal line segment of the target line segment in the horizontal direction may be that the line segment length of the target line segment is determined according to the first start point coordinate and the first end point coordinate. In particular, the determination may be made by means of a trigonometric function. And constructing a horizontal line segment with the length being the length of the line segment of the target line segment in the horizontal direction by taking the first starting point coordinate of the target line segment as a starting point. For example, if the first origin coordinate of the target line segment is (x 1 ,y 1 ) If the length of the target line segment is m, the starting point coordinates of the horizontal line segment are (x) 1 ,y 1 ) The end point coordinates of the horizontal line segment are (x) 1 +m,y 1 )。
According to coordinate points on the horizontal line segment, determining the horizontal hot zone range of the horizontal line segment, for example, a margin value can be preset, so that the horizontal line segment determines the horizontal hot zone range of the rectangular area based on the preset margin value, wherein the margin value from each coordinate point in the horizontal line segment to each side of the rectangular area closest to the coordinate point is the same. It is understood that the preset margin value may be preset by a related technician according to the requirement.
In an alternative embodiment, the coordinate points on the horizontal line segment include a second start point coordinate and a second end point coordinate; correspondingly, determining the horizontal hot zone range of the horizontal line segment according to the coordinate point on the horizontal line segment comprises the following steps: determining the width of the hot zone according to the second starting point coordinates, the second ending point coordinates and a preset width margin threshold; according to the second starting point coordinates and/or the second ending point coordinates, combining a preset height margin threshold value, and determining the height of the hot zone; and constructing a horizontal hot zone range of the horizontal line segment according to the hot zone width and the hot zone height.
The preset width margin threshold may include a preset left margin threshold and a preset right margin threshold. The preset height margin threshold may include a preset upper margin threshold and a preset lower margin threshold. The preset width threshold and the preset height threshold may be preset by a related technician. Specifically, the preset width threshold value and the preset height threshold value may be set to the same value, or may be set to different values.
Illustratively, the width of the horizontal line segment to the left boundary of the horizontal hot zone range may be determined according to the second starting point coordinates and a preset left margin threshold; according to the second end point coordinates and a preset right margin threshold value, the width from the horizontal line segment to the right boundary of the horizontal hot zone range can be determined; according to the second starting point coordinates or the second ending point coordinates, the width from the horizontal line segment to the upper boundary of the horizontal hot area range can be determined by combining a preset upper margin threshold; and according to the second starting point coordinates or the second ending point coordinates, combining a preset lower margin threshold value, and determining the width from the horizontal line segment to the lower boundary of the horizontal hot zone range.
The width of the hot zone can be the sum of a preset left margin threshold value, the length of a horizontal line segment and a preset right margin threshold value; the hot zone height may be the sum of a preset upper margin threshold, a horizontal line segment width, and a preset lower margin threshold. The width of the horizontal line segment is the same as the thickness of the target line segment, and is specifically determined by a relevant technician when drawing the target line segment. For example, the horizontal line segment width may be 1 pound (pt).
A schematic of the horizontal hot zone extent of a horizontal line segment is shown in fig. 1C. The line segment a may represent a preset left margin threshold, the line segment B may represent a preset right margin threshold, the line segment C may represent a preset upper margin threshold, and the line segment D may represent a preset lower margin threshold. According to the preset left margin threshold value, the preset right margin threshold value, the preset upper margin threshold value and the preset lower margin threshold value, the horizontal hot zone range of the horizontal line segment can be determined based on the first starting point coordinate and the second ending point coordinate.
S130, determining the target hot zone range of the target line segment according to the horizontal hot zone range.
For example, the horizontal hot zone range may be taken as the target hot zone range of the target line segment. When the target hot zone range is the horizontal hot zone range, in the subsequent process of selecting the target line segment, the coordinate of the click point clicking the target line segment can be rotated, and whether the target line segment is selected is determined by determining whether the rotated coordinate falls into the horizontal hot zone range. The segment selection angle may be an included angle between the target line segment and the horizontal line segment.
In an alternative embodiment, determining the target hot zone range of the target line segment from the horizontal hot zone range includes: determining the rotation angle of the target line segment in the horizontal direction; rotating the horizontal hot zone range along the direction of the target line segment based on the rotation angle; and taking the rotated horizontal hot zone range as a target hot zone range of a target line segment.
The rotation angle of the target line segment in the horizontal direction may be an included angle between the target line segment and the horizontal line segment.
Optionally, determining the rotation angle of the target line segment in the horizontal direction includes: and determining the rotation angle of the target line segment in the horizontal direction according to the first starting point coordinate and the first ending point coordinate.
For example, the rotation angle of the target line segment in the horizontal direction may be determined based on the existing angle calculation manner, such as a trigonometric function, from the first start point coordinate and the first end point coordinate.
And rotating the horizontal hot zone range along the direction of the target line segment, and taking the horizontal hot zone range rotated based on the rotation angle as the target hot zone range of the target line segment. A schematic of the determination of a target hot zone range is shown in fig. 1D. The line segment ab, the line segment bc, the line segment cd, and the line segment de may be target line segments. Target line segment abThe starting point coordinate is a, the end point coordinate is b, and the line segment ab' is a horizontal line segment of the target line segment ab. The starting point coordinate of the target line segment bc is b, and the ending point coordinate is c. The line segment bc' is a horizontal line segment of the target line segment bc. The starting point coordinate of the target line cd is c, the end point coordinate is d, and the line cd' is a horizontal line of the target line cd. The starting point coordinate of the target line segment de is d, the end point coordinate is e, and the line segment de' is a horizontal line segment of the target line segment de. θ 1 Is the rotation angle of the target line segment ab in the horizontal direction; θ 2 A rotation angle of the target line segment bc in the horizontal direction; θ 3 The rotation angle of the target line cd in the horizontal direction; θ 4 Is the rotation angle of the target line segment de in the horizontal direction. The gray dotted line frame of the horizontal line segment ab ' is the horizontal hot zone range of the horizontal line segment ab ', and the horizontal hot zone range of ab ' is based on theta 1 And after rotation, obtaining a black solid line frame, namely the target hot zone range of the target line segment ab. Similarly, the gray dotted line box of the horizontal line segment bc ' is the horizontal hot zone range of the horizontal line segment bc ', and the horizontal hot zone range of bc ' is based on θ 2 And after rotation, obtaining a black solid line frame, namely the target hot zone range of the target line segment bc. The gray dotted line frame of the horizontal line segment cd ' is the horizontal hot zone range of the horizontal line segment cd ', and the horizontal hot zone range of the cd ' is based on theta 3 And after rotation, obtaining a black solid line frame, namely a target hot zone range of the target line cd. The gray dotted line frame of the horizontal line segment de ' is the horizontal hot zone range of the horizontal line segment de ', and the horizontal hot zone range of the horizontal line segment de ' is based on theta 4 And after rotation, obtaining a black solid line frame, namely the target hot zone range of the target line segment de.
It should be noted that the length of the horizontal line segment may also be determined based on the rotation angle. For example, the first end point coordinates of the target line segment may be rotated to the horizontal direction based on the rotation angle, and the coordinates obtained after the rotation may be taken as the second end point coordinates. A horizontal line segment may be determined from the first endpoint coordinate and the second endpoint coordinate. The process of determining the horizontal line segment by adopting the mode does not need to determine the length of the target line segment, and the determination efficiency of the horizontal line segment is improved.
In an alternative embodiment, after determining the target hot zone range of the target line segment according to the horizontal hot zone range, further comprising: when a click command to a target line segment is detected, acquiring click coordinates of the target line segment; and if the click coordinate is within the target hot area range of the target line segment, placing the target line segment in a selected state.
The click command of the target line segment may be a command selected by a related technician on the target line segment in the View interface. The click coordinates may be click point coordinates when selecting a target line segment in the View interface.
When a click command of the target line segment is detected, a click coordinate corresponding to the target line segment is obtained, and whether the click coordinate is in a target hot area range of the target line segment is judged; if yes, the target line segment is placed in a selected state, and if not, the target line segment is not selected.
It is understood that the horizontal hot zone range may be taken as the target hot zone range of the target line segment without rotating the horizontal hot zone range in the direction of the target line segment correspondence.
In an alternative embodiment, if the click coordinate is within the target hot zone range of the target line segment, then placing the target line segment in the selected state includes: determining the rotation angle of the target line segment in the horizontal direction; rotating the click coordinate based on the rotation angle to obtain a rotation coordinate; if the rotation coordinate is within the horizontal hot zone range of the horizontal line segment, the target line segment is placed in a selected state.
For example, the rotation angle of the target line segment in the horizontal direction may be determined according to the first start point coordinate and the first end point coordinate. And rotating the click coordinate based on the rotation angle to obtain the rotated rotation coordinate. Judging whether the rotation coordinate is in a horizontal hot zone range, wherein the horizontal hot zone range can be used as a target hot zone range of a target line segment; if yes, the target line segment is placed in a selected state, and if not, the target line segment is not selected.
According to the scheme, when the target line segment drawn in the canvas interface is detected, the first starting point coordinate and the first end point coordinate of the target line segment are obtained; determining a horizontal hot zone range corresponding to the target line segment according to the first starting point coordinate and the first end point coordinate; and determining the target hot zone range of the target line segment according to the horizontal hot zone range. According to the scheme, the horizontal hot zone range of the target line segment in the horizontal direction is determined, and the accuracy of determining the target hot zone range of the target line segment is improved in a mode of determining the target hot zone range according to the horizontal hot zone range. According to the method and the device, the calculation rule of the target hot zone is redefined, the dynamic control of the hot zone range is realized, the situation that the hot zone ranges are overlapped due to the fact that the hot zone ranges corresponding to the target line segments are overlarge when the target line segments are angled is avoided, the situation that the hot zone ranges corresponding to the target line segments are too small to cause difficult selection when the target line segments are horizontal or vertical is avoided, the situation that the target line segments are extensible and good operation experience feeling is brought to related personnel using the line segment selection function is obtained.
Example two
Fig. 2 is a schematic flow chart of a method for determining a hot zone range according to a second embodiment of the present invention, where a preferred implementation manner is provided based on the technical solution of the foregoing embodiment.
S210, when a target line segment drawn by a View interface is detected, recording a starting point coordinate and an end point coordinate of the target line segment;
s220, determining the length of the target line segment and the rotation angle of the target line segment in the horizontal direction according to the starting point coordinates and the end point coordinates of the target line segment;
s230, determining a horizontal line segment with the length identical to that of the target line segment in the horizontal direction by taking the starting point coordinates of the target line segment as a starting point;
s240, reserving the margins up, down, left and right based on the starting point coordinates and the end point coordinates of the horizontal line segment according to a preset margin threshold value to obtain a horizontal hot area range horizontal to the horizontal line segment;
s250, rotating the horizontal hot zone range to the position where the target line segment is located by taking the starting point coordinates of the horizontal line segment or the target line segment as a rotation starting point based on the rotation angle;
s260, taking the rotated horizontal hot zone range as a target hot zone range of a target line segment;
s270, when a click command to the target line segment is detected, acquiring click coordinates of the target line segment;
s280, judging whether the click coordinate is in the range of the target hot zone; if yes, executing S290A; if not, executing S290B;
S290A, placing the target line segment in a selected state;
S290B, determining that the target line segment is not selected.
Example III
Fig. 3 is a schematic structural diagram of a hot zone range determining apparatus according to a third embodiment of the present invention. The device for determining the range of the hot zone provided by the embodiment of the invention can be suitable for determining the range of the hot zone of the line segment, and can be realized in a software and/or hardware mode. As shown in fig. 3, the apparatus specifically includes: a coordinate acquisition module 301, a horizontal hot zone range determination module 302, and a target hot zone range determination module 303. Wherein,
the coordinate acquisition module 301 is configured to acquire a first start point coordinate and a first end point coordinate of a target line segment drawn in a canvas interface when the target line segment is detected;
a horizontal hot zone range determining module 302, configured to determine a horizontal hot zone range corresponding to the target line segment according to the first start point coordinate and the first end point coordinate;
and the target hot zone range determining module 303 is configured to determine a target hot zone range of the target line segment according to the horizontal hot zone range.
According to the scheme, when the target line segment drawn in the canvas interface is detected, the first starting point coordinate and the first end point coordinate of the target line segment are obtained; determining a horizontal hot zone range corresponding to the target line segment according to the first starting point coordinate and the first end point coordinate; and determining the target hot zone range of the target line segment according to the horizontal hot zone range. According to the scheme, the horizontal hot zone range of the target line segment in the horizontal direction is determined, and the accuracy of determining the target hot zone range of the target line segment is improved in a mode of determining the target hot zone range according to the horizontal hot zone range. According to the method and the device, the calculation rule of the target hot zone is redefined, the dynamic control of the hot zone range is realized, the situation that the hot zone ranges are overlapped due to the fact that the hot zone ranges corresponding to the target line segments are overlarge when the target line segments are angled is avoided, the situation that the hot zone ranges corresponding to the target line segments are too small to cause difficult selection when the target line segments are horizontal or vertical is avoided, the situation that the target line segments are extensible and good operation experience feeling is brought to related personnel using the line segment selection function is obtained.
Optionally, the horizontal hot zone range determination module 302 includes:
a horizontal line segment determining unit, configured to determine a horizontal line segment of the target line segment in a horizontal direction according to the first start point coordinate and the first end point coordinate;
and the horizontal hot zone range determining unit is used for determining the horizontal hot zone range of the horizontal line segment according to the coordinate points on the horizontal line segment.
Optionally, the coordinate point on the horizontal line segment includes a second start point coordinate and a second end point coordinate;
correspondingly, the horizontal hot zone range determining unit includes:
a hot zone width determining subunit, configured to determine a hot zone width according to the second start point coordinate, the second end point coordinate, and a preset width margin threshold;
the hot zone height determining subunit is used for determining the hot zone height according to the second starting point coordinates and/or the second end point coordinates and in combination with a preset height margin threshold;
and the horizontal hot zone range determining subunit is used for constructing the horizontal hot zone range of the horizontal line segment according to the hot zone width and the hot zone height.
Optionally, the target hot zone range determining module 303 includes:
a first rotation angle determining unit configured to determine a rotation angle of the target line segment in the horizontal direction;
the direction rotating unit is used for rotating the horizontal hot zone range along the direction of the target line segment based on the rotating angle;
and the target hot zone range determining unit is used for taking the rotated horizontal hot zone range as the target hot zone range of the target line segment.
Optionally, the first rotation angle determining unit includes:
and the rotation angle determining subunit is used for determining the rotation angle of the target line segment in the horizontal direction according to the first start point coordinate and the first end point coordinate.
Optionally, the apparatus further includes:
the click coordinate acquisition module is used for acquiring click coordinates of the target line segment when a click command to the target line segment is detected after the target hot zone range of the target line segment is determined according to the horizontal hot zone range;
and the selected state judging module is used for placing the target line segment in a selected state if the click coordinate is in the target hot zone range of the target line segment.
Optionally, the selected state judging module includes:
a second rotation angle determining unit configured to determine a rotation angle of the target line segment in the horizontal direction;
the rotation coordinate determining unit is used for rotating the click coordinate based on the rotation angle to obtain a rotation coordinate;
and the selected state judging unit is used for placing the target line segment in a selected state if the rotation coordinate is in the horizontal hot area range of the horizontal line segment.
The hot zone range determining device provided by the embodiment of the invention can execute the hot zone range determining method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the executing method.
Example IV
Fig. 4 shows a schematic diagram of an electronic device 40 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 40 includes at least one processor 41, and a memory communicatively connected to the at least one processor 41, such as a Read Only Memory (ROM) 42, a Random Access Memory (RAM) 43, etc., in which the memory stores a computer program executable by the at least one processor, and the processor 41 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 42 or the computer program loaded from the storage unit 48 into the Random Access Memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 may also be stored. The processor 41, the ROM 42 and the RAM 43 are connected to each other via a bus 44. An input/output (I/O) interface 45 is also connected to bus 44.
Various components in electronic device 40 are connected to I/O interface 45, including: an input unit 46 such as a keyboard, a mouse, etc.; an output unit 47 such as various types of displays, speakers, and the like; a storage unit 48 such as a magnetic disk, an optical disk, or the like; and a communication unit 49 such as a network card, modem, wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 41 may be various general and/or special purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 41 performs the various methods and processes described above, such as the hot zone range determination method.
In some embodiments, the hot zone range determination method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 48. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 40 via the ROM 42 and/or the communication unit 49. When a computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the hot zone range determination method described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to perform the hot zone range determination method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (7)

1. A method of determining a range of a hot zone, comprising:
when a target line segment drawn in a canvas interface is detected, acquiring a first start point coordinate and a first end point coordinate of the target line segment;
determining a horizontal hot zone range corresponding to the target line segment according to the first starting point coordinate and the first end point coordinate;
determining a target hot zone range of the target line segment according to the horizontal hot zone range;
constructing a horizontal line segment with the length being the length of the target line segment in the horizontal direction by taking the first starting point coordinate of the target line segment as a starting point, wherein the coordinate point on the horizontal line segment comprises a second starting point coordinate and a second end point coordinate;
determining the width of the hot zone according to the second starting point coordinates, the second ending point coordinates and a preset width margin threshold;
according to the second starting point coordinates and/or the second ending point coordinates, combining a preset height margin threshold value, and determining the height of the hot zone;
constructing a horizontal hot zone range of the horizontal line segment according to the hot zone width and the hot zone height;
the determining the target hot zone range of the target line segment according to the horizontal hot zone range includes:
determining the rotation angle of the target line segment in the horizontal direction according to the first starting point coordinate and the first end point coordinate;
rotating the horizontal hot zone range along the direction of the target line segment based on the rotation angle;
and taking the rotated horizontal hot zone range as a target hot zone range of the target line segment.
2. The method of claim 1, wherein determining the horizontal hot zone range corresponding to the target line segment based on the first start point coordinate and the first end point coordinate comprises:
determining a horizontal line segment of the target line segment in the horizontal direction according to the first starting point coordinate and the first ending point coordinate;
and determining the horizontal hot zone range of the horizontal line segment according to the coordinate point on the horizontal line segment.
3. The method of any of claims 1-2, further comprising, after determining the target hot zone range of the target line segment from the horizontal hot zone range:
when a click command to the target line segment is detected, acquiring click coordinates of the target line segment;
and if the click coordinate is in the target hot area range of the target line segment, placing the target line segment in a selected state.
4. The method of claim 3, wherein placing the target line segment in the selected state if the click coordinate is within a target hot zone range of the target line segment comprises:
determining a rotation angle of the target line segment in the horizontal direction;
rotating the click coordinate based on the rotation angle to obtain a rotation coordinate;
and if the rotation coordinate is in the horizontal hot area range of the horizontal line segment, placing the target line segment in a selected state.
5. A hot zone range determining apparatus, comprising:
the coordinate acquisition module is used for acquiring a first starting point coordinate and a first end point coordinate of a target line segment drawn in the canvas interface when the target line segment is detected;
the horizontal hot zone range determining module is used for determining a horizontal hot zone range corresponding to the target line segment according to the first starting point coordinate and the first end point coordinate;
the target hot zone range determining module is used for determining the target hot zone range of the target line segment according to the horizontal hot zone range;
the horizontal hot zone range determining module is specifically configured to construct a horizontal line segment with a length equal to a line segment length of the target line segment in a horizontal direction by taking a first start point coordinate of the target line segment as a start point, wherein a coordinate point on the horizontal line segment comprises a second start point coordinate and a second end point coordinate;
a hot zone width determining subunit, configured to determine a hot zone width according to the second start point coordinate, the second end point coordinate, and a preset width margin threshold;
the hot zone height determining subunit is used for determining the hot zone height according to the second starting point coordinates and/or the second end point coordinates and in combination with a preset height margin threshold;
a horizontal hot zone range determining subunit, configured to construct a horizontal hot zone range of the horizontal line segment according to the hot zone width and the hot zone height;
a rotation angle determining subunit, configured to determine a rotation angle of the target line segment in a horizontal direction according to the first start point coordinate and the first end point coordinate;
the direction rotating unit is used for rotating the horizontal hot zone range along the direction of the target line segment based on the rotating angle;
and the target hot zone range determining unit is used for taking the rotated horizontal hot zone range as the target hot zone range of the target line segment.
6. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the hot zone range determination method of any one of claims 1-4.
7. A computer readable storage medium storing computer instructions for causing a processor to implement the hot zone range determination method of any one of claims 1-4 when executed.
CN202210774034.0A 2022-07-01 2022-07-01 Hot zone range determining method, device, equipment and storage medium Active CN115237289B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210774034.0A CN115237289B (en) 2022-07-01 2022-07-01 Hot zone range determining method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210774034.0A CN115237289B (en) 2022-07-01 2022-07-01 Hot zone range determining method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115237289A CN115237289A (en) 2022-10-25
CN115237289B true CN115237289B (en) 2024-02-23

Family

ID=83671029

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210774034.0A Active CN115237289B (en) 2022-07-01 2022-07-01 Hot zone range determining method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115237289B (en)

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002351620A (en) * 2001-05-25 2002-12-06 Canon Inc Portable information terminal, communication system, method for processing picture area selection, storage medium and program
JP2009031972A (en) * 2007-07-26 2009-02-12 Nikon Corp Image processing program, image processor, and image processing method
WO2015074507A1 (en) * 2013-11-21 2015-05-28 北京金山办公软件有限公司 Method and apparatus for choosing object in display interface
CN106775318A (en) * 2016-12-21 2017-05-31 广州大学 A kind of human-computer interaction device and method for realizing touch mapping
CN107679219A (en) * 2017-10-19 2018-02-09 广州视睿电子科技有限公司 Matching method and device, interactive intelligent panel and storage medium
CN107885538A (en) * 2016-09-28 2018-04-06 北京京东尚科信息技术有限公司 The method and apparatus that hot-zone link is added on picture
CN107943381A (en) * 2017-10-20 2018-04-20 阿里巴巴集团控股有限公司 Hot-zone method of adjustment and device, client
WO2018113638A1 (en) * 2016-12-19 2018-06-28 广州市动景计算机科技有限公司 Portable electronic terminal, and apparatus and method for selecting object to be operated
CN110110264A (en) * 2018-01-10 2019-08-09 华为技术有限公司 Touch adjusting method, device, equipment and the touch screen terminal equipment of hot-zone
CN111104036A (en) * 2019-11-21 2020-05-05 广州视源电子科技股份有限公司 Element control method, device, equipment and storage medium
CN111367445A (en) * 2020-03-31 2020-07-03 中国建设银行股份有限公司 Image annotation method and device
CN112180840A (en) * 2020-09-25 2021-01-05 乐聚(深圳)机器人技术有限公司 Man-machine interaction method, device, equipment and storage medium
CN112783488A (en) * 2019-11-08 2021-05-11 腾讯科技(深圳)有限公司 Business mode canvas drawing method and device
CN113870386A (en) * 2020-06-30 2021-12-31 上海联影医疗科技股份有限公司 Region-of-interest triggering method, device, equipment and storage medium
CN114565701A (en) * 2022-02-28 2022-05-31 深圳市华胜软件技术有限公司 Line segment drawing method and device, electronic equipment and computer readable storage medium
CN114564106A (en) * 2022-02-25 2022-05-31 北京字跳网络技术有限公司 Method and device for determining interaction indicator line, electronic equipment and storage medium
CN114596362A (en) * 2022-03-15 2022-06-07 云粒智慧科技有限公司 High-point camera coordinate calculation method and device, electronic equipment and medium
CN114661394A (en) * 2022-03-01 2022-06-24 网易(杭州)网络有限公司 Interface display control method and device, storage medium and processor

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7818672B2 (en) * 2004-12-30 2010-10-19 Microsoft Corporation Floating action buttons
CN104077029B (en) * 2014-06-06 2017-11-28 小米科技有限责任公司 A kind of reminding method and device for selecting seat
US9965141B2 (en) * 2014-06-06 2018-05-08 Apple Inc. Movable selection indicators for region or point selection on a user interface
TWI585433B (en) * 2014-12-26 2017-06-01 緯創資通股份有限公司 Electronic device and method for displaying target object thereof
CN108228073B (en) * 2018-01-31 2021-06-15 北京小米移动软件有限公司 Interface display method and device
CN108564638B (en) * 2018-04-20 2020-07-10 京东方科技集团股份有限公司 Method and device for determining people flow hot area based on geographic imagery
CN111610923B (en) * 2020-04-26 2022-08-05 北京小米移动软件有限公司 Directional operation method, directional operation device and storage medium

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002351620A (en) * 2001-05-25 2002-12-06 Canon Inc Portable information terminal, communication system, method for processing picture area selection, storage medium and program
JP2009031972A (en) * 2007-07-26 2009-02-12 Nikon Corp Image processing program, image processor, and image processing method
WO2015074507A1 (en) * 2013-11-21 2015-05-28 北京金山办公软件有限公司 Method and apparatus for choosing object in display interface
CN107885538A (en) * 2016-09-28 2018-04-06 北京京东尚科信息技术有限公司 The method and apparatus that hot-zone link is added on picture
WO2018113638A1 (en) * 2016-12-19 2018-06-28 广州市动景计算机科技有限公司 Portable electronic terminal, and apparatus and method for selecting object to be operated
CN106775318A (en) * 2016-12-21 2017-05-31 广州大学 A kind of human-computer interaction device and method for realizing touch mapping
CN107679219A (en) * 2017-10-19 2018-02-09 广州视睿电子科技有限公司 Matching method and device, interactive intelligent panel and storage medium
CN107943381A (en) * 2017-10-20 2018-04-20 阿里巴巴集团控股有限公司 Hot-zone method of adjustment and device, client
CN110110264A (en) * 2018-01-10 2019-08-09 华为技术有限公司 Touch adjusting method, device, equipment and the touch screen terminal equipment of hot-zone
CN112783488A (en) * 2019-11-08 2021-05-11 腾讯科技(深圳)有限公司 Business mode canvas drawing method and device
CN111104036A (en) * 2019-11-21 2020-05-05 广州视源电子科技股份有限公司 Element control method, device, equipment and storage medium
CN111367445A (en) * 2020-03-31 2020-07-03 中国建设银行股份有限公司 Image annotation method and device
CN113870386A (en) * 2020-06-30 2021-12-31 上海联影医疗科技股份有限公司 Region-of-interest triggering method, device, equipment and storage medium
CN112180840A (en) * 2020-09-25 2021-01-05 乐聚(深圳)机器人技术有限公司 Man-machine interaction method, device, equipment and storage medium
CN114564106A (en) * 2022-02-25 2022-05-31 北京字跳网络技术有限公司 Method and device for determining interaction indicator line, electronic equipment and storage medium
CN114565701A (en) * 2022-02-28 2022-05-31 深圳市华胜软件技术有限公司 Line segment drawing method and device, electronic equipment and computer readable storage medium
CN114661394A (en) * 2022-03-01 2022-06-24 网易(杭州)网络有限公司 Interface display control method and device, storage medium and processor
CN114596362A (en) * 2022-03-15 2022-06-07 云粒智慧科技有限公司 High-point camera coordinate calculation method and device, electronic equipment and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
使用线段表实现线段编码与种子填充快速算法;陆宗骐 等;中国图象图形学报;20090315(第03期);499-504 *

Also Published As

Publication number Publication date
CN115237289A (en) 2022-10-25

Similar Documents

Publication Publication Date Title
CN115272291A (en) Film-sticking defect detection method, device, equipment and storage medium
CN115237289B (en) Hot zone range determining method, device, equipment and storage medium
CN117372499A (en) Log length and diameter determining method, device, equipment and storage medium
CN113139891B (en) Image processing method, device, electronic equipment and storage medium
CN116385415A (en) Edge defect detection method, device, equipment and storage medium
CN113032071B (en) Page element positioning method, page testing method, device, equipment and medium
CN114694138B (en) Road surface detection method, device and equipment applied to intelligent driving
CN117589188B (en) Driving path planning method, driving path planning device, electronic equipment and storage medium
CN116258714B (en) Defect identification method and device, electronic equipment and storage medium
CN116071422B (en) Method and device for adjusting brightness of virtual equipment facing meta-universe scene
CN117739993B (en) Robot positioning method and device, robot and storage medium
CN116302277A (en) Data processing method, device, electronic equipment and medium
CN114741072B (en) Page generation method, device, equipment and storage medium
CN117689538B (en) Splicing method, device, equipment and medium for fault point cloud
CN112507671B (en) Method, apparatus, and readable medium for adjusting text distance
CN114546314B (en) Window display method and device, electronic equipment and storage medium
CN117350995A (en) Product defect detection method, device, equipment and storage medium
CN116820378A (en) Control method, device, equipment and system for shared screen of dual-machine system
CN114820770A (en) Scanning triggering method and device, electronic equipment and storage medium
CN118210425A (en) Breakpoint compensation method and device, electronic equipment and storage medium
CN117742544A (en) Equipment screening method, device, electronic equipment and storage medium
CN116798104A (en) Pupil detection method, device, equipment and storage medium
CN115937201A (en) Fine adjustment distance determining method and device and electronic equipment
CN116594732A (en) Virtual desktop control method, device, equipment and storage medium
CN118191935A (en) Fault identification method and device based on edge detection, electronic equipment and medium

Legal Events

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