WO2022228211A1 - Method and apparatus for constructing visual view - Google Patents

Method and apparatus for constructing visual view Download PDF

Info

Publication number
WO2022228211A1
WO2022228211A1 PCT/CN2022/087681 CN2022087681W WO2022228211A1 WO 2022228211 A1 WO2022228211 A1 WO 2022228211A1 CN 2022087681 W CN2022087681 W CN 2022087681W WO 2022228211 A1 WO2022228211 A1 WO 2022228211A1
Authority
WO
WIPO (PCT)
Prior art keywords
axis
trajectory
coordinate
coordinate axis
coordinate system
Prior art date
Application number
PCT/CN2022/087681
Other languages
French (fr)
Chinese (zh)
Inventor
黄兆嵩
丁治宇
Original Assignee
华为云计算技术有限公司
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 华为云计算技术有限公司 filed Critical 华为云计算技术有限公司
Publication of WO2022228211A1 publication Critical patent/WO2022228211A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01VGEOPHYSICS; GRAVITATIONAL MEASUREMENTS; DETECTING MASSES OR OBJECTS; TAGS
    • G01V3/00Electric or magnetic prospecting or detecting; Measuring magnetic field characteristics of the earth, e.g. declination, deviation
    • G01V3/08Electric or magnetic prospecting or detecting; Measuring magnetic field characteristics of the earth, e.g. declination, deviation operating with magnetic or electric fields produced or modified by objects or geological structures or by detecting devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles

Definitions

  • the present application relates to the field of computer technologies, and in particular, to a method and apparatus for constructing a visualization view.
  • Data visualization is a technology that encodes the attributes, characteristics and other information of data through visual elements and visual channels, and intuitively displays it to users. It utilizes the sharp visual perception ability of people and the powerful data analysis ability of computer, which greatly improves the efficiency of understanding and analyzing data. In recent years, data visualization techniques have played an important role in data journalism, smart cities, and business intelligence.
  • the related art uses a Cartesian coordinate system to construct a visualization view.
  • the developer needs to calculate the coordinates of each point in the rectangular coordinate system, and then calculate the position coordinates of the point on the curve outline according to the coordinates in the rectangular coordinate system, instructing the computer to calculate The position coordinates of the draw visualization elements, resulting in a visualization view.
  • the embodiments of the present application provide a method and apparatus for constructing a visualization view, which help to improve the efficiency of constructing a complex visualization view.
  • the technical solution is as follows.
  • a first aspect provides a method for constructing a visual view, the method comprising: receiving a construction request, the construction request instructing to construct a visual view of target data based on a set coordinate system, the coordinate axis of the coordinate system includes a trajectory coordinate axis, the trajectory coordinate axis
  • the axis refers to a coordinate axis whose shape is a trajectory; according to the trajectory coordinate axis and the target data, determine the position of the target data in the visual view; according to the determined position, obtain the visual view of the target data, so
  • the visualization view includes visualization elements for representing the target data, the visualization elements are located at the determined positions in the visualization view; and the visualization view is provided.
  • the target data refers to the data to be visualized, for example, the target data is a chart.
  • the above provides a method for constructing a visual view with a coordinate system based on the trajectory coordinate axis.
  • the trajectory coordinate axis can support the user to customize the shape of the coordinate axis by drawing or other methods, and automatically calculate the data to be visualized.
  • the position in the coordinate system of the trajectory coordinate axis thus encapsulating the development process of complex layout calculation, avoiding the tedious operation of manually calculating the specific position of the element when constructing the view using the Cartesian coordinate system, thus reducing the user's learning cost and improving the construction.
  • Efficiency of complex visualizations are provided.
  • the user is supported to input a curved trajectory as the coordinate axis.
  • the shape of the trajectory coordinate axis in the coordinate system indicated by the above construction request is the trajectory input by the user, and the trajectory coordinate axis has a plurality of points with different curvatures.
  • the input method of the trajectory includes any one of the following: drawing the trajectory in the construction interface; or inputting the position coordinates of multiple points on the trajectory in the construction interface.
  • the case where the user enters a vertical coordinate system is supported.
  • the shape of each coordinate axis in the coordinate system indicated by the above build request is a straight line. That is, the coordinate system is a vertical coordinate system.
  • acquiring the first position corresponding to the target data on the trajectory coordinate axis includes: acquiring the position of the trajectory point on the trajectory coordinate axis according to the ratio of the value of the target data in the definition domain of the trajectory coordinate axis, as the first position Position, the distance between the track point and the endpoint of the track axis is scale-dependent.
  • the coordinate axis combination relationship is also considered when obtaining the coordinate system position. Specifically, the second position corresponding to the target data in the coordinate system is acquired according to the first position and the coordinate axis combination relationship of the coordinate system.
  • the coordinate axis combination relationship includes at least one of an absolute type combination relationship or a relative type combination relationship
  • the absolute type combination relationship includes that the ordinate axis and the canvas are kept at a set first angle
  • the relative type combination relationship includes The coordinate axis and the abscissa axis are maintained at a set second angle
  • the canvas is an area for displaying the visual view in the construction interface.
  • the determining the position of the target data in the visual view according to the trajectory coordinate axis and the target data includes: in response to the combination relationship of the coordinate system being an absolute combination relationship, according to The first angle and the offset angle of the coordinate system are obtained, and the angle of the ordinate axis in the coordinate system relative to the canvas is obtained, and the absolute combination relationship includes that the ordinate axis and the canvas remain at the first angle; The angle of the ordinate axis relative to the canvas determines the position of the target data in the visualization view.
  • the absolute combination relationship makes the orientation and rotation angle of the visualization elements uniform, which helps to keep the various icons in the visualization effect neat, thereby improving the effect of the visualization view.
  • the text in the absolute combination relationship is always kept parallel to the canvas without being rotated, which makes it more convenient for the user to read the text.
  • the coordinate axis combination relationship in the coordinate system is a relative type combination relationship
  • the offset of the coordinate system angle and the tangent direction of the abscissa axis obtain the angle of the ordinate axis in the coordinate system relative to the canvas
  • the relative combination relationship includes that the ordinate axis and the abscissa axis are maintained at the second angle; according to the The angle of the ordinate axis relative to the canvas determines the position of the target data in the visualization view.
  • the relative coordinate axis can keep the Y axis and the X axis at a certain angle.
  • the text information is not emphasized, and the visual elements (rectangles, lines) need to follow the coordinate axis.
  • This relative axis can reduce the complexity of implementing this visualization when the changes have different rotation angles.
  • the visualization is provided through a construction interface for constructing the visualization of the target data.
  • a construction interface for constructing the visualization of the target data.
  • a building interface is provided, which includes a visual view.
  • the above construction interface not only includes a visual view, but also includes a coordinate system setting area, where the coordinate system setting area is used for the user to set parameters of the coordinate system.
  • the user is supported to trigger interactive operations on the construction interface to customize the parameters of the coordinate system, thereby eliminating the tedious operation of writing program codes through a programming language, and improving the efficiency of constructing a visual view.
  • the method before receiving the construction request, further includes: in response to the coordinate axis setting instruction, determining the trajectory coordinate axis according to the trajectory data input through the coordinate system setting area, the coordinate axis setting instruction indicating setting based on the trajectory data Trajectory axis.
  • the user is supported to customize the shape of the coordinate axis through the trajectory data, which helps the trajectory coordinate axis to be more accurate and more flexible.
  • the coordinate system setting area includes a trajectory drawing area, where the trajectory drawing area is used for the user to draw the shape of the trajectory coordinate axis, and the trajectory data includes the position coordinates of the trajectory points in the trajectory drawn in the trajectory drawing area.
  • the coordinate system setting area includes trajectory data options
  • the trajectory data includes attributes of the target data entered through the trajectory data options.
  • the trajectory data given by the data is more controllable and accurate than the shape drawn directly.
  • the layout shape that the user wants to generate is included in the data, for example, the movement trajectory of the data object, the outline shape of the object, etc. are used as the trajectory shape to generate the coordinate axis, it is faster and more convenient to use the data to directly assign the definition, and there is no need for the user to copy .
  • the user is supported to customize the coordinate axis relationship in the coordinate system by triggering interactive operations through the interface.
  • the coordinate system setting area includes a coordinate axis relationship option.
  • the method further includes: in response to the coordinate axis relationship setting instruction, determining the coordinate axis combination relationship selected through the coordinate axis relationship option as the coordinate axis of the coordinate system. Combination relationship.
  • a user is supported to trigger an interactive operation through an interface to customize the angle of the coordinate axis in the coordinate system.
  • the coordinate system setting area includes a coordinate axis angle control
  • the above method further includes: in response to the coordinate axis angle setting instruction, in the case that the coordinate axis combination relationship is an absolute combination relationship, the coordinate axis angle control
  • the input first angle is determined as the angle between the vertical axis in the coordinate system and the canvas.
  • the second angle input through the coordinate axis angle control is determined as the ordinate axis and the abscissa axis in the coordinate system. maintain the angle.
  • the build interface includes a visual view and a code area.
  • the code area in the construction interface is used to display the first code for generating the visual view.
  • the constructed visualization view and the generated code of the visualization view are returned to the user through the same interface, so that the user can view the effect and code of the visualization view synchronously.
  • the method further includes: in response to the code export instruction, outputting the first code in the code region to the target location.
  • the method further includes: in response to the code execution instruction, adjusting the visual view by executing the second code entered in the code area.
  • the method further includes: in response to an attribute setting operation on the visual view triggered on the construction interface, obtaining a third code corresponding to the attribute setting operation; and adding the third code to a code area in the construction interface.
  • the code displayed in the interface can be updated in real time following the user's operation, so that the code generated by the user's operation can be fed back in a more timely manner.
  • the constructed visualization can be provided to the user in a number of ways.
  • the cloud device when the visualization view is constructed by the cloud device, the cloud device sends the content of the visualization view to the initiator of the construction request. In this way, it supports to encapsulate the construction process of the visualization view as a cloud service and provide it to customers.
  • the terminal device displays the visual view in the construction interface.
  • an apparatus for constructing a visual view in a second aspect, is provided, and the apparatus for constructing a visual view has the function of implementing the first aspect or any optional manner of the first aspect.
  • the apparatus for constructing a visual view includes at least one functional module, and the at least one functional module is configured to implement the method provided in the first aspect or any optional manner of the first aspect.
  • the functional modules in the apparatus for constructing the visual view are implemented by software, and the functional modules in the apparatus for constructing the visual view are program modules. In other embodiments, the functional modules in the apparatus for constructing the visual view are implemented by hardware or firmware.
  • the apparatus for constructing a visual view optionally runs on a cloud computing system (including multiple cloud computing devices, such as servers), and is used to provide a cloud service for constructing a visual view to a customer.
  • the visual view building apparatus runs on an edge computing system (including multiple edge computing devices, such as servers, desktop computers, etc.); desktop computer, etc.).
  • a third aspect provides a computing device comprising a processor and a memory, wherein the memory stores computer instructions, and the processor executes the computer instructions to implement the method of the first aspect and possible implementations thereof.
  • the computing device further includes a network interface for sending the constructed visualization over the network.
  • the computing device further includes a screen for displaying the constructed visualization.
  • a (non-transitory) computer-readable storage medium stores at least one instruction that, when executed on a computer, causes the computer to execute the method provided in the first aspect or any optional manner of the first aspect.
  • the type of the storage medium includes, but is not limited to, volatile memory, such as random access memory, non-volatile memory, such as flash memory, hard disk drive (HDD), solid state drive (solid state drive, SSD).
  • a computer program product in a fifth aspect, includes one or more computer program instructions, when the computer program instructions are loaded and executed by a computer, cause the computer to execute the first aspect or the first aspect above.
  • the computer program product is optionally a software installation package, and when the method provided in the first aspect needs to be used, the computer program product is downloaded and executed on a computing device.
  • a chip including a memory and a processor, the memory is used to store computer instructions, and the processor is used to call and run the computer instructions from the memory to execute the above-mentioned first aspect and any possible possible aspects of the first aspect. method in the implementation.
  • a computing device cluster includes at least one computing device. Different units of the computing device in the above second aspect are distributed and run on different computing devices in the computing device cluster.
  • the computing device cluster is a cloud computing system (including multiple cloud computing devices, such as servers).
  • the computing device cluster is an edge computing system (including multiple edge computing devices, such as servers and desktop computers); alternatively, the computing device cluster is a terminal device cluster (including multiple terminals, such as desktop computer, etc.).
  • FIG. 1 is a schematic diagram of a comparison of visualization effects under a different shape coordinate axis provided by an embodiment of the present application
  • Fig. 2 is a kind of visualization view of Napoleon's army east expedition provided by the embodiment of the present application;
  • FIG. 3 is a data news visualization view provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of constructing a visualization view of Napoleon's Crusades based on a Cartesian coordinate system provided by an embodiment of the present application;
  • Fig. 5 is a kind of visualization view of Napoleon's army east expedition provided by the embodiment of the present application.
  • FIG. 6 is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • FIG. 7 is a flowchart of a method for constructing a visual view provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a coordinate axis combination relationship provided by an embodiment of the present application.
  • FIG. 9 is a logical architecture diagram of a method for interactively constructing a visual view provided by an embodiment of the present application.
  • FIG. 10 is a visualization view provided by an embodiment of the present application.
  • FIG. 11 is a schematic diagram of a construction interface of a visual view provided by an embodiment of the present application.
  • FIG. 12 is a schematic diagram of an interface for constructing a visual view provided by an embodiment of the present application.
  • FIG. 13 is a schematic diagram of an interface for constructing a visual view provided by an embodiment of the present application.
  • FIG. 14 is a schematic diagram of a trajectory coordinate system implementing a visualization view of Napoleon's Crusades provided by an embodiment of the present application;
  • FIG. 15 is a visualization effect diagram provided by an embodiment of the present application.
  • 16 is a schematic structural diagram of an apparatus for constructing a visualization view provided by an embodiment of the present application.
  • FIG. 17 is a schematic structural diagram of a computing device provided by an embodiment of the present application.
  • 604-Attribute view also called parameter configuration view
  • 605-Construct result display area also called visualization effect display area
  • Data visualization refers to the technique of encoding properties of data into properties of graphs to display data.
  • Data visualization is used to communicate more clearly and effectively to users the information contained in the data. For example, encode the number of crowds as the size of a circle. The larger the circle size, the greater the number of crowds, so that the size of the circle can intuitively and effectively convey the number of crowds; another example, encode the date as a point Color, code working days as color 1 and holidays as color 2, so that holidays and working days can be visually distinguished by different colors.
  • Visual elements are graphics used to present data. Visual elements are also sometimes called graphic symbols, visual symbols, or interface elements. Visual elements include, but are not limited to, rectangles, circles, arcs, curves, text, paths, regions, triangles, stars, and the like, from the perspective of the shape of the visual elements. From the perspective of the attributes of the visualization element, various attributes such as the position of the visualization element (such as x and y coordinates), size, color, shape, texture, line width, radius, length, width, etc. can be used to represent the data. For example, correlate the area of a circle (visualization element) with the number of crowds (a property of the data), with larger circles indicating more crowds. Different types of visualization elements may have the same properties or may have different properties. For example, circular elements have a radius property, and rectangular elements have a width property.
  • a visual channel refers to the visual attributes that visual elements use to convey information.
  • visual channels include, without limitation, position, size, color, shape, texture, etc.
  • Visual encoding refers to using information to encode visual channels when an individual receives information, such as encoding visual channels such as color and size. The darker the color and the larger the size, the greater the data value.
  • the trajectory coordinate axis refers to the coordinate axis whose shape is a trajectory.
  • the shape of the trajectory coordinate axis is optionally not a straight line, but a curved polyline.
  • the shape of the trajectory coordinate axis is set by the user, for example.
  • Trajectory axes support the process of building visualizations in the shape of traces.
  • FIG. 1 show visualization views obtained by visualizing the same data using two coordinate axes respectively.
  • (a) of FIG. 1 shows a visualization view obtained by visualizing data using a coordinate system of the X-axis shaped as a straight line and the Y-axis shaped as a straight line.
  • the visualization result of (a) in FIG. 1 is a straight line.
  • (b) of FIG. 1 shows a visualization view obtained by visualizing the data using the coordinate system of the X-axis (track coordinate axis) shaped as a polyline and the Y-axis shaped as a straight line.
  • the visualization result in (b) of FIG. 1 is also affected by the shape of the track coordinate axis, and is also a polyline.
  • Typical application scenarios of the trajectory coordinate axis include the following cases 1 to 3.
  • Scenario 1 Visualize data whose data distribution is irregular in value, such as in the field of data news.
  • the layout of visual elements in a view is often domain-specific to deepen the theme and engage the audience.
  • the layout of the visual elements is shaped like the shape of a person; in the visualization layout related to the Yellow River, the layout of the visual elements is shaped like the outline of the Yellow River.
  • the use of track axes helps to build visualizations more quickly.
  • users are supported to set the outline of a person as the trajectory data of the trajectory coordinate axis, so that the shape of the trajectory coordinate axis is the outline of a person, so as to facilitate the construction of a visual view of humanistic data. .
  • a visualization view related to the Yellow River users are supported to set the contour of the Yellow River as the trajectory data of the trajectory coordinate axis, so that the shape of the trajectory coordinate axis is the contour of the Yellow River, so as to facilitate the construction of a visualization view related to the Yellow River. .
  • the second case is to realize a visual view with a complex layout.
  • Scenario 3 Visualization of high-dimensional data.
  • high-dimensional data contains many attributes, and simple traditional views are difficult to express many attributes.
  • the use of track axes helps to achieve more complex views to show the various properties of high-dimensional data.
  • attributes such as longitude, latitude, number of troops, marching direction, time, and time can be displayed through the coordinate system based on the trajectory coordinate axis.
  • trajectory coordinate axis By providing the trajectory coordinate axis, it can support the user to build a coordinate axis of a custom shape, which is convenient for the visualization of various curve data and high-dimensional data with irregular values, and meets the construction requirements of unconventional layout visualization views. .
  • the trajectory data is data for setting the trajectory coordinate axis.
  • Trajectory data includes the location coordinates of a series of points.
  • the trajectory coordinate axis is defined by using four vertices on the polyline as trajectory data. That is, after obtaining the position coordinates of point a, the position coordinates of point b, the position coordinates of point c, and the position coordinates of point d in (b) of FIG. 1, the position coordinates of these four points can be used.
  • a trajectory coordinate axis shown in (b) of FIG. 1 is set.
  • the axes properties are used to indicate the mapping between the values of the data and the canvas pixel range (ie the position in the visualization). Axis properties are also sometimes called axis parameters.
  • the coordinate axis attributes include, but are not limited to, the type of the coordinate axis, the definition domain of the coordinate axis, the value range of the coordinate axis, and the like.
  • axes include, but are not limited to, linear axes, category axes, circular axes, quadratic function axes, exponential function axes, polar axes, and the like.
  • the domain of the coordinate axis represents the value range of the data to be visualized.
  • the definition domain of the coordinate axis is [0, 100], indicating that the value range of the data to be visualized is [0, 100].
  • the range of the coordinate axis is also called the range of the coordinate axis.
  • the value range of the coordinate axis is used to indicate the range of the coordinate axis distribution in the canvas.
  • the range of the axes is used to determine how much of the canvas the data within the domain should be drawn on when building the visualization. For example, if the value range of the coordinate axis is [0,600], [0,800], it means that the coordinate axis is drawn in a rectangle with a length of 600 and a width of 800 in the canvas.
  • Data visualization is a technology that encodes the attributes, characteristics and other information of data through visual elements and visual channels, and intuitively displays it to users. It utilizes the sharp visual perception ability of people and the powerful data analysis ability of computer, which greatly improves the efficiency of understanding and analyzing data. In recent years, data visualization techniques have played an important role in data journalism, smart cities, and business intelligence.
  • Figure 2 shows the visualization of Napoleon's army in 1812.
  • the trajectory of the line represents the army's marching route
  • the grayscale of the line represents the army's attack and retreat
  • the width of the line represents the number of troops.
  • the line graph below Shows the local temperature as the army marches. This view makes people intuitively feel the situation of the army marching from west to east in the cold winter, and then continuously defeated from east to west.
  • the data news visualization in Figure 3 adopts an S-shaped layout, showing data from 2015 to 2021.
  • Figure 3 makes reasonable use of space, displays a large amount of text and data information, and at the same time enhances viewing, which is both beautiful and practical.
  • Interactive visualization construction interfaces such as Tableau (data visualization analysis tool), voyager2 (a visual analysis tool) and other systems, mostly focus on helping users define the binding process of data attributes to visual channels such as color and length, rather than Support for freely defining coordinate systems such as allowing users to draw axes to complete the building process of complex visualizations.
  • Fig. 4 shows a schematic diagram of the realization process of the case of Napoleon's Eastern Expedition in the Cartesian coordinate system, including the following steps (a) to (e).
  • Step (a) First, the user needs to establish the X-axis with the longitude as the definition domain and the canvas width as the value domain.
  • Step (b) Then the user needs to establish a Y-axis with the dimension as the definition domain and the canvas height as the value domain.
  • Step (c) obtains the position of each track point in the data on the canvas.
  • Step (d) uses line segments to connect adjacent trajectory points.
  • Step (e) Finally, convert the number of troops corresponding to each trajectory point into a width value, and assign it to each line segment as the line segment width, and the marching direction as the line segment color.
  • Step (f-1) firstly needs to obtain the coordinates of each track point in the Cartesian coordinate system.
  • Step (f-2) then obtains the length of the offset mapped to the number of troops corresponding to the current trajectory point.
  • Step (f-3) calculates the normal vector direction of the current trajectory point (as indicated by the arrow).
  • Step (f-4) Calculate the abscissa and ordinate offset ⁇ x and the offset ⁇ y according to the length of the offset and the direction of the normal vector, and calculate the position of the corresponding point on the outer contour of the curve from the coordinate offset of the trajectory point coordinate.
  • Step (f-5) connects the outer contour coordinates of the curve corresponding to all the trajectory points to generate the target curve.
  • the complex customized visualization views appearing in various fields at this stage, or the construction requirements of professionally designed visualization views with special layout requirements are supported by users to freely define the coordinate system, And automatically calculate the position coordinates and other information of the visual elements in the user-defined coordinate system in the system, which can reduce the user's workload and liberate the user's energy, allowing them to focus more on visual design and visual coding design, lowering the developer threshold and improving development. efficiency.
  • the embodiments of the present application provide an interactive interface to help users freely construct coordinate systems and visualization views, and further improve the construction of complex visualizations, aiming at the characteristics of high development difficulty and cumbersome debugging process caused by the need to write codes in the current construction process. efficiency, reduce learning costs, and realize rapid development and deployment of views.
  • the embodiment of the present application provides a visualization syntax that supports the user to freely define a coordinate system.
  • a construction interface for customized visual views is designed. It provides a set of interactive methods to help users intuitively define coordinate system parameters or freely draw coordinate systems, specify visual codes and adjust parameters, and finally output the corresponding visual view.
  • the code and results allow users to build complex visualizations with minimal time cost.
  • the embodiment of the present application encapsulates the development process of complex layout calculation and underlying rendering by allowing the user to interactively and freely define the coordinate system and visual coding, which greatly reduces the user's workload and usage threshold, and improves the development efficiency. .
  • FIG. 6 is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • the application scenario includes a terminal 10 and a server 11 , and the terminal 10 and the server 11 are connected through a wired network or a wireless network.
  • the function, typical product form, deployment location and interaction mode of each device in FIG. 6 are illustrated below.
  • the terminal 10 is used for receiving the user's operation and displaying the visual chart to the user.
  • the terminal 10 is specifically configured to display a visual construction interface for nested charts on a screen and receive user input on the visual construction interface.
  • the terminal 10 is used to provide a channel for the user to construct a visual chart in two ways: interaction and inputting codes, so as to ensure the flexibility and correctness of the visual construction.
  • the above-mentioned visual construction interface displayed by the terminal 10 includes input components (such as input boxes and selection boxes), and the user triggers input operations on the input components to input the properties of the chart.
  • the terminal 10 receives the attributes of the chart input by the user on the input component, acquires the constructed visualization view based on the attributes of the user configuration chart, and displays the constructed visualization view in the construction interface.
  • the user inputs the program code in the visual construction interface.
  • the terminal 10 receives the program code input by the user on the visualization construction interface, acquires the constructed visualization view based on the program code input by the user, and displays the constructed visualization view in the construction interface.
  • the terminal 10 includes, without limitation, a personal computer, a mobile phone, a notebook computer, an IP phone, a camera, a tablet computer, a wearable device, and the like.
  • the terminal 10 is deployed in the terminal 10 environment or in the edge environment. In some embodiments, the terminal 10 is deployed in a local area network.
  • the server 11 is used to provide the construction service of the visualization view.
  • the server 11 is specifically configured to calculate the layout parameters of the sub-chart according to the coordinate axis properties of the parent chart, such as the position coordinates of the sub-chart in the canvas area of the interface.
  • the server 11 is also used to undertake other tasks that take up large computing power when constructing the visualization view.
  • the server 11 is optionally an independent hardware device, or a cluster or distributed system including multiple hardware devices, or a virtualized device implemented based on cloud computing and network functions virtualization (NFV) technology.
  • Virtualization devices include, without limitation, virtual machines or containers.
  • the server 11 is deployed in a cloud environment.
  • the terminal 10 is deployed in the Internet.
  • the terminal 10 and the server 11 interact to implement the following method embodiments.
  • the terminal 10 sends a visualization request to the server 11 to access the visualization construction service provided by the server 11 .
  • the visualization request carries the information required for building the chart, such as parameters configured through the input component of the building interface or code input through the building interface.
  • the server 11 constructs a visualization chart according to the information carried by the visualization request, and returns the visualization chart to the terminal 10 .
  • the interaction between the terminal 10 and the server 11 includes, but is not limited to, the interaction through browser software or service client software.
  • the server 11 is, for example, a website server 11
  • the terminal 10 accesses a specified webpage through the browser software to trigger the above-mentioned visualization request
  • the server 11 carries the constructed visualization view in an HTML file and returns it to the terminal 10 .
  • the above server 11 is, for example, a background server 11 associated with the business client software, and the terminal 10 accesses the above server 11 through the business client software to obtain a visual view.
  • the scenario of the interaction between the terminal 10 and the server 11 shown in FIG. 6 is optional.
  • the terminal 10 locally executes the following method embodiments.
  • FIG. 7 is a flowchart of a method for constructing a visualization view provided by an embodiment of the present application.
  • the method shown in FIG. 7 includes the following steps S201 to S205.
  • the network deployment scenario on which the method shown in FIG. 7 is based is optionally as shown in FIG. 6 above.
  • the computing device in the method shown in FIG. 7 is the server or terminal in FIG. 6 .
  • the method shown in FIG. 7 is described by taking a computing device performing steps S201 to S204 as an example. In other embodiments, steps S201 to S204 are performed cooperatively by multiple devices. For example, with reference to FIG. 6 , the method shown in FIG. 7 is executed cooperatively by the server and the terminal.
  • the server undertakes the main processing work, and the terminal undertakes the secondary processing work; in other embodiments, the server undertakes the secondary processing work, and the terminal undertakes the main processing work; or, the server or the terminal respectively undertakes the processing work.
  • the terminal acts as the initiator of the visual view construction request, requesting the server to construct the visual view of the chart; the server acts as the responder of the visual view request, constructs the visual view and returns the constructed visual view to the terminal, which is sent by The terminal displays a visual view.
  • the method shown in FIG. 7 involves multiple positions such as the position on the coordinate axis and the position in the coordinate system.
  • positions such as the position on the coordinate axis and the position in the coordinate system.
  • first position the position on the coordinate axis and the position in the coordinate system.
  • second position the position in the coordinate system.
  • the method shown in FIG. 7 involves the angle between the coordinate axis and the canvas, and the angle between the ordinate axis and the abscissa axis.
  • first angle "second angle”
  • distinction are used to describe a plurality of different angles.
  • Step S201 the computing device receives a construction request.
  • a build request instructs to build a visualization of the target data based on the specified coordinate system.
  • the coordinate axes of the set coordinate system include the trajectory coordinate axes.
  • the track coordinate axis is the X axis of the set coordinate system, or the track coordinate axis is the Y axis of the set coordinate system.
  • the set coordinate system is a two-dimensional coordinate system, and the coordinate axis of the coordinate system is a combination of a trajectory coordinate axis and other types of coordinate axes other than a trajectory coordinate axis.
  • the X axis of the coordinate system is the trajectory coordinate axis
  • the Y axis is the linear coordinate axis.
  • the two coordinate axes of the set coordinate system are both trajectory coordinate axes.
  • Target data refers to the data to be visualized.
  • the target data includes at least one attribute.
  • the target data includes attributes such as the longitude of the army's location, the latitude of the army's location, and the army's location.
  • the shape of the trajectory coordinate axis is a trajectory input by the user, and the trajectory coordinate axis has a plurality of points with different curvatures.
  • the input method of the trajectory corresponding to the trajectory coordinate axis includes any one of the following: drawing the trajectory in the construction interface; or inputting the position coordinates of multiple points on the trajectory in the construction interface.
  • Step S202 the computing device determines the position of the target data in the visualization view according to the trajectory coordinate axis and the target data.
  • the process of determining the position includes: the computing device obtains the first position corresponding to the target data on the trajectory coordinate axis.
  • the computing device acquires, according to the first position, a second position corresponding to the target data in the coordinate system.
  • the above-mentioned first location is determined by a pre-established mapping rule.
  • the mapping rule indicates the mapping relationship from data values to position coordinates on the trajectory coordinate axis.
  • the computing device acquires, according to the target data and the mapping rule, the position coordinates of the value mapping of the target data, as the above-mentioned first position.
  • the above-mentioned first position is specifically determined according to the ratio of the data value to the definition domain.
  • the computing device acquires the position of the trajectory point on the trajectory coordinate axis as the first position according to the ratio of the value of the target data in the definition domain of the trajectory coordinate axis.
  • the distance between the trajectory point and the endpoint of the trajectory axis (such as the start or end point) is scale-dependent.
  • the definition range of the track coordinate axis is 0 to 100, and the data with a value of 30 will be mapped to the position on the canvas where the track point whose distance from the track start point is 30% of the entire track length is located.
  • the canvas is the area in the build interface for displaying the visualization.
  • the second position is the pixel position corresponding to the target data in the canvas, and the second position indicates where the visual element should be drawn on the screen.
  • the computing device obtains the second position corresponding to the target data in the coordinate system according to the first position, using the mapping position of the data on the Y-axis as the offset.
  • the calculation process of the second position includes the following steps (a) to (c).
  • Step (a) The computing device calculates the coordinate position mapped by the target data on the X-axis according to the value of the target data. And, the computing device calculates the coordinate position mapped by the target data on the Y-axis according to the value of the target data.
  • the X axis or the Y axis is the trajectory coordinate axis. That is, step (a) includes the above-mentioned step S202.
  • Step (b) The computing device obtains the offset of the abscissa and the offset of the ordinate according to the coordinate position mapped by the target data on the Y-axis.
  • Step (c) The computing device superimposes the abscissa offset and the ordinate offset and the coordinate position mapped by the data on the X axis to obtain the final data coordinate position (second position).
  • the calculation process according to the trajectory coordinate axis and the data includes the following steps (1) to (3).
  • Step (2) obtains a track point from the track according to the ratio calculated in step (1), and the ratio of the distance between the track point and the track start point to the track length is equal to the ratio. For example, if the track length is 300 and the ratio calculated in step (1) is 0.2, then find a position on the track that is 20% away from the starting point of the track, that is, a position 60 away from the starting point.
  • step (3) the position coordinates of the track points determined in step (2) are scaled according to the value range of the coordinate axis, so as to obtain the canvas pixel positions corresponding to the track points.
  • the value range of the coordinate axis is [0,600], [0,800], it means that if the track is all drawn on the canvas, it should be drawn in a rectangle with a length of 600 and a width of 800; if the track point is 60 from the starting point position, then find the pixel corresponding to the point corresponding to 60 in the canvas.
  • the coordinate system position is specifically determined according to a preset coordinate axis combination relationship.
  • the computing device acquires the second position corresponding to the target data in the coordinate system according to the first position and the coordinate axis combination relationship of the coordinate system.
  • the coordinate axis combination relationship refers to the relationship between different coordinate axes in the coordinate system.
  • the coordinate axes of the two-dimensional coordinate system include an abscissa axis and an ordinate axis
  • the combination relationship of the coordinate axes of the two-dimensional coordinate system is the relationship between the abscissa axis and the ordinate axis.
  • the absolute combination relationship is that the ordinate axis (Y axis) and the canvas in the coordinate system are maintained at a set first angle, and the direction of the ordinate axis is optionally independent of the direction, shape and type of the abscissa axis (X axis).
  • FIG. 8 (a) in FIG. 8 is a schematic diagram of an absolute combination relationship.
  • the Y-axis direction of each point is always at a certain angle to the canvas, that is, the angle between the Y-axis direction of each point and the canvas is identical.
  • a typical application scenario of an absolute combination relationship is to construct a visual view with a complex shape in the X-axis direction and a large amount of data.
  • the absolute combination relationship makes the directions and rotation angles of the visualization elements unified. For example, in the visualization scene of FIG. 3, if the coordinate system of this absolute combination relationship is used, all the rectangles will be vertically upward, and all the text will be vertical, and the resulting visualization effect will be relatively neat. In addition, in the scenario where the user wants to emphasize the text when constructing the visual view, the text in the absolute combination relationship is always kept parallel to the canvas without being rotated, which makes it more convenient for the user to read the text.
  • the calculation process from the coordinate position on the trajectory coordinate axis to the position in the coordinate system includes: in response to the combination relationship of the coordinate system being an absolute combination relationship, the computing device calculates the offset angle of the coordinate system according to the first angle and the coordinate system. , to obtain the angle of the ordinate axis in the coordinate system relative to the canvas; the computing device obtains the second position according to the angle of the ordinate axis relative to the canvas and the first position.
  • the relative type combination relationship is, for example, that the ordinate axis (Y axis) and the abscissa axis (X axis) in the coordinate system are maintained at a set second angle.
  • FIG. 8 (b) in FIG. 8 is a schematic diagram of a relative combination relationship.
  • the Y-axis direction of each point is always at a certain angle with the X-axis direction, that is, the Y-axis direction and the X-axis direction of each point are at a certain angle.
  • the included angles are the same.
  • a typical application scenario of a relative composition relationship is to build a visual view with a small amount of data and a simple X-axis shape.
  • this embodiment can at least achieve the following effects: the relative coordinate axes can keep the Y axis and the X axis at a certain angle, thereby reducing the complexity of constructing a visualization view such as FIG. 3 .
  • this relative coordinate axis can reduce the complexity of realizing such a visualization view.
  • the angle between the ordinate axis and the canvas in the above-mentioned absolute combination relationship (the first angle) or the angle between the ordinate axis and the abscissa axis in the above-mentioned relative combination relationship (the second angle) ) are user-defined settings.
  • the computing device obtains the user's definition information of the coordinate system, and obtains the above-mentioned first angle or the second angle from the definition information.
  • the above-mentioned definition information is generated based on codes input by a user through a programming language.
  • the above-mentioned definition information is a declarative code for visual coding.
  • the computing device By supporting the setting of the angle between the Y axis and the X axis or the angle between the Y axis and the canvas, in the process of constructing a visualization view, the computing device will automatically calculate the layout according to the angle specified by the user, without the need for the user to manually calculate.
  • users can quickly declare more diverse visualization views, or adjust the angle according to the visualization effect of the data to obtain a view with better visual effect and artistic effect.
  • the computing device For example, if the user does not want the Y-axis to be vertical, he can set the Y-axis and the X-axis to form a 45-degree angle, and the computing device generates an oblique histogram according to the 45-degree angle set by the user, thus saving half of the canvas space in the upper left corner for other drawing of the element.
  • the calculation process from the coordinate position on the trajectory coordinate axis to the position in the coordinate system includes: in response to the combination relationship of the coordinate system being a relative type combination relationship, calculating the device according to the second angle, the offset angle of the coordinate system and the tangent direction of the abscissa axis to obtain the angle of the ordinate axis relative to the canvas in the coordinate system; the computing device obtains the second position according to the angle of the ordinate axis relative to the canvas and the first position.
  • Step S204 the computing device acquires a visual view of the target data according to the determined position.
  • the visualization view includes at least one visualization element for representing target data.
  • the visual element is located in the visual view at a determined position, such as the second position described above. Specifically, the computing device draws the visual element at the position determined in the canvas according to the visual element bound by the target data, thereby obtaining the visual view.
  • Step S205 the computing device provides a visualization view.
  • the visual view is provided to the user by building an interface.
  • the build interface is the interface used to build a visual view of the data.
  • the construction interface provided by the computing device includes a visualization result display area in which a visualization view is displayed. Through the construction interface, the construction result of the nested chart can be displayed intuitively during the visual construction process.
  • the visual view is provided to the user through a file, an interface other than the build interface, and so on.
  • the computing device sends the content of the visualization to the originator of the build request.
  • the computing device is provided as the cloud server 11, the initiator of the construction request is the terminal 10, and the above construction request is a Hyper Text Transfer Protocol (Hyper Text Transfer Protocol, HTTP) request.
  • HTTP Hyper Text Transfer Protocol
  • the computing device obtains the visual view, it encapsulates the content of the visual view.
  • HTML Hyper Text Markup Language
  • the HTML file is sent to the terminal 10 through an HTTP response.
  • the computing device displays the visualization in the build interface.
  • This embodiment provides a method for constructing a visual view based on a coordinate system based on the trajectory coordinate axis.
  • the trajectory coordinate axis can support the user-defined shape of the coordinate axis, and the data to be visualized can be automatically calculated based on the trajectory coordinate axis. position in the coordinate system, thus encapsulating the development process of complex layout calculation, avoiding the tedious operation of manually calculating the specific position of the element when constructing the view using the Cartesian coordinate system, thus reducing the user's learning cost and improving the construction of complex visualization views s efficiency.
  • the above embodiment encapsulates the calculation process of the contour points on the curve. For example, after the user sets the trajectory coordinate axis as the coordinate axis in the coordinate system and sets the trajectory data, the system uses the calculation process related to the trajectory coordinate axis and the coordinate system to realize the position calculation of the trajectory contour point. By connecting them, a visualization view containing continuous curves can be formed, without relying on the user to manually calculate the position of the contour points, which greatly simplifies the tedious process of visualization view construction.
  • an interactive construction interface supporting a custom coordinate system includes a visual view and a coordinate system setting area, where the coordinate system setting area is used for a user to set parameters of the coordinate system.
  • the trajectory data of the trajectory coordinate axes, the combination relationship of the coordinate axes, and the included angle between the coordinate axes are set by an operation triggered on the coordinate system setting area. For example, after the user inputs trajectory data into the coordinate system setting area, a coordinate axis setting instruction is triggered, and the coordinate axis setting instruction instructs to set the trajectory coordinate axis based on the inputted trajectory data.
  • the computing device determines the trajectory coordinate axis according to the trajectory data input through the coordinate system setting area in response to the coordinate axis setting instruction.
  • FIG. 12 is an example of the coordinate system setting area in the construction interface 60 shown in FIG. 11 .
  • the coordinate system setting area includes an interactive construction view 602 , a property view 604 , and a trajectory drawing area 607 . Next, each component included in the coordinate system setting area in the construction interface will be introduced.
  • the interactive construction view 602 is used for a user to create a diagram into a visualization view.
  • the interactive construction view 602 allows the user to specify the kinds of icons in the diagram, nesting relationships between diagrams, diagram structure, and the like.
  • the interactive construction view 602 in (a) of FIG. 13 includes a set of rectangular icons 6031 created.
  • the interactive construction view 602 in (b) of FIG. 13 includes two sets of rectangular icons 6031 and one set of circular icons 6032 that are created.
  • the property view 604 is used for the user to configure the visual properties (such as color, size, etc.) of the visual element, so as to separate the chart structure construction and the visual content filling, and make the construction process clearer for the user.
  • the property view 604 includes various input components, and the types of input components in the property view 604 include, but are not limited to, the following components (a) to (f).
  • Component (b) Digital input box: used for inputting digital parameters such as height, width, font size, and line width.
  • Component (c) drop-down box also called drop-down menu: used for enumeration type parameter input.
  • Component (e) radio box used for optional parameter input.
  • Component (f) Combined text input box: used for parameter input with multiple values, such as range, margin, etc.
  • the properties view 604 includes various components that support inputting coordinate system parameters, thereby allowing the user to set the coordinate system parameters utilized by the method shown in FIG. 7 .
  • the property view 604 includes a coordinate axis relationship option 6041 and a coordinate axis included angle control 6042 .
  • the coordinate axis relationship option 6041 is a component for inputting the coordinate axis relationship, and the coordinate axis relationship option 6041 is, for example, a drop-down box.
  • the user triggers an operation on the coordinate axis relationship option 6041, and selects one of the absolute type combination relationship and the relative type combination relationship as the combination relationship of the coordinate axis in the custom coordinate system.
  • the user's operation on the coordinate axis relationship option 6041 will trigger the coordinate axis relationship setting command.
  • the computing device determines the coordinate axis combination relationship selected through the coordinate axis relationship option 6041 as the coordinate axis combination relationship of the coordinate system. For example, in FIG. 12, the user selects an absolute type (fixed) combination relationship as the coordinate axis combination relationship in the custom coordinate system.
  • the coordinate axis included angle control 6042 is a component for inputting the coordinate axis included angle.
  • the coordinate axis included angle control 6042 is, for example, a number input box.
  • the user triggers an operation on the coordinate axis included angle control 6042, and inputs the angle maintained by the ordinate axis and the canvas.
  • the computing device determines the first angle input through the coordinate axis angle control 6042 as the angle maintained by the ordinate axis in the coordinate system and the canvas.
  • the user triggers an operation on the coordinate axis angle control 6042, and inputs the angle maintained by the angle maintained by the ordinate axis and the abscissa axis.
  • the computing device determines the second angle input through the coordinate axis angle control 6042 as the angle maintained by the ordinate axis and the abscissa axis in the coordinate system. For example, in FIG. 12, the user inputs an angle of 66 degrees as the angle between the vertical axis in the custom coordinate system and the canvas.
  • the properties view 604 also provides a component 6043 for entering the rotation angle of the chart.
  • the user inputs an angle of 0 degrees to the component 6043 as the rotation angle of the chart in the custom coordinate system.
  • the properties view 604 also provides a component 6044 for entering a chart name.
  • a component 6044 for entering a chart name. For example, in Figure 12, the user enters the string 132 into component 6044 as the name of the chart.
  • the trajectory drawing area 607 is used for the user to draw the shape of the trajectory coordinate axis, so as to set the trajectory data of the trajectory coordinate axis.
  • the trajectory drawing area 607 is also called a trajectory drawing panel.
  • the user may perform a drawing operation on the track drawing area 607 through a mouse, a touch screen or other input devices, thereby drawing a track.
  • the computing device acquires the trajectory drawn in the trajectory drawing area 607, and extracts the position coordinates of the trajectory points from the trajectory as trajectory data of the trajectory coordinate axis. For example, referring to FIG. 12 , after the user draws the trajectory, the computing device extracts the position coordinates of the trajectory point A, the position coordinates of the trajectory point B, the position coordinates of the trajectory point C, and the position coordinates of the trajectory point D from the trajectory.
  • the position coordinates of each track point are set as the track data of the track coordinate axis.
  • the coordinate system setting area includes trajectory data options (not shown in FIG. 12 ), and the user inputs the attributes of the target data into the trajectory data options by dragging or other methods.
  • the computing device sets the attribute of the target data input through the trajectory data option as the trajectory data of the trajectory coordinate axis. For example, the user drags the first attribute of the target data and the second attribute of the target data to the trajectory data option, and the computing device sets the first attribute of the target data as the abscissa of the trajectory data, and sets the second attribute of the target data as the abscissa of the trajectory data.
  • the ordinate of the trajectory data is set as the ordinate of the trajectory data.
  • the trajectory data given by the data is more controllable and accurate than the shape drawn directly.
  • the layout shape that the user wants to generate is included in the data, for example, the movement trajectory of the data object, the outline shape of the object, etc. are used as the trajectory shape to generate the coordinate axis, it is faster and more convenient to use the data to directly assign the definition, and there is no need for the user to copy .
  • the construction interface 60 further includes a data view 601 , a hierarchical view 603 , a construction result display area 605 and a code area 606 .
  • the data view 601 is used to display the imported data to be visualized.
  • the data presented in data view 601 includes at least one attribute and a value for each attribute.
  • Hierarchy view 603 is used to present a hierarchy diagram of the diagram.
  • Hierarchy diagrams are used to represent each icon (sub-diagram) contained in the diagram. Diagrams that are logically at different levels have different heights in the hierarchy diagram.
  • the hierarchical view 603 is used to display the hierarchical structure diagram of the target data whose type is a chart, and the chart of the icon type in the hierarchical structure diagram is located in the lower layer of the parent chart.
  • the hierarchical structure of the chart currently under construction can be displayed intuitively, and the hierarchical structure of the chart can be transmitted to the user through the interface.
  • the construction result display area 605 is used to present the construction result of the visual view.
  • the visual view 6051 drawn by the drawing module 503 will be displayed in the construction result display area 605 .
  • the visual view 6051 drawn by the drawing module 503 specifically includes a group of rectangular icons 60511 .
  • the construction result display area 605 includes an export control 6052.
  • the computing device When the user triggers an operation on the export control 6052, the computing device outputs the constructed visual view 6051 to the target location in the form of a picture, a file or other forms.
  • the code area 606 is used to display the code for generating the visual view.
  • the code area 606 includes an export control 6062 and a run control 6061 .
  • the export control 6062 is used to trigger the code export instruction.
  • the computing device outputs the code in the code area 606 to the target location in response to the code export instruction.
  • the running control 6061 is used to trigger the code running instruction.
  • the computing device executes the code entered in the code area 606 in response to the code execution instruction.
  • the user can interactively construct the visualization view, and the user can complete the steps of object creation and parameter configuration by dragging and dropping, which further simplifies the construction process.
  • the meaning of the code displayed in the code area 606 in FIG. 11 is to set the parameters of the visual view, the specific meaning is to set the width to 1000, the height to 800, the background color to RGB(4,14,4), the X axis
  • the type is set to linear, the domain is set between 0 and 2, the value range is set between 0 and 500, the type of Y-axis is set to linear, the domain is set between 0 and 3, and the value range is set between 0 and 500. between 520.
  • the embodiments of the present application support the flexible use of two construction methods of code construction and interactive construction in a unified construction interface to build charts, thereby solving the problem that only one of code construction and interactive construction in the related art can be selected.
  • the technical problems used, the following is an example of the implementation method related to code construction.
  • the computing device presents program code for generating the visualization in the build interface.
  • the construction interface 60 includes a code area 606 for displaying the first code for generating the visual view 6051 .
  • the computing device displays the generated code of the visual view 6051 in the code area 606 . In this way, the constructed visualization view and the generated code of the visualization view are returned to the user through the same interface, so that the user can view the effect and code of the visualization view synchronously.
  • the source of the first code displayed in the construction interface includes many situations, and the following is an example of combining two situations.
  • the first code displayed in the construction interface is the code generated according to the user's operation on the interface component in the process of constructing the visual view in an interactive manner.
  • the first code is code generated based on the setting operation of the element attribute triggered on the interactive construction view 602 or the attribute view 604 .
  • the first code represents the visual encoding set for the visualization element. For example, the user selects Arial as the font of the text icon in the font input box in the property view 604, and the first code indicates that the font of the text icon is set to Arial.
  • the first code displayed in the construction interface is the code input by the user in the process of constructing the visual view by means of code.
  • the first code is the code entered in the code area 606 in the construction interface 60 .
  • the above-described build interface supports the ability to export the generated code of the visualization.
  • the code area 606 in the above construction interface 60 includes an export control 6062, and the user clicks or operates on the export control 6062 to trigger a code export instruction.
  • the computing device outputs the first code in the code region 606 to the target location in response to the code export instruction.
  • the code export instruction is used to instruct to export the first code in the code area 606 .
  • This destination is used to save the generated code for the exported visualization.
  • the target location includes, but is not limited to, a default location or a location set by the user.
  • the target location includes, but is not limited to, a local storage location of the computing device or a storage location in the cloud.
  • the above-described build interface supports the function of generating code for inputting the visualization.
  • the code area in the build interface above contains an input component capable of receiving user input.
  • the user inputs the second code in the code area in the construction interface to trigger the code running instruction.
  • the computing device adjusts the visual view by running the second code input in the code area in the construction interface in response to the code running instruction, and provides the adjusted visual view in the construction interface.
  • the code running instruction instructs to run the code input in the construction interface.
  • the code area 606 in the construction interface includes an export control 6062 , and the code running instruction is triggered by an operation on the export control 6062 . In this way, the code entered by the user can be fed back into the interaction building process, allowing the user to adjust the visualization by entering the code.
  • the computing device will synchronously update the code displayed in the construction interface as the user sets the properties of the visual element. For example, the computing device obtains the third code corresponding to the attribute setting operation in response to the attribute setting operation on the visual element in the visualization view triggered on the construction interface; and adds the third code to the code area 606 in the construction interface.
  • the property setting operation is, for example, an operation triggered by an input component in the property view 604 , an operation triggered by the interactive construction view 602 or the hierarchical view 603 .
  • the property setting operation is an operation of inputting the included angle of the coordinate axis triggered by the component 6042 for inputting the included angle of the coordinate axis in the property view 604 .
  • the code displayed in the interface can be updated in real time following the user's operation, so that the code generated by the user's operation can be fed back in a more timely manner.
  • FIG. 9 shows a frame diagram of an interactive construction method of a visual view.
  • the frame structure shown in FIG. 9 can be provided as a construction device 70 for a visualization view.
  • the frame structure of the apparatus 70 for constructing the visual view mainly includes three parts, which are the generation module 71 of the interactive construction interface, the visual grammar module 72 and the communication module 73 respectively.
  • the interactive construction interface generation module 71 is used to generate the interactive construction interface.
  • the generation module 71 of the interactive construction interface supports the user to specify the coordinate system through the interface and define the visual code.
  • the generation module 71 of the interactive construction interface includes a coordinate system formulation module 711 , a visual code formulation module 712 , a visual effect return module 713 and a visual code return module 714 .
  • the coordinate system setting module 711 is used to support the user to specify the coordinate system through the interface.
  • Visual code formulation module 712 is used to support specifying visual codes in interaction with the user.
  • the visualization effect returning module 713 is used to return the final visualization effect graph to the user, so as to facilitate the user to view the effect and interactively debug the parameters in the view.
  • the visual code return module 714 is used to return the code corresponding to the visual effect diagram, which is convenient for the user to directly export or perform secondary development.
  • the visual grammar module 72 is used to support visual coding based on a custom coordinate system.
  • the visual grammar module 72 includes a visual coding module 721 and a code packaging module 722 .
  • the visual coding module 721 is used to draw visual elements through the visual coding and coordinate system specified by the user.
  • the visual coding module 721 includes a classic coordinate axis library 7211 , a trajectory coordinate axis module 7212 , a coordinate system calculation module 7213 and other visual coding modules 7214 .
  • the classic coordinate axis library 7211, the trajectory coordinate axis module 7212, and the coordinate system calculation module 7213 can be provided as the layout calculation module.
  • the three modules of the classic coordinate axis library 7211, the trajectory coordinate axis module 7212, and the coordinate system calculation module 7213 are used for processing position-related layout calculations.
  • the classic coordinate axis library 7211 is convenient for users to directly construct the classic coordinate system.
  • the Trajectory Axes module 7212 allows the user to define axes of arbitrary shape.
  • the coordinate system calculation module 7213 is used to encapsulate the layout calculation process of mapping data to a specific position in the coordinate system.
  • the other visual coding module 7214 handles the designation and rendering methods of other visual channels in the visualization in addition to the positional layout.
  • the code encapsulation module 722 encapsulates the underlying layout calculation process and rendering process, and outputs concise declarative code to return to the construction interface.
  • the communication module 73 is used to interact with the user.
  • the communication module 73 is configured to receive the coordinate system parameters input by the user (such as a drawn trajectory), and the communication module 73 sends the coordinate system parameters input by the user to the generation module 71 of the interactive construction interface.
  • the generation module 71 of the interactive construction interface uses the coordinate system parameters input by the communication module 73 to generate the construction interface.
  • the visual view and the code are sent to the communication module 73 .
  • the communication module 73 returns the visualization and code to the user.
  • Visual grammar module 72 provides a set of declarative visual programming language, which encapsulates the underlying layout calculation process and visual rendering process. Users can obtain code for complex visual views by entering data, formulating coordinate systems, and defining visual coding rules and visualize the results.
  • the visual grammar module 72 includes the following visual coding module 721 and code packaging module 722.
  • the visual coding module 721 is mainly used to help the user to specify visual channels, such as position, color, shape, etc., to display data attributes, and to encapsulate the calculation and drawing process of visual elements.
  • the visual encoding module 721 includes a layout calculation module.
  • the layout calculation module is responsible for the position-related calculation tasks.
  • this embodiment of the present application also provides a trajectory coordinate axis module 7212 to support the user to construct a custom coordinate axis .
  • the coordinate system calculation module 7213 it further provides a method for defining the combination relationship between the horizontal and vertical coordinate axes, which supports more flexible coordinate system definition. .
  • the specific description is as follows.
  • the classic coordinate axis library 7211 in this embodiment of the application provides classic coordinate axis libraries including linear coordinate axes, polar coordinate axes, circular coordinate axes, exponential function coordinate axes, quadratic function coordinate axes, and category coordinate axes.
  • classic coordinate axis libraries including linear coordinate axes, polar coordinate axes, circular coordinate axes, exponential function coordinate axes, quadratic function coordinate axes, and category coordinate axes.
  • several coordinate axes in the classic coordinate axis library 7211 can be directly called, and the parameters such as the definition domain and value range of the coordinate axis can be adjusted through the configuration options, and the coordinate axis can be directly completed. build process.
  • the code for constructing the linear coordinate axis is as follows, the meaning of the code shown below is to set the definition domain of the linear coordinate axis to be 1.2 times the minimum value to 1.2 times the maximum value of the data to be visualized, and The range of the linear axis is set to the canvas height.
  • the code of the circular category coordinate axis is as follows, the meaning of the code shown below is to set the definition domain of the circular category coordinate axis to all the values of the name attribute of the data to be visualized, and the circular
  • the value range of the category coordinate axis (that is, the starting and ending angles) is set to [0,270], the specified circle radius is 100, and the angle corresponding to each category and the interval between categories is specified as 0.3.
  • the code of the quadratic function coordinate axis is as follows, the meaning of the code shown below is to set the quadratic term coefficient a in the quadratic function corresponding to the quadratic function coordinate axis to 1, and set the quadratic function coordinate
  • the value range of x in the quadratic function corresponding to the axis is set to [0, 20]
  • the definition domain of the quadratic function coordinate axis is set to [0, 600]
  • the width of the value range of the quadratic function coordinate axis is set.
  • the height of the value range of the quadratic function coordinate axis to 0.8 times the height of the canvas.
  • the code of the category coordinate axis is as follows, the meaning of the code shown below is to set the definition domain of the category coordinate axis to all the values of the name attribute of the data to be visualized, and set the value range of the category coordinate axis to Set to canvas width, and set the ratio of the distance between categories on the category axis to the size of each category itself to 0.3.
  • the code of the polar coordinate axis is as follows, the meaning of the code shown below is to set the definition domain of the polar coordinate axis to all the values of the name attribute of the data to be visualized, and set the value range of the polar coordinate axis to (Start and end angle) is set to [0,360].
  • the code for declaring the trajectory coordinate axis of the trajectory coordinate axis module 7212 is as follows, the meaning of the code shown below is to set the trajectory data of the trajectory coordinate axis as data trajData, and set the definition domain of the trajectory coordinate axis. For [0,500], set the width of the range (distribution range) of the trajectory coordinate axis to the width of the canvas, and set the height of the range (distribution range) of the trajectory coordinate axis to 0.4 times the height of the canvas.
  • the track coordinate axis module 7212 provided by the embodiment of the present application, as shown in FIG. 12 , allows the data of a track to be used as the coordinate axis attribute, thereby constructing a coordinate axis of any shape.
  • the custom coordinate axis shape capability provided by the trajectory coordinate axis module 7212 greatly improves the flexibility of coordinate system definition and facilitates the generation of customized coordinate systems.
  • the calculation process of the element layout position is encapsulated by the track coordinate axis module 7212 . Any value in the definition domain of the trajectory coordinate axis will be mapped to the corresponding position on the trajectory according to the proportion of the value in the definition domain.
  • trajectory coordinate axis with a definition domain of 0 to 100
  • data with a value of 30 will be mapped to the position on the canvas where the trajectory point is 30% of the entire trajectory length from the start point of the trajectory, and will It is used as the coordinate of the data on the coordinate axis.
  • the coordinate system calculation module 7213 abstracts the structure of the coordinate system, that is, a two-dimensional coordinate system consists of the X axis and the Y axis, and the combination relationship between the X axis and the Y axis is divided into two types: relative type combination and absolute type.
  • FIG. 8 shows a schematic diagram of the combination relationship of the coordinate axes.
  • the absolute type combination means that the Y-axis always maintains a certain angle with the canvas, regardless of the direction of the X-axis.
  • the relative type combination means that the Y-axis is always at a certain angle to the X-axis, and the direction of the Y-axis changes with the direction of the X-axis tangent.
  • the user declares the coordinate system by entering the following code, and after adding the rectangular visualization element, the visualization result shown in FIG. 10 will be obtained.
  • the meaning of the following code is to set both the X-axis and the Y-axis as the coordinate axes in the predefined classic coordinate axis library 7211.
  • Set the X-axis to the pre-defined line category axis.
  • Set the Y-axis to the predefined linear numerical axis.
  • Set the combination type of the X-axis and the Y-axis to relative type, set the angle between the X-axis and the Y-axis to 50 degrees, and rotate the coordinate system counterclockwise by 50 degrees.
  • a user can customize a free-form coordinate system through the classic coordinate axis library 7211, the trajectory coordinate axis module 7212, and the coordinate system combination definition method provided by the embodiment of the present application, so as to construct a visual view of a complex layout.
  • the embodiment of the present application maps the encapsulated data to the calculation process of the position in the coordinate system.
  • the specific flow of the calculation process from the data to the position in the coordinate system is as follows, including the following steps S1 to S4.
  • the combined angle a in the following formula (1) is an example of the first angle in the method shown in FIG. 7
  • the combined angle a in the following formula (2) is an example of the first angle in the method shown in FIG. 7 .
  • Step S1 calculates the coordinate position (x 1 , y 1 ) of the data on the X-axis.
  • Step S2 calculates the coordinate position (x 2 , y 2 ) of the data on the Y axis.
  • Step S3 calculates the direction A of the Y axis under the current X coordinate according to the combination type of the coordinate axis, the combination angle a, the current tangent direction of the X axis and the offset angle b of the coordinate system.
  • the coordinate axis combination type is absolute type
  • the following formula (1) is used to calculate the direction of the Y axis.
  • the coordinate axis combination type is the relative type
  • the following formula (2) is used to calculate the direction of the Y axis.
  • step S4 according to the coordinate position and direction on the Y-axis, the offset of the horizontal and vertical coordinates of the data is calculated and superimposed on the coordinates of the data on the X-axis to obtain the final coordinate position of the data.
  • Step S4 is calculated by using the following formula (3) and formula (4).
  • the x and y obtained by the following formula (3) and formula (4) represent the pixel position on the canvas.
  • the other visual encoding module 7214 provides user designation and rendering methods for visual channels other than the location of visual elements.
  • Other visual channels outside of position include, but are not limited to, fill color, line color, line width, element height, element width, angle, and the like.
  • the declarative code for visual coding is as follows.
  • One way is to directly specify the value as the value of the element's visual channel, for example, in the above example, set the border width of each rectangle to 0.
  • Another way is to use the attribute value of the data returned by the function as the element attribute.
  • the height of the rectangle is bound to the attribute value of the val attribute of each piece of data. The rectangle corresponding to the data with a large val value will be taller.
  • the code encapsulation module 722 separates the declarative code from the specific implementation code, allows the declarative code to be defined, and encapsulates the underlying rendering and calculation processes.
  • the user is mainly concerned with what needs to be drawn and which attribute values the drawn elements need to correspond to, and does not need to care too much about how to draw and how to perform mapping calculation on data values.
  • the encapsulated semantic code is as shown in the above case, and will be returned to the generation module 71 of the interactive construction interface, which is convenient for users to export or perform secondary development together with the grammar package.
  • FIG. 11 is a schematic diagram of a generation module 71 of a construction interface of a visualization view provided by an embodiment of the present application.
  • the interactive construction interface generation module 71 provided by the embodiment of the present application includes a series of interaction schemes, helping the user to define the coordinate system and visual coding, iteratively adjust the visual parameters, and return the visual view and code to the user.
  • the interactive construction interface generation module 71 is used, for example, to generate the construction interface 60 .
  • the generation module 71 of the interactive construction interface includes a coordinate system formulation module 711 , a visual code formulation module 712 , a visual effect return module 713 and a visual code return module 714 .
  • the coordinate system setting module 711 allows the user to interactively specify parameters such as the coordinate axis in the two-dimensional coordinate system and the combination type and combination angle between the coordinate axes.
  • the user can drag the coordinate axis or track coordinate axis in the classic coordinate axis library 7211 on the left to the X or Y axis to specify the coordinate axis type.
  • the user can set the parameters of the X or Y coordinate axis in the property view 604 in the lower left corner of the interface, and the input methods include the following three.
  • Input method 1 The user inputs a numerical value as a parameter, for example, the input interval [0,100] is used as the definition domain of the linear coordinate axis.
  • Input method 2 The user drags the data attribute to the parameter of the coordinate axis, indicating that the value range of the data value is used as the definition domain of the coordinate axis. For example, the user drags the name attribute field of the data to the definition domain of the X-axis, indicating that all the values of the name are used as the definition domain of the category-type coordinate axis.
  • Input method 3 For the trajectory coordinate axis, the user can directly draw a trajectory in the panel manually, and the system will automatically extract the trajectory points as the trajectory data of the coordinate axis. The user can also use the trajectory coordinates in the data to specify two of the data. The attribute is used as the horizontal and vertical coordinates of the trajectory data. Both of the above schemes for drawing and trajectory data allow the user to define an axis of any shape.
  • the user can adjust the coordinate system parameters in the property view 604, including selecting the combination type of the coordinate axis from the drop-down menu, rotating or scaling the coordinate axis by dragging the rotation point and zoom point on the coordinate axis, and adjusting the combination of the coordinate axis The angle and the rotation angle of the coordinate system.
  • the system will automatically apply it to the construction of the visualization attempt according to the user's input, and return the adjusted visualization results, so that the user can obtain the result feedback in real time during the dragging process, realize the interactive parameter adjustment process, and improve the user's experience. development efficiency.
  • the visual coding formulating module 712 in this embodiment of the present application allows the user to add visual elements in the visual view and set visual coding. Specifically, as shown in (a) of FIG. 13 , the user can drag and drop visual elements (eg, rectangle, circle) in the visual element library to add to the interactive construction view 602 . For example, FIG. 13 shows the user dragging the rectangular icon 6031 to the interaction construction view 602 .
  • visual elements eg, rectangle, circle
  • this embodiment provides three different interactive ways to help users declare visual codes.
  • Interaction mode 1 the user can drag the attribute of the data to the visual channel option box of the element in the attribute view 604, and use the attribute value of the data as the visual channel of the visual element. value. For example, in FIG. 13, dragging the text field to the text channel 6045 of the text element indicates that the displayed text of the text element is the content of the text field of the data.
  • the value input by the user is used as the visual channel.
  • the user inputs 20 as the font size of the text element into the font size input component 6046 of the property view 604 in the interface.
  • Interaction Mode 3 As shown in (d) of FIG. 13 , a color selector 608 is provided, and the built-in color selector 608 is used to select a color as the value of the visual channel.
  • the system will call the underlying visual grammar module 72 to perform visual rendering and code encapsulation, and then directly return the visual view constructed by the user in the interface
  • the user can intuitively grasp the current status of the view generation, and can also interactively adjust the coordinate axis parameters or visual coding by returning the results to achieve the desired visualization effect.
  • the user in addition to returning the visual effect, the user will also get the visual code written in the declarative syntax on the interface.
  • the user can directly modify the code for secondary development, or copy the code to other projects for implementation. Export and deployment of complex visualization code.
  • the following is an example to illustrate the method of constructing a visual view.
  • Fig. 14 shows a schematic diagram of a case of Napoleon's Eastern Expeditions realized using the trajectory coordinate system. This embodiment realizes the visualization case flow of Napoleon's Crusades with a continuous curve as shown in FIG. 14 , including the following steps (a) to (i).
  • Step (a) The user drags the track coordinate axis in the coordinate axis library as the X axis.
  • Step (b) The user drags the linear value coordinate axis in the coordinate axis library as the Y axis.
  • Step (c) The user selects the coordinate axis relationship as relative type, and sets the angle between the X axis and the Y axis as 90 degrees.
  • Step (d) sets the properties of the X-axis.
  • the user drags the longitude and latitude fields in the data to the track data option on the X-axis.
  • the user drags the date field in the data to the definition domain option of the X axis as the definition domain of the coordinate axis.
  • the user enters the value range of the X-axis, and defines the length and width of the X-axis drawing range.
  • Step (e) The user drags the size field of the number of troops of the data to the domain option of the Y-axis, and sets the Y-axis value range to [0,100]. A coordinate system as shown in FIG. 15 is thus established.
  • Step (f) The user adds a visual element of type 'area' to the view.
  • Step (g) The user drags the date field of the data to the x option of the "Area" property panel, drags the size field of the army number to the y property of the element property panel, and selects the fill color of the area to be light yellow.
  • Step (h) Through the returned visualization result, drag the Y axis to rotate, adjust the combined angle between the coordinate axes, and finally obtain the visualization effect diagram as shown in FIG. 15 .
  • step (i) other auxiliary views are constructed, and a visualization effect diagram as shown in FIG. 15 can be obtained.
  • the meaning of the code area 606 in FIG. 15 is to define the trajectory coordinate axis, and the specific meaning is to set the range of the trajectory coordinate axis to be the closed interval of 0 to 600, the closed interval of 0 to 600*0.4, and the definition domain of the Y axis is equal to The number of troops, set the Y-axis height to 70.
  • the embodiment of the present application can support the establishment of a custom coordinate system based on the trajectory coordinate axis, and can define the relationship and combination angle between the coordinate axes, provide more flexible coordinate system options, and make the construction layout complex
  • it can encapsulate the mapping calculation process of data to the canvas position. Users only need to define the coordinate axis parameters and declare the visual code to complete the construction of the visual view, so there is no need to have basic knowledge background such as mathematics and graphics drawing. It greatly reduces the workload of complex view construction and improves construction efficiency.
  • a custom coordinate system provides a set of interactive interfaces to help users build complex visual views, create visual elements and visual coding through drag-and-drop methods, and can draw, specify, etc.
  • the coordinate system is established in this way, and the visual results and codes are updated in real time and returned to the user for convenient parameter adjustment and export, which reduces the professional threshold and the efficiency of building and debugging codes, effectively avoiding the waste of manpower and time.
  • some embodiments of the present application propose an abstract model of a free coordinate system in a visualization view, and based on this, a set of visualization grammars that allow a user to define a coordinate system are established.
  • Users can use a declarative language to select common coordinate axes or customize any trajectory as coordinate axes to establish a coordinate system, which encapsulates the mapping process of data values to positions in the coordinate system.
  • Users only need to declare the binding rules of the coordinate system and visual coding, namely It can complete the drawing of complex visual views without mathematical background knowledge and position calculation, thus improving the development efficiency and the code amount by more than 50%.
  • a set of interactive visual view construction methods are designed. Users can use simple and intuitive interactive operations to select or draw the coordinate axes in the coordinates, freely create a coordinate system, and then add visual elements in the coordinate system for visual coding, Adjust parameters to complete complex visualization building and refinement tasks.
  • the final result can be directly exported in the form of code, which is convenient for use and secondary development, which greatly reduces the development threshold and reduces the waste of manpower, time and resources in the development of complex visual views.
  • FIG. 16 is a schematic structural diagram of a computing device provided by an embodiment of the present application.
  • the visualization view constructing apparatus 900 shown in FIG. 16 is used to implement the visualization view constructing method provided by the above method embodiments.
  • the apparatus 900 for constructing the visual view shown in FIG. 16 is the terminal 10 or the server 11 in FIG. 6 .
  • the apparatus 900 for constructing a visual view shown in FIG. 16 is a computing device in the method flow shown in FIG. 7 .
  • the communication module 901 in the apparatus 900 for constructing a visual view shown in FIG. 16 is the communication module 73 in FIG. 9 .
  • the visual grammar module 902 in the apparatus 900 for constructing a visual view shown in FIG. 16 includes the visual coding module 721 and the code encapsulation module 72 in FIG. 9 .
  • the generation module 903 of the interactive construction interface in the visual view construction apparatus 900 shown in FIG. 16 includes the coordinate system formulation module 711, the visual code formulation module 712, the visualization effect return module 713 and the visualization code return module 714 in FIG. 9 .
  • the apparatus 900 for constructing a visual view includes a communication module 901 , a visual grammar module 902 and a generating module 903 for interactively constructing an interface.
  • the communication module 901 is used to support the construction apparatus 900 of the visual view to execute S201 and S205.
  • the visual grammar module 902 is used to support the construction apparatus 900 of the visual view to execute S202.
  • the generation module 903 of the interactive construction interface is used for the construction apparatus 900 to support the visualization view to execute S204.
  • the apparatus embodiment described in FIG. 16 is only illustrative.
  • the division of the above-mentioned units is only a logical function division.
  • there may be other division methods for example, multiple units or components may be combined or Integration into another system, or some features can be ignored, or not implemented.
  • Each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • All or part of each unit in the apparatus 900 for constructing a visual view is implemented by software, hardware, firmware or any combination thereof.
  • the above-mentioned visual grammar module 902 and interactive construction interface generation module 903 are software generated by at least one processor 801 in FIG. 17 after reading the program code stored in the memory 802 functional unit to achieve.
  • the above-mentioned units in FIG. 16 are respectively implemented by different hardware in the computing device.
  • the communication module 901 is implemented by at least one of the network interface 803 or the input-output interface 806 in FIG. 17 .
  • the visual grammar module 902 is implemented by a part of the processing resources in at least one processor 801 in FIG. 17 (for example, one core or two cores in a multi-core processor), and the interactive construction interface generation module 903 is implemented by FIG. 17 .
  • the remaining part of the processing resources in at least one processor 801 (for example, other cores in a multi-core processor), or use a field-programmable gate array (field-programmable gate array, FPGA), or a programmable device such as a coprocessor to complete .
  • processor 801 for example, other cores in a multi-core processor
  • FPGA field-programmable gate array
  • programmable device such as a coprocessor
  • the visual grammar module 902 in FIG. 16 is implemented by a hardware programmable device, and the generation module 903 of the interactive construction interface is the program code stored in the memory read by the CPU After that, the generated software functional unit.
  • the basic hardware structure of the computing device is exemplified below.
  • FIG. 17 is a schematic structural diagram of a computing device provided by an embodiment of the present application.
  • the computing device 800 shown in FIG. 17 is used to implement the method for constructing a visualization view provided by the above method embodiments.
  • the computing device 800 shown in FIG. 17 is the terminal 10 or the server 11 in FIG. 6 .
  • the computing device 800 shown in FIG. 17 is the computing device in the method flow shown in FIG. 7 .
  • the computing device 800 shown in FIG. 17 includes a coordinate system formulation module 711 , a visual code formulation module 712 , a visualization effect return module 713 , and a visual code return module 714 shown in FIG. 9 . , a visual coding module 721 and a code packaging module 722 .
  • Computing device 800 includes at least one processor 801 , memory 802 , and at least one network interface 803 .
  • the processor 801 is, for example, a general-purpose central processing unit (central processing unit, CPU), a network processor (network processor, NP), a graphics processing unit (graphics processing unit, GPU), a neural-network processing unit (neural-network processing units, NPU) ), a data processing unit (DPU), a microprocessor or one or more integrated circuits for implementing the solution of the present application.
  • the processor 801 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof.
  • the PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
  • the memory 802 is, for example, a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (RAM) or a memory device that can store information and instructions.
  • ROM read-only memory
  • RAM random access memory
  • Other types of dynamic storage devices such as electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, optical disks storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of Any other medium accessed by a computer without limitation.
  • the memory 802 exists independently and is connected to the processor 801 through an internal connection 804 .
  • the memory 802 and the processor 801 are optionally integrated.
  • the network interface 803 uses any transceiver-like device for communicating with other devices or communication networks.
  • the network interface 803 includes, for example, at least one of a wired network interface or a wireless network interface.
  • the wired network interface is, for example, an Ethernet interface.
  • the Ethernet interface is, for example, an optical interface, an electrical interface or a combination thereof.
  • the wireless network interface is, for example, a wireless local area network (wireless local area network, WLAN) interface, a cellular network network interface or a combination thereof, and the like.
  • processor 801 includes one or more CPUs, such as CPU0 and CPU1 shown in FIG. 17 .
  • computing device 800 optionally includes multiple processors, such as processor 801 and processor 805 shown in FIG. 17 .
  • processors are, for example, a single-core processor (single-CPU), or a multi-core processor (multi-CPU).
  • a processor herein optionally refers to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • computing device 800 also includes internal connections 804 .
  • the processor 801 , the memory 802 and at least one network interface 803 are connected by an internal connection 804 .
  • Internal connections 804 include pathways that transfer information between the aforementioned components.
  • the internal connection 804 is a single board or bus.
  • the internal connection 804 is divided into an address bus, a data bus, a control bus, and the like.
  • computing device 800 also includes an input-output interface 806 .
  • Input and output interface 806 is connected to internal connection 804 .
  • the input and output interface 806 is used to connect with an input device, and receive commands or data related to the method shown in FIG. 7 input by the user through the input device, such as a construction request, information for defining coordinate axes (such as Trajectory data, coordinate axis definition domain, coordinate axis type, coordinate axis value domain), information used to define the combination relationship of coordinate axes (such as absolute type or relative type, the angle between the Y axis and the canvas, the angle between the Y axis and the X axis) , the code used to generate the visualization, the type of icon, and the parameters of the chart or icon.
  • Input devices include, but are not limited to, keyboards, touch screens, microphones, mice, or sensing devices, among others.
  • the input-output interface 806 is also used to interface with output devices.
  • the input and output interface 806 outputs the intermediate results and/or final results generated by the processor 301 executing the above-mentioned method shown in FIG. 7 through the output device, such as the visual view, the code for generating the visual view, and the result generated according to the configuration operation on the visual view. code.
  • Output devices include, but are not limited to, displays, printers, projectors, and the like.
  • the processor 801 implements the methods in the foregoing embodiments by reading program codes 810 stored in the memory 802, or the processor 801 implements the methods in the foregoing embodiments by using internally stored program codes.
  • the processor 801 implements the method in the above embodiment by reading the program code 810 stored in the memory 802
  • the memory 802 stores the program code for implementing the visualization view construction method provided by the embodiment of the present application.
  • A refers to B, which means that A is the same as B or A is a simple variation of B.
  • first and second in the description and claims of the embodiments of the present application are used to distinguish different objects, rather than used to describe the specific order of the objects, nor should they be construed as indicating or implying relative importance sex.
  • first position and the second position are used to distinguish different positions, not to describe a specific order of the positions, nor should it be understood that the first position is more important than the second position.
  • the meaning of "at least one” means one or more, and the meaning of "plurality” means two or more.
  • multiple visualization elements refers to two or more visualization elements.
  • the above-described embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software When implemented in software, it can be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server or data center Transmission to another website site, computer, server, or data center is by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media.
  • the usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), and the like.

Abstract

The present application relates to the technical field of computers and provides a method and apparatus for constructing a visual view. The present application provides a method for constructing a visual view by using a coordinate system with a trajectory coordinate axis as a basis. The trajectory coordinate axis supports a user to customize the shape of a coordinate axis by drawing or other modes. By automatically calculating the position of data to be visualized in a coordinate system based on a trajectory coordinate axis, a complex layout calculation development process is encapsulated, and complicated operations for a user to manually calculate the specific position of an element during the construction of a visual view by using a rectangular coordinate system are avoided. Therefore, learning cost of a user is reduced, and the efficiency of constructing a complex visual view is improved.

Description

可视化视图的构建方法及装置Method and device for constructing visual view
本申请要求于2021年04月26日提交的申请号为202110455318.9、发明名称为“可视化视图的构建方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110455318.9 and the invention titled "Method and Device for Constructing Visualization Views" filed on April 26, 2021, the entire contents of which are incorporated into this application by reference.
技术领域technical field
本申请涉及计算机技术领域,特别涉及一种可视化视图的构建方法及装置。The present application relates to the field of computer technologies, and in particular, to a method and apparatus for constructing a visualization view.
背景技术Background technique
数据可视化是一种通过可视化元素和视觉通道,将数据的属性、特征等信息进行编码,直观地展示给用户的技术。它利用人敏锐的视觉感知能力和计算机强大的数据分析能力,大大提升了理解和分析数据的效率。近年来,数据可视化技术在数据新闻、智慧城市和商业智能等领域都扮演了重要的角色。Data visualization is a technology that encodes the attributes, characteristics and other information of data through visual elements and visual channels, and intuitively displays it to users. It utilizes the sharp visual perception ability of people and the powerful data analysis ability of computer, which greatly improves the efficiency of understanding and analyzing data. In recent years, data visualization techniques have played an important role in data journalism, smart cities, and business intelligence.
相关技术使用直角坐标系来构建可视化视图。为了对数据新闻或者其他高维数据进行可视化,开发者需要计算每个点在直角坐标系下的坐标,再根据直角坐标系下的坐标计算出曲线轮廓上点的位置坐标,指示计算机在计算出的位置坐标绘制可视化元素,从而产生可视化视图。The related art uses a Cartesian coordinate system to construct a visualization view. In order to visualize data news or other high-dimensional data, the developer needs to calculate the coordinates of each point in the rectangular coordinate system, and then calculate the position coordinates of the point on the curve outline according to the coordinates in the rectangular coordinate system, instructing the computer to calculate The position coordinates of the draw visualization elements, resulting in a visualization view.
然而,上述流程要求开发人员有很强的数学背景和编程能力,同时需要花费大量时间和精力进行数学公式的推导和位置计算函数的编写,导致了构建复杂可视化视图时效率低下,学习成本很高。However, the above process requires developers to have a strong mathematical background and programming ability, and spend a lot of time and energy on the derivation of mathematical formulas and the writing of position calculation functions, resulting in low efficiency and high learning costs when building complex visualization views. .
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种可视化视图的构建方法及装置,有助于提高构建复杂可视化视图的效率。所述技术方案如下。The embodiments of the present application provide a method and apparatus for constructing a visualization view, which help to improve the efficiency of constructing a complex visualization view. The technical solution is as follows.
第一方面,提供了一种可视化视图的构建方法,该方法包括:接收构建请求,构建请求指示基于设定的坐标系构建目标数据的可视化视图,坐标系的坐标轴包括轨迹坐标轴,轨迹坐标轴是指形状为轨迹的坐标轴;根据所述轨迹坐标轴以及所述目标数据,确定所述目标数据在可视化视图中的位置;根据确定出的位置,获取所述目标数据的可视化视图,所述可视化视图包括用于表示所述目标数据的可视化元素,所述可视化元素在所述可视化视图中位于所述确定出的位置;提供可视化视图。目标数据是指待进行可视化的数据,例如,目标数据为图表。A first aspect provides a method for constructing a visual view, the method comprising: receiving a construction request, the construction request instructing to construct a visual view of target data based on a set coordinate system, the coordinate axis of the coordinate system includes a trajectory coordinate axis, the trajectory coordinate axis The axis refers to a coordinate axis whose shape is a trajectory; according to the trajectory coordinate axis and the target data, determine the position of the target data in the visual view; according to the determined position, obtain the visual view of the target data, so The visualization view includes visualization elements for representing the target data, the visualization elements are located at the determined positions in the visualization view; and the visualization view is provided. The target data refers to the data to be visualized, for example, the target data is a chart.
以上提供了一种以轨迹坐标轴为基础的坐标系来构建可视化视图的方法,通过轨迹坐标轴能支持用户通过绘制或者其他方式来自定义坐标轴的形状,通过自动计算出待可视化的数据在基于轨迹坐标轴的坐标系中的位置,从而封装了复杂的布局计算的开发过程,避免采用直角坐标系构建视图时用户手动计算元素具体位置的繁琐操作,因此降低了用户的学习成本,提高了构建复杂可视化视图的效率。The above provides a method for constructing a visual view with a coordinate system based on the trajectory coordinate axis. The trajectory coordinate axis can support the user to customize the shape of the coordinate axis by drawing or other methods, and automatically calculate the data to be visualized. The position in the coordinate system of the trajectory coordinate axis, thus encapsulating the development process of complex layout calculation, avoiding the tedious operation of manually calculating the specific position of the element when constructing the view using the Cartesian coordinate system, thus reducing the user's learning cost and improving the construction. Efficiency of complex visualizations.
在一些实施例中,支持用户输入弯曲轨迹作为坐标轴。具体来说,上述构建请求指示的 坐标系中轨迹坐标轴的形状是用户输入的轨迹,所述轨迹坐标轴上具有多个曲率不同的点。In some embodiments, the user is supported to input a curved trajectory as the coordinate axis. Specifically, the shape of the trajectory coordinate axis in the coordinate system indicated by the above construction request is the trajectory input by the user, and the trajectory coordinate axis has a plurality of points with different curvatures.
在一些实施例中,所述轨迹的输入方式包括以下任意一种:在构建界面中绘制所述轨迹;或者,在构建界面中输入所述轨迹上多个点的位置坐标。In some embodiments, the input method of the trajectory includes any one of the following: drawing the trajectory in the construction interface; or inputting the position coordinates of multiple points on the trajectory in the construction interface.
在一些实施例中,支持用户输入垂直坐标系的情况。具体来说,上述构建请求指示的坐标系中每个坐标轴的形状是直线。也即是,坐标系是垂直坐标系。In some embodiments, the case where the user enters a vertical coordinate system is supported. Specifically, the shape of each coordinate axis in the coordinate system indicated by the above build request is a straight line. That is, the coordinate system is a vertical coordinate system.
在一些实施例中,获取轨迹坐标轴上目标数据对应的第一位置,包括:根据目标数据的值在轨迹坐标轴的定义域中的比例,获取轨迹坐标轴上轨迹点的位置,作为第一位置,轨迹点与轨迹坐标轴的端点之间的距离与比例相关。In some embodiments, acquiring the first position corresponding to the target data on the trajectory coordinate axis includes: acquiring the position of the trajectory point on the trajectory coordinate axis according to the ratio of the value of the target data in the definition domain of the trajectory coordinate axis, as the first position Position, the distance between the track point and the endpoint of the track axis is scale-dependent.
在一些实施例中,在获取坐标系位置时,还考虑坐标轴组合关系。具体地,根据第一位置以及坐标系的坐标轴组合关系,获取坐标系中目标数据对应的第二位置。In some embodiments, the coordinate axis combination relationship is also considered when obtaining the coordinate system position. Specifically, the second position corresponding to the target data in the coordinate system is acquired according to the first position and the coordinate axis combination relationship of the coordinate system.
在一些实施例中,坐标轴组合关系包括绝对型组合关系或者相对型组合关系中至少一项,绝对型组合关系包括纵坐标轴与画布保持为设定的第一角度,相对型组合关系包括纵坐标轴与横坐标轴保持为设定的第二角度,所述画布为构建界面中用于显示所述可视化视图的区域。In some embodiments, the coordinate axis combination relationship includes at least one of an absolute type combination relationship or a relative type combination relationship, the absolute type combination relationship includes that the ordinate axis and the canvas are kept at a set first angle, and the relative type combination relationship includes The coordinate axis and the abscissa axis are maintained at a set second angle, and the canvas is an area for displaying the visual view in the construction interface.
在一些实施例中,所述根据所述轨迹坐标轴以及所述目标数据,确定所述目标数据在可视化视图中的位置,包括:响应于所述坐标系的组合关系为绝对型组合关系,根据第一角度以及所述坐标系的偏移角度,获取所述坐标系中纵坐标轴相对于画布的角度,所述绝对型组合关系包括纵坐标轴与画布保持为所述第一角度;根据所述纵坐标轴相对于画布的角度,确定所述目标数据在可视化视图中的位置。In some embodiments, the determining the position of the target data in the visual view according to the trajectory coordinate axis and the target data includes: in response to the combination relationship of the coordinate system being an absolute combination relationship, according to The first angle and the offset angle of the coordinate system are obtained, and the angle of the ordinate axis in the coordinate system relative to the canvas is obtained, and the absolute combination relationship includes that the ordinate axis and the canvas remain at the first angle; The angle of the ordinate axis relative to the canvas determines the position of the target data in the visualization view.
通过提供绝对型组合关系,至少能达到以下效果:绝对型组合关系让可视化元素的方向和旋转角度统一,有助于可视化效果中的各个图符保持整齐,从而提升可视化视图的效果。另外,在构建可视化视图时用户想要强调文字的场景中,绝对型组合关系文字始终不旋转与画布保持平行,让用户读文字时更方便。By providing an absolute combination relationship, at least the following effects can be achieved: the absolute combination relationship makes the orientation and rotation angle of the visualization elements uniform, which helps to keep the various icons in the visualization effect neat, thereby improving the effect of the visualization view. In addition, in the scenario where the user wants to emphasize the text when constructing the visual view, the text in the absolute combination relationship is always kept parallel to the canvas without being rotated, which makes it more convenient for the user to read the text.
在一些实施例中,在坐标系中坐标轴组合关系为相对型组合关系的情况下,响应于所述坐标系的组合关系为相对型组合关系,根据第二角度、所述坐标系的偏移角度以及所述横坐标轴的切线方向,获取所述坐标系中纵坐标轴相对于画布的角度,所述相对型组合关系包括纵坐标轴与横坐标轴保持为所述第二角度;根据所述纵坐标轴相对于画布的角度,确定所述目标数据在可视化视图中的位置。In some embodiments, when the coordinate axis combination relationship in the coordinate system is a relative type combination relationship, in response to the coordinate system combination relationship being a relative type combination relationship, according to the second angle, the offset of the coordinate system angle and the tangent direction of the abscissa axis, obtain the angle of the ordinate axis in the coordinate system relative to the canvas, and the relative combination relationship includes that the ordinate axis and the abscissa axis are maintained at the second angle; according to the The angle of the ordinate axis relative to the canvas determines the position of the target data in the visualization view.
通过提供相对型组合关系,至少能达到以下效果:相对性的坐标轴能让Y轴与X轴保持一定角度,当可视化时不强调文字信息,需要让可视化元素(矩形,线条)随着坐标轴的变化有不同的旋转角度时,这种相对型坐标轴能降低实现这种可视化视图的复杂度。By providing a relative combination relationship, at least the following effects can be achieved: the relative coordinate axis can keep the Y axis and the X axis at a certain angle. When visualizing, the text information is not emphasized, and the visual elements (rectangles, lines) need to follow the coordinate axis. This relative axis can reduce the complexity of implementing this visualization when the changes have different rotation angles.
在一些实施例中,可视化视图是通过构建界面提供的,构建界面用于构建目标数据的可视化视图。具体来说,提供构建界面,构建界面包括可视化视图。In some embodiments, the visualization is provided through a construction interface for constructing the visualization of the target data. Specifically, a building interface is provided, which includes a visual view.
在一些实施例中,上述构建界面不仅包括可视化视图,还包括坐标系设定区域,坐标系设定区域用于供用户设定坐标系的参数。In some embodiments, the above construction interface not only includes a visual view, but also includes a coordinate system setting area, where the coordinate system setting area is used for the user to set parameters of the coordinate system.
通过上述方式,支持用户对构建界面触发交互操作来自定义坐标系的参数,免去通过编程语言编写程序代码的繁琐操作,提高构建可视化视图的效率。Through the above method, the user is supported to trigger interactive operations on the construction interface to customize the parameters of the coordinate system, thereby eliminating the tedious operation of writing program codes through a programming language, and improving the efficiency of constructing a visual view.
在一些实施例中,接收构建请求之前,方法还包括:响应于坐标轴设定指令,根据通过坐标系设定区域输入的轨迹数据确定轨迹坐标轴,坐标轴设定指令指示基于轨迹数据设定轨迹坐标轴。In some embodiments, before receiving the construction request, the method further includes: in response to the coordinate axis setting instruction, determining the trajectory coordinate axis according to the trajectory data input through the coordinate system setting area, the coordinate axis setting instruction indicating setting based on the trajectory data Trajectory axis.
通过上述方式,支持用户通过轨迹数据来自定义坐标轴的形状,有助于轨迹坐标轴更精确,灵活性高。In the above manner, the user is supported to customize the shape of the coordinate axis through the trajectory data, which helps the trajectory coordinate axis to be more accurate and more flexible.
在一些实施例中,坐标系设定区域包括轨迹绘制区域,轨迹绘制区域用于供用户绘制轨迹坐标轴的形状,轨迹数据包括在轨迹绘制区域中绘制的轨迹中轨迹点的位置坐标。In some embodiments, the coordinate system setting area includes a trajectory drawing area, where the trajectory drawing area is used for the user to draw the shape of the trajectory coordinate axis, and the trajectory data includes the position coordinates of the trajectory points in the trajectory drawn in the trajectory drawing area.
通过上述方式,支持用户通过绘制一条轨迹来自定义坐标轴的形状,更加简便快捷。In the above manner, it is more convenient and quicker to support the user to customize the shape of the coordinate axis by drawing a track.
在一些实施例中,坐标系设定区域包括轨迹数据选项,轨迹数据包括通过轨迹数据选项输入的目标数据的属性。In some embodiments, the coordinate system setting area includes trajectory data options, and the trajectory data includes attributes of the target data entered through the trajectory data options.
通过上述方式,至少能达到两方面的效果。第一,通过数据给定轨迹数据比直接绘制出来的形状更可控,更精确。第二,当用户想生成的布局形状包含在数据中时,例如利用数据对象的移动轨迹,物体的轮廓形状等作为轨迹形状生成坐标轴时,使用数据直接赋值定义更快速,方便,无需用户临摹。Through the above method, at least two effects can be achieved. First, the trajectory data given by the data is more controllable and accurate than the shape drawn directly. Second, when the layout shape that the user wants to generate is included in the data, for example, the movement trajectory of the data object, the outline shape of the object, etc. are used as the trajectory shape to generate the coordinate axis, it is faster and more convenient to use the data to directly assign the definition, and there is no need for the user to copy .
在一些实施例中,支持用户通过界面触发交互操作来自定义坐标系中的坐标轴关系。例如,坐标系设定区域包括坐标轴关系选项,接收构建请求之前,方法还包括:响应于坐标轴关系设定指令,将通过坐标轴关系选项选中的坐标轴组合关系确定为坐标系的坐标轴组合关系。In some embodiments, the user is supported to customize the coordinate axis relationship in the coordinate system by triggering interactive operations through the interface. For example, the coordinate system setting area includes a coordinate axis relationship option. Before receiving the construction request, the method further includes: in response to the coordinate axis relationship setting instruction, determining the coordinate axis combination relationship selected through the coordinate axis relationship option as the coordinate axis of the coordinate system. Combination relationship.
通过这种方式,一方面,支持允许用户自定义设置坐标系中不同坐标轴之间的组合关系,提高灵活性,使得构建的可视化视图更匹配用户的需求。另一方面,更加快捷方便,免去为设定坐标轴组合关系而编写程序代码的繁琐操作,降低了构建可视化视图的实现复杂度。In this way, on the one hand, it supports allowing users to customize the combination relationship between different coordinate axes in the coordinate system, which improves flexibility and makes the constructed visual view more suitable for users' needs. On the other hand, it is faster and more convenient, eliminating the tedious operation of writing program codes for setting the combination relationship of the coordinate axes, and reducing the implementation complexity of constructing a visual view.
在一些实施例中,支持用户通过界面触发交互操作来自定义坐标系中的坐标轴的角度。例如,坐标系设定区域包括坐标轴夹角控件,上述方法还包括:响应于坐标轴夹角设定指令,在坐标轴组合关系为绝对型组合关系的情况下,将通过坐标轴夹角控件输入的第一角度,确定为坐标系中的纵坐标轴与画布保持的角度。响应于坐标轴夹角设定指令,在坐标轴组合关系为相对型组合关系的情况下,将通过坐标轴夹角控件输入的第二角度,确定为坐标系中的纵坐标轴与横坐标轴保持的角度。In some embodiments, a user is supported to trigger an interactive operation through an interface to customize the angle of the coordinate axis in the coordinate system. For example, the coordinate system setting area includes a coordinate axis angle control, and the above method further includes: in response to the coordinate axis angle setting instruction, in the case that the coordinate axis combination relationship is an absolute combination relationship, the coordinate axis angle control The input first angle is determined as the angle between the vertical axis in the coordinate system and the canvas. In response to the coordinate axis angle setting command, in the case that the coordinate axis combination relationship is a relative combination relationship, the second angle input through the coordinate axis angle control is determined as the ordinate axis and the abscissa axis in the coordinate system. maintain the angle.
通过这种方式,一方面,支持允许用户自定义设置坐标系中纵坐标轴与画布保持的角度或者纵坐标轴与横坐标轴保持的角度,提高灵活性,使得构建的可视化视图更匹配用户的需求。另一方面,更加快捷方便,免去为设定坐标系中角度而编写程序代码的繁琐操作,降低了构建可视化视图的实现复杂度。In this way, on the one hand, it supports allowing users to customize the angle maintained by the ordinate axis and the canvas in the coordinate system or the angle maintained by the ordinate axis and the abscissa axis, which improves flexibility and makes the built visual view more suitable for users. need. On the other hand, it is faster and more convenient, eliminating the tedious operation of writing program codes for setting the angle in the coordinate system, and reducing the implementation complexity of building a visual view.
在一些实施例中,构建界面包括可视化视图和代码区域。In some embodiments, the build interface includes a visual view and a code area.
在一些实施例中,构建界面中代码区域用于对生成可视化视图的第一代码进行展示。In some embodiments, the code area in the construction interface is used to display the first code for generating the visual view.
通过这种方式,将构建好的可视化视图以及可视化视图的生成代码通过同一个界面返回给用户,方便用户同步查看可视化视图的效果以及代码。In this way, the constructed visualization view and the generated code of the visualization view are returned to the user through the same interface, so that the user can view the effect and code of the visualization view synchronously.
在一些实施例中,方法还包括:响应于代码导出指令,将代码区域中第一代码输出至目标位置。In some embodiments, the method further includes: in response to the code export instruction, outputting the first code in the code region to the target location.
通过导出代码的功能,方便用户修改代码进行二次开发,也支持用户将代码拷贝到其他项目中来部署复杂可视化视图。Through the function of exporting code, it is convenient for users to modify the code for secondary development, and it also supports users to copy the code to other projects to deploy complex visual views.
在一些实施例中,方法还包括:响应于代码运行指令,通过运行在代码区域中输入的第二代码,对可视化视图进行调整。In some embodiments, the method further includes: in response to the code execution instruction, adjusting the visual view by executing the second code entered in the code area.
通过这种方式,用户输入的代码能反馈到交互构建过程中,可视化视图随着用户输入的 代码而同步更新,从而支持用户通过输入代码来调整可视化视图,如此,支持灵活使用代码构建和交互构建这两种构建方式搭建图表,解决了相关技术中代码构建和交互构建只能选择一项使用的技术问题。In this way, the code entered by the user can be fed back to the interactive construction process, and the visual view is updated synchronously with the code entered by the user, so that the user can adjust the visual view by entering the code. In this way, the flexible use of code construction and interactive construction is supported. These two construction methods build charts, which solves the technical problem of code construction and interactive construction in related technologies that only one can be used.
在一些实施例中,方法还包括:响应于构建界面上触发的对可视化视图的属性设定操作,获取属性设定操作对应的第三代码;将第三代码增加至构建界面中的代码区域。In some embodiments, the method further includes: in response to an attribute setting operation on the visual view triggered on the construction interface, obtaining a third code corresponding to the attribute setting operation; and adding the third code to a code area in the construction interface.
通过这种方式,在用户交互构建可视化视图的场景下,每当用户执行一次操作时,界面中展示的代码能够跟随用户的操作而实时更新,从而将用户本次操作产生的代码更及时地反馈给用户,便于用户交互式的调整图表参数和嵌套逻辑,进一步提高可视化视图的构建效率。In this way, in the scenario where the user interacts to construct a visual view, whenever the user performs an operation, the code displayed in the interface can be updated in real time following the user's operation, so that the code generated by the user's operation can be fed back in a more timely manner. For users, it is convenient for users to interactively adjust chart parameters and nested logic, and further improve the construction efficiency of visual views.
在一些实施例中,构建好的可视化视图能通过多种方式提供给用户。In some embodiments, the constructed visualization can be provided to the user in a number of ways.
例如,由云端设备来构建可视化视图时,云端设备向构建请求的发起方发送可视化视图的内容。通过这种方式,支持将可视化视图的构建流程封装为云服务提供给客户。For example, when the visualization view is constructed by the cloud device, the cloud device sends the content of the visualization view to the initiator of the construction request. In this way, it supports to encapsulate the construction process of the visualization view as a cloud service and provide it to customers.
又如,由终端设备来构建可视化视图时,终端设备在构建界面中显示可视化视图。For another example, when the visual view is constructed by the terminal device, the terminal device displays the visual view in the construction interface.
第二方面,提供了一种可视化视图的构建装置,该可视化视图的构建装置具有实现上述第一方面或第一方面任一种可选方式的功能。该可视化视图的构建装置包括至少一个功能模块,至少一个功能模块用于实现上述第一方面或第一方面任一种可选方式所提供的方法。In a second aspect, an apparatus for constructing a visual view is provided, and the apparatus for constructing a visual view has the function of implementing the first aspect or any optional manner of the first aspect. The apparatus for constructing a visual view includes at least one functional module, and the at least one functional module is configured to implement the method provided in the first aspect or any optional manner of the first aspect.
在一些实施例中,可视化视图的构建装置中的功能模块通过软件实现,可视化视图的构建装置中的功能模块是程序模块。在另一些实施例中,可视化视图的构建装置中的功能模块通过硬件或固件实现。In some embodiments, the functional modules in the apparatus for constructing the visual view are implemented by software, and the functional modules in the apparatus for constructing the visual view are program modules. In other embodiments, the functional modules in the apparatus for constructing the visual view are implemented by hardware or firmware.
可视化视图的构建装置可选地运行在云计算系统(包括多个云计算设备,如服务器),用于向客户提供构建可视化视图的云服务。可替代地,可视化视图的构建装置运行在边缘计算系统(包括多个边缘计算设备,如服务器、台式电脑等);可替代地,可视化视图的构建装置运行在终端设备上(如笔记本电脑、个人台式电脑等)。The apparatus for constructing a visual view optionally runs on a cloud computing system (including multiple cloud computing devices, such as servers), and is used to provide a cloud service for constructing a visual view to a customer. Alternatively, the visual view building apparatus runs on an edge computing system (including multiple edge computing devices, such as servers, desktop computers, etc.); desktop computer, etc.).
第二方面提供的可视化视图的构建装置的具体细节可参见上述第一方面或第一方面任一种可选方式,此处不再赘述。For the specific details of the apparatus for constructing the visualization view provided in the second aspect, reference may be made to the first aspect or any optional manner of the first aspect, which will not be repeated here.
第三方面,提供了一种计算设备,该计算设备包括处理器和存储器,其中存储器中存储有计算机指令,处理器执行计算机指令,以实现第一方面及其可能的实现方式的方法。在一些实施例中,该计算设备还包括网络接口,用于通过网络发送构建好的可视化视图。在一些实施例中,该计算设备还包括屏幕,用于显示构建好的可视化视图。A third aspect provides a computing device comprising a processor and a memory, wherein the memory stores computer instructions, and the processor executes the computer instructions to implement the method of the first aspect and possible implementations thereof. In some embodiments, the computing device further includes a network interface for sending the constructed visualization over the network. In some embodiments, the computing device further includes a screen for displaying the constructed visualization.
第四方面,提供了一种(非瞬态的)计算机可读存储介质。该(非瞬态的)计算机可读存储介质中存储有至少一条指令,该指令在计算机上运行时,使得计算机执行上述第一方面或第一方面任一种可选方式所提供的方法。该存储介质的类型包括但不限于易失性存储器,例如随机访问存储器,非易失性存储器,例如快闪存储器、硬盘(hard disk drive,HDD)、固态硬盘(solid state drive,SSD)。In a fourth aspect, a (non-transitory) computer-readable storage medium is provided. The (non-transitory) computer-readable storage medium stores at least one instruction that, when executed on a computer, causes the computer to execute the method provided in the first aspect or any optional manner of the first aspect. The type of the storage medium includes, but is not limited to, volatile memory, such as random access memory, non-volatile memory, such as flash memory, hard disk drive (HDD), solid state drive (solid state drive, SSD).
第五方面,提供了一种计算机程序产品,所述计算机程序产品包括一个或多个计算机程序指令,当所述计算机程序指令被计算机加载并运行时,使得所述计算机执行上述第一方面或第一方面任一种可选方式所提供的方法。该计算机程序产品可选地为软件安装包,在需要使用上述第一方面提供的方法的情况下,下载该计算机程序产品并在计算设备上执行该计算机程序产品。In a fifth aspect, a computer program product is provided, the computer program product includes one or more computer program instructions, when the computer program instructions are loaded and executed by a computer, cause the computer to execute the first aspect or the first aspect above. A method provided by any of the alternatives on the one hand. The computer program product is optionally a software installation package, and when the method provided in the first aspect needs to be used, the computer program product is downloaded and executed on a computing device.
第六方面,提供了一种芯片,包括存储器和处理器,存储器用于存储计算机指令,处理器用于从存储器中调用并运行该计算机指令,以执行上述第一方面及其第一方面任意可能的实现方式中的方法。In a sixth aspect, a chip is provided, including a memory and a processor, the memory is used to store computer instructions, and the processor is used to call and run the computer instructions from the memory to execute the above-mentioned first aspect and any possible possible aspects of the first aspect. method in the implementation.
第七方面,提供了一种计算设备集群,该计算设备集群包括至少一个计算设备。上述第二方面中计算设备的不同单元分布在计算设备集群中的不同的计算设备上运行。可选地,该计算设备集群为云计算系统(包括多个云计算设备,如服务器)。可替代地,该计算设备集群为边缘计算系统(包括多个边缘计算设备,如服务器、台式电脑);可替代地,该计算设备集群为终端设备集群(包括多个终端,如笔记本电脑、个人台式电脑等)。In a seventh aspect, a computing device cluster is provided, and the computing device cluster includes at least one computing device. Different units of the computing device in the above second aspect are distributed and run on different computing devices in the computing device cluster. Optionally, the computing device cluster is a cloud computing system (including multiple cloud computing devices, such as servers). Alternatively, the computing device cluster is an edge computing system (including multiple edge computing devices, such as servers and desktop computers); alternatively, the computing device cluster is a terminal device cluster (including multiple terminals, such as desktop computer, etc.).
附图说明Description of drawings
图1是本申请实施例提供的一种不同形状坐标轴下可视化效果的对比示意图;1 is a schematic diagram of a comparison of visualization effects under a different shape coordinate axis provided by an embodiment of the present application;
图2是本申请实施例提供的一种拿破仑军队东征可视化视图;Fig. 2 is a kind of visualization view of Napoleon's army east expedition provided by the embodiment of the present application;
图3是本申请实施例提供的一种数据新闻可视化视图;3 is a data news visualization view provided by an embodiment of the present application;
图4是本申请实施例提供的一种基于直角坐标系构建拿破仑东征可视化视图的示意图;4 is a schematic diagram of constructing a visualization view of Napoleon's Crusades based on a Cartesian coordinate system provided by an embodiment of the present application;
图5是本申请实施例提供的一种拿破仑军队东征可视化视图;Fig. 5 is a kind of visualization view of Napoleon's army east expedition provided by the embodiment of the present application;
图6是本申请实施例提供的一种应用场景的示意图;6 is a schematic diagram of an application scenario provided by an embodiment of the present application;
图7是本申请实施例提供的一种可视化视图的构建方法的流程图;7 is a flowchart of a method for constructing a visual view provided by an embodiment of the present application;
图8是本申请实施例提供的一种坐标轴组合关系的示意图;8 is a schematic diagram of a coordinate axis combination relationship provided by an embodiment of the present application;
图9是本申请实施例提供的一种可视化视图的交互式构建方法的逻辑架构图;9 is a logical architecture diagram of a method for interactively constructing a visual view provided by an embodiment of the present application;
图10是本申请实施例提供的一种可视化视图;FIG. 10 is a visualization view provided by an embodiment of the present application;
图11是本申请实施例提供的一种可视化视图的构建界面的示意图;11 is a schematic diagram of a construction interface of a visual view provided by an embodiment of the present application;
图12是本申请实施例提供的一种可视化视图的构建界面的示意图;12 is a schematic diagram of an interface for constructing a visual view provided by an embodiment of the present application;
图13是本申请实施例提供的一种可视化视图的构建界面的示意图;13 is a schematic diagram of an interface for constructing a visual view provided by an embodiment of the present application;
图14是本申请实施例提供的一种轨迹坐标系实现拿破仑东征可视化视图的示意图;14 is a schematic diagram of a trajectory coordinate system implementing a visualization view of Napoleon's Crusades provided by an embodiment of the present application;
图15是本申请实施例提供的一种可视化效果图;FIG. 15 is a visualization effect diagram provided by an embodiment of the present application;
图16是本申请实施例提供的一种可视化视图的构建装置的结构示意图;16 is a schematic structural diagram of an apparatus for constructing a visualization view provided by an embodiment of the present application;
图17是本申请实施例提供的一种计算设备的结构示意图。FIG. 17 is a schematic structural diagram of a computing device provided by an embodiment of the present application.
附图标记:Reference number:
10-终端10 - Terminal
11-服务器11-Server
60-构建界面60 - Building the interface
601-数据视图601 - Data View
602-交互构建视图602 - Interactive Build View
603-层次视图603 - Hierarchical View
6031-图符或图表6031 - Icon or Chart
604-属性视图(也称参数配置视图)604-Attribute view (also called parameter configuration view)
6041-用于输入坐标轴关系的组件6041 - Component for entering axis relations
6042-用于输入坐标轴夹角的组件6042 - Component for entering axis angles
6043-用于输入图表旋转角度的组件6043 - Component for entering chart rotation angle
6044-用于输入图表名称的组件6044 - Component for entering chart names
6045-文本通道6045 - text channel
6046-字号输入组件6046-Font size input component
605-构建结果展示区域(也称可视化效果展示区)605-Construct result display area (also called visualization effect display area)
6051-可视化视图(图表)6051 - Visualization view (chart)
60511-矩形图符60511 - Rectangle Icon
6052-用于触发导出可视化视图的导出控件6052 - Export control for triggering export of visualizations
606-代码区域606-code area
6061-用于触发运行代码的运行控件6061 - Run control for triggering running code
6062-用于触发导出代码的导出控件6062 - Export control for triggering export code
607-轨迹绘制区域607-Track drawing area
608-颜色选择器608 - Color Picker
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
下面对本申请实施例涉及的一些术语概念做解释说明。Some terms and concepts involved in the embodiments of the present application are explained below.
(1)数据可视化(data visualization)(1) Data visualization
数据可视化是指将数据的属性编码为图形的属性以展示数据的技术。数据可视化用于向用户更清晰有效地传达数据包含的信息。例如,将人群的数量编码为圆形的尺寸,圆形尺寸越大,表示人群数量越多,从而通过圆形的尺寸大小直观有效地传达人群数量的多少;又如,将日期编码为点的颜色,将工作日编码为颜色1,将节假日编码为颜色2,从而通过不同的颜色直观地区分出节假日和工作日。Data visualization refers to the technique of encoding properties of data into properties of graphs to display data. Data visualization is used to communicate more clearly and effectively to users the information contained in the data. For example, encode the number of crowds as the size of a circle. The larger the circle size, the greater the number of crowds, so that the size of the circle can intuitively and effectively convey the number of crowds; another example, encode the date as a point Color, code working days as color 1 and holidays as color 2, so that holidays and working days can be visually distinguished by different colors.
(2)可视化元素(2) Visual elements
可视化元素是用来展示数据的图形。可视化元素有时也称为图形符号、视觉符号或界面元素。从可视化元素的形状的角度来看,可视化元素包括而不限于矩形、圆形、弧、曲线、文字、路径、区域、三角形、星型等等。从可视化元素的属性的角度来看,可视化元素的位置(如x坐标和y坐标)、尺寸、颜色、形状、纹理、线宽、半径、长度、宽度等各种属性都能够用来表示数据。例如,将圆形(可视化元素)的面积与人群的数量(数据的属性)关联,圆形的面积越大表示人群数量越多。不同类型的可视化元素可能具有相同的属性,也可能具有不同的属性。例如,圆形元素具有半径属性,矩形元素具有宽度属性。Visual elements are graphics used to present data. Visual elements are also sometimes called graphic symbols, visual symbols, or interface elements. Visual elements include, but are not limited to, rectangles, circles, arcs, curves, text, paths, regions, triangles, stars, and the like, from the perspective of the shape of the visual elements. From the perspective of the attributes of the visualization element, various attributes such as the position of the visualization element (such as x and y coordinates), size, color, shape, texture, line width, radius, length, width, etc. can be used to represent the data. For example, correlate the area of a circle (visualization element) with the number of crowds (a property of the data), with larger circles indicating more crowds. Different types of visualization elements may have the same properties or may have different properties. For example, circular elements have a radius property, and rectangular elements have a width property.
(3)视觉通道(3) Visual channel
视觉通道是指可视化元素用来传递信息的视觉属性。例如,视觉通道包括而不限于位置,大小,颜色,形状,纹理等。A visual channel refers to the visual attributes that visual elements use to convey information. For example, visual channels include, without limitation, position, size, color, shape, texture, etc.
(4)视觉编码(Visual Coding)(4) Visual Coding
视觉编码是指在个体接收信息时,使用信息对视觉通道进行编码,如:对颜色、大小等视觉通道的进行编码,颜色越深,大小越大表示数据值越大。Visual encoding refers to using information to encode visual channels when an individual receives information, such as encoding visual channels such as color and size. The darker the color and the larger the size, the greater the data value.
(5)轨迹坐标轴(5) Track coordinate axis
轨迹坐标轴是指形状为轨迹的坐标轴。例如,请参考附图1中的(b),轨迹坐标轴的形状可 选地不是直线,而是一条弯曲的折线。轨迹坐标轴的形状例如是用户设定的。The trajectory coordinate axis refers to the coordinate axis whose shape is a trajectory. For example, referring to Fig. 1 (b), the shape of the trajectory coordinate axis is optionally not a straight line, but a curved polyline. The shape of the trajectory coordinate axis is set by the user, for example.
轨迹坐标轴能支持形状为轨迹的可视化视图的构建过程。例如,请参考附图1,附图1中的(a)和(b)示出了分别使用两种坐标轴对同一个数据进行可视化得到的可视化视图。附图1中的(a)示出了使用形状为直线的X轴、且形状为直线的Y轴的坐标系对数据进行可视化得到的可视化视图。附图1中的(a)的可视化结果呈一条直线。附图1中的(b)示出了使用形状为折线的X轴(轨迹坐标轴)、且形状为直线的Y轴的坐标系对该数据进行可视化得到的可视化视图。由于附图1中的(b)中的X轴(轨迹坐标轴)的形状为折线,所以附图1中的(b)中可视化结果受到轨迹坐标轴形状的影响,也呈一条折线。Trajectory axes support the process of building visualizations in the shape of traces. For example, please refer to FIG. 1 . (a) and (b) of FIG. 1 show visualization views obtained by visualizing the same data using two coordinate axes respectively. (a) of FIG. 1 shows a visualization view obtained by visualizing data using a coordinate system of the X-axis shaped as a straight line and the Y-axis shaped as a straight line. The visualization result of (a) in FIG. 1 is a straight line. (b) of FIG. 1 shows a visualization view obtained by visualizing the data using the coordinate system of the X-axis (track coordinate axis) shaped as a polyline and the Y-axis shaped as a straight line. Since the shape of the X-axis (track coordinate axis) in (b) of FIG. 1 is a polyline, the visualization result in (b) of FIG. 1 is also affected by the shape of the track coordinate axis, and is also a polyline.
轨迹坐标轴的典型应用场景包括以下情况一至情况三。Typical application scenarios of the trajectory coordinate axis include the following cases 1 to 3.
情况一、对数据新闻领域等数据分布呈取值不规则的曲线的数据进行可视化。Scenario 1: Visualize data whose data distribution is irregular in value, such as in the field of data news.
例如,在数据新闻领域中,可视化元素在视图中的布局经常有一定领域特色,以此来加深主题和吸引观众。比如,和人文相关的可视化视图中,可视化元素的布局形状像一个人的形状;和黄河相关的可视化布局中,可视化元素的布局形状像黄河的轮廓形状。在这类场景下,通过轨迹坐标轴有助于更加快速的构建可视化视图。比如,在构建人文相关的可视化视图的应用场景下,支持用户将一个人的轮廓设定为轨迹坐标轴的轨迹数据,使得轨迹坐标轴的形状呈人的轮廓,从而方便构建人文数据的可视化视图。又如,在构建黄河相关的可视化视图的应用场景下,支持用户将黄河的轮廓设定为轨迹坐标轴的轨迹数据,使得轨迹坐标轴的形状呈黄河的轮廓,从而方便构建黄河相关的可视化视图。For example, in the field of data journalism, the layout of visual elements in a view is often domain-specific to deepen the theme and engage the audience. For example, in a visualization related to humanities, the layout of the visual elements is shaped like the shape of a person; in the visualization layout related to the Yellow River, the layout of the visual elements is shaped like the outline of the Yellow River. In such scenarios, the use of track axes helps to build visualizations more quickly. For example, in the application scenario of building a humanities-related visual view, users are supported to set the outline of a person as the trajectory data of the trajectory coordinate axis, so that the shape of the trajectory coordinate axis is the outline of a person, so as to facilitate the construction of a visual view of humanistic data. . For another example, in the application scenario of constructing a visualization view related to the Yellow River, users are supported to set the contour of the Yellow River as the trajectory data of the trajectory coordinate axis, so that the shape of the trajectory coordinate axis is the contour of the Yellow River, so as to facilitate the construction of a visualization view related to the Yellow River. .
情况二、实现布局复杂的可视化视图。The second case is to realize a visual view with a complex layout.
具体来说,使用直角坐标系实现可视化视图的方式实现布局复杂的可视化的时候,需要用户大量的计算。而通过使用本申请实施例定义的轨迹坐标轴,能为用户省略这些计算过程,由系统自动基于轨迹坐标轴进行计算。Specifically, when a visualization with a complex layout is realized by using a Cartesian coordinate system to realize a visualization view, a large amount of calculation by the user is required. However, by using the trajectory coordinate axis defined in the embodiment of the present application, these calculation processes can be omitted for the user, and the system can automatically perform the calculation based on the trajectory coordinate axis.
情况三、对高维数据可视化的场景。Scenario 3: Visualization of high-dimensional data.
具体来说,高维数据包含很多属性,而简单的传统的视图难以表达众多属性。通过轨迹坐标轴有助于实现更复杂的视图来展示高维数据的各个属性。比如对军队行军数据可视化的场景中,能通过基于轨迹坐标轴的坐标系展示了经度纬度军队数量行军方向时间这几个属性。Specifically, high-dimensional data contains many attributes, and simple traditional views are difficult to express many attributes. The use of track axes helps to achieve more complex views to show the various properties of high-dimensional data. For example, in the scenario of visualizing army march data, several attributes such as longitude, latitude, number of troops, marching direction, time, and time can be displayed through the coordinate system based on the trajectory coordinate axis.
总结来看,通过提供轨迹坐标轴,能支持用户构建自定义形状的坐标轴,方便对各种取值不规则的曲线的数据以及高维数据进行可视化,满足非常规布局的可视化视图的构建需求。In summary, by providing the trajectory coordinate axis, it can support the user to build a coordinate axis of a custom shape, which is convenient for the visualization of various curve data and high-dimensional data with irregular values, and meets the construction requirements of unconventional layout visualization views. .
(6)轨迹数据(6) Track data
轨迹数据是用于设定轨迹坐标轴的数据。轨迹数据包括一系列点的位置坐标。例如,请参考附图1中的(b),附图1中的(b)中轨迹坐标轴是通过折线上的四个顶点作为轨迹数据定义出来的。也即是,当获得附图1中的(b)中点a的位置坐标、点b的位置坐标、点c的位置坐标和点d的位置坐标之后,即可利用这四个点的位置坐标作为轨迹数据,设定出一条附图1中的(b)所示的轨迹坐标轴。The trajectory data is data for setting the trajectory coordinate axis. Trajectory data includes the location coordinates of a series of points. For example, please refer to (b) in FIG. 1 . In FIG. 1 (b), the trajectory coordinate axis is defined by using four vertices on the polyline as trajectory data. That is, after obtaining the position coordinates of point a, the position coordinates of point b, the position coordinates of point c, and the position coordinates of point d in (b) of FIG. 1, the position coordinates of these four points can be used. As the trajectory data, a trajectory coordinate axis shown in (b) of FIG. 1 is set.
(7)坐标轴属性(7) Coordinate axis properties
坐标轴属性用于指示数据的值与画布像素范围(即可视化视图中位置)之间的映射关系。坐标轴属性有时也称为坐标轴参数。坐标轴属性包括而不限于坐标轴的类型、坐标轴的定义域、坐标轴的值域等。The axes properties are used to indicate the mapping between the values of the data and the canvas pixel range (ie the position in the visualization). Axis properties are also sometimes called axis parameters. The coordinate axis attributes include, but are not limited to, the type of the coordinate axis, the definition domain of the coordinate axis, the value range of the coordinate axis, and the like.
坐标轴类型包括而不限于线性坐标轴、类别坐标轴、圆形坐标轴、二次函数坐标轴、指 数函数坐标轴、极坐标轴等。The types of axes include, but are not limited to, linear axes, category axes, circular axes, quadratic function axes, exponential function axes, polar axes, and the like.
坐标轴的定义域(domain)表示待进行可视化的数据的取值范围。例如,坐标轴的定义域为[0,100],表示待进行可视化的数据的取值范围为[0,100]。The domain of the coordinate axis represents the value range of the data to be visualized. For example, the definition domain of the coordinate axis is [0, 100], indicating that the value range of the data to be visualized is [0, 100].
坐标轴的值域(range)也称坐标轴的范围,坐标轴的值域用于指示坐标轴在画布中分布的范围。坐标轴的值域用来确定在构建可视化视图时,在定义域范围内的数据应当绘制在画布中多大的区域内。例如,如果坐标轴的值域为[0,600]、[0,800],表示在画布中长为600、宽为800的矩形中绘制坐标轴。The range of the coordinate axis is also called the range of the coordinate axis. The value range of the coordinate axis is used to indicate the range of the coordinate axis distribution in the canvas. The range of the axes is used to determine how much of the canvas the data within the domain should be drawn on when building the visualization. For example, if the value range of the coordinate axis is [0,600], [0,800], it means that the coordinate axis is drawn in a rectangle with a length of 600 and a width of 800 in the canvas.
数据可视化是一种通过可视化元素和视觉通道,将数据的属性、特征等信息进行编码,直观地展示给用户的技术。它利用人敏锐的视觉感知能力和计算机强大的数据分析能力,大大提升了理解和分析数据的效率。近年来,数据可视化技术在数据新闻、智慧城市和商业智能等领域都扮演了重要的角色。Data visualization is a technology that encodes the attributes, characteristics and other information of data through visual elements and visual channels, and intuitively displays it to users. It utilizes the sharp visual perception ability of people and the powerful data analysis ability of computer, which greatly improves the efficiency of understanding and analyzing data. In recent years, data visualization techniques have played an important role in data journalism, smart cities, and business intelligence.
随着数据所包含的信息越来越复杂,数据可视化视图的设计也越来越不仅限于使用简单的图表形式。例如,数据新闻领域开始追求视图中艺术感与直观性的融合,设计带有美感的、符合领域特色的数据展示形式来传递信息,以此获取观众的注意力和解读图表的兴趣。例如,请参考附图2,附图2示出了1812年拿破仑军队东征可视化作品,线条的轨迹表示军队的行军路线,线条灰度表示军队进攻和撤退,线条宽度表示军队数量,下方折线图展示了军队行进时的当地温度。该视图让人直观的感受到军队在寒冬中由西向东进军,又由东到西不断溃败的情况。As the information contained in the data becomes more and more complex, the design of data visualization views is more and more limited to the use of simple charts. For example, the field of data journalism has begun to pursue the integration of art and intuition in the view, and design a data display form with aesthetics that conforms to the characteristics of the field to transmit information, so as to gain the audience's attention and interest in interpreting charts. For example, please refer to Figure 2. Figure 2 shows the visualization of Napoleon's army in 1812. The trajectory of the line represents the army's marching route, the grayscale of the line represents the army's attack and retreat, and the width of the line represents the number of troops. The line graph below Shows the local temperature as the army marches. This view makes people intuitively feel the situation of the army marching from west to east in the cold winter, and then continuously defeated from east to west.
附图3中的数据新闻可视化视图则采用了S型的布局方式,展示了2015-2021年的数据。附图3合理地利用了空间,展示了大量的文字和数据信息,同时又增强了观赏性,既美观又实用。The data news visualization in Figure 3 adopts an S-shaped layout, showing data from 2015 to 2021. Figure 3 makes reasonable use of space, displays a large amount of text and data information, and at the same time enhances viewing, which is both beautiful and practical.
然而,在可视化视图的实现过程中,传统方法局限于使用直角坐标系进行可视化元素的布局。为了实现复杂的可视化作品,通常需要开发人员对应设计师的设计稿,编写程序,构造数据值到画布上像素点的映射函数,手动计算视图中元素的具体像素位置,绘制并呈现可视化结果。上述流程要求开发人员有很强的数学背景和编程能力,同时需要花费大量时间和精力进行数学公式的推导和位置计算函数的编写,直接导致了复杂可视化构建的高门槛和低效率。尽管相关技术通过枚举极坐标轴、类别坐标轴等帮助用户创建除传统的数值直角坐标系之外的坐标系类型。然而,枚举得到的有限坐标轴选项,只能组成几种典型的坐标系,无法满足现代具有艺术感的、布局越来越复杂的定制化、专业化、开放式可视化作品的设计需求。However, in the implementation of visualization views, traditional methods are limited to using the Cartesian coordinate system for the layout of visualization elements. In order to realize complex visualization works, developers usually need to correspond to the designer's design draft, write a program, construct a mapping function from data values to pixels on the canvas, manually calculate the specific pixel positions of elements in the view, and draw and present the visualization results. The above process requires developers to have a strong mathematical background and programming ability, and it takes a lot of time and energy to deduce mathematical formulas and write position calculation functions, which directly leads to the high threshold and low efficiency of complex visualization construction. Although the related art helps users to create coordinate system types other than the traditional numerical Cartesian coordinate system by enumerating polar coordinate axes, category coordinate axes, etc. However, the limited coordinate axis options obtained from the enumeration can only form several typical coordinate systems, which cannot meet the design requirements of modern artistic, customized, specialized, and open visualization works with increasingly complex layouts.
此外,以往的可视化构建过程大都依赖开发人员直接编写可视化程序。在程序中实现坐标系定义和视觉编码任务。因此需要开发者熟练使用可视化语言和应用程序接口(Application Programming Interface,API)中方法的参数含义,在开发过程中还需要对应设计稿迭代地调整程序中的参数,重新编译并绘制对比,达到期待的可视化效果。因此,高水平的可视化开发人员需求和繁琐的开发过程给构建复杂的可视化视图带来了巨大挑战。交互式可视化构建界面,如Tableau(数据可视化分析工具)、voyager2(一种可视分析工具)等系统,大都专注于帮助用户定义数据属性到颜色、长度等视觉通道的绑定过程,而并不支持诸如让用户绘制坐标轴这类自由定义坐标系,以此完成复杂可视化视图的构建过程。In addition, the previous visualization construction process mostly relied on developers to directly write visualization programs. Coordinate system definition and visual coding tasks are implemented in the program. Therefore, developers need to be proficient in using visual language and the meaning of the parameters of the methods in the Application Programming Interface (API). During the development process, it is also necessary to iteratively adjust the parameters in the program corresponding to the design draft, recompile and draw comparisons to meet expectations visualization effect. Therefore, high-level visualization developer requirements and cumbersome development process bring great challenges to building complex visualizations. Interactive visualization construction interfaces, such as Tableau (data visualization analysis tool), voyager2 (a visual analysis tool) and other systems, mostly focus on helping users define the binding process of data attributes to visual channels such as color and length, rather than Support for freely defining coordinate systems such as allowing users to draw axes to complete the building process of complex visualizations.
综上,现亟需一种直观高效的复杂可视化视图的构建方法,改进以往高学习成本、低效率的复杂可视化视图构建方案。In conclusion, there is an urgent need for an intuitive and efficient method for constructing complex visualization views, which improves the previous construction schemes for complex visualization views with high learning costs and low efficiency.
目前,可视化编程语言,例如D3js(基于数据驱动文档工作方式的一款JavaScript函数库)和Vega,虽然使用数据映射库或可视化图表库可以满足传统的简单可视化视图的快速构建任务,但是仅提供有限的坐标系类型无法支撑专业复杂、自由开放的可视化视图的高效构建任务。例如使用D3js语言实现附图2中的可视化视图过程如附图4所示,附图4示出了直角坐标系下拿破仑东征案例的实现过程示意图,包括以下步骤(a)至(e)。At present, visual programming languages, such as D3js (a JavaScript function library based on the way of working with data-driven documents) and Vega, although the use of data mapping library or visual chart library can meet the rapid construction tasks of traditional simple visual views, but only provide limited The type of coordinate system cannot support the efficient construction of professional complex, free and open visualization views. For example, using D3js language to realize the visualization view process in Fig. 2 is shown in Fig. 4, Fig. 4 shows a schematic diagram of the realization process of the case of Napoleon's Eastern Expedition in the Cartesian coordinate system, including the following steps (a) to (e).
步骤(a)首先用户需要建立以经度为定义域,以画布宽为值域的X轴。Step (a) First, the user needs to establish the X-axis with the longitude as the definition domain and the canvas width as the value domain.
步骤(b)然后用户需要建立以维度为定义域,以画布高为值域的Y轴。Step (b) Then the user needs to establish a Y-axis with the dimension as the definition domain and the canvas height as the value domain.
步骤(c)获取数据中的每一个轨迹点在画布上的位置。Step (c) obtains the position of each track point in the data on the canvas.
步骤(d)使用线段连接相邻的轨迹点。Step (d) uses line segments to connect adjacent trajectory points.
步骤(e)最后将每一个轨迹点对应的军队数量,转化为宽度数值,并赋予给每一个线段,作为线段宽度,行军方向作为线段颜色。Step (e) Finally, convert the number of troops corresponding to each trajectory point into a width value, and assign it to each line segment as the line segment width, and the marching direction as the line segment color.
然而仅仅通过上述流程绘制出的军队轨迹是分段的,因为每一段线段的宽度是唯一的,无法实现如附图5所示的连续曲线效果。该效果能展示军队在行军过程中的连续削减过程,并且视觉效果更佳。若改进此流程,生成附图5所示的连续曲线,开发者必须要自行计算曲线外轮廓上的点在直角坐标系中的坐标。过程如附图4中的(f)所示,由以下5个步骤组成。However, the army trajectory drawn only by the above process is segmented, because the width of each line segment is unique, and the continuous curve effect as shown in FIG. 5 cannot be achieved. This effect shows the continuous reduction of troops as they march, and is visually better. If this process is improved and the continuous curve shown in Figure 5 is generated, the developer must calculate the coordinates of the points on the outer contour of the curve in the Cartesian coordinate system. The process is shown in (f) of FIG. 4 and consists of the following 5 steps.
步骤(f-1)首先需要获取每个轨迹点在直角坐标系中的坐标。Step (f-1) firstly needs to obtain the coordinates of each track point in the Cartesian coordinate system.
步骤(f-2)然后获取当前轨迹点对应的军队数量映射成的偏移量长度。Step (f-2) then obtains the length of the offset mapped to the number of troops corresponding to the current trajectory point.
步骤(f-3)计算当前轨迹点的法向量方向(如箭头所示)。Step (f-3) calculates the normal vector direction of the current trajectory point (as indicated by the arrow).
步骤(f-4)根据偏移量长度和法向量方向计算得到横纵坐标偏移量△x和偏移量△y,并由轨迹点的坐标偏移计算得到曲线外轮廓上对应点的位置坐标。Step (f-4) Calculate the abscissa and ordinate offset △x and the offset △y according to the length of the offset and the direction of the normal vector, and calculate the position of the corresponding point on the outer contour of the curve from the coordinate offset of the trajectory point coordinate.
步骤(f-5)连接所有轨迹点对应的曲线外轮廓坐标,生成目标曲线。Step (f-5) connects the outer contour coordinates of the curve corresponding to all the trajectory points to generate the target curve.
上述过程中,法向量方向、偏移量长度和偏移量△x和偏移量△y需要使用三角函数计算,过程繁琐且开发时编写程序容易出错,调试起来非常耗费开发者的精力。即使是精通可视化语言API的开发者,也需要一方面调试程序,小心的编写计算函数,另一方面对应设计稿在程序中不断调整法向量角度和线条宽度。这样的开发和调试过程不仅门槛极高,且繁琐、不直观、效率低。In the above process, the normal vector direction, offset length, offset △x and offset △y need to be calculated using trigonometric functions. The process is cumbersome and the programming is prone to errors during development. It is very expensive for developers to debug. Even developers who are proficient in visual language APIs need to debug the program on the one hand, carefully write calculation functions, and on the other hand, constantly adjust the normal vector angle and line width in the program corresponding to the design draft. Such a development and debugging process is not only extremely difficult, but also cumbersome, unintuitive, and inefficient.
在诸如数据新闻等应用领域的开放式、定制化可视化视图构建过程中,普遍具有上述构建流程会产生的技术问题。例如为了实现附图3所示的视图,开发者需要手动计算每条数据在直角坐标系中对应圆弧上的位置坐标,通过法向量和偏移量计算矩形四个点的坐标,绘制矩形与文字信息,最后进行元素的旋转操作。诸如此类的构建流程必将浪费大量的人力、物力、财力。In the process of constructing open and customized visual views in application fields such as data journalism, there are generally technical problems arising from the above construction process. For example, in order to realize the view shown in Figure 3, the developer needs to manually calculate the position coordinates of each piece of data on the corresponding arc in the rectangular coordinate system, calculate the coordinates of the four points of the rectangle through the normal vector and the offset, and draw the rectangle and Text information, and finally rotate the element. Such construction processes will inevitably waste a lot of manpower, material resources, and financial resources.
对于采用提供包括线性映射、指数映射、类别映射、角度映射、时间映射等数种典型的映射方法API,或提供不同类型坐标系的可视化视图模板的方法来说,实现复杂的可视化视图,需要熟悉编程API和数学知识的开发者手动计算数据在坐标系中的位置,以此定位可视化元素,而无法自由的定义坐标系并让系统自动计算数据在坐标系中的位置。此外,开发过程中的编程和手动调参过程也给实现高效的可视化构建方案带来了挑战。因此,以往高成本、高门槛、低效率的构建方案,已无法满足现在定制化、专业化、自由度日益增强的复杂可视 化视图的构建需求。For the method that provides several typical mapping method APIs including linear mapping, exponential mapping, category mapping, angle mapping, time mapping, etc., or provides visual view templates of different types of coordinate systems, it is necessary to be familiar with the implementation of complex visualization views. Developers with programming API and mathematical knowledge manually calculate the position of data in the coordinate system to locate visual elements, but cannot freely define the coordinate system and let the system automatically calculate the position of the data in the coordinate system. In addition, the programming and manual parameter tuning process during the development process also brings challenges to achieve an efficient visual construction scheme. Therefore, the previous high-cost, high-threshold, and low-efficiency construction solutions have been unable to meet the requirements for the construction of complex visualization views that are now customized, specialized, and increasingly free.
近年来,针对可视化视图的交互式构建方案大都关注于帮助用户定义视觉编码,用于实现传统的简单图表。它们内置只有直角坐标系或极坐标系等几类典型的坐标系系统,因此必将限制可视化的设计,生成的视图定制度低,可视化元素的布局不够灵活多变,不能支持如前文所说的复杂图表构建任务。In recent years, most of the interactive construction schemes for visualization views have focused on helping users define visual codes for implementing traditional simple diagrams. They only have several types of typical coordinate systems such as Cartesian coordinate system or polar coordinate system built-in, so it will limit the visualization design, the generated view customization system is low, and the layout of visualization elements is not flexible enough to support the above mentioned Complex chart building tasks.
有鉴于此,本申请的一些实施例中,解决现阶段各领域出现的复杂的定制化可视化视图,或带有专业设计的有特殊布局要求的可视化视图的构建需求,支持用户自由定义坐标系,并在系统中自动计算可视化元素在用户定义坐标系下的位置坐标等信息,可以减少用户工作量和解放用户精力,让其更专注于可视化的设计与视觉编码设计,降低开发者门槛,提升开发效率。同时本申请实施例针对现阶段搭建流程中,需要编写代码所导致的开发难度高、调试过程繁琐等特点,提供交互式的界面,帮助用户自由构建坐标系和可视化视图,进一步提高复杂可视化的构建效率,降低学习成本,实现视图的快速研发和部署。In view of this, in some embodiments of the present application, the complex customized visualization views appearing in various fields at this stage, or the construction requirements of professionally designed visualization views with special layout requirements, are supported by users to freely define the coordinate system, And automatically calculate the position coordinates and other information of the visual elements in the user-defined coordinate system in the system, which can reduce the user's workload and liberate the user's energy, allowing them to focus more on visual design and visual coding design, lowering the developer threshold and improving development. efficiency. At the same time, the embodiments of the present application provide an interactive interface to help users freely construct coordinate systems and visualization views, and further improve the construction of complex visualizations, aiming at the characteristics of high development difficulty and cumbersome debugging process caused by the need to write codes in the current construction process. efficiency, reduce learning costs, and realize rapid development and deployment of views.
本申请实施例提供了一种支持用户自由定义坐标系的可视化语法。在此基础上设计了一个针对定制可视化视图的搭建界面,它提供了一套交互方法,帮助用户直观地定义坐标系参数或自由绘制坐标系,指定视觉编码并进行参数调整,最后输出可视化视图对应的代码和结果,能让用户以最小的时间成本,搭建复杂的可视化视图。对比相关方案,本申请实施例通过允许用户交互式地自由定义坐标系和视觉编码,封装了复杂的布局计算和底层渲染的开发过程,大大降低了用户的工作量和使用门槛,提升了开发效率。The embodiment of the present application provides a visualization syntax that supports the user to freely define a coordinate system. On this basis, a construction interface for customized visual views is designed. It provides a set of interactive methods to help users intuitively define coordinate system parameters or freely draw coordinate systems, specify visual codes and adjust parameters, and finally output the corresponding visual view. The code and results allow users to build complex visualizations with minimal time cost. Compared with related solutions, the embodiment of the present application encapsulates the development process of complex layout calculation and underlying rendering by allowing the user to interactively and freely define the coordinate system and visual coding, which greatly reduces the user's workload and usage threshold, and improves the development efficiency. .
下面对本申请实施例的应用场景举例说明。The application scenarios of the embodiments of the present application are illustrated below with examples.
附图6是本申请实施例提供的一种应用场景的示意图。如附图6所示,该应用场景包括终端10和服务器11,终端10和服务器11通过有线网络或无线网络相连。下面对附图6中各个设备的作用、典型产品形态、部署位置和交互方式举例说明。FIG. 6 is a schematic diagram of an application scenario provided by an embodiment of the present application. As shown in FIG. 6 , the application scenario includes a terminal 10 and a server 11 , and the terminal 10 and the server 11 are connected through a wired network or a wireless network. The function, typical product form, deployment location and interaction mode of each device in FIG. 6 are illustrated below.
(1)终端10(1) Terminal 10
终端10用于接收用户的操作以及向用户展示可视化图表。在本申请的一些实施例中,终端10具体用于在屏幕中显示针对嵌套图表的可视化构建界面以及接收用户对可视化构建界面的输入。The terminal 10 is used for receiving the user's operation and displaying the visual chart to the user. In some embodiments of the present application, the terminal 10 is specifically configured to display a visual construction interface for nested charts on a screen and receive user input on the visual construction interface.
在本申请的一些实施例中,终端10用于为用户提供交互和输入代码这两种方式来构建可视化图表的渠道,从而保证可视化构建的灵活性和正确性。在采用交互的方式构建的过程中,终端10显示的上述可视化构建界面包括输入组件(如输入框、选择框),用户对输入组件触发输入操作,输入图表的属性。终端10接收用户在输入组件上输入的图表的属性,基于用户配置图表的属性获取构建的可视化视图,将构建好的可视化视图显示在构建界面中。在采用代码的方式构建的过程中,用户在可视化构建界面输入程序代码。终端10接收用户在可视化构建界面输入的程序代码,基于用户输入的程序代码获取构建的可视化视图,将构建好的可视化视图显示在构建界面中。In some embodiments of the present application, the terminal 10 is used to provide a channel for the user to construct a visual chart in two ways: interaction and inputting codes, so as to ensure the flexibility and correctness of the visual construction. In the interactive construction process, the above-mentioned visual construction interface displayed by the terminal 10 includes input components (such as input boxes and selection boxes), and the user triggers input operations on the input components to input the properties of the chart. The terminal 10 receives the attributes of the chart input by the user on the input component, acquires the constructed visualization view based on the attributes of the user configuration chart, and displays the constructed visualization view in the construction interface. In the process of constructing by means of code, the user inputs the program code in the visual construction interface. The terminal 10 receives the program code input by the user on the visualization construction interface, acquires the constructed visualization view based on the program code input by the user, and displays the constructed visualization view in the construction interface.
终端10存在多种可能产品形态。终端10包括而不限于个人计算机、移动电话、笔记本电脑、IP电话、摄像头、平板电脑、可穿戴设备等。There are many possible product forms for the terminal 10 . The terminal 10 includes, without limitation, a personal computer, a mobile phone, a notebook computer, an IP phone, a camera, a tablet computer, a wearable device, and the like.
终端10部署在终端10环境中或边缘环境中。在一些实施例中,终端10部署在局域网中。The terminal 10 is deployed in the terminal 10 environment or in the edge environment. In some embodiments, the terminal 10 is deployed in a local area network.
(2)服务器11(2) Server 11
服务器11用于提供可视化视图的构建服务。在本申请的一些实施例中,服务器11具体用于根据父图表的坐标轴属性计算子图表的布局参数,如子图表在界面的画布区域中位置坐标。可选地,服务器11还用于承担可视化视图构建时其他占用较大算力的任务。The server 11 is used to provide the construction service of the visualization view. In some embodiments of the present application, the server 11 is specifically configured to calculate the layout parameters of the sub-chart according to the coordinate axis properties of the parent chart, such as the position coordinates of the sub-chart in the canvas area of the interface. Optionally, the server 11 is also used to undertake other tasks that take up large computing power when constructing the visualization view.
服务器11可选地是独立的硬件设备、或者是包含多个硬件设备的集群或者分布式系统,或者是基于云计算以及网络功能虚拟化(network functions virtualization,NFV)技术所实现的虚拟化设备。虚拟化设备包括而不限于虚拟机或容器。The server 11 is optionally an independent hardware device, or a cluster or distributed system including multiple hardware devices, or a virtualized device implemented based on cloud computing and network functions virtualization (NFV) technology. Virtualization devices include, without limitation, virtual machines or containers.
服务器11部署在云环境中。在一些实施例中,终端10部署在互联网中。The server 11 is deployed in a cloud environment. In some embodiments, the terminal 10 is deployed in the Internet.
在一些实施例中,终端10和服务器11通过交互来实施下述方法实施例。例如,终端10响应于用户的操作,向服务器11发送可视化请求,访问服务器11提供的可视化构建服务。可视化请求中携带了构建图表所需的信息,如通过构建界面的输入组件配置的参数或者通过构建界面输入的代码。服务器11响应于可视化请求,根据可视化请求携带的信息构建可视化图表,将可视化图表返回给终端10。In some embodiments, the terminal 10 and the server 11 interact to implement the following method embodiments. For example, in response to the user's operation, the terminal 10 sends a visualization request to the server 11 to access the visualization construction service provided by the server 11 . The visualization request carries the information required for building the chart, such as parameters configured through the input component of the building interface or code input through the building interface. In response to the visualization request, the server 11 constructs a visualization chart according to the information carried by the visualization request, and returns the visualization chart to the terminal 10 .
终端10和服务器11的交互方式包括而不限于通过浏览器软件或者业务客户端软件交互的方式。在采用浏览器软件的方式交互时,上述服务器11例如是网站服务器11,终端10通过浏览器软件访问指定网页从而触发上述可视化请求,服务器11将构建的可视化视图携带在HTML文件中返回给终端10。在采用业务客户端软件的方式交互时,上述服务器11例如是业务客户端软件关联的后台服务器11,终端10通过业务客户端软件访问上述服务器11,从而获得可视化视图。The interaction between the terminal 10 and the server 11 includes, but is not limited to, the interaction through browser software or service client software. When using browser software to interact, the server 11 is, for example, a website server 11 , the terminal 10 accesses a specified webpage through the browser software to trigger the above-mentioned visualization request, and the server 11 carries the constructed visualization view in an HTML file and returns it to the terminal 10 . When using business client software for interaction, the above server 11 is, for example, a background server 11 associated with the business client software, and the terminal 10 accesses the above server 11 through the business client software to obtain a visual view.
上述附图6所示的终端10和服务器11交互的场景是可选地。可替代地,终端10本地执行下述方法实施例。The scenario of the interaction between the terminal 10 and the server 11 shown in FIG. 6 is optional. Alternatively, the terminal 10 locally executes the following method embodiments.
下面对本申请实施例的方法流程举例说明。The method flow of the embodiment of the present application is illustrated below with an example.
附图7是本申请实施例提供的一种可视化视图的构建方法的流程图。附图7所示方法包括以下步骤S201至步骤S205。FIG. 7 is a flowchart of a method for constructing a visualization view provided by an embodiment of the present application. The method shown in FIG. 7 includes the following steps S201 to S205.
附图7所示方法所基于的网络部署场景可选地如上述附图6所示。例如,结合附图6来看,附图7所示方法中的计算设备为附图6中的服务器或者终端。The network deployment scenario on which the method shown in FIG. 7 is based is optionally as shown in FIG. 6 above. For example, with reference to FIG. 6 , the computing device in the method shown in FIG. 7 is the server or terminal in FIG. 6 .
附图7所示方法以一个计算设备执行步骤S201至步骤S204为例进行说明。在另一些实施例中,步骤S201至步骤S204由多台设备协作执行。例如,结合附图6来看,附图7所示方法由服务器和终端协作执行。在一些实施例中,服务器承担主要处理工作,终端承担次要处理工作;在另一些实施例中,服务器承担次要处理工作,终端承担主要处理工作;或者,服务器或终端分别单独承担处理工作。在一种可能的实现中,终端充当可视化视图构建请求的发起方,请求服务器构建图表的可视化视图;服务器充当可视化视图请求的响应方,构建可视化视图并将构建好的可视化视图返回给终端,由终端展示可视化视图。The method shown in FIG. 7 is described by taking a computing device performing steps S201 to S204 as an example. In other embodiments, steps S201 to S204 are performed cooperatively by multiple devices. For example, with reference to FIG. 6 , the method shown in FIG. 7 is executed cooperatively by the server and the terminal. In some embodiments, the server undertakes the main processing work, and the terminal undertakes the secondary processing work; in other embodiments, the server undertakes the secondary processing work, and the terminal undertakes the main processing work; or, the server or the terminal respectively undertakes the processing work. In a possible implementation, the terminal acts as the initiator of the visual view construction request, requesting the server to construct the visual view of the chart; the server acts as the responder of the visual view request, constructs the visual view and returns the constructed visual view to the terminal, which is sent by The terminal displays a visual view.
附图7所示方法涉及坐标轴上的位置、坐标系中位置等多个位置。为了区分不同的位置,用“第一位置”、“第二位置”、区分描述多个不同的位置。The method shown in FIG. 7 involves multiple positions such as the position on the coordinate axis and the position in the coordinate system. In order to distinguish different positions, "first position", "second position", and distinction are used to describe a plurality of different positions.
附图7所示方法涉及坐标轴与画布之间夹角的角度、纵坐标轴与横坐标轴之间夹角的角度。为了区分不同的角度,用“第一角度”、“第二角度”、区分描述多个不同的角度。The method shown in FIG. 7 involves the angle between the coordinate axis and the canvas, and the angle between the ordinate axis and the abscissa axis. In order to distinguish different angles, "first angle", "second angle", and distinction are used to describe a plurality of different angles.
步骤S201、计算设备接收构建请求。Step S201, the computing device receives a construction request.
构建请求指示基于设定的坐标系构建目标数据的可视化视图。A build request instructs to build a visualization of the target data based on the specified coordinate system.
该设定的坐标系的坐标轴包括轨迹坐标轴。可选地,轨迹坐标轴为设定的坐标系的X轴,或者,轨迹坐标轴为设定的坐标系的Y轴。可选地,该设定的坐标系为二维坐标系,该坐标系的坐标轴为一个轨迹坐标轴与一个轨迹坐标轴之外其他类型坐标轴的组合。例如,该坐标系的X轴为轨迹坐标轴,而Y轴为线性坐标轴。或者,该设定的坐标系的两个坐标轴均为轨迹坐标轴。The coordinate axes of the set coordinate system include the trajectory coordinate axes. Optionally, the track coordinate axis is the X axis of the set coordinate system, or the track coordinate axis is the Y axis of the set coordinate system. Optionally, the set coordinate system is a two-dimensional coordinate system, and the coordinate axis of the coordinate system is a combination of a trajectory coordinate axis and other types of coordinate axes other than a trajectory coordinate axis. For example, the X axis of the coordinate system is the trajectory coordinate axis, and the Y axis is the linear coordinate axis. Alternatively, the two coordinate axes of the set coordinate system are both trajectory coordinate axes.
目标数据是指待进行可视化的数据。目标数据包括至少一个属性。例如,在构建附图2所示的军队东征可视化视图时,目标数据包括军队所在地的经度、军队所在地的维度、军队位置等属性。Target data refers to the data to be visualized. The target data includes at least one attribute. For example, when constructing the visualization view of the army's Eastern Expedition shown in Fig. 2, the target data includes attributes such as the longitude of the army's location, the latitude of the army's location, and the army's location.
在一些实施例中,轨迹坐标轴的形状是用户输入的轨迹,轨迹坐标轴上具有多个曲率不同的点。In some embodiments, the shape of the trajectory coordinate axis is a trajectory input by the user, and the trajectory coordinate axis has a plurality of points with different curvatures.
在一些实施例中,轨迹坐标轴对应的轨迹的输入方式包括以下任意一种:在构建界面中绘制所述轨迹;或者,在构建界面中输入所述轨迹上多个点的位置坐标。In some embodiments, the input method of the trajectory corresponding to the trajectory coordinate axis includes any one of the following: drawing the trajectory in the construction interface; or inputting the position coordinates of multiple points on the trajectory in the construction interface.
步骤S202、计算设备根据轨迹坐标轴以及目标数据,确定目标数据在可视化视图中的位置。Step S202, the computing device determines the position of the target data in the visualization view according to the trajectory coordinate axis and the target data.
可选地,确定位置的过程包括:计算设备获取轨迹坐标轴上目标数据对应的第一位置。计算设备根据第一位置,获取坐标系中目标数据对应的第二位置。Optionally, the process of determining the position includes: the computing device obtains the first position corresponding to the target data on the trajectory coordinate axis. The computing device acquires, according to the first position, a second position corresponding to the target data in the coordinate system.
在一些实施例中,上述第一位置是通过预先建立的映射规则确定的。映射规则指示从数据值到轨迹坐标轴上位置坐标之间的映射关系。计算设备根据目标数据以及映射规则,获取目标数据的值映射的位置坐标,作为上述第一位置。In some embodiments, the above-mentioned first location is determined by a pre-established mapping rule. The mapping rule indicates the mapping relationship from data values to position coordinates on the trajectory coordinate axis. The computing device acquires, according to the target data and the mapping rule, the position coordinates of the value mapping of the target data, as the above-mentioned first position.
在一些实施例中,上述第一位置具体是按照数据值相对于定义域的比例确定的。例如,计算设备根据目标数据的值在轨迹坐标轴的定义域中的比例,获取轨迹坐标轴上轨迹点的位置,作为第一位置。轨迹点与轨迹坐标轴的端点(如起点或终点)之间的距离与比例相关。例如,轨迹坐标轴的定义域为0到100,数值为30的数据会被映射到距离轨迹起点为整条轨迹长度的百分之三十的轨迹点所在的画布上的位置。In some embodiments, the above-mentioned first position is specifically determined according to the ratio of the data value to the definition domain. For example, the computing device acquires the position of the trajectory point on the trajectory coordinate axis as the first position according to the ratio of the value of the target data in the definition domain of the trajectory coordinate axis. The distance between the trajectory point and the endpoint of the trajectory axis (such as the start or end point) is scale-dependent. For example, the definition range of the track coordinate axis is 0 to 100, and the data with a value of 30 will be mapped to the position on the canvas where the track point whose distance from the track start point is 30% of the entire track length is located.
画布为构建界面中用于显示所述可视化视图的区域。第二位置即目标数据在画布中对应的像素位置,第二位置指示可视化元素应绘制在屏幕上哪个位置。The canvas is the area in the build interface for displaying the visualization. The second position is the pixel position corresponding to the target data in the canvas, and the second position indicates where the visual element should be drawn on the screen.
在一些实施例中,计算设备根据第一位置,以数据在Y轴上的映射位置作为偏移量,获取坐标系中目标数据对应的第二位置。In some embodiments, the computing device obtains the second position corresponding to the target data in the coordinate system according to the first position, using the mapping position of the data on the Y-axis as the offset.
在一些实施例中,第二位置的计算过程包括以下步骤(a)至步骤(c)。In some embodiments, the calculation process of the second position includes the following steps (a) to (c).
步骤(a)计算设备根据目标数据的值,计算目标数据在X轴上映射的坐标位置。并且,计算设备根据目标数据的值,计算目标数据在Y轴上映射的坐标位置。其中,X轴或Y轴为轨迹坐标轴。也即是,步骤(a)包括上述步骤S202。Step (a) The computing device calculates the coordinate position mapped by the target data on the X-axis according to the value of the target data. And, the computing device calculates the coordinate position mapped by the target data on the Y-axis according to the value of the target data. Among them, the X axis or the Y axis is the trajectory coordinate axis. That is, step (a) includes the above-mentioned step S202.
步骤(b)计算设备根据目标数据在Y轴上映射的坐标位置,获取横坐标偏移量和纵坐标偏移量。Step (b) The computing device obtains the offset of the abscissa and the offset of the ordinate according to the coordinate position mapped by the target data on the Y-axis.
步骤(c)计算设备对横坐标偏移量和纵坐标偏移量与数据在X轴上映射的坐标位置进行叠加,得到最终的数据坐标位置(第二位置)。Step (c) The computing device superimposes the abscissa offset and the ordinate offset and the coordinate position mapped by the data on the X axis to obtain the final data coordinate position (second position).
第二位置更具体的计算过程可参考下文中步骤S1至步骤S3,以及对公式(1)至公式(4)的介绍。For a more specific calculation process of the second position, reference may be made to steps S1 to S3 below, and the introduction to formula (1) to formula (4).
在一个示例性实施例中,根据轨迹坐标轴以及数据的计算过程包括以下步骤(1)至步骤(3)。In an exemplary embodiment, the calculation process according to the trajectory coordinate axis and the data includes the following steps (1) to (3).
步骤(1)根据数据值和定义域计算一个比例。例如,定义域是0-100,数值是20,则比例是20/100=0.2。Step (1) calculates a scale according to the data value and the definition domain. For example, if the domain is 0-100 and the value is 20, the ratio is 20/100=0.2.
步骤(2)根据该步骤(1)计算的比例,从轨迹上获取轨迹点,该轨迹点与轨迹起点之间的距离与轨迹长度的比例等于该比例。例如,如果轨迹长300,步骤(1)计算出的比例为0.2,则找到轨迹上距离轨迹起点为百分之二十的位置,即距离起点60的位置。Step (2) obtains a track point from the track according to the ratio calculated in step (1), and the ratio of the distance between the track point and the track start point to the track length is equal to the ratio. For example, if the track length is 300 and the ratio calculated in step (1) is 0.2, then find a position on the track that is 20% away from the starting point of the track, that is, a position 60 away from the starting point.
步骤(3)根据坐标轴的值域,对步骤(2)中确定的轨迹点的位置坐标进行缩放,从而得到轨迹点对应的画布像素位置。例如,如果坐标轴的值域是[0,600],[0,800],就表示这个轨迹如果全部都绘制到画布上,应该绘制在画布中一个长600宽800的长方形里;如果轨迹点是距离起点60的位置,则找到60对应的那个点在画布中对应的像素。In step (3), the position coordinates of the track points determined in step (2) are scaled according to the value range of the coordinate axis, so as to obtain the canvas pixel positions corresponding to the track points. For example, if the value range of the coordinate axis is [0,600], [0,800], it means that if the track is all drawn on the canvas, it should be drawn in a rectangle with a length of 600 and a width of 800; if the track point is 60 from the starting point position, then find the pixel corresponding to the point corresponding to 60 in the canvas.
在一些实施例中,坐标系位置具体根据预先设定的坐标轴组合关系确定。例如,计算设备根据第一位置以及坐标系的坐标轴组合关系,获取坐标系中目标数据对应的第二位置。In some embodiments, the coordinate system position is specifically determined according to a preset coordinate axis combination relationship. For example, the computing device acquires the second position corresponding to the target data in the coordinate system according to the first position and the coordinate axis combination relationship of the coordinate system.
坐标轴组合关系是指坐标系中不同坐标轴之间的关系。例如,对于一个二维坐标系来说,二维坐标系的坐标轴包括横坐标轴以及纵坐标轴,二维坐标系的坐标轴组合关系为横坐标轴与纵坐标轴之间的关系。本实施例提供了多种类型的坐标轴组合关系,下面对一些可能的坐标轴组合关系进行介绍。The coordinate axis combination relationship refers to the relationship between different coordinate axes in the coordinate system. For example, for a two-dimensional coordinate system, the coordinate axes of the two-dimensional coordinate system include an abscissa axis and an ordinate axis, and the combination relationship of the coordinate axes of the two-dimensional coordinate system is the relationship between the abscissa axis and the ordinate axis. This embodiment provides various types of coordinate axis combination relationships, and some possible coordinate axis combination relationships are introduced below.
(1)绝对型组合关系(1) Absolute combination relationship
绝对型组合关系例如是坐标系中纵坐标轴(Y轴)与画布保持为设定的第一角度,纵坐标轴的方向可选地与横坐标轴(X轴)的方向、形状和类型无关。示例性地,请参考附图8,附图8中的(a)是绝对型组合关系的示意图。如附图8中的(a)所示,在采用绝对型组合关系的情况下,各个点的Y轴方向始终与画布呈一定角度,即各个点的Y轴方向与画布之间的夹角是相同的。绝对型组合关系的典型应用场景是构建X轴方向形状较复杂,数据量较大的可视化视图。For example, the absolute combination relationship is that the ordinate axis (Y axis) and the canvas in the coordinate system are maintained at a set first angle, and the direction of the ordinate axis is optionally independent of the direction, shape and type of the abscissa axis (X axis). . Exemplarily, please refer to FIG. 8 , (a) in FIG. 8 is a schematic diagram of an absolute combination relationship. As shown in (a) of FIG. 8, in the case of using an absolute combination relationship, the Y-axis direction of each point is always at a certain angle to the canvas, that is, the angle between the Y-axis direction of each point and the canvas is identical. A typical application scenario of an absolute combination relationship is to construct a visual view with a complex shape in the X-axis direction and a large amount of data.
本实施例通过提供绝对型组合关系,至少能达到以下效果:绝对型组合关系让可视化元素的方向和旋转角度统一。例如,在对附图3进行可视化的场景下,若使用这种绝对型组合关系的坐标系,就会矩形全部垂直向上,文字也全部是垂直的,这种产生的可视化效果会比较整齐。另外,在构建可视化视图时用户想要强调文字的场景中,绝对型组合关系文字始终不旋转与画布保持平行,让用户读文字时更方便。In this embodiment, by providing an absolute combination relationship, at least the following effects can be achieved: the absolute combination relationship makes the directions and rotation angles of the visualization elements unified. For example, in the visualization scene of FIG. 3, if the coordinate system of this absolute combination relationship is used, all the rectangles will be vertically upward, and all the text will be vertical, and the resulting visualization effect will be relatively neat. In addition, in the scenario where the user wants to emphasize the text when constructing the visual view, the text in the absolute combination relationship is always kept parallel to the canvas without being rotated, which makes it more convenient for the user to read the text.
在一些实施例中,从轨迹坐标轴上的坐标位置到坐标系中位置的计算过程包括:响应于坐标系的组合关系为绝对型组合关系,计算设备根据第一角度以及坐标系的偏移角度,获取坐标系中纵坐标轴相对于画布的角度;计算设备根据纵坐标轴相对于画布的角度以及第一位置,获取第二位置。In some embodiments, the calculation process from the coordinate position on the trajectory coordinate axis to the position in the coordinate system includes: in response to the combination relationship of the coordinate system being an absolute combination relationship, the computing device calculates the offset angle of the coordinate system according to the first angle and the coordinate system. , to obtain the angle of the ordinate axis in the coordinate system relative to the canvas; the computing device obtains the second position according to the angle of the ordinate axis relative to the canvas and the first position.
(2)相对型组合关系(2) Relative combination relationship
相对型组合关系例如是坐标系中纵坐标轴(Y轴)与横坐标轴(X轴)保持为设定的第二角度。示例性地,请参考附图8,附图8中的(b)是相对型组合关系的示意图。如附图8中的(b)所示,在采用相对型组合关系的情况下,各个点的Y轴方向始终与X轴方向呈一 定角度,即各个点的Y轴方向与X轴方向之间的夹角是相同的。相对型组合关系的典型应用场景是构建数据量小,X轴形状简单的可视化视图。The relative type combination relationship is, for example, that the ordinate axis (Y axis) and the abscissa axis (X axis) in the coordinate system are maintained at a set second angle. Illustratively, please refer to FIG. 8 , (b) in FIG. 8 is a schematic diagram of a relative combination relationship. As shown in (b) of FIG. 8, in the case of adopting the relative type combination relationship, the Y-axis direction of each point is always at a certain angle with the X-axis direction, that is, the Y-axis direction and the X-axis direction of each point are at a certain angle. The included angles are the same. A typical application scenario of a relative composition relationship is to build a visual view with a small amount of data and a simple X-axis shape.
本实施例通过提供相对型组合关系,至少能达到以下效果:相对性的坐标轴能让Y轴与X轴保持一定角度,从而降低构建如附图3这类的可视化视图的复杂度。此外,当可视化时不强调文字信息,需要让可视化元素(矩形,线条)随着坐标轴的变化有不同的旋转角度时,这种相对型坐标轴能降低实现这种可视化视图的复杂度。By providing a relative combination relationship, this embodiment can at least achieve the following effects: the relative coordinate axes can keep the Y axis and the X axis at a certain angle, thereby reducing the complexity of constructing a visualization view such as FIG. 3 . In addition, when the text information is not emphasized during visualization, and the visualization elements (rectangles, lines) need to have different rotation angles with the change of the coordinate axis, this relative coordinate axis can reduce the complexity of realizing such a visualization view.
在一些实施例中,上述绝对型组合关系中纵坐标轴与画布之间的夹角(第一角度)或者上述相对型组合关系中纵坐标轴与横坐标轴之间的夹角(第二角度)是用户自定义设置的。例如,计算设备获取用户对坐标系的定义信息,从定义信息中获取上述第一角度或第二角度。可选地,上述定义信息是基于用户通过编程语言输入的代码生成的。例如,上述定义信息是可视化视觉编码的声明代码。In some embodiments, the angle between the ordinate axis and the canvas in the above-mentioned absolute combination relationship (the first angle) or the angle between the ordinate axis and the abscissa axis in the above-mentioned relative combination relationship (the second angle) ) are user-defined settings. For example, the computing device obtains the user's definition information of the coordinate system, and obtains the above-mentioned first angle or the second angle from the definition information. Optionally, the above-mentioned definition information is generated based on codes input by a user through a programming language. For example, the above-mentioned definition information is a declarative code for visual coding.
通过支持设定Y轴与X轴的夹角或Y轴与画布的夹角,在构建可视化视图的过程中,计算设备会自动通过用户规定的角度进行布局计算,而无需用户手动计算。此外,角度声明之后,可以让用户快速声明更多样的可视化视图,或者根据数据的可视化效果,调整角度,得到视觉效果和艺术效果更好的视图。比如用户不想让Y轴垂直,可以设置Y轴与X轴成45度夹角,计算设备根据用户设置的45度夹角生成一个斜的柱状图,从而省出左上角的一半画布空间用于其他元素的绘制。By supporting the setting of the angle between the Y axis and the X axis or the angle between the Y axis and the canvas, in the process of constructing a visualization view, the computing device will automatically calculate the layout according to the angle specified by the user, without the need for the user to manually calculate. In addition, after the angle is declared, users can quickly declare more diverse visualization views, or adjust the angle according to the visualization effect of the data to obtain a view with better visual effect and artistic effect. For example, if the user does not want the Y-axis to be vertical, he can set the Y-axis and the X-axis to form a 45-degree angle, and the computing device generates an oblique histogram according to the 45-degree angle set by the user, thus saving half of the canvas space in the upper left corner for other drawing of the element.
在一些实施例中,从轨迹坐标轴上的坐标位置到坐标系中位置的计算过程包括:响应于坐标系的组合关系为相对型组合关系,计算设备根据第二角度、坐标系的偏移角度以及横坐标轴的切线方向,获取坐标系中纵坐标轴相对于画布的角度;计算设备根据纵坐标轴相对于画布的角度以及第一位置,获取第二位置。In some embodiments, the calculation process from the coordinate position on the trajectory coordinate axis to the position in the coordinate system includes: in response to the combination relationship of the coordinate system being a relative type combination relationship, calculating the device according to the second angle, the offset angle of the coordinate system and the tangent direction of the abscissa axis to obtain the angle of the ordinate axis relative to the canvas in the coordinate system; the computing device obtains the second position according to the angle of the ordinate axis relative to the canvas and the first position.
步骤S204、计算设备根据确定出的位置,获取目标数据的可视化视图。Step S204, the computing device acquires a visual view of the target data according to the determined position.
可视化视图包括用于至少一个表示目标数据的可视化元素。可视化元素在可视化视图中位于确定出的位置,如上述第二位置。具体来说,计算设备根据目标数据绑定的可视化元素,在画布中确定出的位置绘制可视化元素,从而得到可视化视图。The visualization view includes at least one visualization element for representing target data. The visual element is located in the visual view at a determined position, such as the second position described above. Specifically, the computing device draws the visual element at the position determined in the canvas according to the visual element bound by the target data, thereby obtaining the visual view.
步骤S205、计算设备提供可视化视图。Step S205, the computing device provides a visualization view.
可选地,可视化视图通过构建界面提供给用户。构建界面是用于构建数据的可视化视图的界面。例如,计算设备提供的构建界面包括可视化结果展示区域,该可视化结果展示区域中显示有可视化视图。通过该构建界面,能够在可视化搭建过程中直观地展示嵌套图表的构建结果。可替代地,可视化视图通过文件、构建界面之外的其他界面等其他形式提供给用户。Optionally, the visual view is provided to the user by building an interface. The build interface is the interface used to build a visual view of the data. For example, the construction interface provided by the computing device includes a visualization result display area in which a visualization view is displayed. Through the construction interface, the construction result of the nested chart can be displayed intuitively during the visual construction process. Alternatively, the visual view is provided to the user through a file, an interface other than the build interface, and so on.
提供可视化视图包括多种具体方式。在一种可能的实现中,计算设备向构建请求的发起方发送可视化视图的内容。例如,计算设备提供为云端服务器11,构建请求的发起方为终端10,上述构建请求为超文本传输协议(Hyper Text Transfer Protocol,HTTP)请求,计算设备获得可视化视图后,将可视化视图的内容封装为超文本标记语言(Hyper Text Markup Language,HTML)文件,将HTML文件通过HTTP响应发送给终端10。在另一种实现中,计算设备在构建界面中显示可视化视图。There are several specific ways to provide a visual view. In one possible implementation, the computing device sends the content of the visualization to the originator of the build request. For example, the computing device is provided as the cloud server 11, the initiator of the construction request is the terminal 10, and the above construction request is a Hyper Text Transfer Protocol (Hyper Text Transfer Protocol, HTTP) request. After the computing device obtains the visual view, it encapsulates the content of the visual view. For a Hyper Text Markup Language (Hyper Text Markup Language, HTML) file, the HTML file is sent to the terminal 10 through an HTTP response. In another implementation, the computing device displays the visualization in the build interface.
本实施例提供了一种以轨迹坐标轴为基础的坐标系来构建可视化视图的方法,通过轨迹坐标轴能支持用户自定义坐标轴的形状,通过自动计算出待可视化的数据在基于轨迹坐标轴的坐标系中的位置,从而封装了复杂的布局计算的开发过程,避免采用直角坐标系构建视图 时用户手动计算元素具体位置的繁琐操作,因此降低了用户的学习成本,提高了构建复杂可视化视图的效率。This embodiment provides a method for constructing a visual view based on a coordinate system based on the trajectory coordinate axis. The trajectory coordinate axis can support the user-defined shape of the coordinate axis, and the data to be visualized can be automatically calculated based on the trajectory coordinate axis. position in the coordinate system, thus encapsulating the development process of complex layout calculation, avoiding the tedious operation of manually calculating the specific position of the element when constructing the view using the Cartesian coordinate system, thus reducing the user's learning cost and improving the construction of complex visualization views s efficiency.
下面,对上述实施例解决相关技术在构建如附图5所示的连续曲线的可视化视图时步骤繁琐的问题的原理进行分析。In the following, the principle of solving the problem of complicated steps when constructing a visual view of a continuous curve as shown in FIG. 5 in the related art in the above-mentioned embodiment is analyzed.
上述实施例对曲线上轮廓点的计算过程进行了封装。例如,用户将轨迹坐标轴设置为坐标系中坐标轴并设置轨迹数据后,系统使用轨迹坐标轴和坐标系相关的计算过程,即可实现轨迹轮廓点的位置计算,系统把轨迹轮廓点按曲线连接起来,即可形成包含连续曲线的可视化视图,无需依赖用户手动计算轮廓点的位置,从而显著简化了可视化视图构建的繁琐流程。The above embodiment encapsulates the calculation process of the contour points on the curve. For example, after the user sets the trajectory coordinate axis as the coordinate axis in the coordinate system and sets the trajectory data, the system uses the calculation process related to the trajectory coordinate axis and the coordinate system to realize the position calculation of the trajectory contour point. By connecting them, a visualization view containing continuous curves can be formed, without relying on the user to manually calculate the position of the contour points, which greatly simplifies the tedious process of visualization view construction.
在一些实施例中,提供一种支持自定义坐标系的交互式构建界面,构建界面包括可视化视图以及坐标系设定区域,坐标系设定区域用于供用户设定坐标系的参数。附图7所示方法中轨迹坐标轴的轨迹数据、坐标轴组合关系、坐标轴之间的夹角是通过对坐标系设定区域上触发的操作设置的。例如,用户向坐标系设定区域输入轨迹数据之后,触发坐标轴设定指令,坐标轴设定指令指示基于输入的轨迹数据设定轨迹坐标轴。计算设备响应于坐标轴设定指令,根据通过坐标系设定区域输入的轨迹数据确定轨迹坐标轴。In some embodiments, an interactive construction interface supporting a custom coordinate system is provided. The construction interface includes a visual view and a coordinate system setting area, where the coordinate system setting area is used for a user to set parameters of the coordinate system. In the method shown in FIG. 7 , the trajectory data of the trajectory coordinate axes, the combination relationship of the coordinate axes, and the included angle between the coordinate axes are set by an operation triggered on the coordinate system setting area. For example, after the user inputs trajectory data into the coordinate system setting area, a coordinate axis setting instruction is triggered, and the coordinate axis setting instruction instructs to set the trajectory coordinate axis based on the inputted trajectory data. The computing device determines the trajectory coordinate axis according to the trajectory data input through the coordinate system setting area in response to the coordinate axis setting instruction.
请参考附图12,附图12是对附图11所示的构建界面60中坐标系设定区域的举例说明。坐标系设定区域包括交互构建视图602、属性视图604、轨迹绘制区域607。下面,对构建界面中坐标系设定区域包含的各个组件进行介绍。Please refer to FIG. 12 . FIG. 12 is an example of the coordinate system setting area in the construction interface 60 shown in FIG. 11 . The coordinate system setting area includes an interactive construction view 602 , a property view 604 , and a trajectory drawing area 607 . Next, each component included in the coordinate system setting area in the construction interface will be introduced.
(1)交互构建视图602(1) Interactive construction view 602
交互构建视图602用于供用户向可视化视图中创建图表。交互构建视图602允许用户指定图表中的图符种类、图表之间的嵌套关系、图表结构等。例如,附图13中的(a)中交互构建视图602包含创建的一组矩形图符6031。附图13中的(b)中交互构建视图602包含创建的两组矩形图符6031和一组圆形图符6032。The interactive construction view 602 is used for a user to create a diagram into a visualization view. The interactive construction view 602 allows the user to specify the kinds of icons in the diagram, nesting relationships between diagrams, diagram structure, and the like. For example, the interactive construction view 602 in (a) of FIG. 13 includes a set of rectangular icons 6031 created. The interactive construction view 602 in (b) of FIG. 13 includes two sets of rectangular icons 6031 and one set of circular icons 6032 that are created.
(2)属性视图604(2) Property view 604
属性视图604用于供用户配置可视化元素的视觉属性(如颜色、尺寸等),从而分割图表结构搭建和视觉内容填充,让用户的构建过程更加清晰。属性视图604包括多种输入组件,属性视图604中输入组件的类型包括而不限于以下组件(a)至(f)。The property view 604 is used for the user to configure the visual properties (such as color, size, etc.) of the visual element, so as to separate the chart structure construction and the visual content filling, and make the construction process clearer for the user. The property view 604 includes various input components, and the types of input components in the property view 604 include, but are not limited to, the following components (a) to (f).
组件(a)文本输入框:用于名称、等文本类型参数输入。Component (a) text input box: used for name, and other text type parameter input.
组件(b)数字输入框:用于高度、宽度、字号、线宽等数字类型参数输入。Component (b) Digital input box: used for inputting digital parameters such as height, width, font size, and line width.
组件(c)下拉框(也称下拉菜单):用于枚举类型参数输入。Component (c) drop-down box (also called drop-down menu): used for enumeration type parameter input.
组件(d)颜色选择框:用于颜色输入。Component (d) color selection box: used for color input.
组件(e)单选框:用于可选参数输入。Component (e) radio box: used for optional parameter input.
组件(f)组合式文本输入框:用于范围、边距等包含多个值的参数输入。Component (f) Combined text input box: used for parameter input with multiple values, such as range, margin, etc.
在一些实施例中,属性视图604包含多种支持输入坐标系参数的组件,从而供用户设定附图7所示方法利用的坐标系参数。例如,请参考附图12,属性视图604包括坐标轴关系选项6041、坐标轴夹角控件6042。In some embodiments, the properties view 604 includes various components that support inputting coordinate system parameters, thereby allowing the user to set the coordinate system parameters utilized by the method shown in FIG. 7 . For example, referring to FIG. 12 , the property view 604 includes a coordinate axis relationship option 6041 and a coordinate axis included angle control 6042 .
坐标轴关系选项6041为用于输入坐标轴关系的组件,坐标轴关系选项6041为例如是一个下拉框。用户对坐标轴关系选项6041触发操作,从绝对型组合关系和相对型组合关系中选中一种作为自定义坐标系中坐标轴的组合关系。用户对坐标轴关系选项6041的操作会触发坐 标轴关系设定指令。计算设备将通过坐标轴关系选项6041选中的坐标轴组合关系确定为坐标系的坐标轴组合关系。例如,在附图12中,用户选择绝对型(fixed)组合关系作为自定义坐标系中坐标轴组合关系。The coordinate axis relationship option 6041 is a component for inputting the coordinate axis relationship, and the coordinate axis relationship option 6041 is, for example, a drop-down box. The user triggers an operation on the coordinate axis relationship option 6041, and selects one of the absolute type combination relationship and the relative type combination relationship as the combination relationship of the coordinate axis in the custom coordinate system. The user's operation on the coordinate axis relationship option 6041 will trigger the coordinate axis relationship setting command. The computing device determines the coordinate axis combination relationship selected through the coordinate axis relationship option 6041 as the coordinate axis combination relationship of the coordinate system. For example, in FIG. 12, the user selects an absolute type (fixed) combination relationship as the coordinate axis combination relationship in the custom coordinate system.
坐标轴夹角控件6042为用于输入坐标轴夹角的组件。坐标轴夹角控件6042例如是一个数字输入框。在坐标轴组合关系为绝对型组合关系的情况下,用户对坐标轴夹角控件6042触发操作,输入纵坐标轴与画布保持的角度。计算设备响应于坐标轴夹角设定指令,将通过坐标轴夹角控件6042输入的第一角度,确定为坐标系中的纵坐标轴与画布保持的角度。或者,在坐标轴组合关系为相对型组合关系的情况下,用户对坐标轴夹角控件6042触发操作,输入纵坐标轴与横坐标轴保持的角度保持的角度。计算设备响应于坐标轴夹角设定指令,将通过坐标轴夹角控件6042输入的第二角度,确定为坐标系中的纵坐标轴与横坐标轴保持的角度。例如,在附图12中,用户输入角度66度作为自定义坐标系中纵坐标轴与画布保持的角度。The coordinate axis included angle control 6042 is a component for inputting the coordinate axis included angle. The coordinate axis included angle control 6042 is, for example, a number input box. In the case that the coordinate axis combination relationship is an absolute combination relationship, the user triggers an operation on the coordinate axis included angle control 6042, and inputs the angle maintained by the ordinate axis and the canvas. In response to the coordinate axis angle setting instruction, the computing device determines the first angle input through the coordinate axis angle control 6042 as the angle maintained by the ordinate axis in the coordinate system and the canvas. Alternatively, when the coordinate axis combination relationship is a relative combination relationship, the user triggers an operation on the coordinate axis angle control 6042, and inputs the angle maintained by the angle maintained by the ordinate axis and the abscissa axis. In response to the coordinate axis angle setting instruction, the computing device determines the second angle input through the coordinate axis angle control 6042 as the angle maintained by the ordinate axis and the abscissa axis in the coordinate system. For example, in FIG. 12, the user inputs an angle of 66 degrees as the angle between the vertical axis in the custom coordinate system and the canvas.
在一些实施例中,属性视图604还提供用于输入图表旋转角度的组件6043。例如,在附图12中,用户向组件6043输入角度0度作为自定义坐标系中图表旋转角度。In some embodiments, the properties view 604 also provides a component 6043 for entering the rotation angle of the chart. For example, in FIG. 12, the user inputs an angle of 0 degrees to the component 6043 as the rotation angle of the chart in the custom coordinate system.
在一些实施例中,属性视图604还提供用于输入图表名称的组件6044。例如,在附图12中,用户向组件6044输入字符串132作为图表的名称。In some embodiments, the properties view 604 also provides a component 6044 for entering a chart name. For example, in Figure 12, the user enters the string 132 into component 6044 as the name of the chart.
(3)轨迹绘制区域607(3) Trajectory drawing area 607
轨迹绘制区域607用于供用户绘制轨迹坐标轴的形状,从而设定轨迹坐标轴的轨迹数据。轨迹绘制区域607也称轨迹绘制面板。The trajectory drawing area 607 is used for the user to draw the shape of the trajectory coordinate axis, so as to set the trajectory data of the trajectory coordinate axis. The trajectory drawing area 607 is also called a trajectory drawing panel.
在设置轨迹坐标轴的参数的过程中,用户可以通过鼠标、触摸屏或者其他输入设备,在轨迹绘制区域607上执行绘制操作,从而绘制一条轨迹。响应于用户对轨迹绘制区域607的绘制操作,计算设备会获取在轨迹绘制区域607中绘制的轨迹,从轨迹中提取轨迹点的位置坐标,作为轨迹坐标轴的轨迹数据。例如,请参考附图12,用户绘制轨迹之后,计算设备从轨迹中提取轨迹点A的位置坐标、轨迹点B的位置坐标、轨迹点C的位置坐标以及轨迹点D的位置坐标,将这四个轨迹点的位置坐标设定为轨迹坐标轴的轨迹数据。In the process of setting the parameters of the track coordinate axis, the user may perform a drawing operation on the track drawing area 607 through a mouse, a touch screen or other input devices, thereby drawing a track. In response to the user's drawing operation on the trajectory drawing area 607, the computing device acquires the trajectory drawn in the trajectory drawing area 607, and extracts the position coordinates of the trajectory points from the trajectory as trajectory data of the trajectory coordinate axis. For example, referring to FIG. 12 , after the user draws the trajectory, the computing device extracts the position coordinates of the trajectory point A, the position coordinates of the trajectory point B, the position coordinates of the trajectory point C, and the position coordinates of the trajectory point D from the trajectory. The position coordinates of each track point are set as the track data of the track coordinate axis.
通过绘制操作来设定轨迹坐标轴的形状是可选的方式。可替代地,使用待可视化的数据的属性作为轨迹数据。例如,坐标系设定区域包括轨迹数据选项(附图12未示出),用户将目标数据的属性通过拖拽或其他方式输入轨迹数据选项。计算设备将通过轨迹数据选项输入的目标数据的属性设定为轨迹坐标轴的轨迹数据。例如,用户将目标数据的第一属性和目标数据的第二属性拖拽至轨迹数据选项,计算设备将目标数据的第一属性设定为轨迹数据的横坐标,将目标数据的第二属性设定为轨迹数据的纵坐标。Setting the shape of the trajectory axes by drawing operations is optional. Alternatively, properties of the data to be visualized are used as trajectory data. For example, the coordinate system setting area includes trajectory data options (not shown in FIG. 12 ), and the user inputs the attributes of the target data into the trajectory data options by dragging or other methods. The computing device sets the attribute of the target data input through the trajectory data option as the trajectory data of the trajectory coordinate axis. For example, the user drags the first attribute of the target data and the second attribute of the target data to the trajectory data option, and the computing device sets the first attribute of the target data as the abscissa of the trajectory data, and sets the second attribute of the target data as the abscissa of the trajectory data. Set as the ordinate of the trajectory data.
通过使用轨迹数据定义坐标轴,至少能达到两方面的效果。第一,通过数据给定轨迹数据比直接绘制出来的形状更可控,更精确。第二,当用户想生成的布局形状包含在数据中时,例如利用数据对象的移动轨迹,物体的轮廓形状等作为轨迹形状生成坐标轴时,使用数据直接赋值定义更快速,方便,无需用户临摹。By using the trajectory data to define the coordinate axis, at least two effects can be achieved. First, the trajectory data given by the data is more controllable and accurate than the shape drawn directly. Second, when the layout shape that the user wants to generate is included in the data, for example, the movement trajectory of the data object, the outline shape of the object, etc. are used as the trajectory shape to generate the coordinate axis, it is faster and more convenient to use the data to directly assign the definition, and there is no need for the user to copy .
在一些实施例中,如附图11所示,该构建界面60还包括数据视图601、层次视图603、构建结果展示区域605以及代码区域606。In some embodiments, as shown in FIG. 11 , the construction interface 60 further includes a data view 601 , a hierarchical view 603 , a construction result display area 605 and a code area 606 .
(4)数据视图601(4) Data View 601
数据视图601用于展示导入的待可视化的数据。数据视图601中展示的数据包括至少一个属性以及每个属性的值。The data view 601 is used to display the imported data to be visualized. The data presented in data view 601 includes at least one attribute and a value for each attribute.
(5)层次视图603(5) Hierarchical view 603
层次视图603用于展示图表的层次结构图。层级结构图用于表示图表中包含的每个图符(子图表)。逻辑上处于不同层次的图表在层次结构图中具有不同的高度。例如,在执行附图7所示方法时,层次视图603用于展示类型为图表的目标数据的层次结构图,层次结构图中图符类型的图表位于父图表的下层。通过层次视图603的设计,能直观的展示当前构建中图表的层级结构,将图表层级结构通过界面传递给用户。 Hierarchy view 603 is used to present a hierarchy diagram of the diagram. Hierarchy diagrams are used to represent each icon (sub-diagram) contained in the diagram. Diagrams that are logically at different levels have different heights in the hierarchy diagram. For example, when the method shown in FIG. 7 is executed, the hierarchical view 603 is used to display the hierarchical structure diagram of the target data whose type is a chart, and the chart of the icon type in the hierarchical structure diagram is located in the lower layer of the parent chart. Through the design of the hierarchical view 603, the hierarchical structure of the chart currently under construction can be displayed intuitively, and the hierarchical structure of the chart can be transmitted to the user through the interface.
(6)构建结果展示区域605(6) Construction result display area 605
构建结果展示区域605用于呈现可视化视图的构建结果。绘制模块503绘制的可视化视图6051会在构建结果展示区域605中展示。附图11中,绘制模块503绘制的可视化视图6051具体包括一组矩形图符60511。The construction result display area 605 is used to present the construction result of the visual view. The visual view 6051 drawn by the drawing module 503 will be displayed in the construction result display area 605 . In FIG. 11 , the visual view 6051 drawn by the drawing module 503 specifically includes a group of rectangular icons 60511 .
在一些实施例中,构建结果展示区域605包括导出控件6052,当用户对导出控件6052触发操作时,计算设备将构建的可视化视图6051以图片、文件或者其他形式输出至目标位置。In some embodiments, the construction result display area 605 includes an export control 6052. When the user triggers an operation on the export control 6052, the computing device outputs the constructed visual view 6051 to the target location in the form of a picture, a file or other forms.
(7)代码区域606(7) Code area 606
代码区域606用于对生成可视化视图的代码进行展示。在一些实施例中,代码区域606包括导出控件6062和运行控件6061。导出控件6062用于触发代码导出指令。当用户对导出控件6062触发操作时,计算设备响应于代码导出指令,将代码区域606中的代码输出至目标位置。运行控件6061用于触发代码运行指令。当用户对运行控件6061触发操作时,计算设备响应于代码运行指令,运行在代码区域606中输入的代码。The code area 606 is used to display the code for generating the visual view. In some embodiments, the code area 606 includes an export control 6062 and a run control 6061 . The export control 6062 is used to trigger the code export instruction. When the user triggers an operation on the export control 6062, the computing device outputs the code in the code area 606 to the target location in response to the code export instruction. The running control 6061 is used to trigger the code running instruction. When the user triggers an operation on the execution control 6061, the computing device executes the code entered in the code area 606 in response to the code execution instruction.
通过附图11所示的可视化组件构建界面,用户在搭建可视化视图时,便能够通过交互的方式进行,用户通过拖拽即可完成对象创建以及参数配置的步骤,进一步简化了搭建流程。Through the visualization component construction interface shown in FIG. 11, the user can interactively construct the visualization view, and the user can complete the steps of object creation and parameter configuration by dragging and dropping, which further simplifies the construction process.
附图11中代码区域606中显示的代码的含义是设置可视化视图的参数,具体的含义是将宽度设置为1000,高度设置为800,背景颜色设置为RGB(4,14,4),X轴的类型设置为线性,定义域设置为0至2之间,值域设置为0至500之间,Y轴的类型设置为线性,定义域设置为0至3之间,值域设置为0至520之间。The meaning of the code displayed in the code area 606 in FIG. 11 is to set the parameters of the visual view, the specific meaning is to set the width to 1000, the height to 800, the background color to RGB(4,14,4), the X axis The type is set to linear, the domain is set between 0 and 2, the value range is set between 0 and 500, the type of Y-axis is set to linear, the domain is set between 0 and 3, and the value range is set between 0 and 500. between 520.
在一些实施例中,本申请实施例支持在一个统一的构建界面中,灵活使用代码构建和交互构建这两种构建方式搭建图表,从而解决了相关技术中代码构建和交互构建只能选择一项使用的技术问题,下面对代码构建相关的实现方式举例说明。In some embodiments, the embodiments of the present application support the flexible use of two construction methods of code construction and interactive construction in a unified construction interface to build charts, thereby solving the problem that only one of code construction and interactive construction in the related art can be selected. The technical problems used, the following is an example of the implementation method related to code construction.
在一些实施例中,计算设备会在构建界面中展示用于生成可视化视图的程序代码。例如,请参考附图11,构建界面60包括代码区域606,代码区域606用于对生成可视化视图6051的第一代码进行展示。计算设备在构建界面中展示可视化视图6051的同时,在代码区域606中展示可视化视图6051的生成代码。通过这种方式,将构建好的可视化视图以及可视化视图的生成代码通过同一个界面返回给用户,方便用户同步查看可视化视图的效果以及代码。In some embodiments, the computing device presents program code for generating the visualization in the build interface. For example, referring to FIG. 11 , the construction interface 60 includes a code area 606 for displaying the first code for generating the visual view 6051 . While displaying the visual view 6051 in the construction interface, the computing device displays the generated code of the visual view 6051 in the code area 606 . In this way, the constructed visualization view and the generated code of the visualization view are returned to the user through the same interface, so that the user can view the effect and code of the visualization view synchronously.
构建界面中展示的第一代码的来源包括很多种情况,下面结合两种情况举例说明。The source of the first code displayed in the construction interface includes many situations, and the following is an example of combining two situations.
情况一、构建界面中展示的第一代码是采用交互的方式构建可视化视图的过程中,根据用户对界面组件的操作生成的代码。Situation 1. The first code displayed in the construction interface is the code generated according to the user's operation on the interface component in the process of constructing the visual view in an interactive manner.
例如,请参考附图11,第一代码是基于交互构建视图602或者属性视图604上触发的、对元素属性的设定操作而生成的代码。第一代码表示为可视化元素设定的视觉编码。例如,用户在属性视图604中字体输入框中选择宋体为文本图符的字体,第一代码表示将文本图符 的字体设定为宋体。For example, please refer to FIG. 11 , the first code is code generated based on the setting operation of the element attribute triggered on the interactive construction view 602 or the attribute view 604 . The first code represents the visual encoding set for the visualization element. For example, the user selects Arial as the font of the text icon in the font input box in the property view 604, and the first code indicates that the font of the text icon is set to Arial.
情况二、构建界面中展示的第一代码是采用代码的方式构建可视化视图的过程中,用户输入的代码。例如,请参考附图11,第一代码是对构建界面60中代码区域606中输入的代码。Situation 2: The first code displayed in the construction interface is the code input by the user in the process of constructing the visual view by means of code. For example, referring to FIG. 11 , the first code is the code entered in the code area 606 in the construction interface 60 .
在一些实施例中,上述构建界面支持导出可视化视图的生成代码的功能。例如,请参考附图11,上述构建界面60中的代码区域606包括导出控件6062,用户对导出控件6062进行点击或其他操作,触发代码导出指令。计算设备响应于代码导出指令,将代码区域606中第一代码输出至目标位置。代码导出指令用于指示导出代码区域606中的第一代码。该目标位置用于保存导出的可视化视图的生成代码。该目标位置包括而不限于默认位置或者用户设定的位置。该目标位置包括而不限于计算设备本地的存储位置或者为云端的存储位置。通过导出代码的功能,方便用户修改代码进行二次开发,也支持用户将代码拷贝到其他项目中来部署复杂可视化视图。In some embodiments, the above-described build interface supports the ability to export the generated code of the visualization. For example, referring to FIG. 11 , the code area 606 in the above construction interface 60 includes an export control 6062, and the user clicks or operates on the export control 6062 to trigger a code export instruction. The computing device outputs the first code in the code region 606 to the target location in response to the code export instruction. The code export instruction is used to instruct to export the first code in the code area 606 . This destination is used to save the generated code for the exported visualization. The target location includes, but is not limited to, a default location or a location set by the user. The target location includes, but is not limited to, a local storage location of the computing device or a storage location in the cloud. Through the function of exporting code, it is convenient for users to modify the code for secondary development, and it also supports users to copy the code to other projects to deploy complex visual views.
在一些实施例中,上述构建界面支持输入可视化视图的生成代码的功能。例如,上述构建界面中的代码区域包含输入组件,能够接收用户的输入。用户在构建界面中代码区域输入第二代码,触发代码运行指令。计算设备响应于代码运行指令,通过运行在构建界面中代码区域中输入的第二代码,对可视化视图进行调整,在构建界面中提供调整后的可视化视图。其中,代码运行指令指示运行构建界面中输入的代码。示例性地,请参考附图11,构建界面中代码区域606包括导出控件6062,代码运行指令通过对导出控件6062的操作触发。通过这种方式,用户输入的代码能反馈到交互构建过程中,从而支持用户通过输入代码来调整可视化视图。In some embodiments, the above-described build interface supports the function of generating code for inputting the visualization. For example, the code area in the build interface above contains an input component capable of receiving user input. The user inputs the second code in the code area in the construction interface to trigger the code running instruction. The computing device adjusts the visual view by running the second code input in the code area in the construction interface in response to the code running instruction, and provides the adjusted visual view in the construction interface. Wherein, the code running instruction instructs to run the code input in the construction interface. Exemplarily, please refer to FIG. 11 , the code area 606 in the construction interface includes an export control 6062 , and the code running instruction is triggered by an operation on the export control 6062 . In this way, the code entered by the user can be fed back into the interaction building process, allowing the user to adjust the visualization by entering the code.
在一些实施例中,计算设备会随着用户对可视化元素的属性设定操作,同步更新构建界面中展示的代码。例如,计算设备响应于构建界面上触发的对可视化视图中可视化元素的属性设定操作,获取属性设定操作对应的第三代码;将第三代码增加至构建界面中的代码区域606。属性设定操作例如是对属性视图604中输入组件触发的操作、交互构建视图602或者层次视图603触发的操作。例如,属性设定操作是对属性视图604中用于输入坐标轴夹角的组件6042触发的、输入坐标轴夹角的操作。通过这种方式,在用户交互构建可视化视图的场景下,每当用户执行一次操作时,界面中展示的代码能够跟随用户的操作而实时更新,从而将用户本次操作产生的代码更及时地反馈给用户,便于用户交互式的调整图表参数和嵌套逻辑,进一步提高可视化视图的构建效率。In some embodiments, the computing device will synchronously update the code displayed in the construction interface as the user sets the properties of the visual element. For example, the computing device obtains the third code corresponding to the attribute setting operation in response to the attribute setting operation on the visual element in the visualization view triggered on the construction interface; and adds the third code to the code area 606 in the construction interface. The property setting operation is, for example, an operation triggered by an input component in the property view 604 , an operation triggered by the interactive construction view 602 or the hierarchical view 603 . For example, the property setting operation is an operation of inputting the included angle of the coordinate axis triggered by the component 6042 for inputting the included angle of the coordinate axis in the property view 604 . In this way, in the scenario where the user interacts to construct a visual view, whenever the user performs an operation, the code displayed in the interface can be updated in real time following the user's operation, so that the code generated by the user's operation can be fed back in a more timely manner. For users, it is convenient for users to interactively adjust chart parameters and nested logic, and further improve the construction efficiency of visual views.
下面,对本申请实施例提供的逻辑功能架构举例说明。Below, the logical function architecture provided by the embodiment of the present application is illustrated by way of example.
请参考附图9,附图9示出了可视化视图的交互式构建方法的框架图。附图9所示的框架结构可以提供为可视化视图的构建装置70。可视化视图的构建装置70的框架结构主要包括三部分,分别是交互式构建界面的生成模块71、可视化语法模块72和通信模块73。Please refer to FIG. 9. FIG. 9 shows a frame diagram of an interactive construction method of a visual view. The frame structure shown in FIG. 9 can be provided as a construction device 70 for a visualization view. The frame structure of the apparatus 70 for constructing the visual view mainly includes three parts, which are the generation module 71 of the interactive construction interface, the visual grammar module 72 and the communication module 73 respectively.
交互式构建界面的生成模块71用于生成交互式构建界面。交互式构建界面的生成模块71支持用户通过界面指定坐标系,定义视觉编码。交互式构建界面的生成模块71包括坐标系制定模块711、视觉编码制定模块712、可视化效果返回模块713以及可视化代码返回模块714。坐标系制定模块711用于支持用户通过界面指定坐标系。视觉编码制定模块712用于支 持与用户交互指定视觉编码。可视化效果返回模块713用于返回给用户最终的可视化效果图,方便用户查看效果和交互式地调试视图中的参数。可视化代码返回模块714用于返回可视化效果图相应的代码,方便用户直接导出或进行二次开发。The interactive construction interface generation module 71 is used to generate the interactive construction interface. The generation module 71 of the interactive construction interface supports the user to specify the coordinate system through the interface and define the visual code. The generation module 71 of the interactive construction interface includes a coordinate system formulation module 711 , a visual code formulation module 712 , a visual effect return module 713 and a visual code return module 714 . The coordinate system setting module 711 is used to support the user to specify the coordinate system through the interface. Visual code formulation module 712 is used to support specifying visual codes in interaction with the user. The visualization effect returning module 713 is used to return the final visualization effect graph to the user, so as to facilitate the user to view the effect and interactively debug the parameters in the view. The visual code return module 714 is used to return the code corresponding to the visual effect diagram, which is convenient for the user to directly export or perform secondary development.
可视化语法模块72用于支持基于自定义坐标系的视觉编码。可视化语法模块72包含了视觉编码模块721和代码封装模块722。视觉编码模块721用于通过用户指定的视觉编码和坐标系,绘制可视化元素。视觉编码模块721包含经典坐标轴库7211、轨迹坐标轴模块7212、坐标系计算模块7213和其他视觉编码模块7214。经典坐标轴库7211、轨迹坐标轴模块7212、坐标系计算模块7213可以提供为布局计算模块。经典坐标轴库7211、轨迹坐标轴模块7212、坐标系计算模块7213这三个模块用于处理位置相关的布局计算。经典坐标轴库7211方便用户直接构建经典的坐标系。轨迹坐标轴模块7212允许用户定义任意形状的坐标轴。坐标系计算模块7213用于封装数据映射到坐标系中特定位置的布局计算过程。其他视觉编码模块7214处理可视化视图中除了位置布局之外的其他视觉通道的指定和绘制方法。代码封装模块722封装底层的布局计算过程和渲染过程,输出简洁的声明式代码返回给构建界面。The visual grammar module 72 is used to support visual coding based on a custom coordinate system. The visual grammar module 72 includes a visual coding module 721 and a code packaging module 722 . The visual coding module 721 is used to draw visual elements through the visual coding and coordinate system specified by the user. The visual coding module 721 includes a classic coordinate axis library 7211 , a trajectory coordinate axis module 7212 , a coordinate system calculation module 7213 and other visual coding modules 7214 . The classic coordinate axis library 7211, the trajectory coordinate axis module 7212, and the coordinate system calculation module 7213 can be provided as the layout calculation module. The three modules of the classic coordinate axis library 7211, the trajectory coordinate axis module 7212, and the coordinate system calculation module 7213 are used for processing position-related layout calculations. The classic coordinate axis library 7211 is convenient for users to directly construct the classic coordinate system. The Trajectory Axes module 7212 allows the user to define axes of arbitrary shape. The coordinate system calculation module 7213 is used to encapsulate the layout calculation process of mapping data to a specific position in the coordinate system. The other visual coding module 7214 handles the designation and rendering methods of other visual channels in the visualization in addition to the positional layout. The code encapsulation module 722 encapsulates the underlying layout calculation process and rendering process, and outputs concise declarative code to return to the construction interface.
通信模块73用于和用户交互。例如,通信模块73用于接收用户输入的坐标系参数(如绘制的轨迹),通信模块73将用户输入的坐标系参数发送至交互式构建界面的生成模块71。交互式构建界面的生成模块71利用通信模块73输入的坐标系参数生成构建界面。交互式构建界面的生成模块71生成可视化视图和代码之后,将可视化视图和代码发送至通信模块73。通信模块73向用户返回可视化视图和代码。The communication module 73 is used to interact with the user. For example, the communication module 73 is configured to receive the coordinate system parameters input by the user (such as a drawn trajectory), and the communication module 73 sends the coordinate system parameters input by the user to the generation module 71 of the interactive construction interface. The generation module 71 of the interactive construction interface uses the coordinate system parameters input by the communication module 73 to generate the construction interface. After the generation module 71 of the interactive construction interface generates the visual view and the code, the visual view and the code are sent to the communication module 73 . The communication module 73 returns the visualization and code to the user.
接下来,自底向上逐一介绍上述每一个模块的功能和具体实现原理。Next, the functions and specific implementation principles of each of the above modules are introduced one by one from the bottom up.
可视化语法模块72提供了一套声明式的可视化编程语言,封装了底层的布局计算过程和可视化渲染过程,用户通过输入数据、制定坐标系、定义视觉编码规则,即可获得针对复杂可视化视图的代码和可视化结果。可视化语法模块72包括以下视觉编码模块721和代码封装模块722。 Visual grammar module 72 provides a set of declarative visual programming language, which encapsulates the underlying layout calculation process and visual rendering process. Users can obtain code for complex visual views by entering data, formulating coordinate systems, and defining visual coding rules and visualize the results. The visual grammar module 72 includes the following visual coding module 721 and code packaging module 722.
(A)视觉编码模块721(A) Visual coding module 721
视觉编码模块721主要用于帮助用户指定视觉通道,如位置,颜色,形状等对数据属性进行展示,封装可视化元素的计算和绘制过程。The visual coding module 721 is mainly used to help the user to specify visual channels, such as position, color, shape, etc., to display data attributes, and to encapsulate the calculation and drawing process of visual elements.
视觉编码模块721包含布局计算模块。布局计算模块负责与位置相关的计算任务。在布局计算模块中,为了支持非常规布局可视化视图的快速构建,除了提供常规的经典坐标轴库7211,本申请实施例还提供了轨迹坐标轴模块7212用于支持用户构建自定义形式的坐标轴。并通过坐标系计算模块7213,进一步提供了横纵坐标轴之间组合关系的定义方法,支持更灵活的坐标系定义,同时,封装数据映射到坐标系中特定位置的计算过程,降低用户工作量。具体说明如下。The visual encoding module 721 includes a layout calculation module. The layout calculation module is responsible for the position-related calculation tasks. In the layout calculation module, in order to support the rapid construction of unconventional layout visualization views, in addition to providing the conventional classic coordinate axis library 7211, this embodiment of the present application also provides a trajectory coordinate axis module 7212 to support the user to construct a custom coordinate axis . And through the coordinate system calculation module 7213, it further provides a method for defining the combination relationship between the horizontal and vertical coordinate axes, which supports more flexible coordinate system definition. . The specific description is as follows.
(i)经典坐标轴库7211(i) Classic axis library 7211
本申请实施例的经典坐标轴库7211,提供了包括直线坐标轴,极坐标轴,圆形坐标轴,指数函数坐标轴,二次函数坐标轴,类别坐标轴等经典的坐标轴库。例如,通过以下所示的坐标轴声明式语法的代码,可直接调用经典坐标轴库7211中的几种坐标轴,并通过配置选项调整坐标轴的定义域和值域等参数,直接完成坐标轴构建过程。The classic coordinate axis library 7211 in this embodiment of the application provides classic coordinate axis libraries including linear coordinate axes, polar coordinate axes, circular coordinate axes, exponential function coordinate axes, quadratic function coordinate axes, and category coordinate axes. For example, through the code of the declarative syntax of the coordinate axis shown below, several coordinate axes in the classic coordinate axis library 7211 can be directly called, and the parameters such as the definition domain and value range of the coordinate axis can be adjusted through the configuration options, and the coordinate axis can be directly completed. build process.
示例性地,构建直线坐标轴的代码如下所示,以下所示的代码的含义是将直线坐标轴的 定义域设定为待可视化的数据的最小值的1.2倍至最大值的1.2倍,将直线坐标轴的值域设定为画布高度。Exemplarily, the code for constructing the linear coordinate axis is as follows, the meaning of the code shown below is to set the definition domain of the linear coordinate axis to be 1.2 times the minimum value to 1.2 times the maximum value of the data to be visualized, and The range of the linear axis is set to the canvas height.
Figure PCTCN2022087681-appb-000001
Figure PCTCN2022087681-appb-000001
示例性地,圆形类别坐标轴的代码如下所示,以下所示的代码的含义是将圆形类别坐标轴的定义域设定为待可视化的数据的name属性的所有取值,将圆形类别坐标轴的值域(即起始终止角度)设置为[0,270],指定圆半径为100,指定每个类别对应的角度大小和类别之间间隔对应的角度大小为0.3。Exemplarily, the code of the circular category coordinate axis is as follows, the meaning of the code shown below is to set the definition domain of the circular category coordinate axis to all the values of the name attribute of the data to be visualized, and the circular The value range of the category coordinate axis (that is, the starting and ending angles) is set to [0,270], the specified circle radius is 100, and the angle corresponding to each category and the interval between categories is specified as 0.3.
Figure PCTCN2022087681-appb-000002
Figure PCTCN2022087681-appb-000002
示例性地,二次函数坐标轴的代码如下所示,以下所示的代码的含义是将二次函数坐标轴对应的二次函数中二次项系数a设定为1,将二次函数坐标轴对应的二次函数中x的取值范围设定为[0,20],将二次函数坐标轴的定义域设定为[0,600],将二次函数坐标轴的值域的宽度设定为画布宽度的一半,将二次函数坐标轴的值域的高度设定为画布高度的0.8倍。Exemplarily, the code of the quadratic function coordinate axis is as follows, the meaning of the code shown below is to set the quadratic term coefficient a in the quadratic function corresponding to the quadratic function coordinate axis to 1, and set the quadratic function coordinate The value range of x in the quadratic function corresponding to the axis is set to [0, 20], the definition domain of the quadratic function coordinate axis is set to [0, 600], and the width of the value range of the quadratic function coordinate axis is set. To be half the width of the canvas, set the height of the value range of the quadratic function coordinate axis to 0.8 times the height of the canvas.
Figure PCTCN2022087681-appb-000003
Figure PCTCN2022087681-appb-000003
示例性地,类别坐标轴的代码如下所示,以下所示的代码的含义是将类别坐标轴的定义域设定为待可视化的数据的name属性的所有取值,将类别坐标轴的值域设定为画布宽度,将类别坐标轴的类别之间距离和每个类别本身大小的比例设定为0.3。Exemplarily, the code of the category coordinate axis is as follows, the meaning of the code shown below is to set the definition domain of the category coordinate axis to all the values of the name attribute of the data to be visualized, and set the value range of the category coordinate axis to Set to canvas width, and set the ratio of the distance between categories on the category axis to the size of each category itself to 0.3.
Figure PCTCN2022087681-appb-000004
Figure PCTCN2022087681-appb-000004
Figure PCTCN2022087681-appb-000005
Figure PCTCN2022087681-appb-000005
示例性地,极坐标轴的代码如下所示,以下所示的代码的含义是将极坐标轴的定义域设定为待可视化的数据的name属性的所有取值,将极坐标轴的值域(起始终止角度)设定为[0,360]。Exemplarily, the code of the polar coordinate axis is as follows, the meaning of the code shown below is to set the definition domain of the polar coordinate axis to all the values of the name attribute of the data to be visualized, and set the value range of the polar coordinate axis to (Start and end angle) is set to [0,360].
Figure PCTCN2022087681-appb-000006
Figure PCTCN2022087681-appb-000006
(ii)轨迹坐标轴模块7212(ii) Track coordinate axis module 7212
示例性地,轨迹坐标轴模块7212的声明轨迹坐标轴的代码如下所示,以下所示的代码的含义是将轨迹坐标轴的轨迹数据设定为数据trajData,将轨迹坐标轴的定义域设定为[0,500],将轨迹坐标轴的值域(分布范围)的宽度设定为画布宽度,将轨迹坐标轴的值域(分布范围)的高度设定为画布高的0.4倍。Exemplarily, the code for declaring the trajectory coordinate axis of the trajectory coordinate axis module 7212 is as follows, the meaning of the code shown below is to set the trajectory data of the trajectory coordinate axis as data trajData, and set the definition domain of the trajectory coordinate axis. For [0,500], set the width of the range (distribution range) of the trajectory coordinate axis to the width of the canvas, and set the height of the range (distribution range) of the trajectory coordinate axis to 0.4 times the height of the canvas.
Figure PCTCN2022087681-appb-000007
Figure PCTCN2022087681-appb-000007
本申请实施例所提供的轨迹坐标轴模块7212,如附图12所示,允许将一条轨迹的数据作为坐标轴属性,从而构建任意形状的坐标轴。轨迹坐标轴模块7212提供的自定义坐标轴形状能力大大提升了坐标系定义的灵活性,方便生成定制化的坐标系。在后续使用的过程中,通过轨迹坐标轴模块7212封装元素布局位置的计算过程。轨迹坐标轴的定义域中的任意数值,将会按照数值在定义域中的比例,映射到轨迹上相对应的位置上。例如,定义域为0到100的轨迹坐标轴中,数值为30的数据将会被映射到距离轨迹起点为整条轨迹长度的百分之三十的轨迹点所在的画布上的位置,并将其作为数据在坐标轴上的坐标。The track coordinate axis module 7212 provided by the embodiment of the present application, as shown in FIG. 12 , allows the data of a track to be used as the coordinate axis attribute, thereby constructing a coordinate axis of any shape. The custom coordinate axis shape capability provided by the trajectory coordinate axis module 7212 greatly improves the flexibility of coordinate system definition and facilitates the generation of customized coordinate systems. In the process of subsequent use, the calculation process of the element layout position is encapsulated by the track coordinate axis module 7212 . Any value in the definition domain of the trajectory coordinate axis will be mapped to the corresponding position on the trajectory according to the proportion of the value in the definition domain. For example, in a trajectory coordinate axis with a definition domain of 0 to 100, data with a value of 30 will be mapped to the position on the canvas where the trajectory point is 30% of the entire trajectory length from the start point of the trajectory, and will It is used as the coordinate of the data on the coordinate axis.
(iii)坐标系计算模块7213(iii) Coordinate system calculation module 7213
坐标系计算模块7213对坐标系的构成进行了抽象,即一个二维坐标系由X轴和Y轴构成,X轴和Y轴之间的组合关系分为相对型组合和绝对型两种。附图8示出了坐标轴组合关系示意图。如附图8所示,绝对型组合表示Y轴始终与画布保持一定角度,而与X轴的方向量方向无关。而相对型组合则表示Y轴始终与X轴呈一定角度,Y轴的方向会随着X轴切线的方向变化而变化。The coordinate system calculation module 7213 abstracts the structure of the coordinate system, that is, a two-dimensional coordinate system consists of the X axis and the Y axis, and the combination relationship between the X axis and the Y axis is divided into two types: relative type combination and absolute type. FIG. 8 shows a schematic diagram of the combination relationship of the coordinate axes. As shown in FIG. 8 , the absolute type combination means that the Y-axis always maintains a certain angle with the canvas, regardless of the direction of the X-axis. The relative type combination means that the Y-axis is always at a certain angle to the X-axis, and the direction of the Y-axis changes with the direction of the X-axis tangent.
示例性地,用户通过输入以下代码声明坐标系,添加矩形可视化元素后会获得附图10所示的可视化结果。以下代码的含义是,将X轴和Y轴均设定为预先定义的经典坐标轴库7211 中的坐标轴。将X轴设定为预先定义的直线类别坐标轴。将Y轴设定为预先定义的直线数值坐标轴。将X轴和Y轴的组合类型设定为相对型,并设定X轴和Y轴之间的夹角为50度,并对坐标系进行逆时针旋转50度。Exemplarily, the user declares the coordinate system by entering the following code, and after adding the rectangular visualization element, the visualization result shown in FIG. 10 will be obtained. The meaning of the following code is to set both the X-axis and the Y-axis as the coordinate axes in the predefined classic coordinate axis library 7211. Set the X-axis to the pre-defined line category axis. Set the Y-axis to the predefined linear numerical axis. Set the combination type of the X-axis and the Y-axis to relative type, set the angle between the X-axis and the Y-axis to 50 degrees, and rotate the coordinate system counterclockwise by 50 degrees.
Figure PCTCN2022087681-appb-000008
Figure PCTCN2022087681-appb-000008
由此,用户可以通过本申请实施例提供的经典坐标轴库7211,轨迹坐标轴模块7212以及坐标系组合定义方法定制自由形式的坐标系,用于构建复杂布局的可视化视图。给定坐标系后,本申请实施例将封装数据映射到坐标系中位置的计算过程。Thus, a user can customize a free-form coordinate system through the classic coordinate axis library 7211, the trajectory coordinate axis module 7212, and the coordinate system combination definition method provided by the embodiment of the present application, so as to construct a visual view of a complex layout. After the coordinate system is given, the embodiment of the present application maps the encapsulated data to the calculation process of the position in the coordinate system.
在一个具体示例中,从数据到坐标系中位置的计算过程具体流程如下所示,包括以下步骤S1至步骤S4。其中,下述公式(1)中的组合角度a是对附图7所示方法中第一角度的举例说明,下述公式(2)中的组合角度a是对附图7所示方法中第二角度的举例说明,In a specific example, the specific flow of the calculation process from the data to the position in the coordinate system is as follows, including the following steps S1 to S4. Wherein, the combined angle a in the following formula (1) is an example of the first angle in the method shown in FIG. 7 , and the combined angle a in the following formula (2) is an example of the first angle in the method shown in FIG. 7 . An example of two angles,
步骤S1计算数据在X轴上的坐标位置(x 1,y 1)。 Step S1 calculates the coordinate position (x 1 , y 1 ) of the data on the X-axis.
步骤S2计算数据在Y轴上的坐标位置(x 2,y 2)。 Step S2 calculates the coordinate position (x 2 , y 2 ) of the data on the Y axis.
步骤S3根据坐标轴组合类型、组合角度a,X轴当前切线方向和坐标系的偏移角度b,计算在当前X坐标下,Y轴的方向A。其中,在坐标轴组合类型为绝对型的情况下,采用下述公式(1)计算Y轴的方向。在坐标轴组合类型为相对型的情况下,采用下述公式(2)计算Y轴的方向。Step S3 calculates the direction A of the Y axis under the current X coordinate according to the combination type of the coordinate axis, the combination angle a, the current tangent direction of the X axis and the offset angle b of the coordinate system. Among them, when the coordinate axis combination type is absolute type, the following formula (1) is used to calculate the direction of the Y axis. When the coordinate axis combination type is the relative type, the following formula (2) is used to calculate the direction of the Y axis.
A=a+b;公式(1)A=a+b; formula (1)
A=a+b+X轴在(x 1,y 1)位置的切线方向;公式(2) A=a+b+X-axis tangent direction at (x 1 , y 1 ) position; formula (2)
步骤S4根据Y轴上的坐标位置和方向,计算数据的横纵坐标偏移量并叠加在数据在X轴上的坐标,得到最终的数据坐标位置。步骤S4即采用下述公式(3)和公式(4)计算。下述公式(3)和公式(4)得到的x、y表示画布上的像素位置。In step S4, according to the coordinate position and direction on the Y-axis, the offset of the horizontal and vertical coordinates of the data is calculated and superimposed on the coordinates of the data on the X-axis to obtain the final coordinate position of the data. Step S4 is calculated by using the following formula (3) and formula (4). The x and y obtained by the following formula (3) and formula (4) represent the pixel position on the canvas.
x=x 1+x 2+cos(A);公式(3) x=x 1 +x 2 +cos(A); formula (3)
y=y 1+y 2+sin(A);公式(4) y=y 1 +y 2 +sin(A); formula (4)
(iv)其他视觉编码模块7214(iv) Other visual coding modules 7214
其他视觉编码模块7214提供了用户对可视化元素的位置之外其他视觉通道的指定和渲染方法。位置之外的其他视觉通道包括而不限于填充颜色、线条颜色、线条宽度、元素高度、元素宽度、角度等。示例性地,可视化视觉编码的声明代码如下。The other visual encoding module 7214 provides user designation and rendering methods for visual channels other than the location of visual elements. Other visual channels outside of position include, but are not limited to, fill color, line color, line width, element height, element width, angle, and the like. Illustratively, the declarative code for visual coding is as follows.
Figure PCTCN2022087681-appb-000009
Figure PCTCN2022087681-appb-000009
Figure PCTCN2022087681-appb-000010
Figure PCTCN2022087681-appb-000010
指定其他视觉通道的方式包括两种方式。一种方式是直接指定值作为元素视觉通道的值,例如上例中,将每个矩形的边框宽度都设定为0。另一种方式是通过使用函数返回数据的属性值作为元素属性,上例中矩形的高度与每一条数据的val属性的属性值进行了绑定。val值大的数据对应的矩形会更高。在获得数据编码之后,系统会根据布局模块计算得到的元素位置和其他元素属性。There are two ways to specify other visual channels. One way is to directly specify the value as the value of the element's visual channel, for example, in the above example, set the border width of each rectangle to 0. Another way is to use the attribute value of the data returned by the function as the element attribute. In the above example, the height of the rectangle is bound to the attribute value of the val attribute of each piece of data. The rectangle corresponding to the data with a large val value will be taller. After obtaining the data encoding, the system will calculate the element position and other element attributes according to the layout module.
(B)代码封装模块722(B) Code Encapsulation Module 722
代码封装模块722将声明代码与具体的实现代码分隔开,允许定义声明代码,而封装底层的渲染和计算过程。本实施例通过代码封装模块722,让用户主要关心需要画什么,画的元素需要与哪些属性值对应,而不用过多关心具体怎么画和数据值如何进行映射计算。在本申请实施例的构建方案中,封装后的语义化代码如上面的案例中所示,并将返回交互式构建界面的生成模块71,方便用户与语法包一起导出或进行二次开发。The code encapsulation module 722 separates the declarative code from the specific implementation code, allows the declarative code to be defined, and encapsulates the underlying rendering and calculation processes. In this embodiment, through the code encapsulation module 722 , the user is mainly concerned with what needs to be drawn and which attribute values the drawn elements need to correspond to, and does not need to care too much about how to draw and how to perform mapping calculation on data values. In the construction scheme of the embodiment of the present application, the encapsulated semantic code is as shown in the above case, and will be returned to the generation module 71 of the interactive construction interface, which is convenient for users to export or perform secondary development together with the grammar package.
请参考附图11,附图11是本申请实施例提供的可视化视图的构建界面的生成模块71的示意图。本申请实施例提供的交互式构建界面的生成模块71,包含了一系列交互方案,帮助用户定义坐标系和视觉编码,迭代式调整可视化参数,并将可视化视图和代码返回给用户。该交互式构建界面的生成模块71例如用于生成构建界面60。Please refer to FIG. 11 . FIG. 11 is a schematic diagram of a generation module 71 of a construction interface of a visualization view provided by an embodiment of the present application. The interactive construction interface generation module 71 provided by the embodiment of the present application includes a series of interaction schemes, helping the user to define the coordinate system and visual coding, iteratively adjust the visual parameters, and return the visual view and code to the user. The interactive construction interface generation module 71 is used, for example, to generate the construction interface 60 .
交互式构建界面的生成模块71包括坐标系制定模块711、视觉编码制定模块712和可视化效果返回模块713和可视化代码返回模块714。The generation module 71 of the interactive construction interface includes a coordinate system formulation module 711 , a visual code formulation module 712 , a visual effect return module 713 and a visual code return module 714 .
(a)坐标系制定模块711(a) Coordinate system formulation module 711
如附图12所示,坐标系制定模块711允许用户交互式地指定二维坐标系中的坐标轴和坐标轴之间的组合类型,组合角度等参数。用户可以拖拽左侧经典坐标轴库7211中的坐标轴或轨迹坐标轴到X或Y轴进行坐标轴类型的指定。指定坐标类型后,用户可以在界面左下角的属性视图604中设置X或Y坐标轴的参数,输入方式包括以下三种。As shown in FIG. 12 , the coordinate system setting module 711 allows the user to interactively specify parameters such as the coordinate axis in the two-dimensional coordinate system and the combination type and combination angle between the coordinate axes. The user can drag the coordinate axis or track coordinate axis in the classic coordinate axis library 7211 on the left to the X or Y axis to specify the coordinate axis type. After specifying the coordinate type, the user can set the parameters of the X or Y coordinate axis in the property view 604 in the lower left corner of the interface, and the input methods include the following three.
输入方式一、用户输入数值作为参数,例如输入区间[0,100]作为直线坐标轴的定义域。Input method 1. The user inputs a numerical value as a parameter, for example, the input interval [0,100] is used as the definition domain of the linear coordinate axis.
输入方式二、用户将数据属性拖动到坐标轴的参数上,表示该数据值的取值范围作为坐标轴的定义域。例如,用户将数据的name属性字段拖动到X轴的定义域上,表示name的所有取值作为类别型坐标轴的定义域。Input method 2. The user drags the data attribute to the parameter of the coordinate axis, indicating that the value range of the data value is used as the definition domain of the coordinate axis. For example, the user drags the name attribute field of the data to the definition domain of the X-axis, indicating that all the values of the name are used as the definition domain of the category-type coordinate axis.
输入方式三、对于轨迹坐标轴,用户可以直接在面板中手动绘制一条轨迹,系统将自动把轨迹点提取出来作为坐标轴的轨迹数据,用户也可以使用数据中的轨迹坐标,指定数据的 两个属性作为轨迹数据的横纵坐标。上述绘制和轨迹数据这两种方案都能允许用户定义一个任意形状的坐标轴。Input method 3. For the trajectory coordinate axis, the user can directly draw a trajectory in the panel manually, and the system will automatically extract the trajectory points as the trajectory data of the coordinate axis. The user can also use the trajectory coordinates in the data to specify two of the data. The attribute is used as the horizontal and vertical coordinates of the trajectory data. Both of the above schemes for drawing and trajectory data allow the user to define an axis of any shape.
接着,用户可以在属性视图604中调整坐标系参数,包括通过下拉菜单中选择坐标轴的组合类型,通过拖拽坐标轴上的旋转点和缩放点,旋转或缩放坐标轴,调整坐标轴的组合角度和坐标系的旋转角度。调整参数时,系统将根据用户输入,自动应用于可视化试图的构建,并返回调整后的可视化结果,从而让用户在拖拽的过程中实时获取结果反馈,实现交互式调参过程,提升用户的开发效率。Next, the user can adjust the coordinate system parameters in the property view 604, including selecting the combination type of the coordinate axis from the drop-down menu, rotating or scaling the coordinate axis by dragging the rotation point and zoom point on the coordinate axis, and adjusting the combination of the coordinate axis The angle and the rotation angle of the coordinate system. When adjusting the parameters, the system will automatically apply it to the construction of the visualization attempt according to the user's input, and return the adjusted visualization results, so that the user can obtain the result feedback in real time during the dragging process, realize the interactive parameter adjustment process, and improve the user's experience. development efficiency.
(b)视觉编码制定模块712(b) Visual coding formulation module 712
本申请实施例的视觉编码制定模块712允许用户在可视化视图中添加可视化元素,并设定视觉编码。具体来说,如附图13中的(a)所示,用户能在可视化元素库中拖拽可视化元素(如矩形、圆形)添加到交互构建视图602中。例如,附图13示出了用户拖拽矩形图符6031至交互构建视图602。The visual coding formulating module 712 in this embodiment of the present application allows the user to add visual elements in the visual view and set visual coding. Specifically, as shown in (a) of FIG. 13 , the user can drag and drop visual elements (eg, rectangle, circle) in the visual element library to add to the interactive construction view 602 . For example, FIG. 13 shows the user dragging the rectangular icon 6031 to the interaction construction view 602 .
然后,本实施例提供了三种不同的交互方式帮助用户声明视觉编码。Then, this embodiment provides three different interactive ways to help users declare visual codes.
交互方式一、如附图13中的(b)所示,用户可以拖拽数据的属性到属性视图604中元素的视觉通道选项框中,将数据的属性值作为可视化元素的某个视觉通道的值。例如附图13中将text字段拖拽到文字元素的文本通道6045中,表示该文字元素的显示文本为数据的text字段内容。Interaction mode 1. As shown in (b) of FIG. 13, the user can drag the attribute of the data to the visual channel option box of the element in the attribute view 604, and use the attribute value of the data as the visual channel of the visual element. value. For example, in FIG. 13, dragging the text field to the text channel 6045 of the text element indicates that the displayed text of the text element is the content of the text field of the data.
交互方式二、如附图13中的(c)所示,将用户输入的值作为视觉通道。例如,附图13中,用户向界面中属性视图604字号输入组件6046输入20作为文本元素的字号大小。In the second interaction mode, as shown in (c) of FIG. 13 , the value input by the user is used as the visual channel. For example, in FIG. 13, the user inputs 20 as the font size of the text element into the font size input component 6046 of the property view 604 in the interface.
交互方式三、如附图13中的(d)所示,提供颜色选择器608,使用内置的颜色选择器608选择颜色作为视觉通道的值。Interaction Mode 3: As shown in (d) of FIG. 13 , a color selector 608 is provided, and the built-in color selector 608 is used to select a color as the value of the visual channel.
(c)可视化效果返回模块713(c) Visualization effect return module 713
如附图11中构建结果展示区域6051所示,随着用户交互构建的过程,系统将会调用底层的可视化语法模块72,进行可视化渲染和代码封装,然后在界面中直接返回用户构建的可视化视图效果,用户一方面能直观的掌握视图的生成现状,也能通过返回结果交互式的调整坐标轴参数或视觉编码,达到期待的可视化效果。As shown in the construction result display area 6051 in FIG. 11, along with the user interactive construction process, the system will call the underlying visual grammar module 72 to perform visual rendering and code encapsulation, and then directly return the visual view constructed by the user in the interface On the one hand, the user can intuitively grasp the current status of the view generation, and can also interactively adjust the coordinate axis parameters or visual coding by returning the results to achieve the desired visualization effect.
(d)可视化代码返回模块714(d) Visualization code return module 714
如附图11中代码区域606所示,除了返回可视化效果,用户在界面还将得到声明式语法编写的可视化代码,用户可以直接修改代码进行二次开发,也可以将代码拷贝到其他项目中实现复杂可视化视图代码的导出与部署。As shown in the code area 606 in FIG. 11, in addition to returning the visual effect, the user will also get the visual code written in the declarative syntax on the interface. The user can directly modify the code for secondary development, or copy the code to other projects for implementation. Export and deployment of complex visualization code.
下面结合一个实例,对构建可视化视图的方法举例说明。The following is an example to illustrate the method of constructing a visual view.
实例1Example 1
附图14示出了使用轨迹坐标系实现的拿破仑东征案例示意图。本实施例实现如附图14所示的连续曲线的拿破仑东征可视化案例流程包括如下步骤(a)至步骤(i)。Fig. 14 shows a schematic diagram of a case of Napoleon's Eastern Expeditions realized using the trajectory coordinate system. This embodiment realizes the visualization case flow of Napoleon's Crusades with a continuous curve as shown in FIG. 14 , including the following steps (a) to (i).
步骤(a)用户拖拽坐标轴库中的轨迹坐标轴作为X轴。Step (a) The user drags the track coordinate axis in the coordinate axis library as the X axis.
步骤(b)用户拖拽坐标轴库中的直线数值坐标轴作为Y轴。Step (b) The user drags the linear value coordinate axis in the coordinate axis library as the Y axis.
步骤(c)用户选择坐标轴关系为相对型,设定X轴与Y轴之间的角度为90度。Step (c) The user selects the coordinate axis relationship as relative type, and sets the angle between the X axis and the Y axis as 90 degrees.
步骤(d)设定X轴的属性。首先,用户拖拽数据中的经度和维度字段到X轴的轨迹数 据选项上。然后,用户将数据中的日期字段拖拽到X轴的定义域选项作为坐标轴的定义域。最后,用户输入X轴的值域,定义X轴绘制范围的长和宽。Step (d) sets the properties of the X-axis. First, the user drags the longitude and latitude fields in the data to the track data option on the X-axis. Then, the user drags the date field in the data to the definition domain option of the X axis as the definition domain of the coordinate axis. Finally, the user enters the value range of the X-axis, and defines the length and width of the X-axis drawing range.
步骤(e)用户拖拽数据的军队数量字段size到Y轴的定义域选项,并将Y轴值域设置为[0,100]。由此建立了如附图15所示的坐标系。Step (e) The user drags the size field of the number of troops of the data to the domain option of the Y-axis, and sets the Y-axis value range to [0,100]. A coordinate system as shown in FIG. 15 is thus established.
步骤(f)用户添加‘区域’类型的可视化元素到视图中。Step (f) The user adds a visual element of type 'area' to the view.
步骤(g)用户拖拽数据的日期字段到“区域”属性面板的x选项,拖拽军队数量size字段到元素属性面板的y属性,并选择区域的填充颜色为淡黄色。Step (g) The user drags the date field of the data to the x option of the "Area" property panel, drags the size field of the army number to the y property of the element property panel, and selects the fill color of the area to be light yellow.
步骤(h)通过返回的可视化结果,拖拽Y轴旋转,调整坐标轴之间的组合角度大小,最终得到如附图15所示的可视化效果图。Step (h) Through the returned visualization result, drag the Y axis to rotate, adjust the combined angle between the coordinate axes, and finally obtain the visualization effect diagram as shown in FIG. 15 .
步骤(i)构建其他辅助视图,可以得到如附图15所示的可视化效果图。In step (i), other auxiliary views are constructed, and a visualization effect diagram as shown in FIG. 15 can be obtained.
附图15中代码区域606的含义为定义轨迹坐标轴,具体的含义是设置轨迹坐标轴的范围是0至600的闭区间、0至600*0.4的闭区间,以及定义Y轴的定义域等于军队数量,设定Y轴高度为70。The meaning of the code area 606 in FIG. 15 is to define the trajectory coordinate axis, and the specific meaning is to set the range of the trajectory coordinate axis to be the closed interval of 0 to 600, the closed interval of 0 to 600*0.4, and the definition domain of the Y axis is equal to The number of troops, set the Y-axis height to 70.
总结来看,本申请实施例能够支持建立以轨迹坐标轴为基础的自定义坐标系,并能定义坐标轴之间的关系和组合角度,提供了更为灵活的坐标系选项,使得构建布局复杂的可视化视图时,能够封装数据到画布位置的映射计算过程,用户仅需要定义坐标轴参数,并声明视觉编码,即可完成可视化视图搭建,从而不需要有数学和图形绘制等基础知识背景,极大减轻了复杂视图搭建的工作量,提升了搭建效率。To sum up, the embodiment of the present application can support the establishment of a custom coordinate system based on the trajectory coordinate axis, and can define the relationship and combination angle between the coordinate axes, provide more flexible coordinate system options, and make the construction layout complex When creating a visual view, it can encapsulate the mapping calculation process of data to the canvas position. Users only need to define the coordinate axis parameters and declare the visual code to complete the construction of the visual view, so there is no need to have basic knowledge background such as mathematics and graphics drawing. It greatly reduces the workload of complex view construction and improves construction efficiency.
进一步地,在支持自定义坐标系的基础上,提供了一套交互式的界面帮助用户构建复杂的可视化视图,通过托拉拽的方式进行可视化元素创建和视觉编码,同时可以通过绘制,指定等方式建立坐标系,可视化结果和代码实时的更新并返回给用户方便调参和导出,降低了专业门槛和构建及调试代码的效率有效避免了人力和时间的浪费。Further, on the basis of supporting a custom coordinate system, it provides a set of interactive interfaces to help users build complex visual views, create visual elements and visual coding through drag-and-drop methods, and can draw, specify, etc. The coordinate system is established in this way, and the visual results and codes are updated in real time and returned to the user for convenient parameter adjustment and export, which reduces the professional threshold and the efficiency of building and debugging codes, effectively avoiding the waste of manpower and time.
综上,本申请的一些实施例提出了可视化视图中自由坐标系的抽象模型,并以此建立了一套允许用户自定义坐标系的可视化语法。用户可以使用声明式语言选择常用坐标轴或自定义任意的轨迹作为坐标轴建立坐标系,封装了数据值到坐标系中位置的映射过程,用户仅需要声明坐标系和视觉编码的绑定规则即可完成复杂可视化视图的绘制,不需要有数学背景知识,不需要进行位置计算,从而提升了开发的效率和50%以上的代码量。To sum up, some embodiments of the present application propose an abstract model of a free coordinate system in a visualization view, and based on this, a set of visualization grammars that allow a user to define a coordinate system are established. Users can use a declarative language to select common coordinate axes or customize any trajectory as coordinate axes to establish a coordinate system, which encapsulates the mapping process of data values to positions in the coordinate system. Users only need to declare the binding rules of the coordinate system and visual coding, namely It can complete the drawing of complex visual views without mathematical background knowledge and position calculation, thus improving the development efficiency and the code amount by more than 50%.
此外,设计了一套交互式的可视化视图构建方法,用户可以使用简单直观的交互操作,选择或绘制坐标中的坐标轴,自由创建坐标系,然后在坐标系中添加可视化元素,进行视觉编码,调整参数,完成复杂的可视化视图构建和完善任务。最终的结果可以直接通过代码形式导出,方便使用和进行二次开发,大大降低了开发门槛,减少了复杂可视化视图开发过程中的人力、时间、资源的浪费。In addition, a set of interactive visual view construction methods are designed. Users can use simple and intuitive interactive operations to select or draw the coordinate axes in the coordinates, freely create a coordinate system, and then add visual elements in the coordinate system for visual coding, Adjust parameters to complete complex visualization building and refinement tasks. The final result can be directly exported in the form of code, which is convenient for use and secondary development, which greatly reduces the development threshold and reduces the waste of manpower, time and resources in the development of complex visual views.
附图16是本申请实施例提供的一种计算设备的结构示意图,附图16所示的可视化视图的构建装置900用于实施上述各个方法实施例提供的可视化视图的构建方法。FIG. 16 is a schematic structural diagram of a computing device provided by an embodiment of the present application. The visualization view constructing apparatus 900 shown in FIG. 16 is used to implement the visualization view constructing method provided by the above method embodiments.
可选地,结合附图6所示的应用场景来看,附图16所示的可视化视图的构建装置900是附图6中的终端10或服务器11。Optionally, with reference to the application scenario shown in FIG. 6 , the apparatus 900 for constructing the visual view shown in FIG. 16 is the terminal 10 or the server 11 in FIG. 6 .
可选地,结合附图7来看,附图16所示的可视化视图的构建装置900是附图7所示方法流程中的计算设备。Optionally, with reference to FIG. 7 , the apparatus 900 for constructing a visual view shown in FIG. 16 is a computing device in the method flow shown in FIG. 7 .
可选地,结合附图9来看,附图16所示的可视化视图的构建装置900中通信模块901为附图9中通信模块73。附图16所示的可视化视图的构建装置900中可视化语法模块902包括附图9中视觉编码模块721和代码封装模块72。附图16所示的可视化视图的构建装置900中交互式构建界面的生成模块903包括附图9中坐标系制定模块711、视觉编码制定模块712、可视化效果返回模块713以及可视化代码返回模块714。Optionally, with reference to FIG. 9 , the communication module 901 in the apparatus 900 for constructing a visual view shown in FIG. 16 is the communication module 73 in FIG. 9 . The visual grammar module 902 in the apparatus 900 for constructing a visual view shown in FIG. 16 includes the visual coding module 721 and the code encapsulation module 72 in FIG. 9 . The generation module 903 of the interactive construction interface in the visual view construction apparatus 900 shown in FIG. 16 includes the coordinate system formulation module 711, the visual code formulation module 712, the visualization effect return module 713 and the visualization code return module 714 in FIG. 9 .
可视化视图的构建装置900包括通信模块901、可视化语法模块902和交互式构建界面的生成模块903。通信模块901用于支持可视化视图的构建装置900执行S201和S205。可视化语法模块902用于支持可视化视图的构建装置900执行S202。交互式构建界面的生成模块903用于支持可视化视图的构建装置900执行S204。The apparatus 900 for constructing a visual view includes a communication module 901 , a visual grammar module 902 and a generating module 903 for interactively constructing an interface. The communication module 901 is used to support the construction apparatus 900 of the visual view to execute S201 and S205. The visual grammar module 902 is used to support the construction apparatus 900 of the visual view to execute S202. The generation module 903 of the interactive construction interface is used for the construction apparatus 900 to support the visualization view to execute S204.
附图16所描述的装置实施例仅仅是示意性的,例如,上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。The apparatus embodiment described in FIG. 16 is only illustrative. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be combined or Integration into another system, or some features can be ignored, or not implemented. Each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
可视化视图的构建装置900中的各个单元全部或部分地通过软件、硬件、固件或者其任意组合来实现。All or part of each unit in the apparatus 900 for constructing a visual view is implemented by software, hardware, firmware or any combination thereof.
在采用软件实现的情况下,例如,上述可视化语法模块902和交互式构建界面的生成模块903是由附图17中的至少一个处理器801读取存储器802中存储的程序代码后,生成的软件功能单元来实现。In the case of software implementation, for example, the above-mentioned visual grammar module 902 and interactive construction interface generation module 903 are software generated by at least one processor 801 in FIG. 17 after reading the program code stored in the memory 802 functional unit to achieve.
在采用硬件实现的情况下,例如,附图16中上述各个单元由计算设备中的不同硬件分别实现。例如,通信模块901由附图17中的网络接口803或输入输出接口806中至少一项实现。视化语法模块902由附图17中的至少一个处理器801中的一部分处理资源(例如多核处理器中的一个核或两个核)实现,而交互式构建界面的生成模块903由附图17中至少一个处理器801中的其余部分处理资源(例如多核处理器中的其他核),或者采用现场可编程门阵列(field-programmable gate array,FPGA)、或协处理器等可编程器件来完成。In the case of hardware implementation, for example, the above-mentioned units in FIG. 16 are respectively implemented by different hardware in the computing device. For example, the communication module 901 is implemented by at least one of the network interface 803 or the input-output interface 806 in FIG. 17 . The visual grammar module 902 is implemented by a part of the processing resources in at least one processor 801 in FIG. 17 (for example, one core or two cores in a multi-core processor), and the interactive construction interface generation module 903 is implemented by FIG. 17 . The remaining part of the processing resources in at least one processor 801 (for example, other cores in a multi-core processor), or use a field-programmable gate array (field-programmable gate array, FPGA), or a programmable device such as a coprocessor to complete .
在采用软件硬件相结合的方式来实现的情况下,例如,附图16中可视化语法模块902由硬件可编程器件实现,交互式构建界面的生成模块903是由CPU读取存储器中存储的程序代码后,生成的软件功能单元。In the case of a combination of software and hardware, for example, the visual grammar module 902 in FIG. 16 is implemented by a hardware programmable device, and the generation module 903 of the interactive construction interface is the program code stored in the memory read by the CPU After that, the generated software functional unit.
下面对计算设备的基本硬件结构举例说明。The basic hardware structure of the computing device is exemplified below.
附图17是本申请实施例提供的一种计算设备的结构示意图,附图17所示的计算设备800用于实施上述各个方法实施例提供的可视化视图的构建方法。FIG. 17 is a schematic structural diagram of a computing device provided by an embodiment of the present application. The computing device 800 shown in FIG. 17 is used to implement the method for constructing a visualization view provided by the above method embodiments.
可选地,结合附图6所示的应用场景来看,附图17所示的计算设备800是附图6中的终端10或服务器11。Optionally, with reference to the application scenario shown in FIG. 6 , the computing device 800 shown in FIG. 17 is the terminal 10 or the server 11 in FIG. 6 .
可选地,结合附图7来看,附图17所示的计算设备800是附图7所示方法流程中的计算设备。Optionally, with reference to FIG. 7 , the computing device 800 shown in FIG. 17 is the computing device in the method flow shown in FIG. 7 .
可选地,结合附图9来看,附图17所示的计算设备800包括附图9所示的坐标系制定模 块711、视觉编码制定模块712、可视化效果返回模块713、可视化代码返回模块714、视觉编码模块721和代码封装模块722。Optionally, with reference to FIG. 9 , the computing device 800 shown in FIG. 17 includes a coordinate system formulation module 711 , a visual code formulation module 712 , a visualization effect return module 713 , and a visual code return module 714 shown in FIG. 9 . , a visual coding module 721 and a code packaging module 722 .
计算设备800包括至少一个处理器801、存储器802以及至少一个网络接口803。 Computing device 800 includes at least one processor 801 , memory 802 , and at least one network interface 803 .
处理器801例如是通用中央处理器(central processing unit,CPU)、网络处理器(network processer,NP)、图形处理器(graphics processing unit,GPU)、神经网络处理器(neural-network processing units,NPU)、数据处理单元(data processing unit,DPU)、微处理器或者一个或多个用于实现本申请方案的集成电路。例如,处理器801包括专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。PLD例如是复杂可编程逻辑器件(complex programmable logic device,CPLD)、现场可编程逻辑门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)或其任意组合。The processor 801 is, for example, a general-purpose central processing unit (central processing unit, CPU), a network processor (network processor, NP), a graphics processing unit (graphics processing unit, GPU), a neural-network processing unit (neural-network processing units, NPU) ), a data processing unit (DPU), a microprocessor or one or more integrated circuits for implementing the solution of the present application. For example, the processor 801 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
存储器802例如是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,又如是随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,又如是电可擦可编程只读存储器(electrically erasable programmable read-only Memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。可选地,存储器802独立存在,并通过内部连接804与处理器801相连接。或者,可选地存储器802和处理器801集成在一起。The memory 802 is, for example, a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (RAM) or a memory device that can store information and instructions. Other types of dynamic storage devices, such as electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, optical disks storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of Any other medium accessed by a computer without limitation. Optionally, the memory 802 exists independently and is connected to the processor 801 through an internal connection 804 . Alternatively, the memory 802 and the processor 801 are optionally integrated.
网络接口803使用任何收发器一类的装置,用于与其它设备或通信网络通信。网络接口803例如包括有线网络接口或者无线网络接口中的至少一项。其中,有线网络接口例如为以太网接口。以太网接口例如是光接口,电接口或其组合。无线网络接口例如为无线局域网(wireless local area networks,WLAN)接口,蜂窝网络网络接口或其组合等。The network interface 803 uses any transceiver-like device for communicating with other devices or communication networks. The network interface 803 includes, for example, at least one of a wired network interface or a wireless network interface. The wired network interface is, for example, an Ethernet interface. The Ethernet interface is, for example, an optical interface, an electrical interface or a combination thereof. The wireless network interface is, for example, a wireless local area network (wireless local area network, WLAN) interface, a cellular network network interface or a combination thereof, and the like.
在一些实施例中,处理器801包括一个或多个CPU,如附图17中所示的CPU0和CPU1。In some embodiments, processor 801 includes one or more CPUs, such as CPU0 and CPU1 shown in FIG. 17 .
在一些实施例中,计算设备800可选地包括多个处理器,如附图17中所示的处理器801和处理器805。这些处理器中的每一个例如是一个单核处理器(single-CPU),又如是一个多核处理器(multi-CPU)。这里的处理器可选地指一个或多个设备、电路、和/或用于处理数据(如计算机程序指令)的处理核。In some embodiments, computing device 800 optionally includes multiple processors, such as processor 801 and processor 805 shown in FIG. 17 . Each of these processors is, for example, a single-core processor (single-CPU), or a multi-core processor (multi-CPU). A processor herein optionally refers to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
在一些实施例中,计算设备800还包括内部连接804。处理器801、存储器802以及至少一个网络接口803通过内部连接804连接。内部连接804包括通路,在上述组件之间传送信息。可选地,内部连接804是单板或总线。可选地,内部连接804分为地址总线、数据总线、控制总线等。In some embodiments, computing device 800 also includes internal connections 804 . The processor 801 , the memory 802 and at least one network interface 803 are connected by an internal connection 804 . Internal connections 804 include pathways that transfer information between the aforementioned components. Optionally, the internal connection 804 is a single board or bus. Optionally, the internal connection 804 is divided into an address bus, a data bus, a control bus, and the like.
在一些实施例中,计算设备800还包括输入输出接口806。输入输出接口806连接到内部连接804上。In some embodiments, computing device 800 also includes an input-output interface 806 . Input and output interface 806 is connected to internal connection 804 .
在一些实施例中,输入输出接口806用于与输入设备连接,接收用户通过输入设备输入的上述附图7所示方法涉及的命令或数据,例如构建请求、用于定义坐标轴的信息(如轨迹数据、坐标轴定义域、坐标轴类型、坐标轴值域)、用于定义坐标轴组合关系的信息(如绝对型或相对型、Y轴与画布夹角、Y轴与X轴夹角)、用于生成可视化视图的代码、图符种类、 图表或图符的参数。输入设备包括但不限于键盘、触摸屏、麦克风、鼠标或传感设备等等等。In some embodiments, the input and output interface 806 is used to connect with an input device, and receive commands or data related to the method shown in FIG. 7 input by the user through the input device, such as a construction request, information for defining coordinate axes (such as Trajectory data, coordinate axis definition domain, coordinate axis type, coordinate axis value domain), information used to define the combination relationship of coordinate axes (such as absolute type or relative type, the angle between the Y axis and the canvas, the angle between the Y axis and the X axis) , the code used to generate the visualization, the type of icon, and the parameters of the chart or icon. Input devices include, but are not limited to, keyboards, touch screens, microphones, mice, or sensing devices, among others.
在一些实施例中,输入输出接口806还用于与输出设备连接。输入输出接口806通过输出设备输出处理器301执行上述附图7所示方法产生的中间结果和/或最终结果,例如可视化视图、用于生成可视化视图的代码、根据对可视化视图的配置操作产生的代码。输出设备包括但不限于显示器、打印机、投影仪等等。In some embodiments, the input-output interface 806 is also used to interface with output devices. The input and output interface 806 outputs the intermediate results and/or final results generated by the processor 301 executing the above-mentioned method shown in FIG. 7 through the output device, such as the visual view, the code for generating the visual view, and the result generated according to the configuration operation on the visual view. code. Output devices include, but are not limited to, displays, printers, projectors, and the like.
可选地,处理器801通过读取存储器802中保存的程序代码810实现上述实施例中的方法,或者,处理器801通过内部存储的程序代码实现上述实施例中的方法。在处理器801通过读取存储器802中保存的程序代码810实现上述实施例中的方法的情况下,存储器802中保存实现本申请实施例提供的可视化视图的构建方法的程序代码。Optionally, the processor 801 implements the methods in the foregoing embodiments by reading program codes 810 stored in the memory 802, or the processor 801 implements the methods in the foregoing embodiments by using internally stored program codes. When the processor 801 implements the method in the above embodiment by reading the program code 810 stored in the memory 802, the memory 802 stores the program code for implementing the visualization view construction method provided by the embodiment of the present application.
处理器801实现上述功能的更多细节请参考前面各个方法实施例中的描述,在这里不再重复。For more details of the above-mentioned functions implemented by the processor 801, please refer to the descriptions in the foregoing method embodiments, which will not be repeated here.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分可互相参考,每个实施例重点说明的都是与其他实施例的不同之处。The various embodiments in this specification are described in a progressive manner, and the same and similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments.
A参考B,指的是A与B相同或者A为B的简单变形。A refers to B, which means that A is the same as B or A is a simple variation of B.
本申请实施例的说明书和权利要求书中的术语“第一”和“第二”等是用于区别不同的对象,而不是用于描述对象的特定顺序,也不能理解为指示或暗示相对重要性。例如,第一位置和第二位置用于区别不同的位置,而不是用于描述位置的特定顺序,也不能理解为第一位置比第二位置更重要。The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects, rather than used to describe the specific order of the objects, nor should they be construed as indicating or implying relative importance sex. For example, the first position and the second position are used to distinguish different positions, not to describe a specific order of the positions, nor should it be understood that the first position is more important than the second position.
本申请实施例,除非另有说明,“至少一个”的含义是指一个或多个,“多个”的含义是指两个或两个以上。例如,多个可视化元素是指两个或两个以上的可视化元素。In the embodiments of the present application, unless otherwise specified, the meaning of "at least one" means one or more, and the meaning of "plurality" means two or more. For example, multiple visualization elements refers to two or more visualization elements.
上述实施例可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例描述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。The above-described embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server or data center Transmission to another website site, computer, server, or data center is by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media. The usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), and the like.
以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。The above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The recorded technical solutions are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims (28)

  1. 一种可视化视图的构建方法,其特征在于,所述方法包括:A method for constructing a visual view, characterized in that the method comprises:
    接收构建请求,所述构建请求指示基于设定的坐标系构建目标数据的可视化视图,所述坐标系的坐标轴包括轨迹坐标轴,所述轨迹坐标轴是指形状为轨迹的坐标轴;receiving a construction request, the construction request instructing to construct a visual view of the target data based on a set coordinate system, where the coordinate axis of the coordinate system includes a trajectory coordinate axis, and the trajectory coordinate axis refers to a coordinate axis whose shape is a trajectory;
    根据所述轨迹坐标轴以及所述目标数据,确定所述目标数据在可视化视图中的位置;According to the trajectory coordinate axis and the target data, determine the position of the target data in the visualization view;
    根据确定出的位置,获取所述目标数据的可视化视图,所述可视化视图包括用于表示所述目标数据的可视化元素,所述可视化元素在所述可视化视图中位于所述确定出的位置;obtaining a visual view of the target data according to the determined position, where the visual view includes a visual element for representing the target data, and the visual element is located at the determined position in the visual view;
    提供所述可视化视图。The visualization is provided.
  2. 根据权利要求1所述的方法,其特征在于,所述轨迹坐标轴的形状是用户输入的轨迹,所述轨迹坐标轴上具有多个曲率不同的点。The method according to claim 1, wherein the shape of the trajectory coordinate axis is a trajectory input by a user, and the trajectory coordinate axis has a plurality of points with different curvatures.
  3. 根据权利要求2所述的方法,其特征在于,所述轨迹的输入方式包括以下任意一种:The method according to claim 2, wherein the input method of the trajectory comprises any one of the following:
    在构建界面中绘制所述轨迹;或者,draw the trajectory in the build interface; or,
    在构建界面中输入所述轨迹上多个点的位置坐标。The position coordinates of the multiple points on the trajectory are input in the construction interface.
  4. 根据权利要求1所述的方法,其特征在于,所述坐标系中每个坐标轴的形状是直线。The method according to claim 1, wherein the shape of each coordinate axis in the coordinate system is a straight line.
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述根据所述轨迹坐标轴以及所述目标数据,确定所述目标数据在可视化视图中的位置,包括:The method according to any one of claims 1 to 4, wherein the determining the position of the target data in the visualization view according to the trajectory coordinate axis and the target data comprises:
    响应于所述坐标系的组合关系为绝对型组合关系,根据第一角度以及所述坐标系的偏移角度,获取所述坐标系中纵坐标轴相对于画布的角度,所述绝对型组合关系包括纵坐标轴与画布保持为所述第一角度,所述画布为构建界面中用于显示所述可视化视图的区域;In response to the combination relationship of the coordinate system being an absolute combination relationship, the angle of the ordinate axis in the coordinate system relative to the canvas is obtained according to the first angle and the offset angle of the coordinate system, and the absolute combination relationship is obtained. Including that the ordinate axis and the canvas are kept at the first angle, and the canvas is an area for displaying the visual view in the construction interface;
    根据所述纵坐标轴相对于画布的角度,确定所述目标数据在可视化视图中的位置。The position of the target data in the visualization view is determined according to the angle of the ordinate axis relative to the canvas.
  6. 根据权利要求1至4中任一项所述的方法,其特征在于,所述根据所述轨迹坐标轴以及所述目标数据,确定所述目标数据在可视化视图中的位置,包括:The method according to any one of claims 1 to 4, wherein the determining the position of the target data in the visualization view according to the trajectory coordinate axis and the target data comprises:
    响应于所述坐标系的组合关系为相对型组合关系,根据第二角度、所述坐标系的偏移角度以及所述横坐标轴的切线方向,获取所述坐标系中纵坐标轴相对于画布的角度,所述相对型组合关系包括纵坐标轴与横坐标轴保持为所述第二角度,所述画布为构建界面中用于显示所述可视化视图的区域;In response to the combination relationship of the coordinate system being a relative combination relationship, obtain the relative relationship of the ordinate axis in the coordinate system to the canvas according to the second angle, the offset angle of the coordinate system, and the tangent direction of the abscissa axis The angle of the relative type combination includes that the ordinate axis and the abscissa axis are kept at the second angle, and the canvas is an area used to display the visual view in the construction interface;
    根据所述纵坐标轴相对于画布的角度,确定所述目标数据在可视化视图中的位置。The position of the target data in the visualization view is determined according to the angle of the ordinate axis relative to the canvas.
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述提供所述可视化视图,包括:The method according to any one of claims 1 to 6, wherein the providing the visual view comprises:
    提供构建界面,所述构建界面包括所述可视化视图以及坐标系设定区域,所述坐标系设定区域用于供用户设定所述坐标系的参数。A construction interface is provided, and the construction interface includes the visual view and a coordinate system setting area, where the coordinate system setting area is used for a user to set parameters of the coordinate system.
  8. 根据权利要求7所述的方法,其特征在于,所述接收构建请求之前,所述方法还包括:The method according to claim 7, wherein before the receiving the construction request, the method further comprises:
    响应于坐标轴设定指令,根据通过所述坐标系设定区域输入的轨迹数据确定所述轨迹坐标轴,所述坐标轴设定指令指示基于所述轨迹数据设定所述轨迹坐标轴。In response to a coordinate axis setting instruction, the trajectory coordinate axis is determined according to trajectory data input through the coordinate system setting area, the coordinate axis setting instruction instructing to set the trajectory coordinate axis based on the trajectory data.
  9. 根据权利要求8所述的方法,其特征在于,所述坐标系设定区域包括轨迹绘制区域,所述轨迹绘制区域用于供用户绘制所述轨迹坐标轴的形状,所述轨迹数据包括在所述轨迹绘制区域中绘制的轨迹中轨迹点的位置坐标。The method according to claim 8, wherein the coordinate system setting area includes a trajectory drawing area, the trajectory drawing area is used for a user to draw the shape of the trajectory coordinate axis, and the trajectory data is included in the The position coordinates of the trajectory points in the trajectory drawn in the above trajectory drawing area.
  10. 根据权利要求8所述的方法,其特征在于,所述坐标系设定区域包括轨迹数据选项,所述轨迹数据包括通过所述轨迹数据选项输入的所述目标数据的属性。The method according to claim 8, wherein the coordinate system setting area includes trajectory data options, and the trajectory data includes attributes of the target data input through the trajectory data options.
  11. 根据权利要求7至10中任一项所述的方法,其特征在于,所述坐标系设定区域包括坐标轴关系选项,所述接收构建请求之前,所述方法还包括:The method according to any one of claims 7 to 10, wherein the coordinate system setting area includes a coordinate axis relationship option, and before the receiving the construction request, the method further comprises:
    响应于坐标轴关系设定指令,将通过所述坐标轴关系选项选中的坐标轴组合关系确定为所述坐标系的坐标轴组合关系。In response to the coordinate axis relationship setting instruction, the coordinate axis combination relationship selected through the coordinate axis relationship option is determined as the coordinate axis combination relationship of the coordinate system.
  12. 根据权利要求7至11中任一项所述的方法,其特征在于,所述坐标系设定区域包括坐标轴夹角控件,所述接收构建请求之前,所述方法还包括:The method according to any one of claims 7 to 11, wherein the coordinate system setting area includes a coordinate axis included angle control, and before the receiving the construction request, the method further comprises:
    响应于坐标轴夹角设定指令,在所述坐标轴组合关系为绝对型组合关系的情况下,将通过所述坐标轴夹角控件输入的第一角度,确定为所述坐标系中的纵坐标轴与画布保持的角度,所述画布为构建界面中用于显示所述可视化视图的区域;或者,In response to the coordinate axis angle setting instruction, in the case that the coordinate axis combination relationship is an absolute combination relationship, the first angle input through the coordinate axis angle control is determined as the vertical axis in the coordinate system. The angle that the coordinate axis maintains with the canvas, which is the area in the construction interface for displaying the visual view; or,
    响应于坐标轴夹角设定指令,在所述坐标轴组合关系为相对型组合关系的情况下,将通过所述坐标轴夹角控件输入的第二角度,确定为所述坐标系中的纵坐标轴与横坐标轴保持的角度,所述画布为构建界面中用于显示所述可视化视图的区域。In response to the coordinate axis angle setting instruction, in the case that the coordinate axis combination relationship is a relative type combination relationship, the second angle input through the coordinate axis angle control is determined as the vertical axis in the coordinate system. The angle maintained by the coordinate axis and the abscissa axis, and the canvas is an area used to display the visual view in the construction interface.
  13. 根据权利要求7至12中任一项所述的方法,其特征在于,所述构建界面还包括代码区域,所述代码区域用于对生成所述可视化视图的第一代码进行展示。The method according to any one of claims 7 to 12, wherein the construction interface further comprises a code area, and the code area is used to display the first code for generating the visual view.
  14. 根据权利要求13所述的方法,其特征在于,所述方法还包括:The method of claim 13, wherein the method further comprises:
    响应于代码导出指令,将所述代码区域中所述第一代码输出至目标位置。The first code in the code region is output to a target location in response to a code export instruction.
  15. 根据权利要求13或14所述的方法,其特征在于,所述方法还包括:The method according to claim 13 or 14, wherein the method further comprises:
    响应于代码运行指令,通过运行在所述代码区域中输入的第二代码,对所述可视化结果进行调整。The visualization is adjusted by running the second code entered in the code area in response to a code running instruction.
  16. 根据权利要求13至15中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 13 to 15, wherein the method further comprises:
    响应于所述构建界面上触发的对所述可视化视图的属性设定操作,获取所述属性设定操作对应的第三代码;In response to an attribute setting operation on the visual view triggered on the construction interface, acquiring a third code corresponding to the attribute setting operation;
    将所述第三代码增加至所述构建界面中的所述代码区域。The third code is added to the code area in the build interface.
  17. 根据权利要求1至16中任一项所述的方法,其特征在于,所述提供所述可视化视图,包括:The method according to any one of claims 1 to 16, wherein the providing the visual view comprises:
    向所述构建请求的发起方发送所述可视化视图的内容;或者,sending the content of the visualization to the originator of the build request; or,
    在构建界面中显示所述可视化视图。The visualization is displayed in the build interface.
  18. 一种可视化视图的构建装置,其特征在于,所述可视化视图的构建装置包括:An apparatus for constructing a visual view, characterized in that the apparatus for constructing a visual view comprises:
    通信模块,用于接收构建请求,所述构建请求指示基于设定的坐标系构建目标数据的可视化视图,所述坐标系的坐标轴包括轨迹坐标轴,所述轨迹坐标轴是指形状为轨迹的坐标轴;The communication module is used to receive a construction request, the construction request indicates that a visual view of the target data is constructed based on a set coordinate system, the coordinate axis of the coordinate system includes a trajectory coordinate axis, and the trajectory coordinate axis refers to the shape of a trajectory. Axis;
    可视化语法模块,用于根据所述轨迹坐标轴以及所述目标数据,确定所述目标数据在可视化视图中的位置;A visual grammar module for determining the position of the target data in the visual view according to the trajectory coordinate axis and the target data;
    交互式构建界面的生成模块,用于根据确定出的位置,获取所述目标数据的可视化视图,所述可视化视图包括用于表示所述目标数据的可视化元素,所述可视化元素在所述可视化视图中位于所述确定出的位置;The generation module of the interactive construction interface is used to obtain a visual view of the target data according to the determined position, the visual view includes a visual element used to represent the target data, and the visual element is in the visual view. in said determined location;
    通信模块,用于提供所述可视化视图。A communication module for providing the visual view.
  19. 根据权利要求18所述的可视化视图的构建装置,其特征在于,所述轨迹坐标轴的形状是所述通信模块接收的用户输入的轨迹,所述轨迹坐标轴上具有多个曲率不同的点。The apparatus for constructing a visual view according to claim 18, wherein the shape of the trajectory coordinate axis is a trajectory input by the user received by the communication module, and the trajectory coordinate axis has a plurality of points with different curvatures.
  20. 根据权利要求18或19所述的可视化视图的构建装置,其特征在于,所述通信模块,用于通过以下任意一种方式接收输入的轨迹:The apparatus for constructing a visual view according to claim 18 or 19, wherein the communication module is configured to receive the input track in any one of the following ways:
    接收在构建界面中绘制的所述轨迹;或者,receive the trajectory drawn in the build interface; or,
    接收在构建界面中输入所述轨迹上多个点的位置坐标。The position coordinates of a plurality of points on the trajectory are input in the construction interface.
  21. 根据权利要求20所述的可视化视图的构建装置,其特征在于,所述可视化语法模块,用于响应于所述坐标系的组合关系为绝对型组合关系,根据第一角度以及所述坐标系的偏移角度,获取所述坐标系中纵坐标轴相对于画布的角度,所述绝对型组合关系包括纵坐标轴与画布保持为所述第一角度,所述画布为构建界面中用于显示所述可视化视图的区域;根据所述纵坐标轴相对于画布的角度,确定所述目标数据在可视化视图中的位置。The apparatus for constructing a visual view according to claim 20, wherein the visual syntax module is configured to respond that the combination relationship of the coordinate system is an absolute combination relationship, according to the first angle and the coordinate system The offset angle is to obtain the angle of the ordinate axis in the coordinate system relative to the canvas, and the absolute combination relationship includes that the ordinate axis and the canvas are kept at the first angle, and the canvas is used in the construction interface to display all The area of the visualization view is determined; the position of the target data in the visualization view is determined according to the angle of the ordinate axis relative to the canvas.
  22. 根据权利要求20所述的可视化视图的构建装置,其特征在于,所述可视化语法模块,用于响应于所述坐标系的组合关系为相对型组合关系,根据第二角度、所述坐标系的偏移角度以及所述横坐标轴的切线方向,获取所述坐标系中纵坐标轴相对于画布的角度,所述相对型组合关系包括纵坐标轴与横坐标轴保持为所述第二角度,所述画布为构建界面中用于显示所述可视化视图的区域;根据所述纵坐标轴相对于画布的角度,确定所述目标数据在可视化视图中的位置。The apparatus for constructing a visual view according to claim 20, wherein the visual syntax module is configured to, in response to the combination relationship of the coordinate system being a relative type combination relationship, according to the second angle, the coordinate system The offset angle and the tangent direction of the abscissa axis are obtained, and the angle of the ordinate axis in the coordinate system relative to the canvas is obtained, and the relative combination relationship includes that the ordinate axis and the abscissa axis are maintained at the second angle, The canvas is an area in the construction interface for displaying the visual view; the position of the target data in the visual view is determined according to the angle of the ordinate axis relative to the canvas.
  23. 根据权利要求18至22中任一项所述的可视化视图的构建装置,其特征在于,所述通 信模块,用于提供所述交互式构建界面的生成模块生成的构建界面,所述构建界面包括所述可视化视图以及坐标系设定区域,所述坐标系设定区域用于供用户设定所述坐标系的参数。The apparatus for constructing a visual view according to any one of claims 18 to 22, wherein the communication module is configured to provide a constructing interface generated by the interactive constructing interface generating module, the constructing interface comprising: The visual view and the coordinate system setting area, the coordinate system setting area is used for the user to set the parameters of the coordinate system.
  24. 根据权利要求23所述的可视化视图的构建装置,其特征在于,所述交互式构建界面的生成模块,用于响应于所述通信模块接收的坐标轴设定指令,根据通过所述坐标系设定区域输入的轨迹数据确定所述轨迹坐标轴,所述坐标轴设定指令指示基于所述轨迹数据设定所述轨迹坐标轴。The apparatus for constructing a visual view according to claim 23, wherein the generation module of the interactive construction interface is configured to respond to the coordinate axis setting instruction received by the communication module, according to the coordinate system setting instruction through the coordinate system. The trajectory coordinate axis is determined by the trajectory data input in the fixed area, and the coordinate axis setting instruction instructs to set the trajectory coordinate axis based on the trajectory data.
  25. 根据权利要求23至24中任一项所述的可视化视图的构建装置,其特征在于,所述坐标系设定区域包括坐标轴关系选项,所述交互式构建界面的生成模块,用于响应于所述通信模块接收的坐标轴关系设定指令,将通过所述坐标轴关系选项选中的坐标轴组合关系确定为所述坐标系的坐标轴组合关系。The apparatus for constructing a visual view according to any one of claims 23 to 24, wherein the coordinate system setting area includes a coordinate axis relationship option, and the generation module of the interactive construction interface is configured to respond to the The coordinate axis relationship setting instruction received by the communication module determines the coordinate axis combination relationship selected through the coordinate axis relationship option as the coordinate axis combination relationship of the coordinate system.
  26. 根据权利要求23至25中任一项所述的可视化视图的构建装置,其特征在于,所述坐标系设定区域包括坐标轴夹角控件,所述交互式构建界面的生成模块,用于响应于所述通信模块接收的坐标轴夹角设定指令,在所述坐标轴组合关系为绝对型组合关系的情况下,将通过所述坐标轴夹角控件输入的第一角度,确定为所述坐标系中的纵坐标轴与画布保持的角度;或者,响应于所述通信模块接收的坐标轴夹角设定指令,在所述坐标轴组合关系为相对型组合关系的情况下,将通过所述坐标轴夹角控件输入的第二角度,确定为所述坐标系中的纵坐标轴与横坐标轴保持的角度。The apparatus for constructing a visual view according to any one of claims 23 to 25, wherein the coordinate system setting area includes a coordinate axis included angle control, and the generation module of the interactive construction interface is used to respond to the In the coordinate axis angle setting instruction received by the communication module, in the case that the coordinate axis combination relationship is an absolute combination relationship, the first angle input through the coordinate axis angle control is determined as the The angle maintained by the ordinate axis in the coordinate system and the canvas; or, in response to the coordinate axis angle setting instruction received by the communication module, in the case that the coordinate axis combination relationship is a relative combination relationship, the The second angle input by the coordinate axis included angle control is determined as the angle maintained by the ordinate axis and the abscissa axis in the coordinate system.
  27. 一种计算设备,其特征在于,所述计算设备包括处理器和存储器,其中:A computing device, characterized in that the computing device includes a processor and a memory, wherein:
    所述存储器中存储有计算机指令;computer instructions are stored in the memory;
    所述处理器执行所述计算机指令,以实现所述权利要求1至17中任一项权利要求所述的方法。The processor executes the computer instructions to implement the method of any one of claims 1-17.
  28. 一种计算机可读存储介质,其特征在于,所述存储介质中存储有至少一条指令,所述指令在计算机上运行时,使得计算机执行如权利要求1至权利要求17中任一项所述的方法。A computer-readable storage medium, characterized in that, the storage medium stores at least one instruction, and when the instruction is executed on a computer, the computer executes the method described in any one of claims 1 to 17. method.
PCT/CN2022/087681 2021-04-26 2022-04-19 Method and apparatus for constructing visual view WO2022228211A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110455318.9 2021-04-26
CN202110455318.9A CN115249284A (en) 2021-04-26 2021-04-26 Visual view construction method and device

Publications (1)

Publication Number Publication Date
WO2022228211A1 true WO2022228211A1 (en) 2022-11-03

Family

ID=83697634

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/087681 WO2022228211A1 (en) 2021-04-26 2022-04-19 Method and apparatus for constructing visual view

Country Status (2)

Country Link
CN (1) CN115249284A (en)
WO (1) WO2022228211A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160174940A1 (en) * 2014-12-19 2016-06-23 General Electric Company Method and apparatus for animate visualization of static 3-d data
CN107038198A (en) * 2016-12-08 2017-08-11 阿里巴巴集团控股有限公司 The visible processing method and device of data
CN109087553A (en) * 2018-08-23 2018-12-25 广东智媒云图科技股份有限公司 A kind of imitation drawing method
CN111311918A (en) * 2020-05-12 2020-06-19 南京云析科技有限公司 Traffic management method and device based on visual analysis
CN112578462A (en) * 2020-12-11 2021-03-30 北京卫星环境工程研究所 Detection result real-time visualization method based on gradient magnetic field

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160174940A1 (en) * 2014-12-19 2016-06-23 General Electric Company Method and apparatus for animate visualization of static 3-d data
CN107038198A (en) * 2016-12-08 2017-08-11 阿里巴巴集团控股有限公司 The visible processing method and device of data
CN109087553A (en) * 2018-08-23 2018-12-25 广东智媒云图科技股份有限公司 A kind of imitation drawing method
CN111311918A (en) * 2020-05-12 2020-06-19 南京云析科技有限公司 Traffic management method and device based on visual analysis
CN112578462A (en) * 2020-12-11 2021-03-30 北京卫星环境工程研究所 Detection result real-time visualization method based on gradient magnetic field

Also Published As

Publication number Publication date
CN115249284A (en) 2022-10-28

Similar Documents

Publication Publication Date Title
US10254848B2 (en) Cross-platform data visualizations using common descriptions
US10346013B2 (en) Manipulating graphical objects
WO2019109485A1 (en) Echarts tool-based chart making method, apparatus and device, and medium
US11182513B2 (en) Generating technical drawings from building information models
US11087503B2 (en) Interactive color palette interface for digital painting
US8825459B2 (en) Multi-modal manipulation of a geometric model
WO1995012161A1 (en) Graphic editor framework system
CN112540763A (en) Front-end page generation method and device, platform equipment and storage medium
US20200273226A1 (en) Interactive Layout-Aware Construction of Bespoke Charts
US11113855B2 (en) Expression interpretation engine for computer map visualizations
KR101798149B1 (en) Chart visualization method by selecting some areas of the data table
US20140184592A1 (en) Creating, editing, and querying parametric models, e.g., using nested bounding volumes
US20190258396A1 (en) Layout design with adaptive areas
US20210406040A1 (en) Creating default layout constraints for graphical interfaces
US20140325404A1 (en) Generating Screen Data
US11086498B2 (en) Server-side chart layout for interactive web application charts
JP2019185687A (en) Program, information processing method and information terminal
WO2022228211A1 (en) Method and apparatus for constructing visual view
US20230185984A1 (en) Generating Technical Drawings From Building Information Models
CN114675925B (en) Configuration image processing method and device, computer equipment and storage medium
CN109887058A (en) Cross-platform drafting system
WO2022228209A1 (en) Method and apparatus for constructing visual view
AU2013299742B2 (en) Manipulating graphical objects
CN114461324B (en) Drawing tool, drawing tool-based graph generation method, drawing tool-based graph generation device, drawing tool-based graph generation equipment and drawing tool-based graph generation medium
US10586361B2 (en) Mesh art positioning techniques as part of digital content creation

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22794682

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22794682

Country of ref document: EP

Kind code of ref document: A1