Anchoring point calculation method, device, equipment and computer readable storage medium

By calculating the vector path and anchor point deployment information of the graphics, anchor points are automatically marked, solving the problem of low anchor point marking efficiency in existing technologies and achieving more efficient anchor point marking.

CN115964041BActive Publication Date: 2025-11-07TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111186041.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-11
Publication Date
2025-11-07
Estimated Expiration
2041-10-11

AI Technical Summary

Technical Problem

In existing technologies, the marking of graphic anchors on web pages is inefficient, requiring manual operation.

Method used

By acquiring graphic parameters, including the location information of coordinate points and the deployment information of anchor points, the vector path of the graphic is calculated, and the coordinate set of anchor points is determined based on the path length and deployment information, thus automatically marking the anchor points.

Benefits of technology

It improves the efficiency of anchor point marking, reduces manual operation, and enhances the automation level of anchor point marking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115964041B_ABST
    Figure CN115964041B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose an anchor point calculation method, device and equipment and a computer readable storage medium. The method comprises: obtaining a graph parameter; the graph parameter comprises attribute information and anchor point deployment information of the graph, the attribute information comprises position information of coordinate points contained in the graph, at least one vector path corresponding to the graph is obtained according to the position information of the coordinate points, the length of the at least one vector path is obtained, and the coordinate set of the anchor point corresponding to each vector path is determined according to the length of the at least one vector path and the anchor point deployment information. It can be seen that the graph is converted into a vector path through the attribute information of the graph, so as to facilitate the deployment of the anchor point of the graph according to the anchor point deployment information, and the marking efficiency of the anchor point is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to an anchor point calculation method and device, equipment and computer readable storage medium. BACKGROUND

[0002] With the continuous development of computer technology, the form of content presentation in the webpage is more and more diversified; for example, through pictures, audio, video and other forms to improve the attraction of the webpage. In the process of webpage development and design, the graphics in the webpage are usually marked by anchor points; for example, the shape of the graphics is marked by anchor points, or the editable area of the graphics is marked by anchor points. In practical application, due to the different shapes of the graphics, the anchor points of the graphics usually need to be marked manually, which is low in efficiency. SUMMARY

[0003] The anchor point calculation method, device, equipment and computer readable storage medium provided by the embodiments of the present application can improve the marking efficiency of anchor points.

[0004] In one aspect, the present application provides an anchor point calculation method, comprising:

[0005] obtaining graphic parameters; the graphic parameters include attribute information of the graphics and anchor point deployment information, the attribute information includes position information of coordinate points contained in the graphics; the anchor point deployment information is used to indicate a deployment strategy of anchor points associated with the graphics;

[0006] obtaining at least one vector path corresponding to the graphics according to the position information of the coordinate points;

[0007] obtaining the length of the at least one vector path;

[0008] determining a coordinate set of the anchor points corresponding to each vector path according to the length of the at least one vector path and the anchor point deployment information.

[0009] In one aspect, the present application provides an anchor point calculation device, which comprises:

[0010] an obtaining unit, configured to obtain graphic parameters; the graphic parameters include attribute information of the graphics and anchor point deployment information, the attribute information includes position information of coordinate points contained in the graphics; the anchor point deployment information is used to indicate a deployment strategy of anchor points associated with the graphics;

[0011] a processing unit, configured to obtain at least one vector path corresponding to the graphics according to the position information of the coordinate points;

[0012] the obtaining unit is further configured to obtain the length of the at least one vector path;

[0013] The processing unit is further configured to determine a coordinate set of the anchor point corresponding to each vector path according to a length of the at least one vector path and the anchor point deployment information.

[0014] In an embodiment, the attribute information further comprises type indication information of the anchor point, the type indication information indicating that the type of the anchor point is an edit anchor point; and the processing unit is configured to obtain at least one vector path corresponding to the graph according to the position information of the coordinate point, and specifically configured to:

[0015] determine an outer contour of the graph according to the position information of the coordinate point;

[0016] obtain a set of direction points of the graph based on the outer contour of the graph, wherein a direction point in the set of direction points is used to mark a target region, and the outer contour of the graph belongs to the target region;

[0017] obtain at least one vector path corresponding to the graph through the set of direction points of the graph.

[0018] In an embodiment, the graph comprises N coordinate points, N being a positive integer; the attribute information further comprises type indication information of the anchor point and line segment information between the N coordinate points; and the type indication information indicates that the type of the anchor point is a shape anchor point.

[0019] The processing unit is configured to obtain at least one vector path corresponding to the graph according to the position information of the coordinate point, and specifically configured to:

[0020] traverse the graph according to the line segment information between the N coordinate points to obtain at least one vector path corresponding to the graph;

[0021] wherein any vector path is formed by combination of vector paths between any two coordinate points in the N coordinate points; and a vector path between an i-th coordinate point and an i+1-th coordinate point is determined based on line segment information between the i-th coordinate point and the i+1-th coordinate point.

[0022] In an embodiment, the graph comprises M sub-graphs, M being a positive integer; the attribute information further comprises indication information of the M sub-graphs; and the processing unit is configured to traverse the graph according to the line segment information between the N coordinate points to obtain at least one vector path corresponding to the graph, and specifically configured to:

[0023] split the graph according to the line segment information between the N coordinate points to obtain M line segment sets, wherein the M line segment sets correspond to the M sub-graphs in a one-to-one manner, and a line segment in a line segment set is a constituent element of a corresponding sub-graph;

[0024] determine a vector expression of each line segment in the M line segment sets according to the indication information of the M sub-graphs;

[0025] Combining the vector expressions of the line segments, at least one vector path corresponding to the figure is obtained.

[0026] In an embodiment, the figure comprises P key line segments and Q sub-figures; the key line segment refers to a line segment used to connect any two sub-figures; P and Q are positive integers; the attribute information further comprises type indication information of the anchor point, line segment information of the P key line segments, and indication information of the Q sub-figures; the type indication information indicates that the type of the anchor point is an animation anchor point.

[0027] The processing unit is configured to obtain at least one vector path corresponding to the figure according to the position information of the coordinate points, and specifically configured to:

[0028] The figure is split according to the attribute information of the figure, to obtain the P key line segments and the Q sub-figures.

[0029] The entry coordinate point and the exit coordinate point of each sub-figure are obtained, and each sub-figure is split according to the entry coordinate point and the exit coordinate point of each sub-figure, to obtain a candidate path set of each sub-figure; the candidate path set of each sub-figure comprises one or more candidate paths.

[0030] The vector expression of each key line segment is determined according to the line segment information of the P key line segments; and

[0031] The vector expression of each candidate path in the candidate path set of each sub-figure is determined according to the indication information of each sub-figure.

[0032] The vector expression of at least one key line segment is combined with the vector expression of at least one candidate path, to obtain at least one vector path corresponding to the figure.

[0033] In an embodiment, the line segment information of the P key line segments comprises an animation flow direction; the processing unit is configured to combine the vector expression of at least one key line segment with the vector expression of at least one candidate path, to obtain at least one vector path corresponding to the figure, and specifically configured to:

[0034] The starting coordinate point and the terminal coordinate point of the target animation in the figure are obtained.

[0035] The figure is traversed according to the animation flow direction from the starting coordinate point, to obtain at least one animation path, and the terminal point of each animation path is the terminal coordinate point.

[0036] The vector expression of the key line segment and the vector expression of the candidate path in at least one animation path are combined, to obtain at least one vector path corresponding to the figure.

[0037] In an embodiment, the obtaining unit is configured to obtain the attribute information of the figure, and specifically configured to:

[0038] obtaining path information of the graph, and determining attribute information of the graph according to the path information of the graph; or

[0039] obtaining a vector expression of the graph, and determining attribute information of the graph according to the vector expression of the graph.

[0040] In an implementation, the anchor point deployment information includes a ratio between an anchor point spacing and a length of a vector path; the processing unit is configured to determine a coordinate set of an anchor point corresponding to each vector path according to the length of the at least one vector path and the anchor point deployment information, and specifically configured to:

[0041] deploy the anchor points on each vector path according to the ratio between the anchor point spacing and the length of the vector path, to obtain the coordinate set of the anchor point corresponding to each vector path.

[0042] In an implementation, the anchor point deployment information includes an anchor point spacing; the processing unit is configured to determine a coordinate set of an anchor point corresponding to each vector path according to the length of the at least one vector path and the anchor point deployment information, and specifically configured to:

[0043] deploy the anchor points on each vector path according to the anchor point spacing, to obtain the coordinate set of the anchor point corresponding to each vector path.

[0044] In an implementation, the anchor point deployment information includes an anchor point number; the processing unit is configured to determine a coordinate set of an anchor point corresponding to each vector path according to the length of the at least one vector path and the anchor point deployment information, and specifically configured to:

[0045] perform an operation on the length of each vector path and the anchor point number, to obtain an anchor point spacing corresponding to each vector path;

[0046] deploy the anchor points on each vector path according to the anchor point spacing corresponding to each vector path, to obtain the coordinate set of the anchor point corresponding to each vector path.

[0047] In an implementation, the processing unit is further configured to:

[0048] in response to the graph being triggered, display the anchor point corresponding to the graph according to the coordinates of each anchor point in the coordinate set of the anchor point.

[0049] Correspondingly, the present application provides a computer device, which comprises:

[0050] a processor configured to load and execute a computer program;

[0051] a computer readable storage medium, in which a computer program is stored, and the computer program is executed by the processor to implement the anchor point calculation method.

[0052] Correspondingly, the present application provides a computer readable storage medium, which stores a computer program, the computer program being adapted to be loaded by a processor and execute the anchor point calculation method.

[0053] Correspondingly, the present application provides a computer program product or a computer program, which comprises computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the anchor point calculation method.

[0054] In the embodiment of the present application, the graphic parameter is obtained; the graphic parameter comprises attribute information and anchor point deployment information of the graphic, the attribute information comprises position information of coordinate points contained in the graphic, at least one vector path corresponding to the graphic is obtained according to the position information of the coordinate points, the length of the at least one vector path is obtained, and the coordinate set of the anchor point corresponding to each vector path is determined according to the length of the at least one vector path and the anchor point deployment information. It can be seen that the graphic is converted into a vector path through the attribute information of the graphic, so as to facilitate the deployment of the anchor points of the graphic according to the anchor point deployment information, and thus the marking efficiency of the anchor points is improved better. BRIEF DESCRIPTION OF DRAWINGS

[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0056] Figure 1a A schematic diagram of an anchor point calculation system provided by the embodiment of the present application;

[0057] Figure 1b An application flowchart of an anchor point calculation method provided by the embodiment of the present application;

[0058] Figure 1c A flowchart of calculating an anchor point through an anchor point tool library provided by the embodiment of the present application;

[0059] Figure 1d A schematic diagram of obtaining coordinate points of a vector path provided by the embodiment of the present application;

[0060] Figure 2 A flowchart of an anchor point calculation method provided by the embodiment of the present application;

[0061] Figure 3A flowchart of another anchor point calculation method provided by the embodiments of the present application;

[0062] Figure 4a A schematic diagram of a set of direction points provided by the embodiments of the present application;

[0063] Figure 4b A schematic diagram of a polygon conversion provided by the embodiments of the present application;

[0064] Figure 4c A schematic diagram of an ellipse conversion provided by the embodiments of the present application;

[0065] Figure 4d A schematic diagram of a spliced graph conversion provided by the embodiments of the present application;

[0066] Figure 4e A schematic diagram of a sub-graph splitting provided by the embodiments of the present application;

[0067] Figure 4f A schematic diagram of an animation path provided by the embodiments of the present application;

[0068] Figure 5 A structural schematic diagram of an anchor point calculation device provided by the embodiments of the present application;

[0069] Figure 6 A structural schematic diagram of a computer device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0070] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without any creative work fall within the scope of protection of the present application.

[0071] The terms related to the embodiments of the present application will be described below:

[0072] Anchor point: The so-called anchor point refers to a point used for indicating the position of a graph feature in computer vision, which can be indicated by a round dot or a square dot, and is generally used for indicating a point of a graph, operation schematic diagram, etc.

[0073] Scalable Vector Graphics (SVG): Scalable Vector Graphics is a vector image presentation format.

[0074] Web: Abbreviation of Internet webpage.

[0075] Browser: a program for browsing web pages, which can display web pages on different clients and different devices.

[0076] JavaScript: an interactive language developed by Netscape in 1995 for web page development in browsers, which can be used to interact with DOM elements and CSS elements in browsers.

[0077] The anchor point calculation scheme and the anchor point calculation system are provided to improve the labeling efficiency of anchor points. Figure 1a The anchor point calculation system can include a terminal device 101, and further include a server 102. The anchor point calculation scheme provided by the present application can be executed by the terminal device 101 with an anchor point calculation device, or executed by the server 102. The terminal device can include, but is not limited to, a smart phone (such as an Android phone, an IOS phone, etc.), a tablet computer, a portable personal computer, a mobile Internet device (Mobile Internet Devices, MID for short), a vehicle-mounted terminal, etc., which are not limited by the present application. The server can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms, which are not limited by the present application.

[0078] In a specific implementation, the general principle of the anchor point calculation scheme is as follows:

[0079] (1) The server 102 obtains the graphical parameters input by the developer from the terminal device 101, which can be determined according to the path information of the graph or the vector expression of the graph; the graphical parameters include the attribute information of the graph and the anchor point deployment information, the attribute information includes the position information (such as coordinates) of the coordinate points contained in the graph; the anchor point deployment information is used to indicate the deployment strategy of the anchor points associated with the graph (such as the number of anchor points, the spacing between anchor points, etc.).

[0080] (2) The server 102 obtains at least one vector path corresponding to the graph according to the position information of the coordinate points contained in the graph; in a specific implementation, the server 102 determines the acquisition strategy of the vector path corresponding to the type of anchor point according to the type of anchor point, and then obtains one or more vector paths corresponding to the type of anchor point.

[0081] In an embodiment, the type of the anchor point is an edit anchor point, the edit anchor point is used to indicate an edit region corresponding to the figure, and the edit anchor point can or can not be located on the figure; for example, the edit anchor point can be outside the figure. In actual application, when the edit region corresponding to the figure is triggered, the figure can be edited; or, a preset event associated with the figure is executed; for example, when a user clicks the edit region corresponding to the figure A, an edit page of the figure A is displayed, and the user can adjust the shape, size, color, etc. of the figure A in the edit page of the figure A; for another example, the figure B is associated with the page C, and when a user double-clicks the edit region corresponding to the figure B, the page C is displayed. The server 102 determines the outer contour of the figure according to the position information (such as the coordinate point of the image) of the figure; the outer contour refers to the figure obtained by combining the minimum and maximum coordinates of the figure in the vector direction, which is usually 4 coordinate points or 8 coordinate points. Based on the outer contour of the figure, a set of direction points of the figure is obtained, the direction points in the set of direction points are used to mark a target region, the outer contour of the figure belongs to the target region, and at least one vector path corresponding to the figure is obtained through the set of direction points of the figure; for example, assuming that the target region is a rectangle, the server can determine the vertex coordinates of the target region (such as the rectangle) based on the outer contour of the figure, and add the vertex coordinates to the set of direction points of the figure, and then connect the direction points in the set of direction points to obtain at least one vector path corresponding to the figure.

[0082] In another embodiment, the type of the anchor point is a shape anchor point, the shape anchor point is used to identify the shape of the image, and the shape anchor point is located on the figure. The figure includes N coordinate points, N is a positive integer; the attribute information further includes line segment information between the N coordinate points, the line segment information is used to indicate the connection relationship between the coordinate points and the type of the line segment. The server 102 traverses the figure according to the line segment information between the N coordinate points to obtain at least one vector path corresponding to the figure; wherein, any vector path is formed by combining the vector paths between any two coordinate points in the N coordinate points; the vector path between the i-th coordinate point and the i+1-th coordinate point is determined based on the line segment information between the i-th coordinate point and the i+1-th coordinate point.

[0083] In still another embodiment, the type of the anchor point is an animation anchor point, where the animation anchor point is a coordinate set composed of coordinates of a plurality of anchor points, the coordinate set is used to dynamically display dynamic changes of coordinates of the anchor points from a first anchor point to an Nth anchor point, and the animation anchor points are located on the graph. The graph includes P key line segments and Q subgraphs; the key line segment refers to a line segment used to connect any two subgraphs, and the line segment can be a straight line segment or a curved line segment; P and Q are positive integers; the attribute information further includes line segment information of the P key line segments and indication information of the Q subgraphs. The server 102 splits the graph according to the attribute information of the graph to obtain the P key line segments and the Q subgraphs; obtains an entry coordinate point and an exit coordinate point of each subgraph, and splits each subgraph according to the entry coordinate point and the exit coordinate point of each subgraph to obtain a candidate path set of each subgraph; the candidate path set of each subgraph includes one or more candidate paths; for example, assuming that a subgraph is a rectangle, the vertex coordinates of the rectangle are (0, 0), (0, 2), (3, 0), and (3, 2), where (0, 0) is the entry and (3, 2) is the exit, and the rectangle is split according to the entry coordinate point and the exit coordinate point to obtain a candidate path 1: (0, 0)→(0, 2)→(3, 2); and a candidate path 2: (0, 0)→(3, 0)→(3, 2). The server 102 determines a vector expression of each key line segment according to the line segment information of the P key line segments; and determines a vector expression of each candidate path in the candidate path set of each subgraph according to the indication information of each subgraph; where the indication information is used to indicate the type of the subgraph (such as indicating that the subgraph is a rectangle, a circle, an ellipse, a polygon, etc.) and the expression of the subgraph; for example, for a circle, the circle can be represented by a center coordinate and a radius; and for a polygon, the polygon can be represented by each vertex of the polygon. The vector expression of at least one key line segment is combined with the vector expression of at least one candidate path to obtain at least one vector path corresponding to the graph.

[0084] (3) The server 102 obtains the length of the at least one vector path; for example, the server can calculate the length of the vector path through the vector expression of each line segment on the vector path.

[0085] (4) The server 102 determines the coordinate set of the anchor point corresponding to each vector path according to the length of the at least one vector path and the anchor point deployment information, and returns the coordinate set of the anchor point to the terminal device 101. The coordinate of the anchor point is used to indicate the position of the anchor point in the graph indicated by the graph parameter or around the graph. The anchor point deployment information can be specifically a ratio between the anchor point spacing and the length of the vector path, the anchor point spacing, and the number of anchor points.

[0086] In one embodiment, the anchor point deployment information is used to indicate a ratio between the anchor point spacing and the length of the vector path, and the server deploys the anchor points on each vector path according to the ratio between the anchor point spacing and the length of the vector path, to obtain a coordinate set of the anchor points corresponding to each vector path.

[0087] In another embodiment, the anchor point deployment information is used to indicate the anchor point spacing, and the server deploys the anchor points on each vector path according to the anchor point spacing, to obtain a coordinate set of the anchor points corresponding to each vector path.

[0088] In still another embodiment, the anchor point deployment information is used to indicate the number of anchor points, and the length of each vector path is operated (such as average operation, geometric progression operation, or arithmetic progression operation) with the number of anchor points to obtain the anchor point spacing corresponding to each vector path; and the anchor points are deployed on each vector path according to the anchor point spacing corresponding to each vector path, to obtain a coordinate set of the anchor points corresponding to each vector path.

[0089] It should be noted that the anchor points of the graph can coincide with the coordinate points in the graph, or can not coincide with the coordinate points in the graph; for example, assuming that the coordinate points of the graph are the vertices of the graph, the anchor points of the graph can be located at the vertices of the graph (i.e., coincide with the coordinate points of the vertices of the graph), or can be located on the edges of the graph (i.e., do not coincide with the coordinate points of the vertices of the graph).

[0090] In actual applications, the anchor point calculation method provided by the present application can be packaged in an anchor point calculation tool library, which can be carried in the server 102 or the terminal device 101. It can be understood that when the anchor point calculation tool library is carried in the terminal device 101, the anchor point calculation method can be executed by the terminal device 101 alone. Figure 1b An anchor point calculation method application flowchart is provided for the embodiments of the present application. As shown in Figure 1b the graph format can be the path shape of the graph, that is, the input graph format contains the path information of the graph; or the graph SVG, that is, the input graph format contains the SVG information of the graph. Then the anchor point calculation tool library is called to calculate the anchor points of the graph, to obtain an anchor point set of the graph. In the output anchor point set, one or more types of anchor points can be included according to actual needs. Figure 1bAs shown, the anchor set can include edit anchors, which are used to indicate the edit region of the figure, and the target region formed by the edit anchors includes the outer contour of the figure, i.e., the figure is located in the target region. The edit anchors can not be on the link forming the figure; for example, the edit anchors can be located outside the closed figure. The anchor set can also include shape anchors, which are used to indicate the shape of the figure, and all the shape anchors are located on the link forming the figure. The anchor set can also include animation anchors, which are used to dynamically display the movement process of the anchor, and all the animation anchors are located on the link forming the figure. In one embodiment, given a figure [S], the anchor calculation tool library [getVertexPoints] is used to calculate the anchors of the figure [S], to obtain a plurality of directional point coordinates (Xn, Yn) combinations of the outer contour of the figure [S], and the obtained points are not necessarily located on the edge of the figure, but outside the figure, generally 4 directional positions or 8 directional positions. In another embodiment, given a figure [S], the anchor calculation tool library [getAnchors] is used to calculate the anchors of the figure [S], to obtain the anchor (Xn, Yn) combinations on the shape of the figure, and the coordinates are returned according to the number of points. In still another embodiment, given a link L, the anchor calculation tool library [getLinkAnchors] is used to calculate the anchors of the figure [S], to obtain the coordinate (Xn, Yn) combinations of the equal proportion or specified distance. In yet another embodiment, given a figure [S] or a plurality of figures [G], given a starting point [A] (Xs, Ys) and an end point [E] (Xe, Ye), the anchor calculation tool library [getAnimationAnchors] is used to calculate the anchors of the figure [S] or the plurality of figures [G], to obtain the anchor arrangement combinations [(x1, y1), (x2, y2)...]n from the starting point to the end point.

[0091] Figure 1c A flowchart for calculating anchors by the anchor tool library is provided for the embodiments of the present application. As shown, Figure 1c The output data can be: <svg><path d="m 110,50 c 180,100,180,10,250,60">

[0092] < / svg> / / input SVG path corresponding to the figure; in the browser supporting the javascript language, the creation instruction of the path tag can be: const path = document.createElementNS('http: / / www.xxx.org / xxx / svg', 'path') / / used to assign the path.d attribute to the temporary path tag; the instruction for calculating the anchor point through the svg-api (vector format processing interface) of the path can be: const len = path.getTotallength() / / calculate the length of the vector path; path.getPointAtLength() / / calculate the coordinates of the anchor point with a distance of x; {p1, p2, p3…pn} / / custom n anchor point set, pn={xn, yn}; and delete the path tag after completion. As can be seen, through the graphic calculation api of the path, the coordinates of n points (n>0) on any line can be obtained at a certain distance or a certain proportion; for example, as shown in Figure 1d , using the [pathToPoints] method in the component library, the coordinates of the three anchor points on the path tag can be obtained as (0, 0), (20, 0), and (60, 0), which are used to indicate the positions of the anchor points in the figure indicated by the figure parameters.

[0093] In the embodiments of the present application, the figure parameters are obtained; the figure parameters include attribute information and anchor point deployment information of the figure, the attribute information includes position information of coordinate points contained in the figure, at least one vector path corresponding to the figure is obtained according to the position information of the coordinate points, the length of the at least one vector path is obtained, and the coordinate set of the anchor point corresponding to each vector path is determined according to the length of the at least one vector path and the anchor point deployment information. As can be seen, the figure is converted into a vector path through the attribute information of the figure, so as to facilitate the deployment of the anchor points of the figure according to the anchor point deployment information, thereby better improving the marking efficiency of the anchor points.

[0094] Based on the above description of the anchor point calculation method, the embodiments of the present application propose an anchor point calculation method, which can be executed by an anchor point calculation device, which can be specifically the terminal device 101 or the server 102 mentioned in Figure 1a . Referring to Figure 2 , the anchor point calculation method can include the following steps S201-S204:

[0095] S201, obtain figure parameters.

[0096] The graphic parameter can be determined according to path information of the graphic or a vector expression of the graphic. The path information of the graphic includes position information of each coordinate point in the graphic and line segment information between each coordinate point, and the line segment information can be used to indicate a type of the line segment (such as a straight line or a curve) and a length of the line segment. The vector expression of the graphic includes a shape label of the graphic and associated information used to represent the graphic. For example, for a circle, the associated information refers to a center and a radius; and for a rectangle, the associated information refers to four vertices of the rectangle.

[0097] The graphic parameter includes attribute information of the graphic and anchor point deployment information. The attribute information includes position information (such as coordinates) of each coordinate point included in the graphic. The anchor point deployment information is used to indicate a deployment strategy of the anchor points associated with the graphic (such as a number of the anchor points and a spacing between the anchor points). In an embodiment, the graphic parameter is specified by a user. For example, the image parameter output by the user includes vertex coordinates of each vertex of the graphic and a number of anchor points to be deployed in the graphic.

[0098] In an implementation, the anchor point calculation device determines the attribute information of the graphic according to the path information of the graphic. Specifically, the anchor point calculation device determines the position information of each coordinate point and the line segment information between each coordinate point as the attribute information of the graphic.

[0099] In another implementation, the anchor point calculation device determines the attribute information of the graphic according to the vector expression of the graphic. Specifically, the anchor point calculation device obtains the position information of each coordinate point and the line segment information between each coordinate point from the vector expression of the graphic, and determines the position information of each coordinate point and the line segment information between each coordinate point as the attribute information of the graphic. For example, assuming that the vector expression of a rectangle is <rect points="0,0 3,0 3,2 0,2" / >, the four vertex coordinates of the rectangle are (0, 0), (0, 2), (3, 0) and (3, 2) according to the vector expression of the rectangle. The types of the line segments corresponding to the four edges of the rectangle are straight lines, and the lengths of the line segments corresponding to the wide edges are 2 and the lengths of the line segments corresponding to the long edges are 3. The attribute information of the rectangle includes the four vertex coordinates (0, 0), (0, 2), (3, 0) and (3, 2) of the rectangle and the line segment information of the four edges of the rectangle. The line segment information of the two long edges of the rectangle is that the types of the line segments are straight lines and the lengths of the line segments are 3. The line segment information of the two wide edges of the rectangle is that the types of the line segments are straight lines and the lengths of the line segments are 2.

[0100] S202, obtaining at least one vector path corresponding to the graphic according to the position information of the coordinate point.

[0101] The anchor point computing device determines an acquisition strategy of a vector path corresponding to the anchor point according to a type of the anchor point required, and then obtains one or more vector paths corresponding to the type of the anchor point. The type of the anchor point includes an edit anchor point, a shape anchor point, and an animation anchor point. The type of the anchor point can be indicated by a developer according to actual requirements, or can be a preset type, for example, the type of the preset anchor point is the shape anchor point.

[0102] In an embodiment, the type of the anchor point is the edit anchor point, and the edit anchor point is used to indicate an edit region of the graph. The edit anchor point can be located on the graph or can not be located on the graph, for example, the edit anchor point can be outside the graph. In actual application, when the edit region corresponding to the graph is triggered, the graph can be edited, or a preset event associated with the graph is executed. For example, when a user clicks the edit region corresponding to the graph A, an edit page of the graph A is displayed, and the user can adjust the shape, size, color, and the like of the graph A in the edit page of the graph A. For another example, the graph B is associated with a page C, and when a user double-clicks the edit region corresponding to the graph B, the page C is displayed. The anchor point computing device determines an outer contour of the graph according to position information of the coordinate points, obtains a set of direction points of the graph based on the outer contour of the graph, the direction points in the set of direction points are used to mark a target region, and the outer contour of the graph belongs to the target region. At least one vector path corresponding to the graph is obtained through the set of direction points of the graph. For example, assuming that the target region is a rectangle, the anchor point computing device can determine the coordinates of the vertices of the target region (the rectangle) based on the outer contour of the graph, and add the coordinates to the set of direction points of the graph. The direction points in the set of direction points are connected to obtain at least one vector path corresponding to the graph.

[0103] In another embodiment, the type of the anchor point is the shape anchor point, and the shape anchor point is used to identify the shape of the image. The shape anchor point is located on the graph. The graph includes N coordinate points, and N is a positive integer. For example, the graph includes the coordinates of four vertices of the graph. The attribute information further includes line segment information between the N coordinate points of the graph, and the line segment information is used to indicate a connection relationship between the coordinate points and a type of the line segment. The anchor point computing device traverses the graph according to the line segment information between the N coordinate points to obtain at least one vector path corresponding to the graph. Any vector path is formed by combining vector paths between any two coordinate points in the N coordinate points. The vector path between the i th coordinate point and the i+1 th coordinate point is determined based on the line segment information between the i th coordinate point and the i+1 th coordinate point. It should be noted that for a closed graph, the starting point of the traversal can be any coordinate point in the graph. For a non-closed graph (such as a polyline), the starting point of the traversal can be any coordinate point associated with only one line segment.

[0104] In still another embodiment, the type of the anchor point is an animation anchor point, where the animation anchor point is a coordinate set composed of coordinates of a plurality of anchor points, the coordinate set is used to dynamically display dynamic changes of coordinates of the anchor points from a first anchor point to an Nth anchor point, and the animation anchor points are located on the graph. The graph includes P key line segments and Q subgraphs; the key line segment refers to a line segment used to connect any two subgraphs; P and Q are both positive integers; the attribute information further includes line segment information of the P key line segments and indication information of the Q subgraphs. The anchor point computing device splits the graph according to the attribute information of the graph to obtain the P key line segments and the Q subgraphs; obtains an entry coordinate point and an exit coordinate point of each subgraph, and splits each subgraph according to the entry coordinate point and the exit coordinate point of each subgraph to obtain a candidate path set of each subgraph; the candidate path set of each subgraph includes one or more candidate paths; for example, assuming that a subgraph is a rectangle, the vertex coordinates of the rectangle are (0, 0), (0, 2), (3, 0), and (3, 2), where (0, 0) is the entry and (3, 2) is the exit, the rectangle is split according to the entry coordinate point and the exit coordinate point to obtain a candidate path 1: (0, 0)→(0, 2)→(3, 2); and a candidate path 2: (0, 0)→(3, 0)→(3, 2). The anchor point computing device determines a vector expression of each key line segment according to the line segment information of the P key line segments; and determines a vector expression of each candidate path in the candidate path set of each subgraph according to the indication information of each subgraph; where the indication information is used to indicate the type of the subgraph (such as indicating that the subgraph is a rectangle, a circle, an ellipse, a polygon, etc.) and the expression of the subgraph; for example, for a circle, the circle can be represented by a center coordinate and a radius; for a polygon, the polygon can be represented by each vertex of the polygon. The vector expression of at least one key line segment is combined with the vector expression of at least one candidate path to obtain at least one vector path corresponding to the graph.

[0105] S203, obtain the length of the at least one vector path.

[0106] The anchor point computing device calculates the length of the at least one vector path through the positions of the coordinate points on the vector path and the line segment information between the coordinate points. For example, assuming that the vector path is: (0, 0)→(0, 2)→(3, 2), that is, the vector path includes coordinate points: (0, 0), (0, 2), and (3, 2), and if the line segments between the coordinate points are all straight line segments, then the length of the vector path = 2+3=5.

[0107] S204, determine the coordinate set of the anchor point corresponding to each vector path according to the length of the at least one vector path and the anchor point deployment information.

[0108] The anchor deployment information can specifically refer to a ratio between an anchor spacing and a length of a vector path, the anchor spacing, a number of anchors, or coordinates of anchors. The coordinates of anchors are used to indicate positions of the anchors in or around a graph indicated by the graph parameter.

[0109] In one embodiment, the anchor deployment information is used to indicate a ratio between an anchor spacing and a length of a vector path, and the anchor computing device deploys anchors on each vector path according to the ratio between the anchor spacing and the length of the vector path, to obtain a coordinate set of anchors corresponding to the vector path.

[0110] In another embodiment, the anchor deployment information is used to indicate an anchor spacing, and the anchor computing device deploys anchors on each vector path according to the anchor spacing, to obtain a coordinate set of anchors corresponding to the vector path.

[0111] In still another embodiment, the anchor deployment information is used to indicate a number of anchors, and lengths of the vector paths are operated (such as average operation, geometric progression operation, or arithmetic progression operation) with the number of anchors to obtain an anchor spacing corresponding to each vector path. Anchors are deployed on each vector path according to the anchor spacing corresponding to the vector path, to obtain a coordinate set of anchors corresponding to the vector path.

[0112] In yet another embodiment, the anchor deployment information is used to indicate coordinates of anchors, and the anchor computing device determines the coordinates of anchors located on a vector path as coordinates of anchors corresponding to the vector path.

[0113] In the embodiments of the present application, the graphic parameters are acquired; the graphic parameters include attribute information and anchor point deployment information of the graphic, the attribute information includes position information of coordinate points contained in the graphic, at least one vector path corresponding to the graphic is obtained according to the position information of the coordinate points, the length of the at least one vector path is acquired, and the coordinate set of the anchor point corresponding to each vector path is determined according to the length of the at least one vector path and the anchor point deployment information. It can be seen that the graphic is converted into a vector path through the attribute information of the graphic, so as to facilitate the deployment of the anchor points of the graphic according to the anchor point deployment information, and thus the marking efficiency of the anchor points is improved better.

[0114] Based on the related description of the above anchor point calculation method, the embodiments of the present application propose an anchor point calculation method, which can be executed by an anchor point calculation device. The anchor point calculation device can be specifically the terminal device 101 or the server 102 mentioned in the Figure 1a The anchor point calculation method can include the following steps S301-S312, as shown in Figure 3

[0115] S301, acquiring graphic parameters.

[0116] The specific implementation of step S301 can refer to the implementation in step S201 in Figure 2 The specific implementation of step S301 can refer to the implementation in step S201 in

[0117] In an embodiment, the graphic parameters include attribute information and anchor point deployment information of the graphic, the attribute information includes position information (such as coordinates) of coordinate points contained in the graphic and type indication information of the anchor points; the anchor point deployment information is used to indicate the deployment strategy (such as the number of anchor points, the distance between anchor points, etc.) of the anchor points associated with the graphic. If the type indication information of the anchor points indicates that the type of the anchor points is an editing anchor point, step S302 is continued to be executed; if the type indication information of the anchor points indicates that the type of the anchor points is an animation anchor point, step S305 is continued to be executed; if the type indication information of the anchor points indicates that the type of the anchor points is a shape anchor point, step S309 is continued to be executed.

[0118] S302, determining the outer contour of the graphic according to the position information of the coordinate points.

[0119] S303, obtaining a direction point set of the graphic based on the outer contour of the graphic.

[0120] ​The anchor point computing device obtains the maximum horizontal coordinate, the minimum horizontal coordinate, the maximum vertical coordinate and the minimum vertical coordinate based on the position information of each coordinate point in the graph; the maximum horizontal coordinate is the maximum value of the horizontal coordinates in the position information of each coordinate point in the graph, the minimum horizontal coordinate is the minimum value of the horizontal coordinates in the position information of each coordinate point in the graph, the maximum vertical coordinate is the maximum value of the vertical coordinates in the position information of each coordinate point in the graph, and the minimum vertical coordinate is the minimum value of the vertical coordinates in the position information of each coordinate point in the graph. For example, assuming that the coordinate points of the graph A are (1, 2), (4, 5), (5, 7), (8, 6) and (9, 3), the maximum horizontal coordinate of the graph A is 9, the minimum horizontal coordinate is 1, the maximum vertical coordinate is 7, and the minimum vertical coordinate is 2.

[0121] Based on the outer contour of the graph, the edge coordinate points of the graph are determined, and the coordinates of the edge coordinate points include at least one of the maximum horizontal coordinate, the minimum horizontal coordinate, the maximum vertical coordinate and the minimum vertical coordinate; for example, assuming that the coordinate points of the graph A are (1, 2), (4, 5), (5, 7), (8, 6) and (9, 3), the edge coordinate points of the graph A are (1, 2), (5, 7) and (9, 3). A target region is generated so that the edge coordinate points of the graph are located in the line segments constituting the target region, and the coordinate points of the target region in each direction (such as the upper direction, the lower direction, the left direction, the right direction, the upper left direction, the lower left direction, the upper right direction, the lower right direction, etc.) are obtained, and these coordinate points are determined as the direction point set of the graph. Figure 4a A schematic diagram of a direction point set provided by an embodiment of the present application is shown in FIG. 1. Figure 4a As shown in FIG. 1, the target region is a rectangle, and the graph is a circle. Assuming that the edge coordinates of the circle are (0, 2), (2, 0), (2, 4) and (4, 2), the target region is generated so that (0, 2), (2, 0), (2, 4) and (4, 2) are located on the edges of the target region, the coordinate points of the target region in each direction are obtained: (0, 0), (0, 2), (0, 4), (2, 0), (2, 4), (4, 0), (4, 2) and (4, 4), and these coordinate points are added to the direction point set of the circle.

[0122] S304, at least one vector path corresponding to the graph is obtained through the direction point set of the graph.

[0123] In an embodiment, the anchor point computing device connects the various direction points of the graph, and obtains at least one vector path corresponding to the graph based on the coordinate information of the various direction points. For example, assuming that the set of direction points is: (0, 0), (0, 2), (0, 4), (2, 0), (2, 4), (4, 0), (4, 2), (4, 4), the start point and the end point are both (0, 0), and at least one vector path corresponding to the graph is: <path d=“M0,0L0,2L0,4L2,4L4,4L4,2L4,0L2,0Z” / >, wherein, path d is used to represent the attribute of the vector path, M represents the start point, L represents connection by a straight line, and Z represents automatic closure. After obtaining at least one vector path corresponding to the graph in the above manner, the anchor point computing device continues to perform step S310.

[0124] S305, traversing the graph according to the line segment information between the N coordinate points to obtain at least one vector path corresponding to the graph.

[0125] Assuming that the graph contains N coordinate points, N is a positive integer; the attribute information further includes line segment information between the N coordinate points, the line segment information being used to indicate the connection relationship between the various coordinate points and the type of the line segment. The anchor point computing device traverses the graph according to the line segment information between the N coordinate points to obtain at least one vector path corresponding to the graph; wherein, any vector path is formed by combination of a vector path between any two coordinate points in the N coordinate points; the vector path between the i-th coordinate point and the i+1-th coordinate point is determined based on the line segment information between the i-th coordinate point and the i+1-th coordinate point.

[0126] It should be noted that, if the start point of traversal is not specified, for a closed graph, the start point of traversal can be any coordinate point in the graph; for a non-closed graph (such as a polyline), the start point of traversal can be any coordinate point associated with only one line segment.

[0127] Further, the graph includes M sub-graphs, M being a positive integer, and the attribute information further includes indication information of the M sub-graphs, the indication information being used to indicate a type of the sub-graphs (e.g., indicating that the sub-graphs are rectangles, circles, ellipses, polygons, etc.) and an expression of the sub-graphs; for example, for a circle, the circle can be expressed by a center coordinate and a radius; for a polygon, the polygon can be expressed by each vertex of the polygon. The anchor point computing device splits the graph according to line segment information between the N coordinate points to obtain M line segment sets, the M line segment sets corresponding to the M sub-graphs in a one-to-one manner, and the line segments in a line segment set being constituent elements of the corresponding sub-graph; according to the indication information of the M sub-graphs, vector expressions of the line segments in the M line segment sets are determined; for example, the circle is split into two semicircular arcs, and based on the indication information of the circle, the vector expressions of the two semicircular arcs can be obtained. The vector expressions of the line segments are combined to obtain at least one vector path corresponding to the graph.

[0128] In an embodiment, the graph is a closed polyline, a line, or a polygon graph. Taking the graph as a polygon as an example, the anchor point computing device randomly selects a coordinate point on the graph as a starting coordinate point, and traverses the graph according to a direct connection relationship between the coordinate points to obtain at least one vector path of the graph. Figure 4b A polygon conversion schematic diagram is provided for an embodiment of the present application. As shown in Figure 4b A polygon conversion schematic diagram is provided for an embodiment of the present application. As shown in

[0129] In another embodiment, the graph is a circle, an ellipse, or a curve. Taking the graph as an ellipse as an example, the anchor point computing device randomly selects a coordinate point on the graph as a starting coordinate point, obtains line segments between the coordinate points, and based on indication information of the graph, obtains vector expressions of the line segments to obtain at least one vector path of the graph. Figure 4c An ellipse conversion schematic diagram is provided for an embodiment of the present application. As shown in Figure 4cAs shown, the ellipse is converted into two arc segments based on the coordinate points in the ellipse, and the vector expression of the two arc lines is obtained based on the representation information of the ellipse, and then at least one vector path of the ellipse is obtained. Assuming that the representation information of the ellipse is: <ellipse cx="40" cy="40" rx="20" ry="30" / >, wherein, ellipse is used to indicate that the figure is an ellipse, cx is the horizontal coordinate of the circle point, cy is the vertical coordinate of the circle point, rx is the horizontal radius, and ry is the vertical radius. Assuming that the B point is the starting point, the coordinate of the B point is (cx-rx, cy), the radius is cx and cy, and the line is drawn to the C point according to the clockwise radian, the coordinate of the C point is (2rx, cy), and based on the representation information of the ellipse, the vector expression of the arc line of B→C is: (A rx ry 0 1 0 cx+rx cy), and the corresponding parameter format of the expression is: (A rx ry angle large-arc-flag and sweep-flag large-arc-flag x y), wherein, A indicates that the line segment is an arc line, rx and ry are the horizontal radius and the vertical radius of the ellipse, angle indicates the rotation angle (in degrees) of the ellipse relative to the x axis; large-arc-flag and sweep-flag are used to indicate the arc line to be drawn (based on other parameters, four alternative arcs can be drawn, and the four alternative arcs can be indicated by 01, 10, 00 and 11); large-arc-flag is used to indicate the selection of a large arc (1) or a small arc (0); sweep-flag is used to indicate the rotation direction of the arc line, a clockwise rotation arc (1), and a counterclockwise rotation arc (0); and xy is used to indicate the coordinate of the next ellipse center point. Similarly, the line is drawn to the B point according to the clockwise radian with the C point as the starting point, the radius being cx and cy, and the coordinate of the B point being (cx-rx, cy), and based on the representation information of the ellipse, the vector expression of the arc line of C→B is: (A rx ry 0 1 0 cx-rx cy). Based on the vector expression of the arc line of B→C and the vector expression of the arc line of C→B, at least one vector path of the ellipse is obtained: <path d="M20,40 a20 30 0 10 40 0 a20 30 0 1 0 -40 0" / >, wherein, path d is used to represent the attribute of the vector path, M represents the starting point, and a represents the connection through the arc line. It should be noted that the above parameters are only used for example, and do not constitute the actual limitation of the application.

[0130] In still another embodiment, the figure is obtained by splicing a plurality of figures. Figure 4d A conversion schematic diagram of spliced figures is provided for the embodiments of the application. Figure 4dAs shown, the anchor point computing device splits the graph into a plurality of sub-graphs, after obtaining the sub-graphs, the vector expression of each line segment is obtained in the manner of the above embodiment, and then at least one vector path of the graph is obtained.

[0131] After obtaining at least one vector path corresponding to the graph in the above manner, the anchor point computing device continues to perform step S310.

[0132] S306, according to the attribute information of the graph, the graph is split to obtain P key line segments and Q sub-graphs.

[0133] The graph includes P key line segments and Q sub-graphs; the key line segment refers to a line segment used to connect any two sub-graphs; P and Q are both positive integers; the attribute information further includes line segment information of the P key line segments and indication information of the Q sub-graphs.

[0134] S307, obtain the entry coordinate point and the exit coordinate point of each sub-graph, and split each sub-graph according to the entry coordinate point and the exit coordinate point of each sub-graph to obtain a candidate path set of each sub-graph.

[0135] The line segment information of the P key line segments includes an animation flow direction, the animation flow direction is used to indicate the movement direction of the anchor point, and the anchor point computing device determines the entry coordinate point and the exit coordinate point of each sub-graph based on the animation flow direction of the P key line segments. Optionally, any connection point of any sub-graph and the key line segment is taken as the entry coordinate point of the sub-graph, and other connection points except the entry coordinate point are taken as the exit coordinate points.

[0136] Further, the anchor point computing device splits each sub-graph according to the entry coordinate point and the exit coordinate point of each sub-graph to obtain a candidate path set of each sub-graph. Assuming that the coordinate point set of the sub-graph B is: [(a, b), (c, d), (e, f), (g, h), (i, j), (k, l), (m, n), (o, p), …, (x, y), (y, z)], and the entry coordinate point of the graph B is (e, f) and the exit coordinate point is (x, y); then the array is queried from two directions respectively to obtain two candidate paths of the graph B, and the algorithm complexity is: Θ(n).

[0137] Figure 4e A sub-graph splitting schematic diagram provided by an embodiment of the present application is shown in FIG. 3. As shown in FIG. 3, the graph is split into a plurality of sub-graphs, and the vector expression of each line segment is obtained in the manner of the above embodiment, and then at least one vector path of the graph is obtained. Figure 4eAs shown, based on the entry coordinate point (e, f) and the exit coordinate point (x, y) of the sub-graph B, the sub-graph B is split from two directions, and two candidate paths of the sub-graph B are obtained, which are (e, f), (g, h), (i, j), (k, l), (m, n), (o, p),... (x, y) and (e, f), (c, d), (a, b), (y, z), (x, y).

[0138] In S308, vector expressions of the key line segments are determined according to the line segment information of the P key line segments, and vector expressions of the candidate paths in the candidate path set of each sub-graph are determined according to the indication information of each sub-graph.

[0139] The specific implementation of S308 can refer to S305, which is not described here again.

[0140] In S309, the vector expressions of the at least one key line segment are combined with the vector expressions of the at least one candidate path to obtain at least one vector path corresponding to the graph.

[0141] In an embodiment, the anchor point computing device randomly selects the vector expressions of the key line segments and the vector expressions of the candidate paths to combine to obtain at least one vector path corresponding to the graph.

[0142] In another embodiment, the line segment information of the P key line segments includes an animation flow direction, the anchor point computing device obtains a starting coordinate point and a terminal coordinate point of a target animation in the graph, traverses the graph according to the animation flow direction from the starting coordinate point to obtain at least one animation path, and the terminal point of each animation path is the terminal coordinate point. The vector expressions of the key line segments and the vector expressions of the candidate paths in the at least one animation path are combined to obtain at least one vector path corresponding to the graph. The traversal of the graph according to the animation flow direction means that the starting coordinate point is set as the starting point, and all animation paths from the starting coordinate point to the terminal coordinate point in the graph are obtained based on the animation flow direction of each key line segment.

[0143] Figure 4f A schematic diagram of an animation path provided by an embodiment of the present application is shown in FIG. 3. As shown in FIG. 3, a graph is divided into a plurality of sub-graphs, and each sub-graph is divided into a plurality of key line segments and a plurality of candidate paths. Figure 4fAs shown, the graph includes subgraph A, subgraph B, subgraph C, subgraph D, key line segment E, key line segment F, key line segment G and key line segment H. The starting coordinate point is located in subgraph A, and the ending coordinate point is located in subgraph D. The anchor point computing device first records the key line segments and subgraphs passed by the animation according to the starting coordinate point, the ending coordinate point and the animation flow direction of the key line segments; for example, in one animation path, the anchor point passes through key line segment E, subgraph B and key line segment G. Then the entry coordinate point and the exit coordinate point of subgraph B passed through are obtained, and subgraph B is split based on the entry coordinate point and the exit coordinate point to obtain candidate paths of subgraph B, and the vector expressions of the candidate paths are obtained based on the representation information of subgraph B. The vector expressions of key line segment E, key line segment G and any one of the candidate paths of subgraph B are combined to obtain one vector path of the graph; similarly, the vector expressions of key line segment E, key line segment G and the vector expressions of different candidate paths of subgraph B are combined to obtain multiple vector paths of the graph. Similarly, in another animation path, the anchor point passes through key line segment F, subgraph C and key line segment H. The entry coordinate point and the exit coordinate point of subgraph C passed through are obtained, and subgraph C is split based on the entry coordinate point and the exit coordinate point to obtain candidate paths of subgraph C, and the vector expressions of the candidate paths are obtained based on the representation information of subgraph C. The vector expressions of key line segment F, key line segment H and any one of the candidate paths of subgraph C are combined to obtain one vector path of the graph; similarly, the vector expressions of key line segment F, key line segment H and the vector expressions of different candidate paths of subgraph C are combined to obtain multiple vector paths of the graph.

[0144] S310, obtaining the length of at least one vector path.

[0145] The specific implementation of step S310 can refer to the implementation of step S203 in the method for determining the vector path of the anchor point in the animation. Figure 2 The specific implementation of step S311 can refer to the implementation of step S204 in the method for determining the vector path of the anchor point in the animation, which will not be described here.

[0146] It can be understood that for a closed graph, the lengths of the vector paths are all the same, so it is only necessary to calculate the length of one vector path. For the animation paths of the animation anchor point, the lengths of the animation paths can be different, so it is necessary to calculate the lengths of the vector paths.

[0147] S311, determining the coordinate set of the anchor point corresponding to each vector path according to the length of at least one vector path and the anchor point deployment information.

[0148] The specific implementation of step S311 can refer to the implementation of step S204 in the method for determining the vector path of the anchor point in the animation, which will not be described here. Figure 2The implementation method of step S204 will not be described in detail here.

[0149] S312. In response to the graphic being triggered, display the corresponding anchor point of the graphic based on the coordinates of each anchor point in the set of anchor point coordinates.

[0150] After obtaining the coordinate set of the anchor points of the graphic, when the graphic is triggered, the corresponding anchor points of the graphic are displayed according to the display rules and the coordinates of each anchor point in the coordinate set; for example, when the graphic is clicked, the shape anchor point of the graphic is displayed, when the graphic is selected, the editing anchor point of the graphic is displayed, and when the graphic is double-clicked, the animation anchor point of the graphic is displayed.

[0151] In this embodiment, graphic parameters are obtained. These parameters include graphic attribute information and anchor point deployment information. The attribute information includes the position information of coordinate points contained in the graphic. Based on the position information of the coordinate points, at least one vector path corresponding to the graphic is obtained. The length of the at least one vector path is then obtained, and based on the length of the at least one vector path and the anchor point deployment information, the coordinate set of the anchor points corresponding to each vector path is determined. It is evident that converting the graphic into a vector path using its attribute information facilitates the deployment of anchor points according to the anchor point deployment information, thereby significantly improving the efficiency of anchor point marking. Furthermore, this embodiment enriches the display forms and application scenarios of anchor points through different types of anchor points. In practical applications, it can perform anchor point calculations on complex graphics, offering advantages such as high computational performance, low complexity, and controllable computational accuracy.

[0152] The methods of the embodiments of this application have been described in detail above. In order to facilitate better implementation of the above solutions of the embodiments of this application, the apparatus of the embodiments of this application is provided below.

[0153] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of an anchor point calculation device provided in an embodiment of this application. The device can be mounted on... Figure 1a On the terminal device 101 or server 102 shown. Figure 5 The anchor point calculation device shown can be used to perform the above. Figure 2 and Figure 3 Some or all of the functionality described in the method embodiments. Please refer to... Figure 5 The detailed descriptions of each unit are as follows:

[0154] The acquisition unit 501 is used to acquire graphic parameters; the graphic parameters include the attribute information of the graphic and the anchor point deployment information. The attribute information includes the position information of the coordinate points contained in the graphic; the anchor point deployment information is used to indicate the deployment strategy of the anchor points associated with the graphic.

[0155] The processing unit 502 is configured to obtain at least one vector path corresponding to the graph according to the position information of the coordinate points.

[0156] The obtaining unit 501 is further configured to obtain the length of the at least one vector path.

[0157] The processing unit 502 is further configured to determine the coordinate set of the anchor point corresponding to each vector path according to the length of the at least one vector path and the anchor point deployment information.

[0158] In an embodiment, the attribute information further includes type indication information of the anchor point, and the type indication information indicates that the type of the anchor point is an edit anchor point; the processing unit 502 is configured to obtain at least one vector path corresponding to the graph according to the position information of the coordinate points, and specifically configured to:

[0159] determine the outer contour of the graph according to the position information of the coordinate points;

[0160] obtain a set of direction points of the graph based on the outer contour of the graph, wherein a direction point in the set of direction points is used to mark a target region, and the outer contour of the graph belongs to the target region;

[0161] obtain at least one vector path corresponding to the graph through the set of direction points of the graph.

[0162] In an embodiment, the graph includes N coordinate points, and N is a positive integer; the attribute information further includes type indication information of the anchor point and line segment information between the N coordinate points; and the type indication information indicates that the type of the anchor point is a shape anchor point.

[0163] The processing unit 502 is configured to obtain at least one vector path corresponding to the graph according to the position information of the coordinate points, and specifically configured to:

[0164] traverse the graph according to the line segment information between the N coordinate points to obtain at least one vector path corresponding to the graph;

[0165] Any vector path is formed by combination of vector paths between any two coordinate points in the N coordinate points; and the vector path between the i-th coordinate point and the (i+1)-th coordinate point is determined based on the line segment information between the i-th coordinate point and the (i+1)-th coordinate point.

[0166] In an embodiment, the graph includes M sub-graphs, and M is a positive integer; the attribute information further includes indication information of the M sub-graphs; and the processing unit 502 is configured to traverse the graph according to the line segment information between the N coordinate points to obtain at least one vector path corresponding to the graph, and specifically configured to:

[0167] The graph is split according to line segment information between N coordinate points to obtain M line segment sets, the M line segment sets correspond to M sub-graphs in a one-to-one manner, and the line segments in a line segment set are constituent elements of the corresponding sub-graph;

[0168] According to the indication information of the M sub-graphs, vector expressions of the line segments in the M line segment sets are determined;

[0169] The vector expressions of the line segments are combined to obtain at least one vector path corresponding to the graph.

[0170] In an implementation, the graph includes P key line segments and Q sub-graphs; the key line segment refers to a line segment used to connect any two sub-graphs; P and Q are both positive integers; the attribute information further includes type indication information of the anchor points, line segment information of the P key line segments, and indication information of the Q sub-graphs; the type indication information indicates that the type of the anchor point is an animation anchor point;

[0171] The processing unit 502 is configured to obtain at least one vector path corresponding to the graph according to the position information of the coordinate points, and specifically configured to:

[0172] The graph is split according to attribute information of the graph to obtain P key line segments and Q sub-graphs;

[0173] The entry coordinate point and the exit coordinate point of each sub-graph are obtained, and each sub-graph is split according to the entry coordinate point and the exit coordinate point of each sub-graph to obtain a candidate path set of each sub-graph; the candidate path set of each sub-graph includes one or more candidate paths;

[0174] The vector expressions of the P key line segments are determined according to the line segment information of the P key line segments; and

[0175] The vector expressions of the candidate paths in the candidate path set of each sub-graph are determined according to the indication information of each sub-graph;

[0176] The vector expressions of at least one key line segment and the vector expressions of at least one candidate path are combined to obtain at least one vector path corresponding to the graph.

[0177] In an implementation, the line segment information of the P key line segments includes an animation flow direction; the processing unit 502 is configured to combine the vector expressions of at least one key line segment and the vector expressions of at least one candidate path to obtain at least one vector path corresponding to the graph, and specifically configured to:

[0178] The starting coordinate point and the terminal coordinate point of the target animation in the graph are obtained;

[0179] The graph is traversed according to an animation flow direction from the starting coordinate point to obtain at least one animation path, and an end point of each animation path is a terminal coordinate point.

[0180] The vector expression of the key line segment in the at least one animation path and the vector expression of the candidate path are combined to obtain at least one vector path corresponding to the graph.

[0181] In an implementation, the obtaining unit 501 is configured to obtain attribute information of the graph, and specifically configured to:

[0182] obtain path information of the graph, and determine the attribute information of the graph according to the path information of the graph; or

[0183] obtain a vector expression of the graph, and determine the attribute information of the graph according to the vector expression of the graph.

[0184] In an implementation, the anchor point deployment information includes a ratio between an anchor point interval and a length of the vector path; and the processing unit 502 is configured to determine a coordinate set of an anchor point corresponding to each vector path according to the length of the at least one vector path and the anchor point deployment information, and specifically configured to:

[0185] deploy the anchor points on each vector path according to the ratio between the anchor point interval and the length of the vector path to obtain the coordinate set of the anchor point corresponding to each vector path.

[0186] In an implementation, the anchor point deployment information includes an anchor point interval; and the processing unit 502 is configured to determine a coordinate set of an anchor point corresponding to each vector path according to the length of the at least one vector path and the anchor point deployment information, and specifically configured to:

[0187] deploy the anchor points on each vector path according to the anchor point interval to obtain the coordinate set of the anchor point corresponding to each vector path.

[0188] In an implementation, the anchor point deployment information includes an anchor point number; and the processing unit 502 is configured to determine a coordinate set of an anchor point corresponding to each vector path according to the length of the at least one vector path and the anchor point deployment information, and specifically configured to:

[0189] perform an operation on the length of each vector path and the anchor point number to obtain an anchor point interval corresponding to each vector path;

[0190] deploy the anchor points on each vector path according to the anchor point interval corresponding to each vector path to obtain the coordinate set of the anchor point corresponding to each vector path.

[0191] In an implementation, the processing unit 502 is further configured to:

[0192] In response to a graphic being triggered, the corresponding anchor point of the graphic is displayed based on the coordinates of each anchor point in the set of anchor point coordinates.

[0193] According to one embodiment of this application, Figure 2 and Figure 3 The anchor point calculation method shown can be partially implemented by... Figure 5 The anchor point calculation is performed by individual units within the illustrated device. For example, Figure 2 Steps S201 and S203 shown can be derived from... Figure 5 The acquisition unit 501 shown is executed, and steps S202 and S204 can be performed by... Figure 5 The processing unit 502 shown is executed. Figure 3 Steps S301 and S310 shown can be derived from... Figure 5 The acquisition unit 501 shown executes steps S302-S309, S311 and S312, which can be performed by... Figure 5 The processing unit 502 shown is executed. Figure 5 The units in the anchor point calculation device shown can be individually or entirely merged into one or more other units, or some of the units can be further divided into multiple functionally smaller units. This achieves the same operation without affecting the technical effects of the embodiments of this application. The above units are based on logical function division. In practical applications, the function of one unit can be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of this application, the anchor point calculation device may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units.

[0194] According to another embodiment of this application, the following can be executed by running on a general-purpose computing device, such as a computer, which includes processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM). Figure 2 and Figure 3 The computer program (including program code) for each step involved in the corresponding method shown, to construct such... Figure 5 The anchor point calculation apparatus shown herein, and the anchor point calculation method for implementing the embodiments of this application, are described. A computer program may be recorded on, for example, a computer-readable recording medium, loaded onto the aforementioned computing apparatus via the computer-readable recording medium, and executed therein.

[0195] Based on the same inventive concept, the anchor point calculation apparatus provided in the embodiments of the present application has similar principles and beneficial effects to those of the anchor point calculation method, and reference can be made to the principles and beneficial effects of the method for details. For brevity, the principles and beneficial effects will not be described here again.

[0196] Please refer to Figure 6 , Figure 6 A structural schematic diagram of a computer device provided in the embodiments of the present application is shown in FIG. 6. The computer device at least includes a processor 601, a communication interface 602 and a memory 603. The processor 601, the communication interface 602 and the memory 603 can be connected through a bus or other means. The embodiments of the present application take the connection through the bus as an example. The processor 601 (or a central processing unit (CPU)) is the calculation core and control core of the computer device, which can analyze various instructions in the terminal device and process various data of the terminal device. For example, the CPU can be used to analyze the power-on / off instruction sent by the user to the terminal device and control the terminal device to perform the power-on / off operation. For another example, the CPU can transmit various interactive data between the internal structures of the terminal device, and the like. The communication interface 602 can optionally include a standard wired interface, a wireless interface (such as WI-FI, a mobile communication interface, etc.), and can be used to receive and send data under the control of the processor 601. The communication interface 602 can also be used for the transmission and interaction of internal data of the terminal device. The memory 603 is a memory device in the terminal device, which is used to store programs and data. It can be understood that the memory 603 can include the built-in memory of the terminal device, and of course can also include the expansion memory supported by the terminal device. The memory 603 provides a storage space, which stores the operating system of the terminal device, and can include but is not limited to: an Android system, an iOS system, a Windows Phone system, etc., and the present application is not limited thereto.

[0197] The embodiment of the present application further provides a computer readable storage medium (Memory), which is a memory device in a terminal and is used for storing programs and data. It can be understood that the computer readable storage medium herein can include a built-in storage medium in the terminal, and of course can include an extended storage medium supported by the terminal. The computer readable storage medium provides a storage space, and the storage space stores a processing system of the terminal. Furthermore, one or more instructions suitable for being loaded and executed by the processor 601 are stored in the storage space, and the instructions can be one or more computer programs (including program codes). It should be noted that the computer readable storage medium herein can be a high-speed RAM memory, or a non-volatile memory such as at least one disk memory; optionally, the computer readable storage medium can be at least one computer readable storage medium located away from the aforementioned processor.

[0198] The computer device can be Figure 1a The terminal device 101 or the server 102 shown in the figure. In this case, the processor 601 performs the following operations by running the executable program code in the memory 603.

[0199] Obtaining graphic parameters; the graphic parameters include attribute information and anchor point deployment information of the graphic, the attribute information includes position information of coordinate points contained in the graphic; and the anchor point deployment information is used for indicating a deployment strategy of an anchor point associated with the graphic;

[0200] According to the position information of the coordinate points, at least one vector path corresponding to the graphic is obtained;

[0201] Obtaining the length of the at least one vector path;

[0202] According to the length of the at least one vector path and the anchor point deployment information, a coordinate set of the anchor point corresponding to each vector path is determined.

[0203] As an optional embodiment, the attribute information further includes type indication information of the anchor point, and the type indication information indicates that the type of the anchor point is an editing anchor point; and the specific embodiment in which the processor 601 obtains, according to the position information of the coordinate points, at least one vector path corresponding to the graphic is as follows:

[0204] According to the position information of the coordinate points, an outer contour of the graphic is determined;

[0205] Based on the outer contour of the graphic, a direction point set of the graphic is obtained, a direction point in the direction point set is used for marking a target region, and the outer contour of the graphic belongs to the target region;

[0206] At least one vector path corresponding to the graphic is obtained through the direction point set of the graphic.

[0207] As an optional embodiment, the graph comprises N coordinate points, N being a positive integer; the attribute information further comprises type indication information of the anchor point and line segment information between the N coordinate points; the type indication information indicates that the type of the anchor point is a shape anchor point;

[0208] The processor 601 obtains the specific embodiment of the at least one vector path corresponding to the graph according to the position information of the coordinate points as follows:

[0209] The graph is traversed according to the line segment information between the N coordinate points to obtain the at least one vector path corresponding to the graph;

[0210] Any vector path is formed by combination of vector paths between any two coordinate points in the N coordinate points; the vector path between the i th coordinate point and the i+1 th coordinate point is determined based on the line segment information between the i th coordinate point and the i+1 th coordinate point.

[0211] As an optional embodiment, the graph comprises M sub-graphs, M being a positive integer; the attribute information further comprises indication information of the M sub-graphs; the specific embodiment of the processor 601 obtaining the at least one vector path corresponding to the graph according to the line segment information between the N coordinate points is as follows:

[0212] The graph is split according to the line segment information between the N coordinate points to obtain M line segment sets, the M line segment sets corresponding to the M sub-graphs one by one, and the line segments in a line segment set being constituent elements of the corresponding sub-graph;

[0213] The vector expressions of the line segments in the M line segment sets are determined according to the indication information of the M sub-graphs;

[0214] The vector expressions of the line segments are combined to obtain the at least one vector path corresponding to the graph.

[0215] As an optional embodiment, the graph comprises P key line segments and Q sub-graphs; the key line segment refers to a line segment used to connect any two sub-graphs; P and Q are both positive integers; the attribute information further comprises type indication information of the anchor point, line segment information of the P key line segments and indication information of the Q sub-graphs; the type indication information indicates that the type of the anchor point is an animation anchor point;

[0216] The specific embodiment of the processor 601 obtaining the at least one vector path corresponding to the graph according to the position information of the coordinate points is as follows:

[0217] The graph is split according to the attribute information of the graph to obtain the P key line segments and the Q sub-graphs;

[0218] The entry coordinate point and the exit coordinate point of each sub-graph are acquired, and each sub-graph is split according to the entry coordinate point and the exit coordinate point of each sub-graph to obtain a candidate path set of each sub-graph; the candidate path set of each sub-graph includes one or more candidate paths;

[0219] According to the line segment information of the P key line segments, vector expressions of the key line segments are determined; and

[0220] According to the indication information of each sub-graph, vector expressions of the candidate paths in the candidate path set of each sub-graph are determined;

[0221] The vector expressions of the at least one key line segment and the vector expressions of the at least one candidate path are combined to obtain at least one vector path corresponding to the graph.

[0222] As an optional embodiment, the line segment information of the P key line segments includes an animation flow direction; the specific embodiment in which the processor 601 combines the vector expressions of the at least one key line segment and the vector expressions of the at least one candidate path to obtain at least one vector path corresponding to the graph is as follows:

[0223] The starting coordinate point and the ending coordinate point of the target animation in the graph are acquired;

[0224] Starting from the starting coordinate point, the graph is traversed according to the animation flow direction to obtain at least one animation path, and the ending point of each animation path is the ending coordinate point;

[0225] The vector expressions of the key line segments and the vector expressions of the candidate paths in the at least one animation path are combined to obtain at least one vector path corresponding to the graph.

[0226] As an optional embodiment, the specific embodiment in which the processor 601 acquires the attribute information of the graph is as follows:

[0227] The path information of the graph is acquired, and the attribute information of the graph is determined according to the path information of the graph; or

[0228] The vector expression of the graph is acquired, and the attribute information of the graph is determined according to the vector expression of the graph.

[0229] As an optional embodiment, the anchor point deployment information includes a ratio between an anchor point spacing and a length of a vector path; the specific embodiment in which the processor 601 determines the coordinate set of the anchor point corresponding to each vector path according to the length of the at least one vector path and the anchor point deployment information is as follows:

[0230] According to the ratio between the anchor point spacing and the length of the vector path, the anchor points are respectively deployed on the vector paths to obtain the coordinate set of the anchor point corresponding to each vector path.

[0231] As an optional embodiment, the anchor point deployment information comprises an anchor point spacing; and the processor 601 determines the coordinate set of the anchor point corresponding to each vector path according to the length of the at least one vector path and the anchor point deployment information, and the specific embodiment is as follows:

[0232] The anchor points are respectively deployed on each vector path according to the anchor point spacing, to obtain the coordinate set of the anchor point corresponding to each vector path.

[0233] As an optional embodiment, the anchor point deployment information comprises an anchor point number; and the processor 601 determines the coordinate set of the anchor point corresponding to each vector path according to the length of the at least one vector path and the anchor point deployment information, and the specific embodiment is as follows:

[0234] The length of each vector path is operated with the anchor point number, to obtain the anchor point spacing corresponding to each vector path;

[0235] The anchor points are respectively deployed on each vector path according to the anchor point spacing corresponding to each vector path, to obtain the coordinate set of the anchor point corresponding to each vector path.

[0236] As an optional embodiment, the processor 601 further performs the following operation by running the executable program code in the memory 603:

[0237] In response to the graph being triggered, the anchor point corresponding to the graph is displayed according to the coordinates of each anchor point in the coordinate set of the anchor point.

[0238] Based on the same inventive concept, the principle and beneficial effects of the computer device provided in the embodiments of the present application for solving problems are similar to those of the anchor point calculation method of the method embodiments of the present application. For brevity, the principle and beneficial effects are not described here.

[0239] The embodiments of the present application further provide a computer readable storage medium, which stores one or more instructions. The one or more instructions are adapted to be loaded by a processor and execute the anchor point calculation method of the above-mentioned method embodiments.

[0240] The embodiments of the present application further provide a computer program product comprising instructions which, when executed on a computer, cause the computer to carry out the anchor point calculation method of the above-mentioned method embodiments.

[0241] The embodiments of the present application further provide a computer program product or a computer program, which comprises computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned anchor point calculation method.

[0242] The steps in the method of the embodiments of the present application can be adjusted in sequence, combined and deleted according to actual needs.

[0243] The modules in the device of the embodiments of the present application can be combined, divided and deleted according to actual needs.

[0244] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiments can be completed by a program instructing related hardware, and the program can be stored in a computer readable storage medium, which can include a flash disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0245] The above only discloses a preferred embodiment of the present application, and of course cannot limit the scope of the rights of the present application. Those skilled in the art can understand that the implementation of all or part of the above-mentioned embodiments and the equivalent changes made according to the claims of the present application still belong to the scope covered by the application.

Claims

1. An anchor point calculation method, characterized by, The method comprises: acquiring graph parameters; the graph parameters comprise attribute information and anchor point deployment information of a graph, the graph comprising P key line segments and Q subgraphs; the key line segment refers to a line segment used to connect any two subgraphs; P and Q are both positive integers; the attribute information comprises position information of coordinate points contained in the graph, type indication information of anchor points, line segment information of the P key line segments, and indication information of the Q subgraphs; the type indication information indicates that the type of the anchor points is an animation anchor point, and the anchor point deployment information is used to indicate a deployment strategy of anchor points associated with the graph; splitting the graph according to the attribute information of the graph to obtain the P key line segments and the Q subgraphs; acquiring an entry coordinate point and an exit coordinate point of each subgraph, and splitting each subgraph according to the entry coordinate point and the exit coordinate point of each subgraph to obtain a candidate path set of each subgraph; the candidate path set of each subgraph comprises one or more candidate paths; determining a vector expression of each key line segment according to the line segment information of the P key line segments, and determining a vector expression of each candidate path in the candidate path set of each subgraph according to the indication information of the subgraph; combining the vector expression of at least one key line segment with the vector expression of at least one candidate path to obtain at least one vector path corresponding to the graph; acquiring the length of the at least one vector path; determining a coordinate set of anchor points corresponding to each vector path according to the length of the at least one vector path and the anchor point deployment information.

2. The method of claim 1, wherein, The line segment information of the P key line segments comprises an animation flow direction; the combining of the vector expression of at least one key line segment with the vector expression of at least one candidate path to obtain at least one vector path corresponding to the graph comprises: acquiring a starting coordinate point and a terminal coordinate point of a target animation in the graph; traversing the graph according to the animation flow direction from the starting coordinate point to obtain at least one animation path, the terminal point of each animation path being the terminal coordinate point; combining the vector expression of a key line segment in the at least one animation path with the vector expression of a candidate path to obtain at least one vector path corresponding to the graph.

3. The method of claim 1, wherein, The acquiring of the attribute information of the graph comprises: acquiring path information of the graph, and determining the attribute information of the graph according to the path information of the graph; or acquiring a vector expression of the graph, and determining the attribute information of the graph according to the vector expression of the graph.

4. The method of claim 1, wherein, The anchor point deployment information comprises a ratio between an anchor point spacing and the length of a vector path; the determining of a coordinate set of anchor points corresponding to each vector path according to the length of the at least one vector path and the anchor point deployment information comprises: deploying anchor points on each vector path according to the ratio between the anchor point spacing and the length of the vector path to obtain a coordinate set of anchor points corresponding to each vector path.

5. The method of claim 1, wherein, The anchor point deployment information comprises an anchor point spacing; and the determining of the coordinate set of the anchor point corresponding to each vector path according to the length of the at least one vector path and the anchor point deployment information comprises: deploying the anchor points on each vector path according to the anchor point spacing to obtain the coordinate set of the anchor point corresponding to each vector path.

6. The method of claim 1, wherein, The anchor point deployment information comprises an anchor point number; and the determining of the coordinate set of the anchor point corresponding to each vector path according to the length of the at least one vector path and the anchor point deployment information comprises: operating the length of each vector path with the anchor point number to obtain the anchor point spacing corresponding to each vector path; deploying the anchor points on each vector path according to the anchor point spacing corresponding to each vector path to obtain the coordinate set of the anchor point corresponding to each vector path.

7. The method of claim 1, wherein, The method further comprises: in response to the graph being triggered, displaying the anchor point corresponding to the graph according to the coordinates of each anchor point in the coordinate set of the anchor point.

8. An anchor point computing device, comprising: comprise: an acquisition unit configured to acquire graph parameters; the graph parameters comprise attribute information of a graph and anchor point deployment information, the graph comprises P key line segments and Q sub-graphs; the key line segment refers to a line segment used to connect any two sub-graphs; P and Q are both positive integers; the attribute information comprises position information of coordinate points contained in the graph, type indication information of anchor points, line segment information of the P key line segments, and indication information of the Q sub-graphs; the type indication information indicates that the type of the anchor point is an animation anchor point; and the anchor point deployment information is used to indicate a deployment strategy of anchor points associated with the graph; a processing unit configured to split the graph according to the attribute information of the graph to obtain the P key line segments and the Q sub-graphs; acquire an entry coordinate point and an exit coordinate point of each sub-graph, and split each sub-graph according to the entry coordinate point and the exit coordinate point of each sub-graph to obtain a candidate path set of each sub-graph; each candidate path set of each sub-graph comprises one or more candidate paths; determine a vector expression of each key line segment according to the line segment information of the P key line segments; and determine a vector expression of each candidate path in the candidate path set of each sub-graph according to the indication information of each sub-graph; combine the vector expression of at least one key line segment with the vector expression of at least one candidate path to obtain at least one vector path corresponding to the graph; the acquisition unit is further configured to acquire the length of the at least one vector path; the processing unit is further configured to determine the coordinate set of the anchor point corresponding to each vector path according to the length of the at least one vector path and the anchor point deployment information.

9. A computer device, comprising: comprise: a storage device and a processor; the storage device stores a computer program; the processor executes the computer program to implement the anchor point calculation method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the anchor point calculation method according to any one of claims 1-7 is implemented when the computer program is executed by the processor.

11. A computer program product, characterised in that, The computer program product comprises computer instructions stored in a computer readable storage medium; A processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device performs the anchor point calculation method according to any one of claims 1-7.

Citation Information

Patent Citations

  • System and method for WDM (wavelength division multiplexing) network topological structure vectorization

    CN103297984A

  • Image processing method and device, electronic equipment and storage medium

    CN111127543A