Large-scale vector data processing method, system, electronic device and storage medium
By grouping and rendering vector data in vector space and setting standard vectors to determine the recognition distance, the problem of slow display speed of large-scale vector data is solved, fast display and interactive recognition are achieved, and the operation efficiency of vector files is improved.
Patent Information
- Application Number
- CN202411766497.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-04
AI Technical Summary
In the Dwg file format, the large amount of vector data leads to slow display speed, reduced frame rate, difficult graphics interaction, and may even lead to display crashes and the inability to interactively recognize affects subsequent applications.
By obtaining vector data in the vector space, grouping multiple vector sets according to vector attributes, rendering these sets in turn, making the vector data displayed on the projected cross-section, and setting a standard vector to determine the recognition distance, identifying and summarizing the attributes of the target vector.
It realizes the rapid display of large-scale two-dimensional vector data, and supports interactive recognition of these data, reducing the burden of rendering, improving efficiency, and facilitating users to view and operate vector files.
Smart Images

Figure CN119227432B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to but is not limited to the field of vector data processing technology, and in particular to a large-scale vector data processing method, system, electronic device and storage medium. Background Art
[0002] The Dwg file format is a universal vector graphics data, which is widely used in various professional fields. When performing forward design in the BIM building software system, the vector two-dimensional data in the Dwg file must be imported and displayed, and after display, it is necessary to identify the displayed vector data and obtain the geometric information of the vector data.
[0003] Since the Dwg file format contains a large amount of data, there may be tens of thousands to hundreds of thousands of line segments after vectorization and conversion to displayable objects. If the display speed of these data is very slow, it will lead to a decrease in frame rate, difficulty in interactive viewing of graphics, and even display crash. At the same time, if it is only read-only and cannot be interactively recognized, it will affect further extraction applications based on vector data. Therefore, how to quickly display large-scale two-dimensional vector data and support the recognition of these two-dimensional vector data has become an important research topic in the industry. Summary of the invention
[0004] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0005] The embodiments of the present application provide a large-scale vector data processing method, system, electronic device and storage medium, which can quickly count the data that the user intends to obtain, making it convenient for the user to view and operate the vector file.
[0006] To achieve the above-mentioned purpose, the first aspect of an embodiment of the present application proposes a large-scale vector data processing method, including: acquiring vector data in a vector space, grouping the vector data according to the vector attributes of each vector data, and determining multiple vector sets; rendering each vector set in turn to display the vector data on a projection section; setting a standard vector within the field of view of the vector space where the projection section is located, and determining an identification distance between each vector data intersecting with the field of view and the standard vector; determining a target vector in the vector data according to the identification distance, identifying the target vector, and summarizing and collecting the vector attributes of the target vector.
[0007] In some embodiments, the setting of a standard vector in the vector space and determining the identification distance between each of the vector data and the standard vector include: obtaining the coordinates of a first point and a second point on the standard vector, as well as the coordinates of a third point and a fourth point of one of the vector data; determining a first direction vector of the standard vector according to the coordinates of the first point and the second point, determining a second direction vector of the vector data according to the coordinates of the third point and the fourth point, obtaining a third direction vector in which one point on the standard vector points to one point on the vector data, or one point on the vector data points to one point on the standard vector; determining the identification distance between the standard vector and the vector data according to the first direction vector, the second direction vector and the third direction vector, wherein the formula for determining the identification distance is:
[0008] ;
[0009] Wherein, d represents the identification distance, represents the first direction vector, represents the second direction vector, represents the third direction vector.
[0010] In some embodiments, before rendering each of the vector sets in sequence, it includes: determining the position of the viewpoint in the vector space, determining a first projection matrix according to the relative position of the viewpoint and the vector space, and determining a second projection matrix according to the field of view of the projection section; and transforming the original coordinates of the vector data by the first projection matrix and the second projection matrix in sequence.
[0011] In some embodiments, before rendering each of the vector sets in sequence, it also includes: determining a spatial coordinate system in the vector space, obtaining the coordinates of the viewpoint in the spatial coordinate system and the field of view direction, and determining the field of view coordinate system based on the coordinates of the viewpoint in the spatial coordinate system and the field of view direction; converting the vector data from the spatial coordinate system to the field of view coordinate system.
[0012] In some embodiments, after converting the vector data from the spatial coordinate system to the field of view coordinate system, it also includes: determining the plane where the far section is located in the field of view coordinate system according to the coordinates of the viewpoint and the viewing distance, the direction of the viewpoint is perpendicular to the far section, and the first observation distance between the viewpoint and the plane where the far section is located is equal to the maximum viewing distance; obtaining the field of view opening of the viewpoint in the three axis directions of the field of view coordinate system, and delineating the far section on the plane where the far section is located according to the field of view opening; obtaining the field of view depth of the viewpoint, determining a near section between the viewpoint and the far section according to the field of view depth, the field of view depth being equal to the second observation distance between the far section and the near section; determining a projection section between the far section and the near section, and projecting the vector data within the field of view onto the projection section.
[0013] In some embodiments, determining a projection section between the far section and the near section, and projecting the vector data within the field of view onto the projection section, includes: determining a closed field of view cube surrounded by the far section and the near section, the field of view cube consisting of the far section, the near section, and a reference surface, wherein the reference surface consists of a surface formed by any edge on the far section and the corresponding edge on the near section; projecting the portion of the vector data located within the field of view cube onto the projection section.
[0014] In some embodiments, the vector attributes include the vector color of the vector data, each of the vectors in the vector set has the same color, and rendering each of the vector sets in sequence includes: creating a corresponding rendering task for each of the vector sets, and executing each of the rendering tasks in sequence to centrally render each of the corresponding vector sets in sequence.
[0015] To achieve the above-mentioned purpose, the second aspect of the present application proposes a large-scale vector data processing system, including: an acquisition module, used to acquire vector data in a vector space, group the vector data according to the vector attributes of each vector data, and determine multiple vector sets; a rendering module, used to render each vector set in turn so that the vector data can be displayed on a projection section; a measurement module, used to set a standard vector within the field of view of the vector space where the projection section is located, and determine the identification distance between each vector data intersecting with the field of view and the standard vector; a collection module, used to determine a target vector in the vector data according to the identification distance, identify the target vector, and summarize and collect the vector attributes of the target vector.
[0016] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the large-scale vector data processing method described in the first aspect when executing the computer program.
[0017] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium, and the storage medium stores a computer program. When the computer program is executed by a processor, it implements the large-scale vector data processing method described in the first aspect above.
[0018] The embodiments of the present application include at least the following beneficial effects: in a vector file, vector data has different vector attributes such as color, material, transparency, etc. In the process of mapping vector data from a vector space to a two-dimensional plane, the system continuously adjusts the rendering components according to the vector attributes in the vector data, thereby rendering the vector data in sequence; by sequentially acquiring the vector attributes of each vector data in the vector space, determining one of the vector attributes, and grouping the vector data according to one type of vector attribute, the vector data is divided into multiple vector sets, and in each vector set, one type of vector attribute in the vector data is exactly the same, therefore, When rendering one of the vector sets through the rendering component, some parameters in the rendering component can be fixed, thereby reducing the frequency of adjusting the rendering component, alleviating the rendering burden of the system, and improving rendering efficiency; after rendering the vector data onto a two-dimensional plane, the user sets a standard vector within the field of view of the projection section in the vector space according to his or her own needs, and obtains the identification distance between each vector data and the standard vector, determines the target vector in the vector data based on the identification distance, and collects the vector attributes of the target vector, so that the data that the user intends to obtain can be quickly counted, which facilitates the user's review and operation of the vector file.
[0019] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0021] Figure 1An optional flow chart of a large-scale vector data processing method provided in an embodiment of the present application;
[0022] Figure 2 An optional flowchart of vector projection and rendering provided in an embodiment of the present application;
[0023] Figure 3 An optional flow chart of vector data collection provided in an embodiment of the present application;
[0024] Figure 4 An optional schematic diagram of vector data grouping provided in an embodiment of the present application;
[0025] Figure 5 An optional schematic diagram of defining a first radius according to a standard vector provided in an embodiment of the present application;
[0026] Figure 6 An optional schematic diagram of defining a second radius according to a standard vector provided in an embodiment of the present application;
[0027] Figure 7 An optional structural diagram of a large-scale vector data processing system provided in this embodiment;
[0028] Figure 8 A schematic diagram of an optional hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0030] In the description of this application, “several” means one or more, “more” means more than two, “greater than”, “less than”, “exceed”, etc. are understood to exclude the number, and “above”, “below”, “within”, etc. are understood to include the number.
[0031] It should be noted that, although the functional modules are divided in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first", "second", etc. in the specification, claims or the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0032] In the related technology, since the Dwg file format contains a large amount of data, there may be tens of thousands to hundreds of thousands of line segments after vectorization conversion to displayable objects. If the display speed of these data is very slow, it will lead to a decrease in frame rate, difficulty in interactive viewing of graphics, and even display crash. At the same time, if it is only read-only and cannot be interactively recognized, it will affect further extraction applications based on vector data. Therefore, how to quickly display large-scale two-dimensional vector data and support the recognition of these two-dimensional vector data has become an important research topic in the industry.
[0033] Based on this, the embodiments of the present application provide a large-scale vector data processing method, system, electronic device and storage medium, which can quickly count the data that the user intends to obtain, making it convenient for the user to review and operate the vector files.
[0034] The large-scale vector data processing method, system, electronic device and storage medium provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the large-scale vector data processing method in the embodiments of the present application is described.
[0035] The large-scale vector data processing method provided in the embodiment of the present application relates to the field of computer technology. The large-scale vector data processing method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements a large-scale vector data processing method, etc., but is not limited to the above forms.
[0036] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0037] The embodiments of the present application are further described below in conjunction with the accompanying drawings.
[0038] like Figure 1 As shown, Figure 1 An optional flow chart of a large-scale vector data processing method provided in an embodiment of the present application, the large-scale vector data processing method can be executed by a server, or can also be executed by a terminal, or can also be executed by a server in conjunction with a terminal, the large-scale vector data processing method includes but is not limited to the following steps S110 to S140:
[0039] Step S110, obtaining vector data in the vector space, grouping the vector data according to vector attributes of each vector data, and determining a plurality of vector sets;
[0040] Step S120, rendering each vector set in turn, so that the vector data is displayed on the projection section;
[0041] Step S130, setting a standard vector within the field of view of the projection cross section in the vector space, and determining an identification distance between each vector data intersecting the field of view and the standard vector;
[0042] Step S140 , determining a target vector in the vector data according to the identification distance, identifying the target vector, and summarizing and collecting vector attributes of the target vector.
[0043] Based on this, in the vector file, the vector data has different vector attributes such as color, material, transparency, etc. In the process of mapping the vector data from the vector space to the two-dimensional plane, the system continuously adjusts the rendering components according to the vector attributes in the vector data, so as to render the vector data in turn; by sequentially obtaining the vector attributes of each vector data in the vector space, determining one of the vector attributes, and grouping the vector data according to one of the vector attributes, the vector data is divided into multiple vector sets. In each vector set, one of the vector attributes in the vector data is exactly the same. Therefore, when rendering one of the vector sets through the rendering component, some parameters in the rendering component can be fixed, thereby reducing the frequency of adjusting the rendering component, reducing the rendering burden of the system, and improving the rendering efficiency; after rendering the vector data to the two-dimensional plane, the user sets the standard vector within the field of view of the projection section in the vector space according to his own needs, and obtains the recognition distance between each vector data and the standard vector. When the recognition distance is less than the distance threshold, the vector attributes of the corresponding vector data are collected, so that the data that the user intends to obtain can be quickly counted, which is convenient for the user to consult and operate the vector file.
[0044] In graphics programming, a rendering request usually refers to an operation that tells the graphics processing unit (GPU) to draw certain graphics. This can be achieved by calling functions such as glDrawArrays or glDrawElements in the OpenGL (Open Graphics Library) interface. The cost of submitting a rendering request is relatively low. During this process, the GPU mainly draws according to the already set rendering state and the incoming data. Before rendering, graphics data such as vertex data and texture data need to be transferred to the GPU. This process involves data transmission between the CPU and the GPU, which is relatively costly. A large amount of graphics data may occupy valuable GPU memory. Improper management may cause insufficient memory or frequent memory swapping, affecting performance. Rendering states include texture binding, shader programs, blending modes, depth testing, etc. Each change in these states may require the GPU to update the internal state, which will bring additional overhead. Frequent state changes may cause context switching between the GPU and the CPU, which will introduce delays and affect rendering efficiency. Therefore, by reducing the number of rendering requests between the GPU and the CPU and merging multiple rendering requests into one batch, the number of data transmissions and state changes can be reduced, thereby optimizing rendering performance. Also, by minimizing changes in rendering states, the occupancy of the communication channel between the GPU and the CPU can be reduced, for example, by pre-setting all required states and then keeping them unchanged in a larger rendering batch. Through these strategies, rendering efficiency can be significantly improved, latency can be reduced, and user experience can be enhanced.
[0045] By obtaining a specific vector attribute of the vector data, such as color, material, transparency, etc., the quantity data is grouped according to the vector attribute to determine multiple vector sets. In the vector sets, a certain vector attribute of the vector data is exactly the same. At this time, for each vector set with the same specific vector attribute, a corresponding rendering task is created. In each rendering task, the rendering state corresponding to the same vector attribute is fixed. Since the frequency of changing the rendering state is reduced, the amount of data transmission related to the state change is also reduced. Therefore, the CPU does not need to frequently send new rendering state data to the GPU, thereby reducing the pressure on the memory bandwidth and significantly reducing the communication requests generated by the state change between the GPU and the CPU. For example, if all vectors of a vector set are the same color, then this color state remains unchanged during the rendering process of the entire set, avoiding the overhead of frequently changing the color state during the rendering process.
[0046] like Figure 4As shown, according to the vector colors in the vector data, assuming that the vector colors in the vector data include (R1, G1, B1), (R2, G2, B2) and (R3, G3, B3), the vector data is divided into three vector sets according to the vector colors, and a rendering task is created for each vector set. In one of the rendering tasks, the parameters for the color in the rendering component are fixed, and the corresponding vector set is rendered centrally, thereby reducing the frequency of adjusting the rendering component when rendering vector data of different colors. In the process of rendering the entire vector file in this instance, the parameters for the color in the rendering component only need to be set three times, thereby improving the rendering efficiency.
[0047] In the BIM building model, vector data is mainly distinguished by vector color, such as integrated components such as water supply and drainage systems, HVAC systems, electrical systems, or structural components and building components such as structural columns, beams, walls, pipes, cables, etc.; the color information of each vector data is extracted, and the vector data is assigned to different sets according to the vector color. Each vector set contains all vector elements with the same color attributes; after determining multiple vector sets with the same color, the rendering engine creates a dedicated rendering task for each vector set. These tasks are designed to process the rendering of all vector elements in the vector set at one time. Since the vector color of all vector data in the set is the same, the rendering task can pre-set the corresponding color state and keep this state unchanged during the rendering process of the entire set, thereby avoiding frequent changes in color settings during the rendering process, thereby reducing the communication requests generated by state changes between the GPU and the CPU; in this way, the rendering engine can use GPU resources more efficiently, because the number of state changes is reduced, and the GPU can focus more on performing actual rendering calculations instead of frequently processing state changes. This optimization not only improves rendering speed, but also reduces the computational overhead during the rendering process, especially when dealing with large-scale BIM building models. In addition, fixed rendering states also help reduce delays and freezes during the rendering process, allowing users to view and analyze BIM building models more quickly, and achieve more efficient workflows whether in design review, construction coordination or facility management.
[0048] In addition, refer to Figure 2 As shown, one embodiment of the present application, Figure 1 Step S130 in the embodiment includes but is not limited to the following steps S210 to S220:
[0049] Step S210, determining a spatial coordinate system in the vector space, obtaining the coordinates of the viewpoint in the spatial coordinate system and the field of view direction, and determining the field of view coordinate system according to the coordinates of the viewpoint in the spatial coordinate system and the field of view direction;
[0050] Step S220, converting the vector data from the spatial coordinate system to the field of view coordinate system.
[0051] Specifically, each vector in a 3D scene or the shapes it is made of is drawn in its own coordinate system, called model space. When the system assembles and draws objects, we need to transform the vectors in model space from their local space to the world space common to all objects, called the world transformation. The world transformation consists of a series of scaling (scaling the object to match the dimensions of the world), rotation (aligning the axes), and translation (moving the origin). Vector space has its own spatial coordinate system, and rotation and scaling belong to a class of transformations called linear transformations (by definition, linear transformations preserve vector addition and scalar multiplication). Linear transformations and translations form what is called an affine transformation, under which straight lines remain straight lines and the ratio of distances between points remains unchanged.
[0052] In OpenGL, with default parameters, the perspective camera is located at the origin (0,0,0), pointed at the screen (negative z-axis), and facing upwards (positive y-axis). If you use the default parameters, you must place the vector at a negative z value. In computer graphics, moving a vector relative to a fixed camera and moving the camera relative to a fixed vector produce the same image and are therefore equivalent. Therefore, the OpenGL interface manages modeling and viewing transformations in the same way on the so-called model-view matrix, and projection transformations are managed through the projection matrix.
[0053] When a vector file is opened, a viewpoint is determined at a certain point in the vector space. A perspective camera is placed on the viewpoint. The perspective camera can be understood as a two-dimensional screen observed by the user. The viewpoint is the center point on the perspective camera. The field of view of the viewpoint is the direction of the perspective camera. The image information observed by the user on the two-dimensional screen can be understood as the image obtained by shooting with the perspective camera in the field of view direction.
[0054] In the initial state, the vector data determines its own position and coordinates with the spatial coordinate system in the vector space. In the vector space, a new field of view coordinate system is determined with the viewpoint as the origin, and the model coordinates in the world space are converted to the field of view coordinate system determined by the viewpoint.
[0055] In the field of view coordinate system, the plane where the far section is located is determined according to the coordinates of the viewpoint and the viewing distance. The direction of the viewpoint is perpendicular to the far section, and the identification distance between the viewpoint and the plane where the far section is located is equal to the maximum viewing distance; the field of view opening of the viewpoint in the three axis directions of the field of view coordinate system is obtained, and the far section is delineated on the plane where the far section is located according to the field of view opening; the field of view depth of the viewpoint is obtained, and the near section is determined between the viewpoint and the far section according to the field of view depth, and the field of view depth is equal to the identification distance between the far section and the near section, thereby determining the position and size of the field of view range.
[0056] The viewing cone refers to the visible range of the camera in the scene. A virtual cone can be used to wrap the entire visible range, and objects outside the viewing cone cannot be seen by the camera, so they can be culled. The viewing cone consists of six faces, including the reference faces of the upper and lower planes and the left and right planes, as well as the near section and the far section.
[0057] Taking the position of the perspective camera as the vertex, the field of view is extended, and the viewpoint coordinates are one of the vertices. The angles between the upper and lower planes and the left and right planes on the vertex are limited, the field of view is limited, the nearest point and the farthest point of the field of view are determined, and the near section and the far section are obtained. The field of view defined by the viewing cone determines the vector or part of it to be displayed on the two-dimensional screen in the vector space. The system obtains the projection matrix that projects the vector data onto the projection section through the OpenGL interface. Generally speaking, the projection section is on the near section. The system projects the vector data or part of it within the field of view onto the projection section through the projection matrix, thereby obtaining an image displayed on the two-dimensional screen.
[0058] In addition, refer to Figure 3 As shown, one embodiment of the present application, Figure 1 Step S130 in the embodiment includes but is not limited to the following steps S310 to S320:
[0059] Step S310, obtaining the coordinates of a first point and a second point on the standard vector, and the coordinates of a third point and a fourth point of one of the vector data;
[0060] Step S320, determining a first direction vector of the standard vector according to the coordinates of the first point and the second point, determining a second direction vector of the vector data according to the coordinates of the third point and the fourth point, and obtaining a third direction vector in which one point on the standard vector points to one point on the vector data, or one point on the vector data points to one point on the standard vector;
[0061] Step S330, determining the identification distance between the standard vector and the vector data according to the first direction vector, the second direction vector and the third direction vector, the identification distance is determined by the formula: , where d represents the recognition distance, represents the first direction vector, represents the second direction vector, represents the third direction vector, a×b represents the outer product between vectors a and b, and a·b represents the inner product between vectors a and b.
[0062] Specifically, the third direction vector can be a vector formed by any point on the standard vector pointing to any point on the vector data, or any point on the vector data pointing to any point on the standard vector. In particular, the third direction vector can be any vector formed by the coordinate corresponding point of the first point pointing to the coordinate corresponding point of the third point, the coordinate corresponding point of the first point pointing to the coordinate corresponding point of the fourth point, the coordinate corresponding point of the second point pointing to the coordinate corresponding point of the third point, the coordinate corresponding point of the second point pointing to the coordinate corresponding point of the fourth point, the coordinate corresponding point of the third point pointing to the coordinate corresponding point of the first point, the coordinate corresponding point of the third point pointing to the coordinate corresponding point of the second point, or the coordinate corresponding point of the fourth point pointing to the coordinate corresponding point of the first point, and the coordinate corresponding point of the fourth point pointing to the coordinate corresponding point of the second point.
[0063] Specifically, in the vector space, the plane where the two-dimensional screen is located is parallel to both the near section and the far section. The system obtains the current position of the user's mouse on the two-dimensional screen, and determines a standard vector perpendicular to the two-dimensional screen, the near section and the far section based on the coordinates of the position. One end of the standard vector is connected to the near section, and the other end of the standard vector is connected to the far section. At this time, the coordinates of the point where the standard vector is connected to the near section can be used as the first point coordinates, and the coordinates of the point where the standard vector is connected to the far section can be used as the second point coordinates; the vector data on the vector space is searched in sequence, and the coordinates of the third point and the fourth point are randomly obtained on the vector data. The recognition distance between the standard vector and the vector data is obtained by a geometric formula. When the recognition distance is less than a preset distance threshold, the vector attributes of the vector data are returned. The type of the returned vector attributes can be preset by the user. After collecting vector data whose recognition distance is less than the distance threshold, the system summarizes and counts the vector attributes of the collected vector data, and displays this information on the two-dimensional screen in a list, chart or other visual form for the user to view and further interact.
[0064] In a specific implementation, when the opened vector file is a BIM building model file, the vector data not only includes basic geometric information, but also covers the building attributes such as the ownership, length, material, texture, and method of the vector data. After the user interacts with the BIM building model, determines the standard vector in the vector space, and determines the vector data with an identification distance less than a distance threshold based on the standard vector, the system further obtains the ownership information of these vector data, that is, determines which specific building component or structural component they belong to, such as a wall, room, or specific building component, determines the building component or structural component (such as a wall, room, or component) to which the vector data belongs as the target component, selects all the vector data constituting the target component, and highlights the selected vector data for prominent display. The system may also list the detailed attribute information of the target component on the screen, including but not limited to material type, construction method, size data, etc., so as to facilitate users to review and analyze the specific attributes of the building component.
[0065] In a specific embodiment, when vector data intersects with a near section or a far section, the intersection points of the vector data on the plane where the near section is located and the plane where the far section is located are obtained, respectively, and the identification distance between the intersection point of the vector data on the plane where the near section is located and the coordinates of the first point and the identification distance between the intersection point of the vector data on the plane where the far section is located and the coordinates of the second point are calculated. When one of the identification distances is less than a distance threshold, the vector attributes of the vector data are collected and counted.
[0066] In a specific implementation, in order to reduce the amount of calculation, each endpoint of the near section is connected to the endpoint of the far section, and a closed view volume is defined between the near section and the far section. When the vector data is completely within the closed view volume, the coordinates of the third point and the fourth point are randomly selected from the vector data, and the identification distance with the standard vector is calculated based on the coordinates of the third point and the fourth point; when part of the vector data is within the closed view volume and the other part is within the closed view volume, the coordinates of the third point and the fourth point are randomly selected from the part of the vector data within the closed view volume, and the identification distance with the standard vector is calculated based on the coordinates of the third point and the fourth point. At this time, if the identification distance is less than the distance threshold, the vector attributes of the vector data and the detailed attribute information of the component to which it belongs are collected, and the vector data is highlighted for highlighting without highlighting other vector data in the component that is not within the closed view volume; when the vector data is tangent to the closed view volume, that is, there is only one intersection between the vector data and the closed view volume, or the vector data is coplanar with one of the planes of the closed view volume, the vector attributes of the vector data are collected and summarized, but the vector data is not highlighted.
[0067] In a specific embodiment, reference is made to Figure 5 and Figure 6 On a two-dimensional screen for display, a circle with the mouse position as the center and the distance threshold as the first radius can be determined according to the mouse position and a preset distance threshold. Among the vector lines displayed on the two-dimensional screen, when the vector lines intersect with the above circle, it can be considered that the recognition distance between the corresponding vector data and the standard vector is less than the distance threshold; on the two-dimensional screen, the vector lines located in the circle corresponding to the first radius are collected, and a circle with the mouse position as the center and a preset second radius is determined, and the vector lines or parts thereof located in the circle corresponding to the first radius are proportionally enlarged to the circle corresponding to the second radius.
[0068] In addition, refer to Figure 7 The present application also provides a large-scale vector processing system 700, including:
[0069] An acquisition module 701 is used to acquire vector data in a vector space, group the vector data according to vector attributes of each vector data, and determine a plurality of vector sets;
[0070] A rendering module 702, used to render each vector set in turn so that the vector data is displayed on the projection section;
[0071] A measurement module 703 is used to set a standard vector within the field of view of the projection cross section in the vector space, and determine an identification distance between each vector data intersecting the field of view and the standard vector;
[0072] The collection module 704 is used to determine the target vector in the vector data according to the identification distance, identify the target vector, and summarize and collect the vector attributes of the target vector.
[0073] The large-scale vector processing system 700 and the large-scale vector data processing method are based on the same inventive concept, which will not be described in detail herein.
[0074] In addition, refer to Figure 8 , Figure 8 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0075] The processor 801 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0076] The memory 802 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 802 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 802, and the processor 801 calls and executes the large-scale vector data processing method of the embodiment of the present application, for example, executing the above-described Figure 1 Steps S110 to S140 of the method, Figure 2 Steps S210 to S220 of the method, Figure 3 Steps S310 to S320 of the method;
[0077] Input / output interface 803, used to implement information input and output;
[0078] The communication interface 804 is used to realize the communication interaction between the device and other devices. The communication can be realized through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.);
[0079] A bus 805 that transmits information between various components of the device (e.g., the processor 801, the memory 802, the input / output interface 803, and the communication interface 804);
[0080] The processor 801 , the memory 802 , the input / output interface 803 and the communication interface 804 are connected to each other in communication within the device via a bus 805 .
[0081] The embodiment of the present application also provides a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned large-scale vector data processing method, for example, to execute the above-described Figure 1 Steps S110 to S140 of the method, Figure 2 Steps S210 to S220 of the method, Figure 3 Method steps S310 to S320.
[0082] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0083] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0084] It can be understood by those skilled in the art that Figures 1 to 3 The technical solutions shown in the figure do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than those shown in the figure, or a combination of certain steps, or different steps.
[0085] The system embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0086] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0087] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0088] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0089] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.
[0090] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0091] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0092] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0093] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A large-scale vector data processing method, characterized in that: include: Acquire vector data in the vector space, group the vector data according to vector attributes of each of the vector data, and determine a plurality of vector sets; Rendering each of the vector sets in sequence so that the vector data is displayed on the projection section; Setting a standard vector within the field of view of the projection cross section in the vector space, acquiring the coordinates of a first point and a second point on the standard vector, and the coordinates of a third point and a fourth point of one of the vector data; Determine a first direction vector of the standard vector according to the coordinates of the first point and the second point, determine a second direction vector of the vector data according to the coordinates of the third point and the fourth point, and obtain a third direction vector in which one point on the standard vector points to one point on the vector data, or one point on the vector data points to one point on the standard vector; The identification distance between the standard vector and the vector data is determined according to the first direction vector, the second direction vector and the third direction vector, and the formula for determining the identification distance is: ; Wherein, d represents the identification distance, represents the first direction vector, represents the second direction vector, represents the third direction vector; A target vector is determined in the vector data according to the identification distance, the target vector is identified, and vector attributes of the target vector are summarized and collected.
2. The large-scale vector data processing method according to claim 1, characterized in that: Before rendering each of the vector sets in sequence, the large-scale vector data processing method further includes: Determine a spatial coordinate system in the vector space, obtain the coordinates of the viewpoint in the spatial coordinate system and the field of view direction, and determine the field of view coordinate system according to the coordinates of the viewpoint in the spatial coordinate system and the field of view direction; The vector data is converted from the spatial coordinate system to the field of view coordinate system.
3. The large-scale vector data processing method according to claim 2, characterized in that: Before rendering each of the vector sets in sequence, the large-scale vector data processing method further includes: Determine the position of the viewpoint in the vector space, determine a first projection matrix according to the field of view of the viewpoint, and determine a second projection matrix according to the relative position of the viewpoint and the vector space; The original coordinates of the vector data are transformed sequentially using the first projection matrix and the second projection matrix.
4. The large-scale vector data processing method according to claim 3, characterized in that: After converting the vector data from the spatial coordinate system to the field of view coordinate system, the large-scale vector data processing method further includes: In the field of view coordinate system, the plane where the far section is located is determined according to the coordinates of the viewpoint and the viewing distance, the direction of the viewpoint is perpendicular to the far section, and a first observation distance between the viewpoint and the plane where the far section is located is equal to the maximum viewing distance; Acquire the field of view opening of the viewpoint in the three axis directions of the field of view coordinate system, and define the far section on the plane where the far section is located according to the field of view opening; Acquire a depth of field of the viewpoint, and determine a near section between the viewpoint and the far section according to the depth of field, wherein the depth of field is equal to a second observation distance between the far section and the near section; A projection section is determined between the far section and the near section, and the vector data within the field of view is projected onto the projection section.
5. The large-scale vector data processing method according to claim 4, characterized in that: The step of determining a projection section between the far section and the near section, and projecting the vector data within the field of view onto the projection section, comprises: Determine a closed visual field cube surrounded by the far section and the near section, wherein the visual field cube is composed of the far section, the near section, and a reference surface, wherein the reference surface is composed of a surface formed by connecting any edge on the far section with a corresponding edge on the near section; The vector data or a portion thereof located within the field of view cube is projected onto the projection cross section.
6. The large-scale vector data processing method according to claim 1, characterized in that: The vector attribute includes a vector color of the vector data, each of the vectors in the vector set has the same color, and rendering each of the vector sets in sequence includes: A corresponding rendering task is created for each of the vector sets, and each of the rendering tasks is executed in sequence to centrally render each of the corresponding vector sets in sequence.
7. A large-scale vector data processing system, characterized in that: include: An acquisition module, used for acquiring vector data in a vector space, grouping the vector data according to vector attributes of each of the vector data, and determining a plurality of vector sets; A rendering module, used for rendering each of the vector sets in sequence, so that the vector data can be displayed on the projection section; A measurement module, configured to set a standard vector within a field of view of the vector space where the projection cross section is located, and determine an identification distance between each of the vector data intersecting the field of view and the standard vector; The collection module is used to determine a target vector in the vector data according to the identification distance, identify the target vector, and summarize and collect vector attributes of the target vector.
8. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the large-scale vector data processing method according to any one of claims 1 to 6 when executing the computer program.
9. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the large-scale vector data processing method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Map rendering method and map rendering device
CN112115226A
Track generation method and device, equipment and storage medium
CN116860906A