A visual construction method, device, medium and terminal of an open search service
By configuring metadata and a data parsing engine, and combining Vue + Ant Design development, the problems of low scenario adaptability and low development efficiency of existing search service visualization construction solutions have been solved, achieving flexible search result display and efficient development process.
Patent Information
- Application Number
- CN202211177302.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-26
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2042-09-26
AI Technical Summary
Existing search service visualization solutions are highly dependent on search criteria and data formats, resulting in low scenario adaptability, difficulty in adjusting visualization templates, low development efficiency, and high costs.
We adopt a visual construction method for open search services, and through configuring metadata and data parsing engines, we can achieve flexible layout and data display of different search services. We use Vue + Ant Design to quickly build interactive web search service pages.
It enables refined visualization of search results, improves development efficiency, reduces manpower and time costs, and supports diverse data display and layout adjustments.
Smart Images

Figure FT_1 
Figure FT_2
Abstract
Description
Technical Field
[0001] This invention belongs to the field of visualization technology, and in particular relates to a visualization construction method, device, medium and terminal for an open search service. Background Technology
[0002] Currently, the existing visualization construction solutions provided by mainstream search services generally adopt the approach of developing matching visualization templates by analyzing search conditions and data formats. Such construction solutions are highly dependent on search conditions and data formats. Often, adjustments to the data formats require repeated adjustments to the visualization templates. Furthermore, the visualization templates developed by such highly coupled construction solutions have greater limitations in layout adaptability. Ultimately, a large amount of development will be consumed by this time-consuming and laborious mechanical work.
[0003] Based on the above analysis, the problems and shortcomings of the existing technology are as follows:
[0004] (1) Existing search service visualization construction schemes are highly dependent on search conditions and data formats. The visualization templates have poor scene adaptability and multiple visualization templates need to be developed to adapt to different scenarios.
[0005] (2) Existing search service visualization construction schemes are highly coupled with data formats, making it more difficult to adjust visualization templates.
[0006] (3) Existing search service visualization construction solutions are inefficient and costly, with a large part of the workload being mechanical labor. Summary of the Invention
[0007] To address the problems existing in the prior art, this invention provides a method, device, medium, and terminal for visually constructing open search services.
[0008] This invention is implemented as follows: a visual construction method for an open search service, comprising: configuring metadata and a data parsing engine; the configuration metadata is associated with the search service, enabling different configuration schemes for different search services; the innovative "field width" setting provides flexible layout capabilities for search results; the "whether it is long text" setting solves the conflict between keyword display and layout of large amounts of content in long text search results; the invention also provides a data parsing engine, which analyzes the configuration metadata type, value type, and data type, and then distributes the data to the corresponding parser, ultimately obtaining an interactive web search service page.
[0009] Furthermore, the visualization construction method for the open search service includes the following steps:
[0010] Step 1: Acquire configuration metadata of the search service to be displayed, and convert the configuration metadata of the search service into display field metadata, where the display field metadata includes: field ID, field code, field name, field display name, field value type, arrangement mode, whether to wrap line afterwards, desensitization type, whether it is a hyperlink, whether it is a long text, and whether it is a thumbnail;
[0011] Step 2: Construct search service metadata based on all display field metadata in the search service page to be displayed, then transmit the constructed search service metadata into a layout engine, and the layout engine calculates the position and size of the display field by using data such as "field width", "field height" and "whether to wrap line" in the configuration metadata, in combination with information such as the display line height in the search service, whether a thumbnail is included, and whether a sidebar is contained;
[0012] Further, the layout engine will infer whether the search service has an expand and collapse function.
[0013] Step 3: A data parsing engine extracts display field metadata from different search service metadata according to the type of the service, and distributes the metadata to a corresponding type parser for processing according to the type of the display field;
[0014] Step 4: Process the metadata by using a value type parser; and perform data processing by using a data type parser; to obtain an interactive web search service page.
[0015] Further, the step of distributing the metadata to the corresponding type parser for processing according to the type of the display field comprises:
[0016] A logical type parser converts the data into Chinese "Yes" and "No";
[0017] A geographic location type parser has a good data format fault tolerance mechanism, supports data in string, array and JSON formats at the same time, and finally uniformly converts the data into the same Chinese geographic location format;
[0018] A nested document type parser deeply analyzes data in JSON format according to the definition of the context, and at the same time, the nested document type parser calls the data parsing engine again internally, and then displays the data in a table manner.
[0019] Further, the step of processing the metadata by using the value type parser comprises:
[0020] In addition to supporting the parsing of basic timestamps and common string template data formats, the time type parser also provides powerful custom format parsing. This custom format parser reverse-processes the data by analyzing the time format, extracts all the time data, and then unifies the format to the output format set in the configuration metadata.
[0021] The unit type parser determines whether the configuration metadata has a unit set. If the configuration metadata has a unit set, the data is added with the set unit.
[0022] The percentage type parser determines whether the data is in percentage format; data that is not in percentage format will be converted to percentage.
[0023] Furthermore, the data processing using the data type parser includes:
[0024] 1) Display array-type data as a group of labels;
[0025] 2) Process text data differently based on the definition of "content" in the metadata of the display field;
[0026] 2.1) If it is a hyperlink, it will be displayed as a hyperlink text that can be clicked to open a new page;
[0027] 2.2) If it is a long text, the layout will be done using the long text algorithm, and it will be displayed as a short text with ellipses. Clicking on the ellipses will open a pop-up window to view the full text.
[0028] 2.3) If keywords are included, the keywords will be highlighted in red.
[0029] Another object of the present invention is to provide a computer device including a memory and a processor, the memory storing a computer program, which, when executed by the processor, causes the processor to perform the steps of the visualization construction method for the open search service.
[0030] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the visualization construction method for the open search service.
[0031] Another object of the present invention is to provide an information data processing terminal, which is used to execute the steps of the visualization construction method of the open search service.
[0032] Based on the above technical solutions and the technical problems solved, please analyze the advantages and positive effects of the technical solution to be protected by this invention from the following aspects:
[0033] First, addressing the technical problems existing in the prior art and the difficulty in solving them, this paper closely analyzes, in conjunction with the technical solution to be protected by this invention and the results and data obtained during the research and development process, how the technical solution of this invention solves the technical problems, and the inventive technical effects brought about by solving these problems. The specific description is as follows:
[0034] This invention provides a visual construction method for open search services, which can realize the datafication and componentization of search result display fields, construct the interface of the search service based on given JSON data, and also support setting title fields, modifying field display names, and setting desensitization rules.
[0035] This invention was primarily developed using Vue + Ant Design, which can quickly convert the configuration metadata of a search service into an interactive web search service page.
[0036] Second, considering the technical solution as a whole or from a product perspective, the technical effects and advantages of the technical solution to be protected by this invention are specifically described as follows:
[0037] This invention enables more refined visualization construction, promotes more efficient and comprehensive display of search results, and saves time and costs in developing display templates. At the same time, the data parsing engine makes data source import faster, saving significant time and development costs associated with data format conversion during the import process.
[0038] Third, as supplementary evidence of the inventive step of the claims of this invention, it is also reflected in the following important aspects:
[0039] The expected benefits and commercial value of the technical solution of this invention after transformation are as follows:
[0040] Given the current market situation, this invention is applicable to various projects that dynamically display search results.
[0041] In search services, the diversification of search result data types, the difficulty in unifying data structures, and the pluralistic nature of data display all contribute to the increasing time, manpower, and development costs associated with highly coupled visual templates. This invention, developed using Vue + Ant Design, cleverly transforms data characteristics and display layouts into configuration metadata, resolving the high coupling between data and templates and enabling easy configuration for use in multiple locations.
[0042] Compared to visual templates, users only need to configure metadata to get an interactive web search service page, which greatly reduces manpower and development costs. Attached Figure Description
[0043] Figure 1 This is a schematic diagram of the principle of the visualization construction method for the open search service provided in the embodiments of the present invention;
[0044] Figure 2 This is a flowchart of the visualization construction method for the open search service provided in this embodiment of the invention. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0046] I. Explanatory and Illustrative Embodiments. To enable those skilled in the art to fully understand how the present invention is specifically implemented, this section provides an explanatory and illustrative description of the embodiments described in the claims.
[0047] The visual construction method for open search services provided in this invention mainly utilizes Vue + Ant Design for development. It can quickly convert the configuration metadata of search services into interactive web search service pages. Its working principle flowchart is as follows: Figure 1 As shown.
[0048] like Figure 2 As shown, the visualization construction method for open search services provided in this embodiment of the invention includes the following steps:
[0049] S101, Obtain the configuration metadata of the search service to be displayed, and convert the configuration metadata of the search service into the original data of the display fields;
[0050] S102, Construct search service metadata based on the metadata of all display fields within the search service page to be displayed;
[0051] S103, the data parsing engine will extract display field metadata from different search service metadata according to the type of service, and distribute the metadata to the corresponding type parser for processing according to the type of display field;
[0052] S104: Use the value type parser to process metadata; and use the data type parser to process data; to obtain an interactive web search service page.
[0053] The display field is an important component of visual construction: each display field has its corresponding metadata (in JSON format), which covers all attributes required for rendering the display field (field ID, field code, field name, field display name, field value type, arrangement mode, whether to wrap a line afterwards, desensitization type, whether it is a hyperlink, whether it is a long text, and whether it is a thumbnail).
[0054] The search service metadata is a collection of all display field metadata in the search service page that needs to be displayed, which is structured data that can be persisted and stored in a database; and how data is converted into the required search service page relates to a data parsing engine:
[0055] From the configured search service metadata, the data parsing engine extracts display field metadata from different metadata according to the type of the service, and then distributes the metadata to the respective corresponding type parsers according to the type of the display field.
[0056] The type parsers provided in the embodiments of the present invention include:
[0057] The logical type parser converts data into Chinese "Yes" and "No";
[0058] The geographic location type parser analyzes data in string, array and JSON formats, and uniformly converts them into the same Chinese geographic location format;
[0059] The nested document type parser deeply analyzes data in JSON format according to the definition of the context, and finally displays the data in a table manner.
[0060] The value type parsers provided in the embodiments of the present invention include:
[0061] The time type parser supports common numeric and character template notations, and a custom format analyzer is additionally added therein, which supports extracting the required time value from a custom complex format;
[0062] The unit type parser adds a unit to data;
[0063] The percentage type parser determines whether the data carries a percent sign, and adds the percent sign if it does not.
[0064] The data processing performed by the data type parsers provided in the embodiments of the present invention includes:
[0065] Data of the array type is displayed as tags;
[0066] Data of the text type is processed differently in combination with the definition of content in the display field metadata:
[0067] ① If it is a hyperlink, it will be displayed as a hyperlink text that can be clicked to open a new page;
[0068] ② If it is a long text, it will be formatted and laid out using a long text algorithm, and finally displayed as a simplified text containing ellipses. Clicking on the ellipses will open a pop-up window to view the full text.
[0069] ③ If it contains keywords, the keywords will be highlighted in red.
[0070] II. Application Examples. To demonstrate the inventiveness and technical value of the technical solution of this invention, this section provides application examples of the technical solution of the claims on specific products or related technologies.
[0071] The long text algorithm provided in this embodiment of the invention differs from the ordinary ellipsis algorithm. The long text algorithm will prioritize whether the data contains keywords. If it does, other text will be abbreviated with the current keyword as the center. In this way, it is guaranteed that at least one keyword will be displayed in the long text data containing keywords.
[0072] The time type parser in this invention solves the time parsing problem caused by the large number of time formats supported by Elasticsearch. The time analyzer in the parser receives the format used by Elasticsearch when creating the Mapping and extracts all the time information in the data in reverse. In this way, no matter how many time formats Elasticsearch supports, this parser can be used to extract them once and for all.
[0073] The visualization construction method of open search service provided in this embodiment of the invention is applied to a computer device, the computer device including a memory and a processor, the memory storing a computer program, and when the computer program is executed by the processor, the processor performs the steps of the visualization construction method of open search service.
[0074] The visualization construction method for open search services provided in this embodiment of the invention is applied to a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor performs the steps of the visualization construction method for open search services.
[0075] The visualization construction method of the open search service provided in this embodiment of the invention is applied to an information data processing terminal, which is used to execute the steps of the visualization construction method of the open search service.
[0076] It should be noted that embodiments of the present invention can be implemented in hardware, software, or a combination of both. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by a suitable instruction execution system, such as a microprocessor or dedicated-design hardware. Those skilled in the art will understand that the above-described devices and methods can be implemented using computer-executable instructions and / or included in processor control code, for example, such code provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuitry such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field-programmable gate arrays, programmable logic devices, etc., or by software executed by various types of processors, or by a combination of the above-described hardware circuitry and software, such as firmware.
[0077] III. Evidence of the Relevant Effects of the Embodiments. The embodiments of the present invention have achieved some positive effects during research and development or use, and indeed possess significant advantages compared to existing technologies. The following description, in conjunction with data, charts, and other materials from the experimental process, illustrates these advantages.
[0078] Taking policy content with an average length of 25,000 characters as an example, a query using the keyword "policy" retrieved 10 data entries. The time from receiving the data to the page layout being completed was 146ms. Then, the policy content was set to long text, and the same query was performed. The time from receiving the data to the page layout being completed was 172ms. It was found that the long text algorithm took a total of 26ms, which has a negligible impact on the page display.
[0079] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention, and within the spirit and principles of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A visual construction method for an open search service, characterized in that, The visualization construction method of the open search service includes: preprocessing the configuration metadata of the search service, and combining the data parsing engine with different type parsers, value type parsers, and data type parsers to analyze and display the data, thereby obtaining an interactive web search service page; The visualization construction method for the open search service includes the following steps: Step 1: Obtain the configuration metadata of the search service to be displayed, and convert the configuration metadata of the search service into display field metadata; the display field metadata includes: field id, field code, field name, field display name, field value type, arrangement method, whether to add a newline after, anonymization type, whether to use a hyperlink, whether to use long text, and whether to use a thumbnail. Step 2: Construct search service metadata based on the metadata of all display fields within the search service page to be displayed; the search service metadata is a collection of metadata of all display fields within the search service page to be displayed. Step three: The data parsing engine extracts display field metadata from different search service metadata based on the service type, and distributes the metadata to the corresponding type parser for processing according to the type of the display field; the process of distributing metadata to the corresponding type parser for processing according to the type of the display field includes: The logical type parser converts the data into Chinese "yes" or "no". The geolocation parser analyzes string, array, and JSON data and converts them into a unified Chinese geolocation format. The nested document type parser performs in-depth analysis of JSON data based on the context definition and displays the data in a tabular format. Step four: Process metadata using a value type parser; process data using a data type parser; and obtain an interactive web search service page. The metadata processing using the value type resolver includes: The time type parser represents numbers and character templates; the custom format parser extracts the desired time value from a custom, complex format. The unit type parser adds units to the data; the percentage type parser checks whether the data contains a percentage sign, and adds a percentage sign if it does not. The data processing using a data type parser includes: Display array-type data as labels; The text type data is processed differently based on the definition of "content" in the combined display field metadata. If it is a hyperlink, it will be displayed as a hyperlink text that can be clicked to open a new page; If it is a long text, it will be formatted and laid out using a long text algorithm, and displayed as a simplified text containing ellipses. Clicking on the ellipses will open a pop-up window to view the full text. If keywords are included, they will be highlighted in red.
2. A computer device, characterized in that, The computer device includes a memory and a processor. The memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of the visualization construction method for the open search service as described in claim 1.
3. A computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the steps of the visualization construction method for an open search service as described in claim 1.
4. An information data processing terminal, characterized in that, The information data processing terminal is used to execute the steps of the visualization construction method for the open search service as described in claim 1.
Citation Information
Patent Citations
A method and system for web page design
CN109343848A
