A chart display development method and apparatus
By configuring a data configuration table on the server and performing data structure conversion on the client, the problem of redundant development caused by inconsistencies between chart styles and data structures is solved, achieving high versatility and efficiency in chart development.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BAIRONG ZHIXIN (BEIJING) TECH CO LTD
- Filing Date
- 2023-03-27
- Publication Date
- 2026-04-21
AI Technical Summary
In existing technologies, chart styles are diverse and data structures are inconsistent, which means that the front-end display interface needs to be redeveloped every time a different data chart is used as the data source, resulting in low versatility.
The server pre-configures a data configuration table, including multiple data fields, data sources, and query interfaces. The client obtains the target preset data configuration table and develops and displays charts based on the specified query interface, thus achieving unified data structure conversion and unified development of the front-end display interface.
It achieves unified adaptation of data with different data structures on the front-end display interface, improves the versatility of chart development, avoids developing a separate front-end display interface for each data structure, and improves development efficiency.
Smart Images

Figure CN116737841B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of big data technology, and in particular to a method and apparatus for developing display charts. Background Technology
[0002] With the continuous development of technology, the application of big data analysis is becoming more and more widespread. Various industries have begun to use data charts to present data in order to display the data more intuitively, such as bar charts, pie charts, etc.
[0003] However, currently, due to the variety of chart styles and the inconsistent data structures under each data chart, when using data charts as the data source to query and display chart data on the front end, the corresponding chart display interface can only be developed on the front end based on the data structure in the back end data chart. Once a different data chart is used as the data source to query and display chart data on the front end, the corresponding front end display interface needs to be redeveloped, thus resulting in low versatility. Summary of the Invention
[0004] In view of the above problems, the present invention provides a method and apparatus for developing display charts, the main purpose of which is to improve the versatility of display charts.
[0005] To solve the above-mentioned technical problems, the present invention proposes the following solution:
[0006] In a first aspect, the present invention provides a method for developing a display chart, applied to a client-side application, the method comprising:
[0007] Obtain the target preset data configuration table, which includes multiple data fields, a data source corresponding to each data field, a query interface corresponding to each data field, and the target data structure to be converted from the data field in the query interface;
[0008] In the target preset data configuration table, determine the specified data field and the specified query interface corresponding to the specified data field;
[0009] Develop a specified display chart corresponding to the specified data field based on the target data structure in the specified query interface.
[0010] Secondly, this invention provides a method for developing chart display applications, applied to a server-side application, the method comprising:
[0011] Identify multiple business requirements;
[0012] Establish preset data configuration tables corresponding to the various business requirements;
[0013] In each of the preset data configuration tables, multiple data fields matching the corresponding business requirements are configured, along with the data source corresponding to each data field, the query interface corresponding to each data field, and the target data structure to be converted for each data field included in the query interface.
[0014] Thirdly, the present invention provides a chart display development apparatus for use on a client-side application, the apparatus comprising:
[0015] The configuration table acquisition unit is used to acquire a target preset data configuration table, which includes multiple data fields, a data source corresponding to each data field, a query interface corresponding to each data field, and the target data structure to be converted into the data field in the query interface.
[0016] The interface query unit is used to determine a specified data field and the specified query interface corresponding to the specified data field in the target preset data configuration table obtained by the configuration table acquisition unit.
[0017] The chart development unit is used to develop a specified display chart corresponding to the specified data field based on the target data structure in the specified query interface queried by the interface query unit.
[0018] Fourthly, the present invention provides a chart display development device for use on a server, the device comprising:
[0019] The requirement determination unit is used to determine various business requirements.
[0020] The configuration table creation unit is used to create preset data configuration tables corresponding to the various business requirements determined by the requirement determination unit.
[0021] The data configuration unit is used to configure, in each of the preset data configuration tables configured by the configuration table creation unit, multiple data fields that match the corresponding business requirements, the data source corresponding to each data field, the query interface corresponding to each data field, and the target data structure to be converted for the data fields included in each query interface.
[0022] To achieve the above objectives, according to a fifth aspect of the present invention, a storage medium is provided, the storage medium including a stored program, wherein, when the program is executed, the device where the storage medium is located is controlled to execute the display chart development method of the first aspect applied to a client or the display chart development method of the second aspect applied to a server.
[0023] To achieve the above objectives, according to a sixth aspect of the present invention, a processor is provided, the processor being configured to run a program, wherein the program, when running, executes the display chart development method of the first aspect applied to a client or the display chart development method of the second aspect applied to a server.
[0024] By employing the above technical solution, the present invention provides a method and apparatus for developing display charts. This method allows for the pre-configuration of a data configuration table on the server side, including multiple data fields, a data source corresponding to each data field, a query interface corresponding to each data field, and the target data structure to which the data field is to be converted. The client can then obtain the target pre-configured data configuration table, query the specified data field and its corresponding query interface within the table, and develop a specified display chart based on the target data structure in the query interface. Thus, regardless of the data structure of the specified data field and its corresponding data in the server-side data source, the server converts the data according to the target data structure, ensuring compatibility with the client-side front-end display charts developed according to the target data structure. In other words, the server can convert data of various data structures into a single data structure, and the client can then develop display charts according to this structure. This enables the display of data of various data structures on the server side using a unified front-end display interface, eliminating the need to develop a separate front-end display interface for each data structure, resulting in high versatility.
[0025] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0026] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0027] Figure 1 A flowchart illustrating a client-side chart display development method provided by an embodiment of the present invention is shown.
[0028] Figure 2 A flowchart illustrating a method for developing display charts applied to a server, according to an embodiment of the present invention, is shown.
[0029] Figure 3This diagram illustrates a block diagram of a display chart development device for a client application, provided by an embodiment of the present invention.
[0030] Figure 4 This invention provides a block diagram of another display chart development device applied to a client, according to an embodiment of the present invention.
[0031] Figure 5 This diagram illustrates a block diagram of a display chart development device applied to a server, as provided in an embodiment of the present invention.
[0032] Figure 6 This invention provides a block diagram of another display chart development device applied to a server, according to an embodiment of the present invention. Detailed Implementation
[0033] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0034] With the continuous development of technology, the application of big data analysis is becoming increasingly widespread. Various industries are starting to use data charts to present data more intuitively, such as bar charts and pie charts. However, currently, due to the diverse chart styles and inconsistent data structures under each data chart, when using data charts as a data source for front-end data querying and display, a corresponding chart display interface must be developed on the front-end based on the data structure of the back-end data chart. If a different data chart is used as the data source for front-end data querying and display, a new front-end display interface needs to be developed, resulting in low versatility. Therefore, this invention provides a chart display development method that can improve the versatility of chart display. First, the chart display development method applied to the client-side is described, and its specific execution steps are as follows: Figure 1 As shown, it includes:
[0035] 101. Obtain the target preset data configuration table.
[0036] In this invention, multiple preset data configuration tables are pre-configured in the backend. Each preset data configuration table corresponds to a business requirement. Each preset data configuration table is pre-configured with multiple data fields that match the corresponding business requirement, a data source corresponding to each data field, and a query interface corresponding to each data field. The query interface includes the target data structure to be converted from the data field.
[0037] Therefore, when it is necessary to call data from certain data sources and generate the corresponding front-end display interface, you can first determine the specified query conditions according to your own specific business requirements, and then query the target preset data configuration table that matches the specified business requirements in multiple preset data configuration tables of the specified database according to the specified query conditions.
[0038] 102. In the target preset data configuration table, determine the specified data field and the specified query interface corresponding to the specified data field.
[0039] 103. Develop a specified display chart for a specified data field based on the target data structure in the specified query interface.
[0040] Regarding steps 102-103, after determining the target preset data configuration table, since the specified data to be called corresponds to the specified business requirement, and the target preset data configuration table also corresponds to the specified business requirement, the specified data is also included in the target preset data configuration table. Therefore, the specified data field to be called can be found in multiple data fields of the target data configuration table. Further, the query interface and data source corresponding to the specified data field can be found. Since the specified query interface includes the target data structure to which the data field is to be converted, the target data parameters in the target data structure can be obtained. The target data parameters include the data field and the target data type to which the data field is to be converted, the target default value, and the number of decimal places to retain after the target data conversion. Then, the front-end display interface corresponding to the specified data field can be developed based on the target data parameters in the target data structure.
[0041] Alternatively, the client can send a query request for a specified data field to the server. Upon receiving this request, the server can query the specified data field and its corresponding data. The server then transforms the specified data field and its corresponding data according to the target data parameters in the target data structure, obtaining the target data field and target data. This target data field and target data are then returned to the client. The client, upon receiving this data, can then populate the target data field and its corresponding target data into a specified display chart developed according to the target data parameters in the target data structure. In this way, any data structure can be transformed according to the target data structure, and the front-end display interface is also developed according to the target data structure. Therefore, a front-end display interface capable of displaying data from different back-end data sources is achieved.
[0042] Based on the above Figure 1As can be seen from the implementation method, the chart development method provided by this invention, applied to the client, can pre-configure a data configuration table, which includes multiple data fields, a data source corresponding to each data field, a query interface corresponding to each data field, and the target data structure to be converted for each data field. Then, the target preset data configuration table can be obtained. Next, the specified data field and its corresponding specified query interface are queried from the target preset data configuration table. Then, the specified display chart corresponding to the specified data field is developed based on the target data structure in the specified query interface. The data chart developed in this way matches the target data structure. Therefore, regardless of the specified data field and its corresponding data structure in the data source, the data is converted according to the target data structure, and it can adapt to the front-end display chart developed according to the target data structure. In other words, data from various back-end data structures can be converted to a single data structure, and then the front-end can be developed to display charts according to this data structure. This achieves the use of a unified front-end display interface for various back-end data structures, eliminating the need to develop a separate front-end display interface for each data structure, thus achieving high versatility.
[0043] Furthermore, this embodiment of the invention also provides a method for developing display charts applied to the server side, and... Figure 1 The proposed client-side chart development method is based on interactive relationships, such as... Figure 2 As shown, the specific steps are as follows:
[0044] 201. Establish preset data configuration tables corresponding to various business requirements.
[0045] 202. Configure multiple data fields that match the corresponding business requirements, the data source corresponding to each data field, the query interface corresponding to each data field, and the target data structure to be converted for each data field included in the query interface in each preset data configuration table.
[0046] In the server of this invention, multiple business requirements can be predetermined, and then a corresponding preset data configuration table can be configured for each business requirement. In each preset data configuration table, multiple data fields matching the corresponding business requirements are configured, including the data source corresponding to each data field, the query interface corresponding to each data field, and the target data structure to be converted for the data fields included in each query interface.
[0047] Subsequently, since the client will call the specified data on the server, the server can detect at any time whether there is a data query request sent by the client for the specified data field. Any data field in the target preset data configuration table can be the specified data field. If it exists, the data query request can be parsed to obtain the specified query interface corresponding to the specified data field in the data query request, the target data structure to be converted from the specified data field in the specified query interface, and the target data structure including the target data parameters and the specified data source corresponding to the specified data field.
[0048] After parsing, the specified data field and its corresponding data can be retrieved from the specified data source based on the specified query interface. Specifically, during the query, the query period for the specified data field and its corresponding data can be determined first. Then, the minimum dimension for the query can be determined according to the query period. Multi-threading can be used to query the specified data field and its corresponding data according to the minimum dimension. For example, if the query period for the specified data field and its corresponding data is one year, multiple threads can be used to query the specified data by the minimum dimension of months. In this way, multiple threads work simultaneously, and each thread queries the data of the minimum dimension, thus improving the query speed.
[0049] After retrieving the specified data field and its corresponding specified data, the specified data field and its corresponding specified data can be transformed according to the target data parameters in the parsed target data structure to obtain the target data field and its corresponding target data. Then, the target data field and the target data are returned to the client.
[0050] Based on the above Figure 2As can be seen from the implementation, the chart development method provided by this invention, applied to the server side, can pre-establish multiple preset data configuration tables based on multiple business requirements. Each preset data configuration table is configured with multiple data fields matching the corresponding business requirement, a data source corresponding to each data field, a query interface corresponding to each data field, and the target data structure to which the data fields included in each query interface are to be converted. Thus, when a client makes a data query request for specific data in a preset data configuration table, the server can query the specified data field and its corresponding data in the data source corresponding to the specified data field according to the query interface. Then, it converts the specified data field and the specified data according to the target data parameters in the target data structure to obtain the target data field and target data, and then returns the target data field and target data to the client. In this way, each type of data on the server side can be converted according to the target data structure, and the client develops a display interface according to the target data structure. This enables the front-end chart to adapt to multiple data structures on the back-end, and the back-end can utilize multi-threading to query data according to the minimum query dimension when querying specified data. Therefore, based on chart adaptation, the data query and return speed can be improved.
[0051] Furthermore, as a response to the above Figure 1 In addition to the implementation of the method shown, this embodiment of the invention also provides a display chart development device applied to a client, used for the above-described method. Figure 1 The method shown is implemented accordingly. This device embodiment corresponds to the foregoing method embodiment. For ease of reading, this device embodiment will not repeat the details of the foregoing method embodiment, but it should be clear that the device in this embodiment can implement all the contents of the foregoing method embodiment. Figure 3 As shown, the device includes:
[0052] The configuration table acquisition unit 301 is used to acquire a target preset data configuration table, wherein the preset data configuration table includes multiple data fields, a data source corresponding to each data field, a query interface corresponding to each data field, and the query interface includes the target data structure to be converted from the data field.
[0053] The interface query unit 302 is used to determine a specified data field and a specified query interface corresponding to the specified data field in the target preset data configuration table obtained by the configuration table acquisition unit 301.
[0054] The chart development unit 303 is used to develop a specified display chart corresponding to the specified data field based on the target data structure in the specified query interface queried by the interface query unit 302.
[0055] Furthermore, as a response to the above Figure 1 In addition to the detailed implementation of the method shown, this embodiment of the invention also provides another display chart development device applied to the client, used for the above-described method. Figure 1 The method shown is implemented accordingly. This device embodiment corresponds to the foregoing method embodiment. For ease of reading, this device embodiment will not repeat the details of the foregoing method embodiment, but it should be clear that the device in this embodiment can implement all the contents of the foregoing method embodiment. Figure 4 As shown, the device includes:
[0056] The configuration table acquisition unit 301 is used to acquire a target preset data configuration table, wherein the preset data configuration table includes multiple data fields, a data source corresponding to each data field, a query interface corresponding to each data field, and the query interface includes the target data structure to be converted from the data field.
[0057] The interface query unit 302 is used to determine a specified data field and a specified query interface corresponding to the specified data field in the target preset data configuration table obtained by the configuration table acquisition unit 301.
[0058] The chart development unit 303 is used to develop a specified display chart corresponding to the specified data field based on the target data structure in the specified query interface queried by the interface query unit 302.
[0059] In one optional implementation, the configuration table acquisition unit 301 includes:
[0060] The condition determination module 3011 is used to determine the specified query conditions based on the specified business requirements;
[0061] The configuration table query module 3012 is used to query the target preset data configuration table in multiple preset data configuration tables in a specified database based on the specified query conditions determined by the condition determination module 3011.
[0062] In an optional implementation, after the chart development unit 303 develops the specified display chart corresponding to the specified data field based on the target data structure in the specified query interface, the device further includes a data filling unit 304, the data filling unit 304 comprising:
[0063] The request sending module 3041 is used to send a data query request corresponding to the specified data field to the server, so that the server can query the specified data field and the corresponding specified data based on the data query request, and return the specified data field and the target data field and target data corresponding to the specified data.
[0064] The data filling module 3042 is used to fill the target data field returned by the request sending module 3041 and the target data into the specified display chart.
[0065] In one optional implementation, the chart development unit 303 includes:
[0066] Parameter acquisition module 3031 is used to acquire target data parameters in the target data structure;
[0067] The chart development module 3032 is used to develop a corresponding specified display chart according to the target data parameters obtained by the parameter acquisition module 3031.
[0068] Furthermore, as a response to the above Figure 2 In addition to the implementation of the method shown, this embodiment of the invention also provides a display chart development device applied to the server, used for the above-described method. Figure 2 The method shown is implemented accordingly. This device embodiment corresponds to the foregoing method embodiment. For ease of reading, this device embodiment will not repeat the details of the foregoing method embodiment, but it should be clear that the device in this embodiment can implement all the contents of the foregoing method embodiment. Figure 5 As shown, the device includes:
[0069] The requirement determination unit 401 is used to determine various business requirements;
[0070] The configuration table creation unit 402 is used to create preset data configuration tables corresponding to the various business requirements determined by the requirement determination unit 401.
[0071] The data configuration unit 403 is used to configure multiple data fields that match the corresponding business requirements, the data source corresponding to each data field, the query interface corresponding to each data field, and the target data structure to be converted for each data field included in the query interface in each of the preset data configuration tables configured by the configuration table creation unit 402.
[0072] Furthermore, as a response to the above Figure 2 In addition to the detailed implementation of the method shown, this embodiment of the invention also provides another display chart development device applied to the server, used for the above-described method. Figure 2 The method shown is implemented in detail. This device embodiment corresponds to the foregoing method embodiment. For ease of reading, this device embodiment will not repeat the details of the foregoing method embodiment, but it should be clear that the device in this embodiment can implement all the contents of the foregoing method embodiment. Figure 6 As shown, the device includes:
[0073] The requirement determination unit 401 is used to determine various business requirements;
[0074] The configuration table creation unit 402 is used to create preset data configuration tables corresponding to the various business requirements determined by the requirement determination unit 401.
[0075] The data configuration unit 403 is used to configure multiple data fields that match the corresponding business requirements, the data source corresponding to each data field, the query interface corresponding to each data field, and the target data structure to be converted for each data field included in the query interface in each of the preset data configuration tables configured by the configuration table creation unit 402.
[0076] In an optional embodiment, the device further includes a data query unit 404, the data query unit 404 comprising:
[0077] The request detection module 4041 is used to detect whether there is a data query request sent by the client for a specified data field;
[0078] The request parsing module 4042 is used to receive the data query request if the request detection module 4041 detects its existence, and to parse the data query request to obtain the specified query interface corresponding to the specified data field in the data query request, the target data structure to be converted to the specified data field in the specified query interface, and the specified data source corresponding to the specified data field.
[0079] The data query module 4043 is used to query a specified data field and the corresponding specified data in the specified data source parsed by the request parsing module 4042 based on the specified query interface parsed by the request parsing module 4042.
[0080] The data conversion module 4044 is used to convert the specified data field and the corresponding specified data queried by the data query module 4043 according to the target data parameters in the target data structure, so as to obtain the target data field and the corresponding target data.
[0081] The data return module 4045 is used to return the target data field and the target data obtained by the data conversion module 4044 to the client.
[0082] In one optional implementation, the data query module 4043 is specifically used for:
[0083] Determine the query period when querying the specified data corresponding to the specified data field;
[0084] The minimum query dimension is determined based on the query period.
[0085] Based on the minimum query dimension, use multi-threading to query the specified data field and the specified data within the query period.
[0086] Furthermore, embodiments of the present invention also provide a storage medium for storing a computer program, wherein the computer program, when running, controls the device where the storage medium is located to execute the above-described... Figure 1 The method for developing display charts applied to the client as described in the article or Figure 2 The method for developing display charts applied to the server side, as described in the article.
[0087] Furthermore, embodiments of the present invention also provide a processor for running a program, wherein the program executes the above-described... Figure 1 The method for developing display charts applied to the client as described in the article or Figure 2 The method for developing display charts applied to the server side, as described in the article.
[0088] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0089] It is understood that the relevant features in the above methods and apparatus can be referenced interchangeably. Furthermore, the terms "first," "second," etc., in the above embodiments are used to distinguish between embodiments and do not represent the superiority or inferiority of any particular embodiment.
[0090] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0091] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the invention.
[0092] In addition, the memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0093] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0094] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0095] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0096] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0097] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0098] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0099] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0100] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0101] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0102] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for developing display charts, characterized in that, Applied to a client, the method includes: Obtain the target preset data configuration table, which includes multiple data fields, a data source corresponding to each data field, a query interface corresponding to each data field, and the target data structure to be converted from the data field in the query interface; In the target preset data configuration table, determine the specified data field and the specified query interface corresponding to the specified data field; Develop a specified display chart corresponding to the specified data field based on the target data structure in the specified query interface; After developing the specified display chart corresponding to the specified data field based on the target data structure in the specified query interface, the method further includes: Send a data query request corresponding to the specified data field to the server so that the server can query the specified data field and the corresponding specified data based on the data query request, and return the specified data field and the target data field and target data corresponding to the specified data. The specified data is queried using multi-threading according to the minimum dimension of the query, and the minimum dimension of the query is determined according to the query period when querying the specified data corresponding to the specified data field. The target data field and the target data are populated into the specified display chart.
2. The method according to claim 1, characterized in that, Obtain the target preset data configuration table, including: Based on the specified business requirements, determine the specified query conditions; Based on the specified query conditions, the target preset data configuration table is queried from multiple preset data configuration tables in the specified database.
3. The method according to claim 1, characterized in that, Develop a specified display chart corresponding to the specified data field based on the target data structure in the specified query interface, including: Obtain the target data parameters from the target data structure; Develop a corresponding display chart based on the target data parameters.
4. A method for developing display charts, characterized in that, Applied to the server side, the method includes: Identify multiple business requirements; Establish preset data configuration tables corresponding to the various business requirements; In each of the preset data configuration tables, multiple data fields matching the corresponding business requirements are configured, along with the data source corresponding to each data field, the query interface corresponding to each data field, and the target data structure to be converted for the data fields included in each query interface. Upon receiving a data query request from a client for a specified data field, the system retrieves a target preset data configuration table, determines the specified data field and the corresponding specified query interface within the target preset data configuration table, determines the minimum dimension of the query based on the query period when querying the specified data corresponding to the specified data field, and uses multiple threads to query the specified data field and the corresponding specified data according to the minimum dimension of the query, and returns the specified data field, the target data field, and the target data corresponding to the specified data.
5. The method according to claim 4, characterized in that, The method further includes: Detect whether there is a data query request sent by a client for a specified data field; If it exists, the data query request is received and parsed to obtain the specified query interface corresponding to the specified data field in the data query request, the target data structure to be converted to the specified data field in the specified query interface, and the specified data source corresponding to the specified data field. Based on the specified query interface, the specified data field and the corresponding specified data are queried in the specified data source. The specified data field and the corresponding specified data are transformed according to the target data parameters in the target data structure to obtain the target data field and the corresponding target data. The target data field and the target data are returned to the client.
6. The method according to claim 5, characterized in that, When a specified data field and its corresponding specified data are retrieved, including: Determine the query period when querying the specified data corresponding to the specified data field; The minimum query dimension is determined based on the query period. Based on the minimum query dimension, use multi-threading to query the specified data field and the specified data within the query period.
7. A chart display development device, characterized in that, Applied to a client, the device includes: The configuration table acquisition unit is used to acquire a target preset data configuration table, which includes multiple data fields, a data source corresponding to each data field, a query interface corresponding to each data field, and the target data structure to be converted into the data field in the query interface. The interface query unit is used to determine a specified data field and the specified query interface corresponding to the specified data field in the target preset data configuration table obtained by the configuration table acquisition unit. The chart development unit is used to develop a specified display chart corresponding to the specified data field based on the target data structure in the specified query interface queried by the interface query unit; After the chart development unit develops the specified display chart corresponding to the specified data field based on the target data structure in the specified query interface, the device further includes a data filling unit, which includes: The request sending module is used to send a data query request corresponding to the specified data field to the server, so that the server can query the specified data field and the corresponding specified data based on the data query request, and return the specified data field and the target data field and target data corresponding to the specified data. The specified data is queried using multi-threading according to the minimum dimension of the query, and the minimum dimension of the query is determined according to the query period when querying the specified data corresponding to the specified data field. The data filling module is used to fill the target data field returned by the request sending module and the target data into the specified display chart.
8. A chart display development device, characterized in that, Applied to the server side, the device includes: The requirement determination unit is used to determine various business requirements. The configuration table creation unit is used to create preset data configuration tables corresponding to the various business requirements determined by the requirement determination unit. The data configuration unit is used to configure multiple data fields that match the corresponding business requirements, the data source corresponding to each data field, the query interface corresponding to each data field, and the target data structure to be converted for the data fields included in each query interface in each of the preset data configuration tables configured by the configuration table creation unit. When the data configuration unit receives a data query request from the client for a specified data field, it obtains the target preset data configuration table, determines the specified data field and the specified query interface corresponding to the specified data field in the target preset data configuration table, determines the minimum dimension of the query based on the query period when querying the specified data corresponding to the specified data field, and uses multi-threading to query the specified data field and the corresponding specified data according to the minimum dimension of the query, and returns the specified data field and the target data field and target data corresponding to the specified data.
9. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, it controls the device where the storage medium is located to perform the display chart development method as described in any one of claims 1 to 3 or claims 4 to 6.
10. A processor, characterized in that, The processor is used to run a program, wherein the program executes the display chart development method as described in any one of claims 1 to 3 or claims 4 to 6.
Citation Information
Patent Citations
Data query method and device, computer equipment and storage medium
CN110765157A
General query method and device for database table and storage medium
CN115617795A