Template generation method and system for display terminal
By assembling the json file on the back-end PC of the display terminal and generating the template ID number, the front-end display terminal automatically obtains and parses the corresponding module components, solving the problem of troublesome template changes in the existing technology in different scenarios, and achieving flexible configuration and multi-scene adaptation.
Patent Information
- Application Number
- CN202411647814.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-02-28
AI Technical Summary
The existing display terminals are troublesome to change templates in different application scenarios, and have low flexibility, making it difficult to meet various application needs.
By selecting module components on the back-end PC, assemble them into a json file, assemble them according to the preset template, generate the template ID number and store it in the database. The front-end display terminal receives the template ID number, querys the database to obtain corresponding data for JSON parsing, obtains module components and displays.
It realizes flexible configuration of display terminals and is suitable for a variety of different application scenarios. By automatically obtaining and parsing pre-customized template configurations, manual intervention is reduced and operational efficiency and user experience is improved.
Smart Images

Figure CN119536676A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a template generation method and system for a display terminal. Background Art
[0002] At present, most display terminals are configured with corresponding templates when they are manufactured or used for the first time after manufacture to meet the requirements of actual use. However, when the display terminal is used in different scenarios, the template needs to be changed accordingly, which is troublesome, limiting the application of the display terminal and making it less flexible. Summary of the invention
[0003] In view of this, an object of the present invention is to provide a template generation method and system for a display terminal.
[0004] In order to achieve the above object, the technical solution adopted by the present invention is: A method for generating a template for a display terminal comprises the following steps: S1. On the PC at the back end, select one or more module components to assemble into a json file, assemble the json file according to a preset template, determine whether the json assembly is successful, and if so, generate a corresponding first template ID number, and store the data after the json assembly is successful and the corresponding first template ID number in a preset database; S2. The display terminal at the front end determines whether the second template ID number has been received. If so, it determines whether there is a first template ID number that is the same as the second template ID number in the preset database. If so, it obtains corresponding data from the preset database according to the second template ID number and performs json parsing on the data to obtain the corresponding module component. S3. Display the module components obtained in step S2 in the corresponding area of the display terminal.
[0005] Furthermore, step S1 further includes: If the JSON assembly fails, modify the preset template and re-assemble the JSON until the JSON assembly succeeds.
[0006] Furthermore, step S2 further includes: If the second template ID number is not received, the preset general template is obtained and JSON parsed to obtain the corresponding module component.
[0007] Furthermore, step S2 is specifically as follows: Determine whether the display terminal at the front end has received the second template ID number. If so, determine whether there is a first template ID number that is the same as the second template ID number in the preset database. If so, obtain the data to be parsed from the preset database according to the second template ID number, perform json parsing on the data to be parsed, and obtain the parsing result; obtain the module component value from the preset database according to the parsing result, and determine whether the acquisition is successful. If so, perform data parsing on the module component value to obtain the corresponding module component.
[0008] Furthermore, step S2 further includes: If the acquisition is unsuccessful, the preset system default values are acquired, and the corresponding module components are obtained according to the preset system default values.
[0009] A template generation system for a display terminal includes a processor and a memory, wherein the memory stores a program or an instruction, and when the program or the instruction is executed by the processor, the following steps are implemented: S1. On the PC at the back end, select one or more module components to assemble into a json file, assemble the json file according to a preset template, determine whether the json assembly is successful, and if so, generate a corresponding first template ID number, and store the data after the json assembly is successful and the corresponding first template ID number in a preset database; S2. The display terminal at the front end determines whether the second template ID number has been received. If so, it determines whether there is a first template ID number that is the same as the second template ID number in the preset database. If so, it obtains corresponding data from the preset database according to the second template ID number and performs json parsing on the data to obtain the corresponding module component. S3. Display the module components obtained in step S2 in the corresponding area of the display terminal.
[0010] Furthermore, when the program or instruction is executed by the processor, the following steps are also implemented: If the JSON assembly fails, modify the preset template and re-assemble the JSON until the JSON assembly succeeds.
[0011] Furthermore, when the program or instruction is executed by the processor, the following steps are also implemented: If the second template ID number is not received, the preset general template is obtained and JSON parsed to obtain the corresponding module component.
[0012] Furthermore, when the program or instruction is executed by the processor, the following steps are specifically implemented: Determine whether the display terminal at the front end has received the second template ID number. If so, determine whether there is a first template ID number that is the same as the second template ID number in the preset database. If so, obtain the data to be parsed from the preset database according to the second template ID number, perform json parsing on the data to be parsed, and obtain the parsing result; obtain the module component value from the preset database according to the parsing result, and determine whether the acquisition is successful. If so, perform data parsing on the module component value to obtain the corresponding module component.
[0013] Furthermore, when the program or instruction is executed by the processor, the following steps are also implemented: If the acquisition is unsuccessful, the preset system default values are acquired, and the corresponding module components are obtained according to the preset system default values.
[0014] The beneficial effects of the present invention are: The present invention provides a template generation method and system for a display terminal, which selects more than one module component on a PC at the back end to assemble into a json file, assembles the json file according to a preset template, determines whether the json assembly is successful, and if so, generates a corresponding first template ID number, and stores the data after the json assembly is successful and the corresponding first template ID number in a preset database; the display terminal at the front end determines whether a second template ID number has been received, and if so, determines whether there is a first template ID number that is the same as the second template ID number in the preset database, and if so, obtains the corresponding data from the preset database according to the second template ID number and parses the data to obtain the corresponding module component; the module component obtained in step S2 is displayed in the corresponding area of the display terminal. In the above manner, the template stored in the database can be pre-customized and configured, and the display terminal can automatically obtain the required template from the database when it is in use, and parses the corresponding module component to configure the display terminal, so that the flexible configuration of the display terminal can be realized, which is suitable for a variety of different application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 Shown is a flow chart of the steps of a template generation method for a display terminal of the present invention; Figure 2 Shown is a structural block diagram of a template generation system for a display terminal of the present invention; Description of Figure Numbers: 1-Processor; 2-Memory. DETAILED DESCRIPTION
[0016] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments: like Figure 1 As shown, the present invention provides a template generation method for a display terminal, comprising the following steps: S1. On the PC at the back end, select one or more module components to assemble into a json file, assemble the json file according to a preset template, determine whether the json assembly is successful, and if so, generate a corresponding first template ID number, and store the data after the json assembly is successful and the corresponding first template ID number in a preset database; S2. The display terminal at the front end determines whether the second template ID number has been received. If so, it determines whether there is a first template ID number that is the same as the second template ID number in the preset database. If so, it obtains corresponding data from the preset database according to the second template ID number and performs json parsing on the data to obtain the corresponding module component. S3. Display the module components obtained in step S2 in the corresponding area of the display terminal.
[0017] From the above description, it can be seen that the present invention has the following beneficial effects: The present invention provides a template generation method for a display terminal, which selects more than one module component on a PC at the back end to assemble into a json file, assembles the json file according to a preset template, determines whether the json assembly is successful, and if so, generates a corresponding first template ID number, and stores the data after the json assembly is successful and the corresponding first template ID number in a preset database; the display terminal at the front end determines whether a second template ID number is received, and if so, determines whether there is a first template ID number that is the same as the second template ID number in the preset database, and if so, obtains the corresponding data from the preset database according to the second template ID number and parses the data to obtain the corresponding module component; the module component obtained in step S2 is displayed in the corresponding area of the display terminal. In the above manner, the template stored in the database can be pre-customized and configured, and the display terminal can automatically obtain the required template from the database when it is in use, and parses the corresponding module component to configure the display terminal, so that the flexible configuration of the display terminal can be realized, which is suitable for a variety of different application scenarios.
[0018] Furthermore, step S1 further includes: If the JSON assembly fails, modify the preset template and re-assemble the JSON until the JSON assembly succeeds.
[0019] From the above description, it can be seen that through the above method, when json assembly is unsuccessful, the purpose of satisfying the successful json assembly is achieved by modifying the preset template.
[0020] Furthermore, step S2 further includes: If the second template ID number is not received, the preset general template is obtained and JSON parsed to obtain the corresponding module component.
[0021] It can be seen from the above description that, through the above method, if the display terminal does not receive the second template ID number, the preset general template is used to meet the template configuration requirements.
[0022] Furthermore, step S2 is specifically as follows: Determine whether the display terminal at the front end has received the second template ID number. If so, determine whether there is a first template ID number that is the same as the second template ID number in the preset database. If so, obtain the data to be parsed from the preset database according to the second template ID number, perform json parsing on the data to be parsed, and obtain the parsing result; obtain the module component value from the preset database according to the parsing result, and determine whether the acquisition is successful. If so, perform data parsing on the module component value to obtain the corresponding module component.
[0023] From the above description, it can be seen that the corresponding module component is obtained through the above method, wherein the corresponding module component can be obtained by judging whether there is a first template ID number that is the same as the second template ID number in the preset database and whether the judgment logic is successfully obtained from the database.
[0024] Furthermore, step S2 further includes: If the acquisition is unsuccessful, the preset system default values are acquired, and the corresponding module components are obtained according to the preset system default values.
[0025] From the above description, it can be seen that through the above method, if the acquisition is unsuccessful, the system default value is also configured to obtain the corresponding module component to avoid failure to obtain the module component.
[0026] See also Figure 2 The present invention provides a template generation system for a display terminal, comprising a processor and a memory, wherein the memory stores a program or an instruction, and when the program or the instruction is executed by the processor, the following steps are implemented: S1. On the PC at the back end, select one or more module components to assemble into a json file, assemble the json file according to a preset template, determine whether the json assembly is successful, and if so, generate a corresponding first template ID number, and store the data after the json assembly is successful and the corresponding first template ID number in a preset database; S2. The display terminal at the front end determines whether the second template ID number has been received. If so, it determines whether there is a first template ID number that is the same as the second template ID number in the preset database. If so, it obtains corresponding data from the preset database according to the second template ID number and performs json parsing on the data to obtain the corresponding module component. S3. Display the module components obtained in step S2 in the corresponding area of the display terminal.
[0027] From the above description, it can be seen that the present invention has the following beneficial effects: The present invention provides a template generation system for a display terminal, which selects more than one module component on a PC terminal located at the back end to assemble into a json file, assembles the json file according to a preset template, determines whether the json assembly is successful, and if so, generates a corresponding first template ID number, and stores the data after the json assembly is successful and the corresponding first template ID number in a preset database; the display terminal located at the front end determines whether a second template ID number is received, and if so, determines whether there is a first template ID number identical to the second template ID number in the preset database, and if so, obtains the corresponding data from the preset database according to the second template ID number and parses the data to obtain the corresponding module component; and displays the module component obtained in step S2 in the corresponding area of the display terminal. In the above manner, the template stored in the database can be pre-customized and configured, and the display terminal can automatically obtain the required template from the database when in use, and parses the corresponding module component to configure the display terminal, so as to realize flexible configuration of the display terminal, which is suitable for a variety of different application scenarios.
[0028] Furthermore, when the program or instruction is executed by the processor, the following steps are also implemented: If the JSON assembly fails, modify the preset template and re-assemble the JSON until the JSON assembly succeeds.
[0029] From the above description, it can be seen that through the above method, when json assembly is unsuccessful, the purpose of satisfying the successful json assembly is achieved by modifying the preset template.
[0030] Furthermore, when the program or instruction is executed by the processor, the following steps are also implemented: If the second template ID number is not received, the preset general template is obtained and JSON parsed to obtain the corresponding module component.
[0031] It can be seen from the above description that, through the above method, if the display terminal does not receive the second template ID number, the preset general template is used to meet the template configuration requirements.
[0032] Furthermore, when the program or instruction is executed by the processor, the following steps are specifically implemented: Determine whether the display terminal at the front end has received the second template ID number. If so, determine whether there is a first template ID number that is the same as the second template ID number in the preset database. If so, obtain the data to be parsed from the preset database according to the second template ID number, perform json parsing on the data to be parsed, and obtain the parsing result; obtain the module component value from the preset database according to the parsing result, and determine whether the acquisition is successful. If so, perform data parsing on the module component value to obtain the corresponding module component.
[0033] From the above description, it can be seen that the corresponding module component is obtained through the above method, wherein the corresponding module component can be obtained by judging whether there is a first template ID number that is the same as the second template ID number in the preset database and whether the judgment logic is successfully obtained from the database.
[0034] Furthermore, when the program or instruction is executed by the processor, the following steps are also implemented: If the acquisition is unsuccessful, the preset system default values are acquired, and the corresponding module components are obtained according to the preset system default values.
[0035] From the above description, it can be seen that through the above method, if the acquisition is unsuccessful, the system default value is also configured to obtain the corresponding module component to avoid failure to obtain the module component.
[0036] Several preferred embodiments or application examples are listed below to help those skilled in the art better understand the technical content of the present invention and the technical contribution made by the present invention relative to the prior art: Preferred embodiment one: like Figure 1 As shown, the present invention provides a template generation method for a display terminal. In this embodiment, the display terminal may be a waiting screen, a clinic screen, a self-service machine, or other equipment in a hospital. The template generation method includes the following steps: S1. Select one or more module components on the PC at the back end to assemble into a json file, assemble the json file according to the preset template, determine whether the json assembly is successful, if so, generate the corresponding first template ID number, and store the data after the json assembly is successful and the corresponding first template ID number in the preset database; if the json assembly is unsuccessful, modify the preset template and re-assemble the json until the json assembly is successful.
[0037] S2. The display terminal at the front end determines whether the second template ID number has been received. If so, it determines whether there is a first template ID number that is the same as the second template ID number in the preset database. If so, it obtains corresponding data from the preset database according to the second template ID number and performs json parsing on the data to obtain the corresponding module component. If the second template ID number is not received, the preset general template is obtained and json parsed to obtain the corresponding module component. In the above manner, if the display terminal does not receive the second template ID number, the preset general template is used to meet the template configuration requirements.
[0038] In this embodiment, step S2 is specifically as follows: Determine whether the display terminal at the front end has received the second template ID number. If so, determine whether there is a first template ID number that is the same as the second template ID number in the preset database. If so, obtain the data to be parsed from the preset database according to the second template ID number, perform json parsing on the data to be parsed, and obtain the parsing result; obtain the module component value from the preset database according to the parsing result, and determine whether the acquisition is successful. If so, perform data parsing on the module component value to obtain the corresponding module component. If the acquisition is unsuccessful, obtain the preset system default value, and obtain the corresponding module component according to the preset system default value.
[0039] S3. Display the module components obtained in step S2 in the corresponding area of the display terminal.
[0040] The above template generation method provides hospitals with flexible and customizable queue calling templates to optimize the patient triage, waiting and calling processes. Through this system, hospitals can realize the automated information display and update of waiting screens, clinic screens, self-service machines and other equipment to ensure real-time synchronization and management of queue information. The template generation method can adapt to the display requirements in different scenarios, improve the hospital's operational efficiency, reduce manual intervention, and enhance patient experience. At the same time, the system supports general templates and custom templates to provide hospitals with a variety of display solutions.
[0041] The waiting screen displays the patient queue through the template generated by the template generator corresponding to the template generation method. The screen can dynamically update the current queue number, number of people waiting, estimated waiting time and other information. The hospital can flexibly configure the displayed content and format according to the template. For example, some departments can give priority to displaying the call number of emergency patients, or set different colors for the queue information of different clinics to improve the transparency of the waiting area and the patient experience.
[0042] At the door of the clinic, the template generator is used to generate a clinic screen to display the patient's current call number and waiting status. Each clinic can independently set the order of calling numbers, information about the patients called, and the next patient. The template also allows for personalized design based on the needs of hospital departments, such as displaying the doctor's name, clinic number, or special diagnosis and treatment priorities, to ensure that the information is clear and intuitive, helping patients quickly find the corresponding clinic and reducing confusion and waiting anxiety.
[0043] The self-service machine uses templates generated by the template generator to allow patients to register, sign in, and view queue information on their own. The template can be customized to provide patients with personalized waiting instructions, such as displaying detailed information about the waiting queue, estimated waiting time, and subsequent diagnosis and treatment steps. The self-service machine interface is simple and easy to understand, suitable for patients of different ages and language needs. Through automated processes, the hospital's service efficiency has been greatly improved, and the time patients have to wait in line at the service window has been reduced.
[0044] In short, through the template generator, hospitals can implement a flexible queuing system and effectively display information through waiting screens, clinic screens, self-service machines and other devices to optimize the entire medical service process.
[0045] In the above templates, specific areas can be configured as dynamic elements and set corresponding display properties. These elements will display the latest information through interaction with the system background. The template information of the template generator will be stored in the back-end system in the form of JSON and maintained in the MYSQL database. Each template has a unique identifier (ID) to facilitate the system to identify and call the corresponding template. The display screen (check-in machine, waiting screen, and consulting room screen) is installed in the front-end system as an exe file type. This front-end system can be an embedded display controller or a networked computer. The front-end system sends a request to the back-end server through HTTP requests, API calls, or specific communication protocols (such as MQTT, WebSocket, etc.) to call a specific template. API calls are that the front-end system may call the template generator through the API, passing the template ID or specific parameters to request the corresponding template.
[0046] Preferred embodiment 2: See also Figure 2 The present invention provides a template generation system for a display terminal, comprising a processor 1 and a memory 2, wherein the memory 2 stores a program or instruction, and when the program or instruction is executed by the processor 1, the following steps are implemented: S1. On the PC at the back end, select one or more module components to assemble into a json file, assemble the json file according to a preset template, determine whether the json assembly is successful, and if so, generate a corresponding first template ID number, and store the data after the json assembly is successful and the corresponding first template ID number in a preset database; S2. The display terminal at the front end determines whether the second template ID number has been received. If so, it determines whether there is a first template ID number that is the same as the second template ID number in the preset database. If so, it obtains corresponding data from the preset database according to the second template ID number and performs json parsing on the data to obtain the corresponding module component. S3. Display the module components obtained in step S2 in the corresponding area of the display terminal.
[0047] Furthermore, when the program or instruction is executed by the processor, the following steps are also implemented: If the JSON assembly fails, modify the preset template and re-assemble the JSON until the JSON assembly succeeds.
[0048] Furthermore, when the program or instruction is executed by the processor, the following steps are also implemented: If the second template ID number is not received, the preset general template is obtained and JSON parsed to obtain the corresponding module component.
[0049] Furthermore, when the program or instruction is executed by the processor, the following steps are specifically implemented: Determine whether the display terminal at the front end has received the second template ID number. If so, determine whether there is a first template ID number that is the same as the second template ID number in the preset database. If so, obtain the data to be parsed from the preset database according to the second template ID number, perform json parsing on the data to be parsed, and obtain the parsing result; obtain the module component value from the preset database according to the parsing result, and determine whether the acquisition is successful. If so, perform data parsing on the module component value to obtain the corresponding module component.
[0050] Furthermore, when the program or instruction is executed by the processor, the following steps are also implemented: If the acquisition is unsuccessful, the preset system default values are acquired, and the corresponding module components are obtained according to the preset system default values.
[0051] The present invention has been described by the above-mentioned relevant embodiments and drawings, but the above-mentioned embodiments are only examples for implementing the present invention. It must be pointed out that the disclosed embodiments do not limit the scope of the present invention. On the contrary, modifications and equivalent settings included in the spirit and scope of the claims are all included in the scope of the present invention.
Claims
1. A template generation method for a display terminal, characterized in that: The following steps are involved: S1. On the PC at the back end, select one or more module components to assemble into a json file, assemble the json file according to a preset template, determine whether the json assembly is successful, and if so, generate a corresponding first template ID number, and store the data after the json assembly is successful and the corresponding first template ID number in a preset database; S2. The display terminal at the front end determines whether the second template ID number has been received. If so, it determines whether there is a first template ID number that is the same as the second template ID number in the preset database. If so, it obtains corresponding data from the preset database according to the second template ID number and performs json parsing on the data to obtain the corresponding module component. S3. Display the module components obtained in step S2 in the corresponding area of the display terminal.
2. A template generation method for a display terminal according to claim 1, characterized in that: Step S1 also includes: If the JSON assembly fails, modify the preset template and re-assemble the JSON until the JSON assembly succeeds.
3. A template generation method for a display terminal according to claim 1, characterized in that: Step S2 also includes: If the second template ID number is not received, the preset general template is obtained and json parsed to obtain the corresponding module component.
4. A template generation method for a display terminal according to claim 1, characterized in that: Step S2 is specifically as follows: Determine whether the display terminal at the front end has received the second template ID number. If so, determine whether there is a first template ID number that is the same as the second template ID number in the preset database. If so, obtain the data to be parsed from the preset database according to the second template ID number, perform json parsing on the data to be parsed, and obtain the parsing result; obtain the module component value from the preset database according to the parsing result, and determine whether the acquisition is successful. If so, perform data parsing on the module component value to obtain the corresponding module component.
5. A template generation method for a display terminal according to claim 4, characterized in that: Step S2 also includes: If the acquisition is unsuccessful, the preset system default values are acquired, and the corresponding module components are obtained according to the preset system default values.
6. A template generation system for a display terminal, characterized in that: The system comprises a processor and a memory, wherein the memory stores a program or an instruction, and when the program or the instruction is executed by the processor, the following steps are implemented: S1. On the PC at the back end, select one or more module components to assemble into a json file, assemble the json file according to a preset template, determine whether the json assembly is successful, and if so, generate a corresponding first template ID number, and store the data after the json assembly is successful and the corresponding first template ID number in a preset database; S2. The display terminal at the front end determines whether the second template ID number has been received. If so, it determines whether there is a first template ID number that is the same as the second template ID number in the preset database. If so, it obtains corresponding data from the preset database according to the second template ID number and performs json parsing on the data to obtain the corresponding module component. S3. Display the module components obtained in step S2 in the corresponding area of the display terminal.
7. A template generation system for a display terminal according to claim 6, characterized in that: When the program or instruction is executed by the processor, the following steps are also implemented: If the JSON assembly fails, modify the preset template and re-assemble the JSON until the JSON assembly succeeds.
8. A template generation system for a display terminal according to claim 6, characterized in that: When the program or instruction is executed by the processor, the following steps are also implemented: If the second template ID number is not received, the preset general template is obtained and json parsed to obtain the corresponding module component.
9. A template generation system for a display terminal according to claim 6, characterized in that: When the program or instruction is executed by the processor, the following steps are specifically implemented: Determine whether the display terminal at the front end has received the second template ID number. If so, determine whether there is a first template ID number that is the same as the second template ID number in the preset database. If so, obtain the data to be parsed from the preset database according to the second template ID number, perform json parsing on the data to be parsed, and obtain the parsing result; obtain the module component value from the preset database according to the parsing result, and determine whether the acquisition is successful. If so, perform data parsing on the module component value to obtain the corresponding module component.
10. A template generation system for a display terminal according to claim 9, characterized in that: When the program or instruction is executed by the processor, the following steps are also implemented: If the acquisition is unsuccessful, the preset system default values are acquired, and the corresponding module components are obtained according to the preset system default values.