Configuration method for service data organization and dynamic visual output
Through the configuration method of service data organization and dynamic visual output, the Freemarker template engine is used to combine data models with template variables, which solves the problem of insufficient data governance in traditional application development, improves development efficiency and resource utilization, and achieves the effect of quickly responding to needs.
Patent Information
- Application Number
- CN202411581792.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-03-28
AI Technical Summary
During the traditional application development process, insufficient data governance leads to data being unable to meet the needs of new application, resulting in long development cycles, waste of resources, messy page content, and difficult maintenance.
The configuration method of service data organization and dynamic visual output is adopted, and the service data parameters are obtained and processed through the service scheduling center. The Freemarker template engine is used to combine the data model with template variables to dynamically output the visual service results, achieving rapid data fusion and separation of business logic.
It improves development efficiency, clarifies personnel division, reduces data duplication governance and resource waste, and achieves the effect of quickly responding to needs. It is suitable for quickly building new application scenarios based on the data interface of existing business systems.
Smart Images

Figure CN119718403A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of big data information processing, and mainly to a configuration method for service data organization and dynamic visualization output. Background Art
[0002] Although we have entered the data age, there are still many shortcomings in data governance solutions. There is still a gap in the application of data governance solutions. The results of data governance driven by applications are not significant, and the promotion of business process reengineering, technology integration, business integration, and data integration based on application needs is insufficient, and the role of intelligent applications such as decision-making assistance is not fully played.
[0003] Traditional applications are developed based on the best data, and application deployment relies on data governance. However, existing data often cannot meet the needs of new applications, and data governance is required, resulting in a certain waste of data resources, time, and manpower. As requirements continue to increase and change, applications need to be updated and iterated to meet the requirements, resulting in a long demand development cycle and slow impact. In the traditional web development process, it is found that there is a large amount of business logic code in the page, which makes the page content messy and becomes very difficult in the subsequent large-scale modification and maintenance process. For traditional web development that uses Freemarker, once there is a new requirement or the requirement changes, the Freemarker template file needs to be added or modified in the front-end project, and the modification also requires updating the front-end project. Summary of the invention
[0004] In view of the cumbersome development technical problem in the prior art, this application proposes a configuration method for service data organization and dynamic visualization output.
[0005] According to one aspect of the present invention, a configuration method for service data organization and dynamic visualization output is proposed, comprising:
[0006] Obtaining the service data parameters of the main service, and the service dispatch center initiating a service call to perform data processing on the service data parameters;
[0007] The data processing includes: when the service dispatch center initiates a service call, parsing the query conditions of the main service, using multi-threading and paging to perform concurrent queries, and encapsulating the query results into the template configured by the main service to output the service results;
[0008] The service results are configured for service orchestration, configured by a service orchestration node, orchestrated into a service set, and finally the services are assembled according to the configuration to output the results.
[0009] The template of the main service configuration specifically includes:
[0010] Use Freemarker to create template files as template variables;
[0011] Obtaining the query result as a data model;
[0012] The Freemarker engine is called to combine the data model with the template variables and output the service result.
[0013] The service template configuration uses Freemarker as the engine to render and output the service visualization results. The principle of Freemarker is that the template is output in conjunction with the data model. The template is only responsible for the presentation of data on the page and does not involve any logic code. All logic is handled by the data model.
[0014] The output that users see in the end is created by merging the template and the data model. Using Freemarker to render the output service results can improve development efficiency and make the division of labor in the development process clearer. After using Freemarker, as an interface developer, you only need to focus on creating HTML files, images, and other visual aspects of the Web page without worrying about the data; while the program developer focuses on system implementation and is responsible for preparing the data to be displayed on the page.
[0015] The service dispatch center initiating the service call also includes: the service needs to be registered, and the registration includes: the service request method, request address, request parameters and request timeout period, which are provided to the service dispatch center for use.
[0016] According to another aspect of the present invention, a system for service data organization and dynamic visualization output is proposed, which specifically includes:
[0017] A service scheduling module is configured to obtain service data parameters of a main service, and a service scheduling center initiates a service call to perform data processing on the service data parameters;
[0018] The service dispatch center module is configured to parse the query conditions of the main service when initiating a service call, perform concurrent queries using multi-threading and paging, and encapsulate the query results into a template configured by the main service to output the service results;
[0019] The service orchestration module performs service orchestration configuration on the plurality of service results, which are configured by the service orchestration node, orchestrated into a service set, and finally the service is assembled according to the configuration to output the result.
[0020] The above one or more technical solutions in the embodiments of the present application have at least one of the following technical effects:
[0021] The present invention integrates various interface calls through middle-layer services, dynamically outputs visual service results with the Freemarker template engine, and quickly realizes technical integration, business integration, and data integration. It solves the problem that business data cannot be used overloaded and data is repeatedly managed, and achieves the effect of quickly responding to needs without developing code. The present invention is suitable for scenarios where new applications need to be quickly built and generated based on existing business system data interfaces. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated into and constitute a part of this specification. The accompanying drawings illustrate the embodiments and are used together with the description to explain the principles of the present invention. It will be easy to recognize other embodiments and many expected advantages of the embodiments because they become better understood by reference to the following detailed description. The elements of the drawings are not necessarily to scale with each other. The same reference numerals refer to corresponding similar parts.
[0023] Figure 1 A schematic diagram of the service data organization and dynamic visual output process according to an embodiment of the present invention is shown;
[0024] Figure 2 A schematic diagram of a service orchestration configuration process according to a specific embodiment of the present invention is shown;
[0025] Figure 3 A schematic diagram of a system module flow chart according to a specific embodiment of the present invention is shown. DETAILED DESCRIPTION
[0026] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0027] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0028] Figure 1 A schematic diagram of a service data organization and dynamic visualization output process according to an embodiment of the present invention is shown. Figure 1 As shown, the specific steps are as follows:
[0029] S1. Obtain service data parameters of the main service, and the service dispatch center initiates a service call to process the service data parameters;
[0030] The service dispatch center is responsible for receiving requests from clients or other services and parsing the service data parameters in the requests. Based on the service data parameters obtained through parsing, the service dispatch center initiates a service call to the main service to obtain the required data.
[0031] S2, the data processing includes: when the service dispatch center initiates a service call, parsing the query conditions of the main service, using multi-threading and paging to perform concurrent queries, and encapsulating the query results into the template configured by the main service to output the service results;
[0032] The service dispatch center analyzes the query conditions of the main service and generates SQL statements or other query languages suitable for database queries. It uses multi-threading and paging technology to perform concurrent queries to improve query efficiency and response speed. Finally, the query results are packaged in a predefined template format for subsequent processing and display.
[0033] S3. The service dispatch center initiating a service call also includes: the service needs to be registered, and the registration includes: a service request method, a request address, request parameters, and a request timeout period.
[0034] Ensure that the service dispatch center can correctly call the target service and realize service discovery and management by registering service information. Provide service request method (such as HTTP GET / POST), request address, request parameters, request timeout and other information during registration to ensure the accuracy and reliability of service calls.
[0035] The template of the main service configuration specifically includes:
[0036] Use FreeMarker to create template files as template variables;
[0037] Obtaining the query result as a data model;
[0038] The FreeMarker engine is called to combine the data model with the template variables and output the service result.
[0039] Furthermore, the service registration in step S3 also includes:
[0040] S3.1, Service definition;
[0041] Clarify the functions, interfaces, and behaviors of the service to provide basic information for subsequent registration. Ensure that the agreement between the service provider and the service consumer is consistent, including the following steps:
[0042] Clarify the functions and interfaces provided by the service, including request methods (such as GET, POST), request paths, request parameters, etc.
[0043] Determine the data format of requests and responses (such as JSON, XML).
[0044] Defines the return code and error message format when the service encounters an error.
[0045] S3.2, service registration;
[0046] Register the service information to the service registration center so that the service dispatch center can discover and call the service. Provide detailed configuration information of the service to ensure the accuracy and reliability of the call, including the following steps:
[0047] Choose a suitable service registration center. Common ones include Eureka, Consul, Zookeeper, etc.
[0048] Register service information, including: service name, which uniquely identifies the name of the service; service address, which is the access address of the service, usually the URL of the API; port number, which is the port number that the service listens on; request method, which specifies the method of calling the service, such as HTTP GET, POST, etc.; request path, which is the specific access path of the service; request parameters, which define the parameters that need to be passed when calling the service and their format; request timeout, which sets the maximum waiting time for the request to prevent the service call from being unresponsive for a long time due to network delays and other reasons; health check, which defines the health check mechanism of the service to ensure the availability of the service.
[0049] S3.3, Service discovery function;
[0050] The service dispatch center discovers available service instances through the service registration center, dynamically obtains the address and status of the service instance, and ensures the validity of the call. The specific steps include:
[0051] The service dispatch center queries the service registration center for a list of available services; obtains specific service instance information from the service list, including address, port, etc.; if there are multiple service instances, the service dispatch center can select a suitable instance for calling based on the load balancing strategy.
[0052] S3.4, service call function;
[0053] According to the registered service information, initiate the actual call to the main service, process the result of the service call, and perform necessary error handling, which specifically includes the following steps:
[0054] According to the registered service information, a request object is constructed, including the request method, request path, request parameters, etc. The constructed request is sent to the service instance, the response returned by the service instance is received, and the response content is parsed. If an error occurs during the call, it is handled according to the predefined error handling mechanism, such as retrying, logging, etc.
[0055] S3.5, service monitoring and management role;
[0056] Monitor the status and performance of the service, ensure the stable operation of the service, and provide management and maintenance tools to facilitate the update and maintenance of the service. Specifically, the following steps are included:
[0057] Regularly check the health status of the service, record the service operation log, monitor the service response time and throughput, promptly identify performance bottlenecks, set alarm rules, and promptly notify the operation and maintenance personnel when the service is abnormal. Support dynamic updates of the service to ensure that the new version of the service can be smoothly launched. When the service is no longer in use, it can be taken offline from the registration center to release resources.
[0058] like Figure 2 As shown, the service orchestration configuration is performed on the multiple service results, and the service orchestration node is configured to orchestrate into a service set, and finally the service is assembled according to the configuration to output the result. The overall scheduling module is as follows Figure 3 shown.
[0059] Furthermore, in some embodiments, a cache strategy may be introduced to improve the performance and response speed of the system. The specific steps are as follows:
[0060] Use cache elimination strategies such as the LRU least recently used algorithm and the LFU least frequently used algorithm; set the maximum capacity of the cache to prevent memory overflow.
[0061] Refresh the cache regularly to ensure the timeliness of the data, and actively update the cache content when the data changes.
[0062] When the same query request is received, first check whether there is a corresponding result in the cache.
[0063] If it exists, the data is read directly from the cache to reduce the pressure on the backend database.
[0064] Set a reasonable cache expiration time (TTL) to ensure that data does not stay in the cache for a long time.
[0065] Provides the ability to manually clear the cache to force an update of the data when necessary.
[0066] At the same time, distributed cache systems (such as Redis and Memcached) are used to support the caching needs of high concurrency and large-scale data.
[0067] Through cluster deployment and load balancing technology, the availability and scalability of the cache system are improved. In summary, by introducing the cache mechanism, the performance and response speed of the system can be further improved on the basis of the original technical features. The cache mechanism can significantly reduce the frequency of access to the backend database, reduce the system load, and improve the user experience. Combined with the original multi-threading, paging query, service orchestration and other technologies, the entire system will be more efficient, stable and flexible.
[0068] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0069] The modules involved in the embodiments of the present application may be implemented by software or by hardware.
[0070] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.
Claims
1. A method for configuring service data organization and dynamic visualization output, characterized in that: The following steps are involved: Obtaining the service data parameters of the main service, and the service dispatch center initiating a service call to perform data processing on the service data parameters; The data processing includes: when the service dispatch center initiates a service call, parsing the query conditions of the main service, using multi-threading and paging to perform concurrent queries, and encapsulating the query results into the template configured by the main service to output the service results; The service results are configured for service orchestration, configured by a service orchestration node, orchestrated into a service set, and finally the services are assembled according to the configuration to output the results.
2. The configuration method according to claim 1, characterized in that: The template of the main service configuration specifically includes: Use Freemarker to create template files as template variables; Obtaining the query result as a data model; The Freemarker engine is called to combine the data model with the template variables and output the service result.
3. The configuration method according to claim 1, characterized in that: The service dispatch center initiating the service call also includes: the service needs to be registered, and the registration includes: the service request method, request address, request parameters and request timeout period.
4. A system for service data organization and dynamic visualization output, specifically comprising: A service scheduling module is configured to obtain service data parameters of a main service, and a service scheduling center initiates a service call to perform data processing on the service data parameters; The service dispatch center module is configured to parse the query conditions of the main service when initiating a service call, perform concurrent queries using multi-threading and paging, and encapsulate the query results into a template configured by the main service to output the service results; The service orchestration module performs service orchestration configuration on the plurality of service results, which are configured by the service orchestration node, orchestrated into a service set, and finally the service is assembled according to the configuration to output the result.
5. A computer readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method according to any one of claims 1 to 3.
6. A computing system comprising a processor and a memory, wherein the processor is configured to execute the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Network television service adaptation method, server and system
CN101360221A
Method and device for generating early warning information
CN101833708A
Configurable service combination and scheduling system and method
CN116820708A
Efficient data query processing method, system and device
CN117271552A
Modular, convergent customer care and billing system
US20010056362A1