A genomics radial layout visualization recommendation method
By optimizing the configuration of the ensemble network through statistical analysis and embedded model, the inaccurate recommendation effect of the genomic radial layout visualization design tool is solved, efficient visualization recommendation under natural language input is achieved, and the efficiency and user interactivity of genomic visualization creation are improved.
Patent Information
- Application Number
- CN202411636913.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-11-15
AI Technical Summary
Existing genomic radial layout visualization design tools have the disadvantages of inaccurate recommendations and reliance on predefined rules, making them difficult to cope with scenarios unexpected by designers. Researchers also need to frequently switch tools for design optimization.
By statistically analyzing radial layout visualization data, we can obtain the statistical characteristics and data types of the orbits, use embedded models to encode natural language requests input by users, calculate the similarity between embedding vectors and caption-configuration pairs, optimize the configuration set network, design user interfaces and recommend visualization results, and support drawing requirement input in natural language form.
It improves the practicality of genomics visualization recommendation methods, reduces the need for design knowledge, improves the efficiency and user interactivity of visualization creation, and meets the differentiated needs of the visualization process.
Smart Images

Figure CN119580851B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of information visualization and visual analysis, and in particular to a genomics radial layout visualization recommendation method. Background Art
[0002] Interpreting genomic data can provide a better understanding of the genetic causes and mechanisms of both common and rare diseases. However, genomic data is often complex and often presented in multiple components and at multiple scales. Researchers widely use radial layout visualizations to present genomic data.
[0003] In genomics, radial layout visualizations use nested concentric circles (tracks) in a polar coordinate system to display different types of data, with gene sequences mapped to the circumference of the concentric circles. Because these tracks are highly interconnected and influence each other, they often need to be integrated to interpret genomic information. Furthermore, radial layout visualizations in genomics can better display the interactions between non-adjacent regions with the same function and make better use of the available screen space.
[0004] An effective and aesthetically pleasing radial layout visualization typically needs to meet design specifications from both the genomics and visualization fields. However, genomics researchers often have limited knowledge of visualization design. Researchers need to iterate repeatedly, updating their designs through trial and error to achieve better results, which leads to frequent switching between multiple different tools. To obtain better design recommendations for radial layout visualizations, researchers must search for similar papers published in the past to learn from design solutions for similar tasks.
[0005] Visualization recommendation methods offer a solution to this problem: by automatically recommending high-quality visualization designs, they reduce the need for users to have sufficient knowledge of visualization design. However, due to the unique analytical tasks, data formats, and visualization styles of genomics visualization, conventional visualization recommendation methods are not suitable for genomics visualization design.
[0006] In recent years, researchers have attempted to develop new recommendation methods for genomics visualization. These recommendation methods take data and tasks as input, and use the statistical characteristics of the data and the tasks as the basis for decision-making in designing radial layout visualizations. However, rule-matching-based methods lack discussion on the design methods of radial layout visualizations containing multiple trajectories, and there is no room for detailed adjustments. In addition, current heuristic rule-based methods can usually only cope with scenarios within the design scope. When encountering scenarios unexpected by the designer, such as new analysis tasks or abnormal data ranges, the recommendation algorithm often finds it difficult to provide the optimal solution. In summary, existing genomic radial layout visualization design tools have shortcomings such as inaccurate recommendation effects and the recommendation results relying on predefined rules. Summary of the Invention
[0007] In response to the above problems, the present invention aims to provide a genomics radial layout visualization recommendation method, the specific technical solution includes the following steps:
[0008] Step S1: Statistically analyze the existing radial layout visualization data to obtain the statistical characteristics and data types of the tracks;
[0009] Step S2: Encode the natural language request input by the user into an embedding vector through the embedding model; calculate the semantic vector of the caption-configuration pair through the embedding model;
[0010] Step S3: Calculate the similarity between the embedding vector and the embedding vector of the caption-configuration pair, and select the view configuration records with the highest similarity according to a preset number;
[0011] Step S4: constructing a configuration set network based on the view configuration record, and optimizing the layout of the configuration set network;
[0012] Step S5: Based on the statistical characteristics and data type layout of the optimized configuration set network and track, design a user interface and interaction method, and recommend the design results to the user.
[0013] Preferably, the data types include karyograms, scatter plots, line graphs, histograms, tile plots, heat maps, highlight tracks, and chord plots.
[0014] Preferably, the combination relationship of the tracks includes a stacking relationship and a synthesis relationship:
[0015] If the inner diameter of one track is equal to the outer diameter of another track, the two tracks are in a stacked relationship;
[0016] If the inner and outer radii of two tracks are equal, then the two tracks are in a composite relationship.
[0017] Preferably, encoding the natural language request input by the user into an embedding vector specifically includes:
[0018] The natural language request is converted into a word sequence through word segmentation, and then the word sequence is converted into an index to form an input sequence;
[0019] The input sequence is taken as input and passes through the multi-layer Transformer model in sequence to output the embedding vector.
[0020] Preferably, the similarity between the embedding vector and the embedding vector of the caption-configuration pair is calculated as follows:
[0021]
[0022] Where d(x,y) represents the similarity between the embedding vector x and the caption-configuration embedding vector y, i is the dimension number, and n is the dimension of the vector embedding x, i = 1, 2, ..., n. The dimension of the caption-configuration embedding vector y is equal to that of the embedding vector x.
[0023] Preferably, step S4 specifically includes:
[0024] Step S41: Representing the configuration set network G as a directed acyclic graph;
[0025] Step S42: simplify the configuration of the aggregate network G;
[0026] Step S421: Access the configuration set network G through depth-first traversal, and record the depth d(v) and predecessor set P(v) of each node v;
[0027] Step S422: Access the configuration set network G through breadth-first traversal, and retrieve the node set U for each node v.
[0028]
[0029] Where u, v, and w are all elements in node U, s is the source point of the configuration set network G, d(s,v) is the shortest path length from node v to source point s, type(v) is the tag type of node v, and start is the tag type of the source point of the configuration set network G;
[0030] Step S423: Merge node u into node v, specifically by changing the endpoint of the incoming edge of node u to the endpoint of the incoming edge of node v, changing the starting point of the outgoing edge of node u to the starting point of the outgoing edge of node v, and deleting node u.
[0031] Repeat steps S422 to S423 to merge all nodes at the same depth.
[0032] Preferably, step S41 specifically includes:
[0033] Step S411: using a regular expression to split each view configuration record into a two-dimensional array consisting of tags;
[0034] Step S412: Create an empty directed graph and insert the <start> node and the <end> node;
[0035] Traverse the two-dimensional array and treat the same type of tags in the same column as the same node;
[0036] Merge all the 〈end〉 nodes into the same node and obtain the configuration set network G represented by a directed acyclic graph.
[0037] Preferably, the user interface includes a human-machine hybrid agent panel, a radial layout visual editing panel, a recommendation result explanation panel, and a data control panel; wherein the human-machine hybrid agent panel and the data control panel are switched through tabs;
[0038] (1) The human-machine hybrid agent panel includes a dialogue reset control, a dialogue bubble, and an input box;
[0039] The conversation reset control is used to clear the conversation history;
[0040] The conversation bubble contains the conversation text, recommended results, related documents and a regenerate button;
[0041] The input box is used for users to enter recommendation requests;
[0042] (2) The radial layout visual editing panel includes a visual display area and a visual configuration area;
[0043] The visualization display area is used to render the visualization view currently being created by the user, with a floating box at the top displaying the name of the corresponding data;
[0044] The maximum outer diameter of all tracks that can be rendered is 80% of the smaller of the outer container width and height. The ratio of the maximum outer diameter that can be rendered to the actual maximum track outer diameter constitutes the scaling factor used to determine the radius of all tracks.
[0045] Highlight the track you are hovering over with a colored mask;
[0046] The visual configuration area includes the same number of foldable sheets as tracks, which are used to control the insertion, editing, and deletion of tracks one by one. Among them, the global control sheet is used to create new tracks, and any other foldable sheets correspond to the relevant configuration of a track, including color, line thickness, coordinate axis scale and transparency.
[0047] (3) The recommendation result explanation panel includes a directed acyclic graph arranged from left to right in the form of a node-link graph;
[0048] (4) The data control panel is used to provide interactive control of the data required for drawing.
[0049] Preferably, the node-link graph consists of nodes and edges connecting the nodes;
[0050] Different colors are used to represent nodes of different label types and edges of different label types;
[0051] The order in which nodes appear is represented by the left and right position relationship;
[0052] The width is used to indicate the number of edges.
[0053]
[0054] Where n v→u Indicates the number of edges from node v to node u, n max Indicates the maximum number of multiple edges between any two nodes.
[0055] Preferably, a visual configuration generator is constructed based on the language model, and system prompt words and user prompt words are set;
[0056] Build a historical conversation management module to preserve historical conversations;
[0057] Build an output parsing module to parse the output of the visualization configuration generator into JSON format;
[0058] Among them, the system prompt words include task introduction, background knowledge and format requirements;
[0059] User prompt words include examples, requirements, and existingdesign;
[0060] Examples include legends and visualization configurations; different examples are distinguished by consecutive line breaks, and legends exceeding the preset number are replaced by "...";
[0061] Existingdesign is the visualization configuration that has been created; "EMPTY" replaces the visualization configuration that has not been created.
[0062] In summary, the technical solution provided by the present invention can perform genomic radial layout visualization recommendations based on natural language requests, which helps to improve the practicality of genomic visualization recommendation methods; further, it avoids the tedious and abstract characteristics of visualization creation through programming tools, and by improving the interactivity of user-recommendation methods, it can meet the differentiated needs of the visualization process and help improve the efficiency of genomic visualization creation. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 Schematic diagram of the radial layout visualization recommendation method based on retrieval enhancement generation according to the present invention.
[0064] Figure 2 Schematic diagram of the combination relationship between tracks in the present invention.
[0065] Figure 3 Schematic diagram of the recommendation workflow for retrieval enhancement generation in the present invention.
[0066] Figure 4 This is a comparison chart of the effects before and after configuring the collective network simplification in the present invention.
[0067] Figure 5 This is a schematic diagram of the main interface of the system in the present invention. DETAILED DESCRIPTION
[0068] The technical solution provided by the present invention will be further elaborated below in conjunction with the accompanying drawings.
[0069] This invention reduces the need for design knowledge during the drawing process by automatically recommending visual designs. It supports natural language input of drawing requirements, retrieves relevant visualization examples from a dataset, and then provides targeted recommendations based on these examples. While providing visualization configuration recommendations, this invention also provides explanations for the recommendations, thereby enhancing their credibility. Furthermore, this method enables continuous, context-based dialogue, allowing users to modify recommendations using natural language.
[0070] like Figure 1 As shown, the specific steps of the overall method flow of the present invention are as follows:
[0071] Step 1: Similar visualization sample retrieval method based on vector database
[0072] To limit the design space and overcome the implementation difficulties of the algorithm, this step focuses on recommending the type, quantity, and combination relationship of tracks in radial layout visualization. In terms of track types, this step supports the track types introduced in Table 1.
[0073] Table 1 Common track types in radial layout visualization
[0074]
[0075] In terms of track combination relationships, this step only considers track stacking and synthesis. Figure 2 As shown, the stacking relationship means that the two tracks are nested together in the form of concentric circles, while the composite relationship means that the inner and outer diameters of the two tracks are the same.
[0076] The canonical definitions of stacking and composition relationships are:
[0077] If two tracks T1 and T2 satisfy the following conditions, they are said to be in a stacking relationship:
[0078]
[0079] Where: ––Track T i inner diameter; ––Track T i outer diameter.
[0080] If two orbitals T1 and T2 satisfy the following conditions, they are said to be in a composition relationship:
[0081]
[0082] Where: ––Track T i inner diameter; ––Track T i outer diameter.
[0083] The retriever is a crucial component of retrieval-enhanced generation. Its role is to provide the generator (typically a large language model) with external knowledge or contextual information related to the user's query. The accuracy and completeness of the information provided by the retriever significantly impacts the quality of the results produced by the generator.
[0084] The retriever works as follows: First, the natural language request input by the user is encoded into an embedding vector by an embedder model. This vector expresses the semantics of the user's request. Then, this vector is passed to the vector database, which stores radial layout visualization caption-configuration pairs and visualization caption semantic vectors pre-calculated using the embedder model. The embedder model embeds each caption into the same semantic space, which means that these embedding vectors can reflect the semantic characteristics of the embedded text. The similarity of the vectors in the semantic space can express the semantic similarity of the text. Therefore, based on the similarity between the user request embedding vector and the caption embedding vector, the database selects several data records that are most relevant to the user's request, forming similar visualization samples related to the user's request.
[0085] The text embedding model converts text into embedded vectors, enabling the use of vector similarity to compare the semantic similarity of text. Large language model-based methods offer significant advantages in embedding performance, so this method is used in this step.
[0086] Its text embedding process can be expressed as the formula: v1=LLM(t1), where: v1 – embedding vector; LLM – large language model; t1 – input text.
[0087] The SLLM-Embedder (Large Language Model-Embedder) is used as the base model for computing text embeddings, which is optimized for the retrieval augmentation task of large language models. The specific computation process of the text embedding model is as follows: first, the user's input natural language query is processed by word segmentation, and the natural language is converted into a series of words. Then, the words are converted into the index in the corresponding vocabulary built-in the LLM-Embedder model to form an input sequence. Next, the input sequence is passed into the multi-layer Transformer model for operation, and the output of the last layer of the Transformer model is taken as the vector of the embedded text. In this method, the output of the model, i.e., the embedding vector, is a 1024-dimensional vector, which will be used for subsequent vector database construction and similarity comparison.
[0088] The radial layout visualization vector database provides an external knowledge base for retrieval augmentation. This step uses Chroma to build a visualization vector database. It contains three main data fields, namely embedding (embedding vector), document (text corresponding to the embedding vector), and metadata (additional metadata), whose data types and meanings are shown in Table 2, and the metadata field is shown in Table 3. Since Chroma is not a traditional relational database, additional data can be stored in the form of nested objects.
[0089] Table 2 Data field description
[0090] Data Field Data Type Description embedding float
[1024] The embedding vector corresponding to this record document string The text corresponding to this embedding vector metadata object Additional metadata
[0091] Table 3 Metadata field description
[0092] Data Field Data Type Description config string The visualization configuration corresponding to this record paper_name string The title of the source document for this record paper_filename string The filename on disk of the source document for this record paper_page integer The page number in the source document for the figure corresponding to this record paper_fig_id integer The figure number in the source document for the figure corresponding to this record
[0093] In terms of vector similarity measurement indicators, this step uses the default Euclidean distance of the Chroma database as the measurement standard. Given an n-dimensional vector x = (x1, x2, …, x n ) and y = (y1, y2, …, y n ), the similarity can be expressed as the following formula:
[0094]
[0095] In the formula: x, y - embedded vectors to be compared and note - configuration of embedded vectors; d(x, y) - Euclidean distance between vectors x and y.
[0096] For each input query, this step selects the top 10 records with the highest similarity as the similar visualization examples obtained by the query.
[0097] Step 2: Visualization sample generation method
[0098] After completing the design and construction of the visualization sample retrieval method, this step begins to build the visualization sample generation method. The relatively limited data size is one of the key challenges in developing visualization sample generation methods for specific vertical domains. To enable the recommendation method to fully learn visualization design rules from domain-specific visualization types and integrate them with general design knowledge, a recommendation method based on a large language model is adopted.
[0099] The language model-based visual recommendation method first constructs a language model-based visual configuration generator by designing prompt words. Next, it builds a complete retrieval-enhanced generation workflow, including a historical dialogue management module (stored in memory, which can be understood as some JSON-formatted array dialogues saved in memory) and an output parsing module. This combines the retrieval method constructed in the previous step with the generation method constructed in this step to form a complete and usable visual recommendation method.
[0100] The visualization recommendation method constructed in this step belongs to the agent of multi-round dialogue. Therefore, it is necessary to design the initial text input to the model in each round of dialogue and the user prompt words when the user sends a request in each round.
[0101] The system prompts designed for this step are divided into three parts: task introduction, background information, and format requirements. It's important to note that in English, "radial layout visualization" is often referred to by its representative tool, "Circos." To facilitate model understanding, "Circos" is used instead of "radial layout visualization" in the prompts. To maintain simplicity, the prompts below will be translated into Chinese for explanation.
[0102] Task Description: This section briefly introduces the model's role and the task to be completed. In this step, the task description is: "You are a genomics visualization expert. Your task is to recommend the configuration of Circos (radial layout visualization) charts to meet user needs."
[0103] Background: This section describes the Circos visual form, track types, and output configuration syntax rules.
[0104] Format requirements: This section describes the expected input and output of the model. For example, each user input described here includes three parts: examples (similar visualization examples), requirements (user input requirements), and existing design (visualization configuration currently created by the user). Among them, existing design is optional because users do not always request system recommendations when some visualizations have already been created. The format requirements also specify the output format of the model, which should include two string fields, representing the recommended visualization configuration and the reason for making the recommended configuration. In multi-round conversations, users do not necessarily always request recommended visualization configurations. For example, users may require further explanation of the previous visualization configuration recommendation result. Therefore, the visualization configuration field is optional.
[0105] User prompts refer to the content passed to the model each time a user initiates a conversation. The format of this section is consistent with the input description in the "Format Requirements" section of the system prompts. It is divided into three parts, each separated by a separator line:
[0106] examples: Inserts visualization examples retrieved by the search engine. Each example consists of a caption and a visualization configuration, separated by consecutive line breaks. Due to the model context window, captions are capped at 200 words. Any words exceeding this limit will be replaced with "...".
[0107] requirements: The user's natural language requirements.
[0108] Existing design: Indicates the visualization configuration that has been created by the user. If the user has not created a visualization configuration, use "EMPTY" instead.
[0109] After completing the construction of the retriever and generator, this step assembles the above methods into a complete recommendation workflow that can run continuously, such as Figure 3 As shown in the figure, two auxiliary modules, the dialogue context manager and the output parser, are developed to support the operation of the workflow. The following sections introduce these modules separately.
[0110] Large language model applications typically involve multiple rounds of user-model conversations. The conversation context management mechanism preserves user conversation history, supporting contextually relevant conversation content. For the visualization recommendation method constructed in this step, each round of user conversations is accompanied by a large amount of sample data for model learning, resulting in a relatively large number of tokens in each round. Therefore, the context needs to be streamlined and managed. The conversation context manager records user prompts and model responses for each round of conversation. For conversation content prior to two rounds of user-model conversation, the conversation context manager removes the "example" portion of the user prompt to shorten the context length.
[0111] Since the output of large language models is generally in plain text format and has a certain degree of randomness, the consistency of the output format cannot be guaranteed. Therefore, this article uses an output parser to parse the output of large language models into JSON format and provides automatic retries when parsing fails. Specifically, after the model output is completed, Python's JSON module is used to attempt to parse the string output by the model. If parsing fails, a statement requiring the model to strictly follow the prompt output is inserted after the original prompt word and retry until the maximum number of retries is reached. If the JSON is successfully parsed, it checks whether it contains the configuration and explanation fields. Finally, the module checks whether there are any redundant fields and deletes them.
[0112] Step 3: Explanation of view configuration pattern based on flow metaphor
[0113] Through the similar visualization example retrieval and visualization recommendation in step 2, this step has obtained candidate visualization configuration results. The reasoning process is highly black-box. Providing users with a statistically meaningful display of view configuration patterns is also very important.
[0114] Based on this, this step proposes a view configuration pattern interpretation method based on the flow metaphor, which includes two tasks:
[0115] Task 1: Show the view configuration mode related to the recommendation results of the large language model and explain the model recommendation results;
[0116] Task 2: Demonstrate view configuration patterns similar to the created views to support the discovery of common view configuration patterns.
[0117] In order to make the view mode interpretation closer to the user's needs, it is necessary to retrieve the view configuration that is most relevant to the user's current needs from the database. The method proposed in this step supports two retrieval modes that can be selected by the user, corresponding to the above tasks 1 and 2 respectively:
[0118] Mode 1: Retrieval of related view configurations for recommendation results. In this mode, the last recommendation request entered by the user is used as a basis to retrieve N caption-visualization configuration pairs that are most similar to the user's request semantics from the vector database, and the visualization configurations among them are extracted as related view configurations.
[0119] Mode 2: Retrieve the configuration related to the current view creation state. In this mode, the configuration of the visualization chart that the user is currently creating is used (parsed into a track type sequence T user ) as the basis, search the vector database, and T user The N view configurations with the smallest edit distance constitute the related view configuration.
[0120] In terms of data structure, this step proposes to represent the view configuration set in the form of a directed acyclic graph, called a configuration set network. The specific definition of the configuration set network is:
[0121] Directed acyclic graph G = (V, E), node v on the graph i ∈V represents a label i, and the directed edge (v i ,v j )∈E indicates that the next tag after tag i is j. A graph G has only one source node s and one sink node t. The source node indicates the beginning of a configuration (corresponding to the <start> tag), and the sink node indicates the end of the configuration (corresponding to the <end> tag). A path from a source node to a sink node represents a visualization configuration. However, since the same tag can appear multiple times in a visualization configuration, for example, if the same track type is used continuously, multiple nodes of the same type can appear in the graph.
[0122] The configuration collection network construction process is as follows:
[0123] 1. Word segmentation: Use regular expressions to split each visualization configuration into an array of tokens. This results in a two-dimensional array where each row represents a visualization configuration and the i-th column represents the i-th token of the visualization configuration.
[0124] 2. Graph Construction:
[0125] a Create an empty directed graph and insert two nodes, 〈start〉 and 〈end〉.
[0126] b. Traverse the two-dimensional array obtained in step 1 by column. If the same type of marks appear in each column, they are regarded as the same node.
[0127] c Modify all 〈end〉 nodes and merge them into the same node.
[0128] Thus, we get a directed acyclic graph G that meets the definition. Note that in step 2.b, similar labels are merged by column, which means that graph G has the following properties:
[0129]
[0130] In the formula: v, u –––– nodes in graph G; s –––– source point of graph G; d(s, v) –––– shortest path length from node v to source point; type(v) –––– marking type of node v; P(v) –––– set of predecessor nodes of node v; start – marking type of source point of graph G.
[0131] That is, in graph G, nodes with the same shortest path to the source have different label types. However, the algorithm in this step only merges the same type of labels at the same position in each column, which actually still produces a large number of redundant graph nodes. This leads to the proposal of a configuration set network simplification method based on heuristic methods in this step.
[0132] After retrieving relevant visualization configurations and building the basic configuration set network G, there are still many redundant nodes in the network, that is, multiple identical configuration patterns cannot be merged, which interferes with the discovery of common patterns. Figure 4 As shown in A and B, the chord nodes highlighted in green are at the end of multiple visualization configurations (the next digit is "end", indicating the end of the configuration), but since the nodes are not merged, it is difficult to find this pattern from the diagram. Figure 4 A and B represent the configuration set network G before and after optimization, respectively.
[0133] The heuristic configuration proposed in this step is combined with the network simplification method to merge similar nodes as much as possible without reducing the path from the source to the sink, thereby reducing the number of nodes and edges along the way. The specific steps of the algorithm are:
[0134] 1. Graph structure cache: Use depth-first traversal to access the configuration set network G, record the depth d(v) of each node v and the node's predecessor set P(v) (nodes that have a directed edge pointing to the current node or can reach the current node through other nodes);
[0135] 2. Construct a set of candidate nodes for cross-layer merging: Breadth-first traverse the configuration set network G. For each node v, retrieve the node set U that meets the following conditions:
[0136]
[0137] In the formula: v, u --- nodes in graph G; s --- source node of graph G; d(s, v) --- shortest path length from node v to source node; type(v) --- label type of node v; P(v) --- predecessor node set of node v. The label type includes graph type (i.e. kernel graph, scatter graph, line graph, histogram, tile graph, heat map, highlight track and chord diagram), and split, start and end.
[0138] 3. Greedy node merging: merging node u∈U into node v, the merging process is to modify the end point of the incoming edge of node u to v, modify the start point of the outgoing edge of node u to v, and then delete node u;
[0139] 4. Recursive simplification: for nodes of the same depth, repeat steps 2 to 3 until all nodes of the same depth have completed the merging operation. Then, recursively simplify the nodes of the next depth.
[0140] Thus, the configuration set network merges nodes of the same type at different depths that do not form a loop in the network, optimizes the structure of the configuration set network to a simplified state, and provides a data basis for the view configuration mode interpretation visualization method in the next step.
[0141] The visualization design subject is a node-link graph composed of nodes and edges connecting nodes, which uses color, position and width as visual channels to encode configuration set network information, as follows:
[0142] 1. Color: for nodes, the color of each node represents the label type of the node, and this color scheme is extended from the Tableau 10 palette, which can better distinguish different node types in the display graph.
[0143] For edges, since edges represent the connection of two labels and have been merged, there may be multiple edges between two nodes. For the case of multiple edges, only one edge is drawn in this step. The brightness value and hue of the edge are used to represent the number of multiple edges and the type of the edge, respectively. There are three possible types of edges, which are:
[0144] A. Current user visualization configuration: among the multiple edges, any edge that is on the path of the user's current visualization configuration is colored in green.
[0145] B. Recommended visualization configuration: among the multiple edges, any edge that is on the path of the recommended visualization configuration given by the system is colored in blue.
[0146] C. Other similar visualization configuration: multiple edges that do not meet the above requirements. Use gray tone.
[0147] 2. Position: The relative position of a node indicates the order in which the nodes appear in a view configuration. If two nodes are reachable, the node on the left is at the front of the view configuration, and the node on the right is at the back of the view configuration.
[0148] 3. Width: The width of an edge represents the number of multiple edges. Since the number of multiple edges in the configuration set network formed by different visualization configuration sets may vary, this step normalizes the number of multiple edges and uses it as the width of the edge. The specific formula is:
[0149]
[0150] Where: v – a node in the graph G; n v→u ––The number of multiple edges from node v to node u; n max –The maximum number of multiple edges between any two nodes in the graph G.
[0151] Step 4: User interface and interaction design
[0152] The present invention designs user interface and interaction based on the above recommendation algorithm. Figure 5 As shown in the figure, it consists of a human-machine hybrid agent panel (A), radial layout visual editing panels (B, C), recommendation result explanation visual panel (D), and data control panel (E). The human-machine hybrid agent panel and the data control panel use tabs to switch between them to save screen space.
[0153] like Figure 5 As shown in Figure A, the human-machine hybrid agent panel implements interactive view configuration recommendations. The panel consists of a conversation reset control, a conversation bubble, and an input box. The conversation reset control button clears the conversation history and can be manually reset by the user.
[0154] The conversation bubble contains the conversation text, recommended results, related documents, and a regenerate button. The conversation text displays the user's request or the recommended explanation generated by the language model in plain text. Clicking the recommended result button previews the model's recommendations for that conversation and applies them to the current view. Furthermore, clicking the related document button displays a list of related documents retrieved by the searcher during the current conversation. Clicking a document name redirects to the corresponding document PDF file for careful browsing. Clicking the regenerate button allows users to regenerate the recommended results and explanations if they are dissatisfied with the current round of recommendations.
[0155] The input box allows users to enter recommendation requests, such as "add a track to display abnormally enriched gene fragments." Since the system backend supports the preservation of conversation context, users can also use natural language to give feedback on the previous recommendation result, such as "the view is too complicated, use a more concise structure to express the same meaning." At the same time, the input box also provides an automatic completion function similar to a code editor to improve user input efficiency. For example, the data source name and track type can be completed by entering a partial prefix. Furthermore, the input box supports templates starting with " / ". For example, users can directly send the " / recommend" command, which will be replaced by an instruction requiring the model to recommend track combinations according to the current visualization configuration; and the " / data" command will add the current dataset name and type (karyotype data or additional data) to the beginning of the user input to describe the current data.
[0156] The radial layout visual editing panel consists of a visual display area and a visual configuration area. Figure 5 As shown in Figure B, the visualization area displays the visualization you are currently creating. This area supports the drawing of bar charts, line charts, scatter plots, highlight charts, heat maps, tile charts, and chord charts, as well as the display of nuclear type charts.
[0157] To ensure the complete display of the radial layout visualization at all window ratios, the inner and outer radii of all tracks rendered within the visualization area are automatically calculated based on the outer container size. Specifically, the maximum outer diameter of the tracks that can be rendered within the visualization area is 80% of the smaller of the outer container's width and height. The ratio of this maximum outer diameter to the user-configured maximum track outer diameter constitutes the scaling factor, which is used to calculate the radius of all tracks rendered on the screen.
[0158] When hovering the mouse over a track, the system will highlight the track with a colored mask. The color of the colored mask matches the data identification color selected by the user in the data control panel. The name of the dataset will also be displayed in a floating tooltip at the top of the visualization area. When the visualization configuration area and data control panel are open, guide lines will connect the track to the corresponding data and configuration panel, helping users establish a data-track-configuration mapping relationship.
[0159] like Figure 5 As shown in C in the middle, the visual configuration area controls the insertion, editing, and deletion of tracks. It consists of the same number of foldable forms as the tracks. Except for the global control form, each of the remaining foldable forms corresponds to the relevant configuration of a track, such as color, line thickness, coordinate axis scale, transparency, etc.
[0160] The global control form is used to create a new track. Users can insert a track after selecting the track type. When creating a new track, the system will select the initial data source and configuration parameters for the track according to certain heuristic rules. The data source selection rules are as follows:
[0161] 1. If there are data sources that have been uploaded to the system but are not used in any track, one of these data sources is randomly selected as the initial default data source;
[0162] 2. If none of the above data sources exist, a data source available for the track type is randomly selected.
[0163] The rules for selecting configuration parameters are as follows:
[0164] 1. If the user has already created a track of the same type, a track of the same type is randomly selected and its configuration parameters are copied as the default configuration parameters;
[0165] 2. If the user has not created a track of the same type, a template is extracted from the system preset templates as the default configuration parameters.
[0166] The purpose of these heuristics is to provide users with default parameters that are more likely to be useful, reducing the effort required to adjust parameters. For example, when new tracks are created, users are more likely to use existing data sources. Another example is that when creating a track, users are more likely to reuse the configuration of a previously created track of the same type. If the heuristics fail to determine satisfactory values for the user, the user can also manually adjust them.
[0167] In the visualization configuration area, the attribute names, types, and ranges controlled for each track are consistent with those in Circos. In the color mapping section, two modes are available: "Map to Field" and "Static Color." The former uses color to distinguish categorical information such as chromosome type, while the latter assigns the same color to all markers in the track. The "Map to Field" feature also comes with a pre-set color scheme consistent with the UCSC Genome Browser, which can also be customized by the user.
[0168] like Figure 5As shown in FIG. 13, the recommended result explanation panel is composed of the view configuration pattern explanation view in step three based on the flow metaphor, and the main body is composed of a directed acyclic graph arranged from left to right in the form of a node-linked graph. A path from the "start" node to the "end" node represents an existing view configuration, and each node represents an identifier in the view configuration. When the user hovers the mouse over a certain node, all paths passing through the node, i.e., all view configurations containing the identifier, will be displayed in the form of highlighting, thereby showing common configuration patterns. At the same time, the result explanation panel also displays the visualization configuration being created by the user and the recommended visualization configuration of the system in the form of green and blue lines, thereby explaining the recommended result. The user can also click on the nodes on the graph to apply the corresponding configuration in the current visualization configuration.
[0169] The data control panel provides interactive control over the data required for drawing. As shown in FIG. 14, the data control panel supports data uploading and data management functions. In line with the mainstream radial layout drawing tool Circos, the data is divided into two categories: Karyotype data for marking chromosome information and gene hierarchy, and Attachment data for marking quantitative / qualitative data attached to genes. The user needs to distinguish them during data uploading. In data management, the user can view the types of data and browse the data in table form. The user can set a unique color marker for the data, thereby distinguishing the data sources used by the tracks in the visualization display area. Figure 5
[0170] As can be seen from the above, the technical solution provided by the present application can perform genomics radial layout visualization recommendation based on natural language requests, which helps to improve the practicality of the genomics visualization recommendation method. Further, the cumbersome and abstract characteristics of visualization creation through programming tools are avoided, the user-recommendation method interactivity is improved, the differentiated needs of the visualization process can be met, and the efficiency of the visualization creation of genomics is improved.
[0171] Further, on the basis of the above-mentioned beneficial effects of the preferred schemes, the following beneficial effects are also achieved: multiple types of illustrations help to better display different types of data; detailed visualization illustration schemes can ensure the display effect of multiple data; the visualization configuration generator based on the language model can enhance the recommendation effect through retrieval and improve the user-recommendation method interactivity, which helps to further improve the efficiency of visualization creation.
Claims
1. A genomics radial layout visualization recommendation method, characterized in that: The following steps are involved: Step S1: Statistically analyze the existing radial layout visualization data to obtain the statistical characteristics and data types of the tracks; Step S2: Encode the natural language request input by the user into an embedding vector through the embedding model; calculate the semantic vector of the caption-configuration pair through the embedding model; Step S3: Calculate the similarity between the embedding vector and the embedding vector of the caption-configuration pair, and select the view configuration records with the highest similarity according to a preset number; Step S4: constructing a configuration set network based on the view configuration record, and optimizing the layout of the configuration set network; Step S5: Based on the statistical characteristics and data type layout of the optimized configuration set network and track, design a user interface and interaction method, and recommend the design results to the user; In step S1, the track combination relationship includes stacking relationship and synthesis relationship: If the inner diameter of one track is equal to the outer diameter of another track, the two tracks are in a stacked relationship; If the inner and outer diameters of two tracks are equal, then the two tracks are in a composite relationship; The encoding of the natural language request input by the user into an embedding vector specifically includes: The natural language request is converted into a word sequence through word segmentation, and then the word sequence is converted into an index to form an input sequence; Take the input sequence as input, pass it through the multi-layer Transformer model in sequence and output the embedding vector; Step S4 specifically includes: Step S41: Representing the configuration set network as a directed acyclic graph ; Step S42: Optimize the configuration of the aggregate network ; Step S421: Access the configuration set network through depth-first traversal , record each node Depth and precursor collection ; Step S422: Access the configuration set network through breadth-first traversal , for each node , retrieve the node set , ; Where, 、 and Both are node collections The elements in To configure the collection network The source of For nodes To the source The shortest path length, For nodes The tag type, For nodes The set of predecessor nodes, To configure the collection network The source point marker type; Step S423: Node Merge into node , specifically: the node The end point of the incoming edge is changed to a node The end point of the incoming edge, the node The starting point of the outgoing edge is changed to a node The starting point of the outgoing edge and delete the node ; Repeat steps S422 to S423 to merge all nodes at the same depth.
2. The genomics radial layout visualization recommendation method according to claim 1, characterized in that: The data types include karyograms, scatter plots, line graphs, histograms, tile plots, heat maps, highlight tracks, and chord plots.
3. The genomics radial layout visualization recommendation method according to claim 1, characterized in that: The similarity between the embedding vector and the caption-configuration pair embedding vector is calculated as follows: ; Where, Represents the embedding vector With caption-configured embedding vector The similarity of is the dimension ordinal number, Embedding for vector Dimensions, ; Caption - Configuring Embedding Vectors With embedding vector The dimensions are equal.
4. The genomics radial layout visualization recommendation method according to claim 1, characterized in that: Step S41 specifically includes: Step S411: using a regular expression to split each view configuration record into a two-dimensional array consisting of tags; Step S412: Create an empty directed graph and insert the <start> node and the <end> node; Traverse the two-dimensional array and treat the same type of tags in the same column as the same node; Merge all the <end> nodes into the same node to obtain a configuration set network represented by a directed acyclic graph .
5. The genomics radial layout visualization recommendation method according to claim 1, characterized in that: The user interface includes a human-machine hybrid agent panel, a radial layout visual editing panel, a recommendation result explanation panel, and a data control panel; wherein the human-machine hybrid agent panel and the data control panel are switched through tabs; (1) The human-machine hybrid agent panel includes dialogue reset control, dialogue bubbles, and input boxes; The conversation reset control is used to clear the conversation history; The conversation bubble contains the conversation text, recommended results, related documents and a regenerate button; The input box is used for users to enter recommendation requests; (2) The radial layout visual editing panel includes a visual display area and a visual configuration area; The visualization display area is used to render the visualization view currently being created by the user, with a floating box at the top displaying the name of the corresponding data; The maximum outer diameter of all tracks that can be rendered is 80% of the smaller of the outer container width and the height. The ratio of the maximum outer diameter to the actual maximum track outer diameter constitutes the scaling factor used to determine the radius of all tracks. Highlight the track you are hovering over with a colored mask; The visual configuration area includes the same number of foldable sheets as tracks, which are used to control the insertion, editing, and deletion of tracks one by one. Among them, the global control sheet is used to create new tracks, and any other foldable sheets correspond to the relevant configuration of a track, including color, line thickness, coordinate axis scale and transparency. (3) The recommendation result explanation panel includes a directed acyclic graph arranged from left to right in the form of a node-link graph; (4) The data control panel is used to provide interactive control of the data required for drawing.
6. The genomics radial layout visualization recommendation method according to claim 5, characterized in that: The node-link graph consists of nodes and edges connecting the nodes; Different colors are used to represent nodes of different label types and edges of different label types; The order in which nodes appear is represented by the left and right position relationship; Through Width represents the number of multiple edges, ; Where, Representation node To Node The number of multiple edges, Indicates the maximum number of multiple edges between any two nodes.
7. The genomics radial layout visualization recommendation method according to claim 1, characterized in that: Also includes: Build a visual configuration generator based on the language model and set system prompt words and user prompt words; Build a historical conversation management module to preserve historical conversations; Build an output parsing module to parse the output of the visualization configuration generator into JSON format; Among them, the system prompt words include task introduction, background knowledge and format requirements; User prompt words include examples, requirements, and existing design; Examples include legends and visualization configurations; different examples are distinguished by consecutive line breaks, and legends exceeding the preset number are replaced by "..."; Existing design refers to the visualization configuration that has been created; "EMPTY" replaces the visualization configuration that has not been created.