CN114924822B - Screenshot method and device of three-dimensional topological structure, electronic equipment and storage medium - Google Patents

Screenshot method and device of three-dimensional topological structure, electronic equipment and storage medium Download PDF

Info

Publication number
CN114924822B
CN114924822B CN202210543969.8A CN202210543969A CN114924822B CN 114924822 B CN114924822 B CN 114924822B CN 202210543969 A CN202210543969 A CN 202210543969A CN 114924822 B CN114924822 B CN 114924822B
Authority
CN
China
Prior art keywords
target
target topological
topological structure
screenshot
displayed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210543969.8A
Other languages
Chinese (zh)
Other versions
CN114924822A (en
Inventor
刘伟岩
谷雨
王亮
肖新光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Antiy Technology Group Co Ltd
Original Assignee
Antiy Technology Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Antiy Technology Group Co Ltd filed Critical Antiy Technology Group Co Ltd
Priority to CN202210543969.8A priority Critical patent/CN114924822B/en
Publication of CN114924822A publication Critical patent/CN114924822A/en
Application granted granted Critical
Publication of CN114924822B publication Critical patent/CN114924822B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/18Network design, e.g. design based on topological or interconnect aspects of utility systems, piping, heating ventilation air conditioning [HVAC] or cabling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Geometry (AREA)
  • Human Computer Interaction (AREA)
  • Architecture (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computational Mathematics (AREA)
  • Computer Graphics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • User Interface Of Digital Computer (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the invention relates to the technical field of computers, in particular to a screenshot method and device of a three-dimensional topological structure, electronic equipment and a storage medium. The method comprises the following steps: responding to the triggering operation of a user, and determining a target topological structure from the three-dimensional topological structure; the target topological structure comprises target topological elements and three-dimensional coordinate information of each target topological element, and the target topological elements comprise at least one of topological nodes, text prompts and node frames; determining second size information of a screenshot frame for intercepting the target topological structure based on the three-dimensional coordinate information of each target topological element and the first size information of the region to be displayed; and based on the three-dimensional coordinate information and the second size information of each target topological element, centering the target topological structure in the screenshot frame to finish screenshot of the target topological structure. The technical scheme provided by the invention can solve the problem that the size ratio of the screenshot to the region to be displayed is not matched.

Description

Screenshot method and device of three-dimensional topological structure, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a screenshot method and device of a three-dimensional topological structure, electronic equipment and a storage medium.
Background
Analysis of three-dimensional topologies (e.g., three-dimensional network topologies) plays a vital role in the development of computers. At present, if a user wants to capture a three-dimensional topological structure, the user usually uses capture software to select the content and the size of the capture for the full-screen capture or manually dragging the capture frame, so that the capture of the target topological structure can be obtained, and the capture is displayed for the user.
However, the area to be displayed for displaying the screenshot is typically sized, which may cause a problem in that the size ratio of the screenshot to the area to be displayed is not matched, thereby affecting the user experience.
Disclosure of Invention
In order to solve the problem that the size ratio of a screenshot to a display area is not matched, the embodiment of the invention provides a screenshot method and device of a three-dimensional topological structure, electronic equipment and a storage medium.
In a first aspect, an embodiment of the present invention provides a method for capturing a three-dimensional topological structure, including:
responding to the triggering operation of a user, and determining a target topological structure from the three-dimensional topological structure; the target topological structure comprises target topological elements and three-dimensional coordinate information of each target topological element, and the target topological elements comprise at least one of topological nodes, text prompts and node frames;
Determining second size information of a screenshot frame for intercepting the target topological structure based on the three-dimensional coordinate information of each target topological element and the first size information of the region to be displayed; the region to be displayed is used for displaying the screenshot of the target topological structure;
and centering the target topological structure in the screenshot frame based on the three-dimensional coordinate information and the second size information of each target topological element to finish the screenshot of the target topological structure.
In one possible design, the determining, based on the three-dimensional coordinate information of each target topological element and the first size information of the region to be displayed, the second size information of the screenshot frame for capturing the target topological structure includes:
converting the three-dimensional coordinate information of each target topological element into two-dimensional coordinate information;
determining third dimension information of the target topological structure based on the two-dimensional coordinate information of each target topological element; wherein the third dimension information includes a maximum lateral dimension and a maximum longitudinal dimension between each of the target topological elements;
and determining second size information of a screenshot frame for intercepting the target topological structure based on the third size information and the first size information of the region to be displayed.
In one possible design, the determining, based on the third size information and the first size information of the region to be displayed, second size information of a screenshot frame for capturing the target topology includes:
and when the maximum transverse dimension does not exceed the transverse dimension of the area to be displayed and the maximum longitudinal dimension does not exceed the longitudinal dimension of the area to be displayed, respectively taking the transverse dimension and the longitudinal dimension of the area to be displayed as the transverse dimension and the longitudinal dimension of the screenshot frame for intercepting the target topological structure.
In one possible design, the centering the target topology structure in the screenshot frame based on the three-dimensional coordinate information of each target topology element and the second size information includes:
determining the center point coordinates of the target topological structure based on the two-dimensional coordinate information of each target topological element, the maximum transverse dimension and the maximum longitudinal dimension;
and centering the target topological structure in the screenshot frame based on the center point coordinates and the transverse dimension and the longitudinal dimension of the screenshot frame.
In one possible design, the determining, based on the third size information and the first size information of the region to be displayed, second size information of a screenshot frame for capturing the target topology includes:
determining the larger ratio of the maximum transverse dimension to the transverse dimension of the area to be displayed and the ratio of the maximum longitudinal dimension to the longitudinal dimension of the area to be displayed as a scaling ratio;
taking the product of the transverse dimension of the region to be displayed and the scaling and the product of the longitudinal dimension of the region to be displayed and the scaling as the transverse dimension and the longitudinal dimension of a screenshot frame for intercepting the target topological structure respectively.
In one possible design, the centering the target topology structure in the screenshot frame based on the three-dimensional coordinate information of each target topology element and the second size information includes:
and centering the target topological structure in the screenshot frame based on the two-dimensional coordinate information of each target topological element, the maximum transverse dimension, the maximum longitudinal dimension, the transverse dimension and the longitudinal dimension of the screenshot frame.
In one possible design, after the determining the target topology from the three-dimensional topology in response to the triggering operation of the user, the method further includes:
hiding topology elements other than the target topology from the three-dimensional topology.
In a second aspect, an embodiment of the present invention further provides a screenshot device of a three-dimensional topology, including:
the determining module is used for responding to the triggering operation of the user and determining a target topological structure from the three-dimensional topological structure; the target topological structure comprises target topological elements and three-dimensional coordinate information of each target topological element, and the target topological elements comprise at least one of topological nodes, text prompts and node frames;
the computing module is used for determining second size information of a screenshot frame for intercepting the target topological structure based on the three-dimensional coordinate information of each target topological element and the first size information of the region to be displayed; the region to be displayed is used for displaying the screenshot of the target topological structure;
and the centering module is used for centering the target topological structure in the screenshot frame based on the three-dimensional coordinate information and the second size information of each target topological element so as to finish the screenshot of the target topological structure.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the method described in any embodiment of the present specification is implemented.
In a fourth aspect, embodiments of the present invention also provide a computer-readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform a method according to any of the embodiments of the present specification.
The embodiment of the invention provides a screenshot method, device, electronic equipment and storage medium of a three-dimensional topological structure, which are characterized in that firstly, all target topological elements in a target topological structure selected by a user from the three-dimensional topological structure are determined, then, based on three-dimensional coordinate information of all target topological elements and first size information of a region to be displayed, second size information of a screenshot frame for intercepting the target topological structure is determined, and finally, based on the three-dimensional coordinate information of all target topological elements and the second size information, centering processing is carried out on the target topological structure in the screenshot frame so as to finish screenshot of the target topological structure, thus, the problem that the size ratio of the screenshot and the region to be displayed is not matched can be solved, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for capturing a three-dimensional topology according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a three-dimensional topology according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method for capturing a three-dimensional topology according to an embodiment of the present invention;
FIG. 4 is a flowchart of a method for capturing a three-dimensional topology according to an embodiment of the present invention;
FIG. 5 is a hardware architecture diagram of an electronic device according to an embodiment of the present invention;
fig. 6 is a diagram illustrating a three-dimensional topology screenshot device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments, and all other embodiments obtained by those skilled in the art without making any inventive effort based on the embodiments of the present invention are within the scope of protection of the present invention.
As described above, in the related art, if a user wants to capture a three-dimensional topological structure, the user usually uses capture software to select the content and the size of the capture for the full-screen capture or manually dragging the capture frame, so that the capture of the target topological structure can be obtained, and the capture is displayed for the user. However, the display area used to display the screenshot is typically sized, which can cause problems with the mismatch in the size ratio of the screenshot to the display area, thereby affecting the user experience.
In order to solve the technical problem, the inventor can consider the problem that the size ratio of the screenshot to the region to be displayed is not matched due to full screen screenshot or manual dragging of the screenshot frame by determining the second size information of the screenshot frame for intercepting the target topological structure based on the three-dimensional coordinate information of each target topological element in the target topological structure selected by the user and the first size information of the region to be displayed and centering the target topological structure in the screenshot frame.
Specific implementations of the above concepts are described below.
Referring to fig. 1, an embodiment of the present invention provides a screenshot method of a three-dimensional topology structure, including:
Step 100: responding to the triggering operation of a user, and determining a target topological structure from the three-dimensional topological structure; the target topological structure comprises target topological elements and three-dimensional coordinate information of each target topological element, and the target topological elements comprise at least one of topological nodes, text prompts and node frames;
step 102: determining second size information of a screenshot frame for intercepting the target topological structure based on the three-dimensional coordinate information of each target topological element and the first size information of the region to be displayed; the region to be displayed is used for displaying the screenshot of the target topological structure;
step 104: and based on the three-dimensional coordinate information and the second size information of each target topological element, centering the target topological structure in the screenshot frame to finish screenshot of the target topological structure.
In the embodiment of the invention, firstly, each target topological element in the target topological structure selected by a user from the three-dimensional topological structure is determined, then, based on the three-dimensional coordinate information of each target topological element and the first size information of the region to be displayed, the second size information of the screenshot frame for intercepting the target topological structure is determined, and finally, based on the three-dimensional coordinate information of each target topological element and the second size information, the centering treatment is carried out on the target topological structure in the screenshot frame so as to finish the screenshot of the target topological structure, thus, the problem that the size ratio of the screenshot to the region to be displayed is not matched can be solved, and the user experience is improved.
The manner in which the individual steps shown in fig. 1 are performed is described below.
For step 100:
the user can use a man-machine interaction mode to click on the target topological elements in sequence by using a mouse to determine the target topological structure, and can select the target topological structure by moving the frame selection area, so the mode of determining the target topological structure by the user is not particularly limited.
For example, as shown in fig. 2, which is a schematic diagram of a three-dimensional topology structure, the diagram includes topology nodes, connection relationships, text prompts, and node frames, and a user can select a desired target topology element to determine a desired target topology structure. Each target topological element has a unique identification ID, and three-dimensional coordinate information of the target topological element can be obtained through the unique identification ID.
It should be noted that, when the user selects two topology nodes and there is a connection relationship between the two topology nodes, the connection relationship is selected by default, and the connection relationship does not need to be selected additionally.
In some embodiments, after step 100, it may further include:
the topology elements other than the target topology are hidden from the three-dimensional topology.
In this embodiment, all topology elements in the three-dimensional topology structure are traversed, in the traversing process, a target topology element determined by a user is identified according to a unique identification ID, so that topology elements except for the target topology element in the target topology structure are hidden, and after the screenshot is completed, the hidden topology elements can be redisplayed according to the identification ID of the hidden topology element. Therefore, the topology elements except the target topology structure are hidden, the screenshot can be more targeted, and the screenshot of the target topology structure is more concise and clear, so that the user experience can be improved.
It should be noted that, since the topology structure includes the topology nodes and the connection relationships between the topology nodes, in the case where only one end of the topology nodes is selected by the user and the other end of the topology nodes is not selected by the user, the connection relationships between the two topology nodes are also hidden.
In addition, the background color and transparency of the three-dimensional topological structure can be set, so that the screenshot of the target topological structure is more attractive, and the user experience is further improved.
In some embodiments, step 102 may include:
converting three-dimensional coordinate information of each target topological element into two-dimensional coordinate information;
determining third dimension information of the target topological structure based on the two-dimensional coordinate information of each target topological element; wherein the third dimension information includes a maximum lateral dimension and a maximum longitudinal dimension between each target topological element;
and determining second size information of a screenshot frame for intercepting the target topological structure based on the third size information and the first size information of the region to be displayed.
In this embodiment, the screenshot viewing angle can be regulated and controlled by using a man-machine interaction mode, and then the three-dimensional coordinate information of each target topological element can be mapped onto the two-dimensional plane of the regulated and controlled screenshot viewing angle, so as to obtain the two-dimensional coordinate information of each target topological element in the screenshot viewing angle. And then comparing the two-dimensional coordinate information of all the target topological elements, and determining the minimum abscissa, the maximum abscissa, the minimum ordinate and the maximum ordinate in the two-dimensional coordinate information of all the target topological elements to obtain the third size information of the target topological structure. And finally, determining second size information of a screenshot frame for intercepting the target topological structure based on the third size information and the first size information of the region to be displayed, so that the problem that the size ratio of the screenshot to the region to be displayed is not matched is solved, and user experience is improved.
In the present embodiment, the maximum lateral dimension and the maximum longitudinal dimension in the third dimension information can be calculated according to the following formulas:
w=max x-min x
h=max y-min y
wherein, min x and max x are respectively the minimum abscissa and the maximum abscissa in the two-dimensional coordinate information of all the target topological elements, min y and max y are the minimum ordinate and the maximum ordinate in the two-dimensional coordinate information of all the target topological elements, w is the maximum transverse dimension between the target topological elements, and h is the maximum longitudinal dimension between the target topological elements.
In the step of determining the second size information of the screenshot frame for intercepting the target topology based on the third size information and the first size information of the region to be displayed, the embodiment of the present invention provides two ways of determining the second size information, and the two ways are described below respectively.
Mode one:
in a first aspect, the determining, based on the third size information and the first size information of the region to be displayed, the second size information of the screenshot frame for capturing the target topology may include:
and when the maximum transverse dimension does not exceed the transverse dimension of the area to be displayed and the maximum longitudinal dimension does not exceed the longitudinal dimension of the area to be displayed, respectively taking the transverse dimension and the longitudinal dimension of the area to be displayed as the transverse dimension and the longitudinal dimension of the screenshot frame for intercepting the target topological structure.
In this embodiment, when the lateral dimension and the longitudinal dimension in the first dimension information of the region to be displayed are respectively greater than or equal to the maximum lateral dimension and the maximum longitudinal dimension in the third dimension information, the lateral dimension and the longitudinal dimension in the first dimension information may be respectively used as the lateral dimension and the longitudinal dimension of the screenshot frame for intercepting the target topological structure, that is, the second dimension information, so as to solve the problem that the size ratio of the screenshot to the region to be displayed is not matched, and improve the user experience.
It should be noted that, when the maximum lateral dimension exceeds the lateral dimension of the area to be displayed and/or the maximum longitudinal dimension exceeds the longitudinal dimension of the area to be displayed, the second size information may be determined in the following manner.
Mode two:
in a second aspect, the determining, based on the third size information and the first size information of the region to be displayed, the second size information of the screenshot frame for capturing the target topology may include:
determining the larger ratio of the maximum transverse dimension to the transverse dimension of the area to be displayed and the ratio of the maximum longitudinal dimension to the longitudinal dimension of the area to be displayed as a scaling ratio;
Taking the product of the transverse dimension of the region to be displayed and the scaling and the product of the longitudinal dimension of the region to be displayed and the scaling as the transverse dimension and the longitudinal dimension of the screenshot frame for intercepting the target topological structure respectively.
In this embodiment, in order to prevent the screenshot from completely intercepting the target topology, the larger ratio of the maximum lateral dimension to the lateral dimension of the region to be displayed and the ratio of the maximum longitudinal dimension to the longitudinal dimension of the region to be displayed is used as the scaling. Then, the product of the transverse dimension of the region to be displayed and the scaling and the product of the longitudinal dimension of the region to be displayed and the scaling are respectively used as the transverse dimension and the longitudinal dimension of the screenshot frame for intercepting the target topological structure, so that the transverse and longitudinal ratios of the screenshot frame for intercepting the target topological structure are ensured to be equal to those of the region to be displayed, namely, the problem that the size ratios of the screenshot and the region to be displayed are not matched is solved, and the user experience can be improved.
For step 104:
for one aspect, step 104 may include:
determining the center point coordinates of the target topological structure based on the two-dimensional coordinate information, the maximum transverse dimension and the maximum longitudinal dimension of each target topological element;
And centering the target topological structure in the screenshot frame based on the center point coordinates and the transverse dimension and the longitudinal dimension of the screenshot frame.
In this embodiment, the center point coordinates may be determined using the following formula:
wherein (X) 0 ,Y 0 ) For the center point coordinates of the target topological structure, max x is the maximum abscissa in the two-dimensional coordinate information of the target topological elements, max y is the maximum ordinate in the two-dimensional coordinate information of the target topological elements, w is the maximum transverse dimension between the target topological elements, and h is the maximum longitudinal dimension between the target topological elements.
The coordinates of the top left corner vertex of the screenshot frame may then be determined using the following formula:
wherein (X, Y) is the top left corner vertex coordinate of the screenshot frame, (X) 0 ,Y 0 ) The imgW and imgH are the lateral and longitudinal dimensions of the screenshot frame, respectively, for the center point coordinates of the target topology.
It should be noted that, in the embodiment of the present invention, the origin of the two-dimensional coordinate system is at the upper left corner, and the coordinate values of the vertical axis downward gradually increase, so (X, Y) is the upper left corner vertex coordinate of the screenshot frame.
In summary, in the first mode, when the maximum lateral dimension does not exceed the lateral dimension of the area to be displayed and the maximum longitudinal dimension does not exceed the longitudinal dimension of the area to be displayed, the lateral dimension and the longitudinal dimension of the area to be displayed can be respectively used as the lateral dimension and the longitudinal dimension of the screenshot frame for intercepting the target topological structure. After the second size information is determined, the coordinates of any one of the four vertexes of the screenshot frame are determined by using the coordinates of the center point of the target topological structure, so that the target topological structure is ensured to be positioned at the center position of the screenshot frame, and after the coordinates of any one vertex are determined, the target topological structure is subjected to screenshot by using the second size information determined in the step 102, so that the screenshot of the target topological structure is completed, the problem that the size ratio of the screenshot to the region to be displayed is not matched is solved, and the user experience is improved.
For mode two, step 104 may include:
and centering the target topological structure in the screenshot frame based on the two-dimensional coordinate information, the maximum transverse dimension, the maximum longitudinal dimension, the transverse dimension and the longitudinal dimension of the screenshot frame of each target topological element.
In this embodiment, the coordinates of the top left corner vertex of the screenshot frame may be determined using the following formula:
wherein (X, Y) is the top left corner vertex coordinate of the screenshot frame, min X is the minimum abscissa in the two-dimensional coordinate information of the target topological elements, min Y is the minimum ordinate in the two-dimensional coordinate information of the target topological elements, w is the maximum transverse dimension between the target topological elements, h is the maximum longitudinal dimension between the target topological elements, and imgW and imgH are the transverse dimension and the longitudinal dimension of the screenshot frame respectively.
It should be noted that, in the embodiment of the present invention, the origin of the two-dimensional coordinate system is at the upper left corner, and the coordinate values of the vertical axis downward gradually increase, so (X, Y) is the upper left corner vertex coordinate of the screenshot frame.
In summary, the second mode may determine a scaling ratio by using the third size information and the first size information of the region to be displayed, and determine the second size information of the screenshot frame for capturing the target topology by using the scaling ratio. After the second size information is determined, the coordinates of any one of the four vertexes of the screenshot frame can be determined to ensure that the target topological structure is located at the center of the screenshot frame, and after the coordinates of any one vertex are determined, the second size information determined in the step 102 is utilized to perform screenshot on the target topological structure so as to complete the screenshot of the target topological structure, so that the problem that the size ratio of the screenshot to the region to be displayed is not matched is solved, and the user experience is improved.
It should be noted that, the screenshot size of the target topology is the second size information, and the second size information may need to be scaled in equal proportion to the first size information of the region to be displayed, but the transverse and longitudinal scales of the second size information are equal to the transverse and longitudinal scales of the region to be displayed, so that the target topology can be ensured not to be deformed even if the scaling is equal.
Fig. 3 shows a flow chart of a screenshot method of a three-dimensional topology according to another embodiment. Referring to fig. 3, the method includes:
step 300: responding to the triggering operation of a user, and determining a target topological structure from the three-dimensional topological structure; the target topological structure comprises target topological elements and three-dimensional coordinate information of each target topological element, and the target topological elements comprise at least one of topological nodes, text prompts and node frames;
step 302: hiding topology elements except for the target topology from the three-dimensional topology;
step 304: converting three-dimensional coordinate information of each target topological element into two-dimensional coordinate information;
step 306: determining third dimension information of the target topological structure based on the two-dimensional coordinate information of each target topological element; wherein the third dimension information includes a maximum lateral dimension and a maximum longitudinal dimension between each target topological element;
Step 308: when the maximum transverse dimension does not exceed the transverse dimension of the region to be displayed and the maximum longitudinal dimension does not exceed the longitudinal dimension of the region to be displayed, respectively taking the transverse dimension and the longitudinal dimension of the region to be displayed as the transverse dimension and the longitudinal dimension of the screenshot frame for intercepting the target topological structure;
step 310: determining the center point coordinates of the target topological structure based on the two-dimensional coordinate information, the maximum transverse dimension and the maximum longitudinal dimension of each target topological element;
step 312: and centering the target topological structure in the screenshot frame based on the center point coordinates and the transverse dimension and the longitudinal dimension of the screenshot frame to finish screenshot of the target topological structure.
Fig. 4 shows a flow chart of a screenshot method of a three-dimensional topology according to yet another embodiment. Referring to fig. 4, the method includes:
step 400: responding to the triggering operation of a user, and determining a target topological structure from the three-dimensional topological structure; the target topological structure comprises target topological elements and three-dimensional coordinate information of each target topological element, and the target topological elements comprise at least one of topological nodes, text prompts and node frames;
step 402: hiding topology elements except for the target topology from the three-dimensional topology;
Step 404: converting three-dimensional coordinate information of each target topological element into two-dimensional coordinate information;
step 406: determining third dimension information of the target topological structure based on the two-dimensional coordinate information of each target topological element; wherein the third dimension information includes a maximum lateral dimension and a maximum longitudinal dimension between each target topological element;
step 408: determining the larger ratio of the maximum transverse dimension to the transverse dimension of the area to be displayed and the ratio of the maximum longitudinal dimension to the longitudinal dimension of the area to be displayed as a scaling ratio;
step 410: taking the product of the transverse dimension of the region to be displayed and the scaling and the product of the longitudinal dimension of the region to be displayed and the scaling as the transverse dimension and the longitudinal dimension of the screenshot frame for intercepting the target topological structure respectively;
step 412: and centering the target topological structure in the screenshot frame based on the two-dimensional coordinate information, the maximum transverse dimension, the maximum longitudinal dimension and the transverse dimension and the longitudinal dimension of the screenshot frame of each target topological element so as to finish screenshot of the target topological structure.
As shown in fig. 5 and 6, the embodiment of the invention provides a screenshot device of a three-dimensional topological structure. The apparatus embodiments may be implemented by software, or may be implemented by hardware or a combination of hardware and software. In terms of hardware, as shown in fig. 6, a hardware architecture diagram of an electronic device where a three-dimensional topological structure of a screenshot device provided by an embodiment of the present invention is located, where the electronic device where the embodiment is located may include other hardware, such as a forwarding chip responsible for processing a message, besides a processor, a memory, a network interface, and a nonvolatile memory shown in fig. 6. For example, as shown in fig. 6, the device in a logic sense is formed by reading a corresponding computer program in a nonvolatile memory into a memory by a CPU of an electronic device where the device is located.
As shown in fig. 6, a screenshot device of a three-dimensional topological structure provided in this embodiment includes:
a determining module 600, configured to determine a target topology structure from the three-dimensional topology structures in response to a triggering operation of a user; the target topological structure comprises target topological elements and three-dimensional coordinate information of each target topological element, and the target topological elements comprise at least one of topological nodes, text prompts and node frames;
the computing module 601 is configured to determine second size information for capturing a screenshot frame of the target topology structure based on the three-dimensional coordinate information of each target topology element and the first size information of the region to be displayed; the region to be displayed is used for displaying the screenshot of the target topological structure;
and the centering module 602 is configured to perform centering processing on the target topology structure in the screenshot frame based on the three-dimensional coordinate information and the second size information of each target topology element, so as to complete screenshot of the target topology structure.
In one embodiment of the present invention, the computing module 601 is configured to perform the following operations:
converting three-dimensional coordinate information of each target topological element into two-dimensional coordinate information;
determining third dimension information of the target topological structure based on the two-dimensional coordinate information of each target topological element; wherein the third dimension information includes a maximum lateral dimension and a maximum longitudinal dimension between each target topological element;
And determining second size information of a screenshot frame for intercepting the target topological structure based on the third size information and the first size information of the region to be displayed.
In one embodiment of the present invention, the calculation module 601 is configured to, when executing the determination of the second size information for capturing the screenshot frames of the target topology based on the third size information and the first size information of the region to be displayed, execute the following operations:
and when the maximum transverse dimension does not exceed the transverse dimension of the area to be displayed and the maximum longitudinal dimension does not exceed the longitudinal dimension of the area to be displayed, respectively taking the transverse dimension and the longitudinal dimension of the area to be displayed as the transverse dimension and the longitudinal dimension of the screenshot frame for intercepting the target topological structure.
In one embodiment of the invention, centering module 602 is configured to perform the following:
determining the center point coordinates of the target topological structure based on the two-dimensional coordinate information, the maximum transverse dimension and the maximum longitudinal dimension of each target topological element;
and centering the target topological structure in the screenshot frame based on the center point coordinates and the transverse dimension and the longitudinal dimension of the screenshot frame.
In one embodiment of the present invention, the calculation module 601 is configured to, when executing the determination of the second size information for capturing the screenshot frames of the target topology based on the third size information and the first size information of the region to be displayed, execute the following operations:
Determining the larger ratio of the maximum transverse dimension to the transverse dimension of the area to be displayed and the ratio of the maximum longitudinal dimension to the longitudinal dimension of the area to be displayed as a scaling ratio;
taking the product of the transverse dimension of the region to be displayed and the scaling and the product of the longitudinal dimension of the region to be displayed and the scaling as the transverse dimension and the longitudinal dimension of the screenshot frame for intercepting the target topological structure respectively.
In one embodiment of the invention, centering module 602 is configured to perform the following:
and centering the target topological structure in the screenshot frame based on the two-dimensional coordinate information, the maximum transverse dimension, the maximum longitudinal dimension, the transverse dimension and the longitudinal dimension of the screenshot frame of each target topological element.
In one embodiment of the present invention, the hiding module 603 is further included for performing the following operations after determining the target topology from the three-dimensional topology in response to the triggering operation of the user:
the topology elements other than the target topology are hidden from the three-dimensional topology.
It will be appreciated that the structure illustrated in the embodiments of the present invention is not limited to a specific configuration of a three-dimensional topological structure of the screenshot device. In other embodiments of the invention, a three-dimensional topological structure of a screenshot device may include more or fewer components than shown, or certain components may be combined, certain components may be split, or different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The content of information interaction and execution process between the modules in the device is based on the same conception as the embodiment of the method of the present invention, and specific content can be referred to the description in the embodiment of the method of the present invention, which is not repeated here.
The embodiment of the invention also provides electronic equipment, which comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the screenshot method of the three-dimensional topological structure in any embodiment of the invention is realized.
The embodiment of the invention also provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program causes the processor to execute the screenshot method of the three-dimensional topological structure in any embodiment of the invention.
Specifically, a system or apparatus provided with a storage medium on which a software program code realizing the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or apparatus may be caused to read out and execute the program code stored in the storage medium.
In this case, the program code itself read from the storage medium may realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code form part of the present invention.
Examples of the storage medium for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be downloaded from a server computer by a communication network.
Further, it should be apparent that the functions of any of the above-described embodiments may be implemented not only by executing the program code read out by the computer, but also by causing an operating system or the like operating on the computer to perform part or all of the actual operations based on the instructions of the program code.
Further, it is understood that the program code read out by the storage medium is written into a memory provided in an expansion board inserted into a computer or into a memory provided in an expansion module connected to the computer, and then a CPU or the like mounted on the expansion board or the expansion module is caused to perform part and all of actual operations based on instructions of the program code, thereby realizing the functions of any of the above embodiments.
In summary, the invention provides a screenshot method, a screenshot device, an electronic device and a storage medium of a three-dimensional topological structure, and the method has at least the following beneficial effects:
1. In one embodiment of the invention, firstly, each target topological element in a target topological structure selected by a user from a three-dimensional topological structure is determined, then, based on three-dimensional coordinate information of each target topological element and first size information of a region to be displayed, second size information of a screenshot frame for intercepting the target topological structure is determined, and finally, based on the three-dimensional coordinate information of each target topological element and the second size information, centering processing is carried out on the target topological structure in the screenshot frame so as to finish screenshot of the target topological structure, thus, the problem that the size ratio of the screenshot to the region to be displayed is not matched can be solved, and the user experience is improved.
2. In one embodiment of the invention, all topology elements in the three-dimensional topology structure can be traversed, in the traversing process, the target topology elements determined by the user are identified according to the unique identification IDs, so that the topology elements except the target topology elements in the target topology structure are hidden, and after the screenshot is completed, the hidden topology elements can be redisplayed according to the identification IDs of the hidden topology elements. Therefore, the topology elements except the target topology structure are hidden, so that the screenshot of the target topology structure is more concise and clear, and the user experience can be improved.
3. In one embodiment of the invention, the screenshot viewing angle can be regulated in a man-machine interaction mode, and then the three-dimensional coordinate information of each target topological element can be mapped onto the two-dimensional plane of the regulated screenshot viewing angle to obtain the two-dimensional coordinate information of each target topological element in the screenshot viewing angle. And then comparing the two-dimensional coordinate information of all the target topological elements, and determining the minimum abscissa, the maximum abscissa, the minimum ordinate and the maximum ordinate in the two-dimensional coordinate information of all the target topological elements to obtain the third size information of the target topological structure. And finally, determining second size information of a screenshot frame for intercepting the target topological structure based on the third size information and the first size information of the region to be displayed, so that the problem that the size ratio of the screenshot to the region to be displayed is not matched is solved, and user experience is improved.
4. In one embodiment of the present invention, when the maximum lateral dimension does not exceed the lateral dimension of the region to be displayed and the maximum longitudinal dimension does not exceed the longitudinal dimension of the region to be displayed, the lateral dimension and the longitudinal dimension of the region to be displayed may be respectively used as the lateral dimension and the longitudinal dimension of the screenshot frame for intercepting the target topology. After the second size information is determined, the coordinates of any one of the four vertexes of the screenshot frame are determined by using the coordinates of the center point of the target topological structure, so that the target topological structure is ensured to be positioned at the center position of the screenshot frame, and after the coordinates of any one vertex are determined, the target topological structure is subjected to screenshot by using the second size information determined in the step 102, so that the screenshot of the target topological structure is completed, the problem that the size ratio of the screenshot to the region to be displayed is not matched is solved, and the user experience is improved.
5. In one embodiment of the present invention, the third size information and the first size information of the region to be displayed may be used to determine a scaling, and the scaling may be used to determine the second size information of the screenshot frame for intercepting the target topology. After the second size information is determined, the coordinates of any one of the four vertexes of the screenshot frame can be determined to ensure that the target topological structure is located at the center of the screenshot frame, and after the coordinates of any one vertex are determined, the second size information determined in the step 102 is utilized to perform screenshot on the target topological structure so as to complete the screenshot of the target topological structure, so that the problem that the size ratio of the screenshot to the region to be displayed is not matched is solved, and the user experience is improved.
It is noted that relational terms such as first and second, and the like, are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one …" does not exclude the presence of additional identical elements in a process, method, article or apparatus that comprises the element.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A method for capturing a three-dimensional topological structure, comprising:
responding to the triggering operation of a user, and determining a target topological structure from the three-dimensional topological structure; the target topological structure comprises target topological elements and three-dimensional coordinate information of each target topological element, and the target topological elements comprise at least one of topological nodes, text prompts and node frames;
determining second size information of a screenshot frame for intercepting the target topological structure based on the three-dimensional coordinate information of each target topological element and the first size information of the region to be displayed; the region to be displayed is used for displaying the screenshot of the target topological structure;
Centering the target topological structure in the screenshot frame based on the three-dimensional coordinate information and the second size information of each target topological element to finish screenshot of the target topological structure;
the determining, based on the three-dimensional coordinate information of each target topological element and the first size information of the region to be displayed, second size information of a screenshot frame for capturing the target topological structure includes:
converting the three-dimensional coordinate information of each target topological element into two-dimensional coordinate information;
determining third dimension information of the target topological structure based on the two-dimensional coordinate information of each target topological element; wherein the third dimension information includes a maximum lateral dimension and a maximum longitudinal dimension between each of the target topological elements;
and determining second size information of a screenshot frame for intercepting the target topological structure based on the third size information and the first size information of the region to be displayed.
2. The method of claim 1, wherein determining second size information for capturing a screenshot frame of the target topology based on the third size information and the first size information of the region to be displayed comprises:
And when the maximum transverse dimension does not exceed the transverse dimension of the area to be displayed and the maximum longitudinal dimension does not exceed the longitudinal dimension of the area to be displayed, respectively taking the transverse dimension and the longitudinal dimension of the area to be displayed as the transverse dimension and the longitudinal dimension of the screenshot frame for intercepting the target topological structure.
3. The method according to claim 2, wherein the centering the target topology in the screenshot frame based on the three-dimensional coordinate information of each of the target topology elements and the second size information includes:
determining the center point coordinates of the target topological structure based on the two-dimensional coordinate information of each target topological element, the maximum transverse dimension and the maximum longitudinal dimension;
and centering the target topological structure in the screenshot frame based on the center point coordinates and the transverse dimension and the longitudinal dimension of the screenshot frame.
4. The method of claim 1, wherein determining second size information for capturing a screenshot frame of the target topology based on the third size information and the first size information of the region to be displayed comprises:
Determining the larger ratio of the maximum transverse dimension to the transverse dimension of the area to be displayed and the ratio of the maximum longitudinal dimension to the longitudinal dimension of the area to be displayed as a scaling ratio;
taking the product of the transverse dimension of the region to be displayed and the scaling and the product of the longitudinal dimension of the region to be displayed and the scaling as the transverse dimension and the longitudinal dimension of a screenshot frame for intercepting the target topological structure respectively.
5. The method of claim 4, wherein centering the target topology in the screenshot frame based on the three-dimensional coordinate information of each of the target topology elements and the second size information, comprises:
and centering the target topological structure in the screenshot frame based on the two-dimensional coordinate information of each target topological element, the maximum transverse dimension, the maximum longitudinal dimension, the transverse dimension and the longitudinal dimension of the screenshot frame.
6. The method according to any one of claims 1-5, further comprising, after said determining a target topology from the three-dimensional topology in response to a user's triggering operation:
Hiding topology elements other than the target topology from the three-dimensional topology.
7. A screenshot device of a three-dimensional topology, comprising:
the determining module is used for responding to the triggering operation of the user and determining a target topological structure from the three-dimensional topological structure; the target topological structure comprises target topological elements and three-dimensional coordinate information of each target topological element, and the target topological elements comprise at least one of topological nodes, text prompts and node frames;
the computing module is used for determining second size information of a screenshot frame for intercepting the target topological structure based on the three-dimensional coordinate information of each target topological element and the first size information of the region to be displayed; the region to be displayed is used for displaying the screenshot of the target topological structure;
the centering module is used for centering the target topological structure in the screenshot frame based on the three-dimensional coordinate information and the second size information of each target topological element so as to finish screenshot of the target topological structure;
the computing module is used for executing the following operations:
converting three-dimensional coordinate information of each target topological element into two-dimensional coordinate information;
Determining third dimension information of the target topological structure based on the two-dimensional coordinate information of each target topological element; wherein the third dimension information includes a maximum lateral dimension and a maximum longitudinal dimension between each target topological element;
and determining second size information of a screenshot frame for intercepting the target topological structure based on the third size information and the first size information of the region to be displayed.
8. An electronic device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the method of any of claims 1-6 when the computer program is executed.
9. A computer readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of any of claims 1-6.
CN202210543969.8A 2022-05-19 2022-05-19 Screenshot method and device of three-dimensional topological structure, electronic equipment and storage medium Active CN114924822B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210543969.8A CN114924822B (en) 2022-05-19 2022-05-19 Screenshot method and device of three-dimensional topological structure, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210543969.8A CN114924822B (en) 2022-05-19 2022-05-19 Screenshot method and device of three-dimensional topological structure, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114924822A CN114924822A (en) 2022-08-19
CN114924822B true CN114924822B (en) 2023-09-05

Family

ID=82808529

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210543969.8A Active CN114924822B (en) 2022-05-19 2022-05-19 Screenshot method and device of three-dimensional topological structure, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114924822B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115955552B (en) * 2023-03-15 2023-06-02 国网吉林省电力有限公司信息通信公司 Security monitoring system based on 5G wireless communication network

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003296285A (en) * 2002-03-29 2003-10-17 Casio Comput Co Ltd Electronic equipment with graph display function, program, and graph display method
CN102904751A (en) * 2012-09-25 2013-01-30 华为软件技术有限公司 Network topology view generating method and device
CN104297789A (en) * 2014-10-23 2015-01-21 中国科学院地质与地球物理研究所 Three-dimensional dip angle domain stationary phase pre-stack time migration method and system
JP2015143625A (en) * 2014-01-31 2015-08-06 学校法人同志社 Topological data formulating method, data logger, and surveying system
CN106780735A (en) * 2016-12-29 2017-05-31 深圳先进技术研究院 A kind of semantic map constructing method, device and a kind of robot
CN106940878A (en) * 2017-02-27 2017-07-11 深圳华盛昌机械实业有限公司 A kind of display methods and device
CN109728934A (en) * 2018-12-03 2019-05-07 清华大学 Cyberspace cartographic model creation method and device
CN110929201A (en) * 2018-09-20 2020-03-27 中国科学院信息工程研究所 Complex network topology editing and visualization system based on Web
CN113836337A (en) * 2021-09-27 2021-12-24 福建汇川物联网技术科技股份有限公司 BIM display method, device, equipment and storage medium
CN114067231A (en) * 2022-01-14 2022-02-18 成都飞机工业(集团)有限责任公司 Part machining feature identification method based on machine vision learning identification

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003296285A (en) * 2002-03-29 2003-10-17 Casio Comput Co Ltd Electronic equipment with graph display function, program, and graph display method
CN102904751A (en) * 2012-09-25 2013-01-30 华为软件技术有限公司 Network topology view generating method and device
JP2015143625A (en) * 2014-01-31 2015-08-06 学校法人同志社 Topological data formulating method, data logger, and surveying system
CN104297789A (en) * 2014-10-23 2015-01-21 中国科学院地质与地球物理研究所 Three-dimensional dip angle domain stationary phase pre-stack time migration method and system
CN106780735A (en) * 2016-12-29 2017-05-31 深圳先进技术研究院 A kind of semantic map constructing method, device and a kind of robot
CN106940878A (en) * 2017-02-27 2017-07-11 深圳华盛昌机械实业有限公司 A kind of display methods and device
CN110929201A (en) * 2018-09-20 2020-03-27 中国科学院信息工程研究所 Complex network topology editing and visualization system based on Web
CN109728934A (en) * 2018-12-03 2019-05-07 清华大学 Cyberspace cartographic model creation method and device
CN113836337A (en) * 2021-09-27 2021-12-24 福建汇川物联网技术科技股份有限公司 BIM display method, device, equipment and storage medium
CN114067231A (en) * 2022-01-14 2022-02-18 成都飞机工业(集团)有限责任公司 Part machining feature identification method based on machine vision learning identification

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种基于可视外壳方法的实时三维重建系统;汤孝川;《中国优秀硕士学位论文全文数据库信息科技辑》(第05期);I138-1072 *

Also Published As

Publication number Publication date
CN114924822A (en) 2022-08-19

Similar Documents

Publication Publication Date Title
US20200363946A1 (en) Systems and methods for interactive image caricaturing by an electronic device
CN109753641B (en) Method and device for changing object position, electronic equipment and storage medium
JP2009508256A (en) Extensible visualizations to active content in the user interface
US9996516B2 (en) Image processing device for determining a display position of an annotation
CN113657396B (en) Training method, translation display method, device, electronic equipment and storage medium
CN113657518B (en) Training method, target image detection method, device, electronic device, and medium
WO2022252675A1 (en) Road annotation generation method and apparatus, and device and storage medium
CN109324796A (en) Quick interface arrangement method and device
CN113378958A (en) Automatic labeling method, device, equipment, storage medium and computer program product
CN114924822B (en) Screenshot method and device of three-dimensional topological structure, electronic equipment and storage medium
US10403040B2 (en) Vector graphics rendering techniques
CN113837194B (en) Image processing method, image processing apparatus, electronic device, and storage medium
CN113986426B (en) Image detection method and device, readable medium and electronic equipment
CN115578486A (en) Image generation method and device, electronic equipment and storage medium
CN113538623A (en) Method and device for determining target image, electronic equipment and storage medium
CN116259064B (en) Table structure identification method, training method and training device for table structure identification model
AU2017279613A1 (en) Method, system and apparatus for processing a page of a document
CN110825989B (en) Picture display method and device, electronic equipment and readable medium
US20170017370A1 (en) Device and method for processing data
CN112465692A (en) Image processing method, device, equipment and storage medium
US20160110895A1 (en) Generating a computer executable chart visualization by annotating a static image
WO2023005104A1 (en) Multi-view display method and apparatus, and device and medium
CN112559340A (en) Picture testing method, device, equipment and storage medium
JP2017117340A (en) Character attribute estimation device and character attribute estimation program
CN113392811B (en) Table extraction method and device, electronic equipment and storage medium

Legal Events

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