Document configuration method and device, equipment and storage medium
By obtaining and matching document component information, dynamically writing data and rendering with the target engine, the problem of cumbersome configuration of target document dynamic data is solved, and configuration efficiency and document reliability are improved.
Patent Information
- Application Number
- CN202510082106.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-06-13
AI Technical Summary
The dynamic data configuration process of existing target documents is cumbersome, resulting in inefficient configuration and susceptible to manual intervention.
By obtaining component information of each preset document type, the JSON data structure is used to save component information, obtain dynamic data and match the preset document type, write dynamic data to the target configuration file, and render it through the target engine to generate target documents.
It reduces the dynamic data configuration time of the target document, improves the configuration efficiency, and improves the reliability of the generated document, avoiding the impact of manual intervention.
Smart Images

Figure CN120144199A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of documents and information technology, and particularly to a document configuration method, device, equipment and storage medium. Background Art
[0002] A target document refers to a written document with clear purpose and pertinence written for a specific target or task. The target document not only requires accurate language and clear organization, but also must strictly follow the corresponding logical structure and writing norms.
[0003] However, the configuration process of dynamic data in existing target documents is cumbersome, which is not conducive to improving the configuration efficiency of dynamic data in target documents. The reason is that the existing technology mainly adopts the manual configuration method to configure the dynamic data of target documents, and the manual configuration method will consume a large amount of human and time resources, increasing the configuration time of dynamic data in target documents, and is easily affected by manual intervention. Therefore, it is not conducive to improving the configuration efficiency of dynamic data in target documents. Summary of the Invention
[0004] The present invention provides a document configuration method, device, computer equipment and storage medium to solve the technical problem that the configuration process of dynamic data in existing target documents is cumbersome and not conducive to improving the configuration efficiency of dynamic data in target documents.
[0005] In a first aspect, a document configuration method is provided, including: Obtain the component type, component style, component parameters, and event listener corresponding to each preset document type, and form the component information corresponding to each preset document type by combining the component type, component style, component parameters, and event listener corresponding to each preset document type; Adopt the JSON data structure to save the component information corresponding to each preset document type, and obtain the preset configuration file corresponding to each preset document type; Obtain dynamic data and a target document type, match the target document type with multiple preset document types, and select the preset configuration file corresponding to the successfully matched preset document type as the target configuration file; Write the dynamic data into the target configuration file to obtain the target configuration file carrying the dynamic data; Input the target configuration file carrying the dynamic data into a target engine; Through the target engine, render the target configuration file carrying the dynamic data to generate a target document containing the dynamic data.
[0006] Further, the method of using the JSON data structure to save the component information corresponding to each preset document type to obtain a preset configuration file corresponding to each preset document type includes: Read the save instruction in the preset file; Execute the save instruction, and use the JSON data structure to save the component information corresponding to each preset document type to obtain a preset configuration file corresponding to each preset document type.
[0007] Further, the method of obtaining dynamic data and a target document type, matching the target document type with multiple preset document types, and selecting the preset configuration file corresponding to the successfully matched preset document type as the target configuration file includes: Obtain the application programming interface provided by the database, and through the application programming interface, obtain target information in the database; Obtain the dynamic data and the target document type in the target information, match the target document type with multiple preset document types, and select the preset configuration file corresponding to the successfully matched preset document type as the target configuration file.
[0008] Further, the method of writing dynamic data into the target configuration file to obtain the target configuration file carrying the dynamic data includes: Obtain the document name, issuing authority name, document number, date of issue, party information, execution basis, execution matters, execution method, administrative reconsideration information, and administrative litigation information in the dynamic data; Obtain the first placeholder, second placeholder, third placeholder, fourth placeholder, fifth placeholder, sixth placeholder, seventh placeholder, eighth placeholder, ninth placeholder, and tenth placeholder in the target configuration file, replace the first placeholder with the document name, replace the second placeholder with the issuing authority name, replace the third placeholder with the document number, replace the fourth placeholder with the date of issue, replace the fifth placeholder with the party information, replace the sixth placeholder with the execution basis, replace the seventh placeholder with the execution matters, replace the eighth placeholder with the execution method, replace the ninth placeholder with the administrative reconsideration information, and replace the tenth placeholder with the administrative litigation information to obtain the target configuration file carrying the dynamic data.
[0009] Further, the method of inputting the target configuration file carrying the dynamic data into the target engine includes: Obtain the evaluation value corresponding to each template engine, and select the template engine with the largest evaluation value as the target engine; Read the input instruction, execute the input instruction, and input the target configuration file carrying the dynamic data into the target engine.
[0010] Further, rendering the target configuration file carrying the dynamic data by the target engine to generate a target document including the dynamic data includes: Parsing the target configuration file carrying the dynamic data by the target engine to obtain the parsed target configuration file; Reading a rendering instruction, executing the rendering instruction, and rendering the parsed target configuration file to generate a target document including the dynamic data.
[0011] Further, after rendering the target configuration file carrying the dynamic data by the target engine to generate a target document including the dynamic data, the document configuration method includes: Creating a storage area corresponding to the target document type, storing the target document in the storage area, creating an access interface for the storage area, reading the target document through the access interface, creating a display window, and displaying the target document through the display window.
[0012] In a second aspect, a document configuration device is provided, including: A first acquisition module, configured to acquire a component type, a component style, component parameters, and an event listener corresponding to each preset document type, and form the component type, the component style, the component parameters, and the event listener corresponding to each preset document type into component information corresponding to each preset document type; A saving module, configured to save the component information corresponding to each preset document type in a JSON data structure to obtain a preset configuration file corresponding to each preset document type; A second acquisition module, configured to acquire dynamic data and a target document type, match the target document type with a plurality of preset document types, and select the preset configuration file corresponding to the preset document type with a successful match as the target configuration file; A writing module, configured to write the dynamic data into the target configuration file to obtain the target configuration file carrying the dynamic data; An input module, configured to input the target configuration file carrying the dynamic data into a target engine; A generating module, configured to render the target configuration file carrying the dynamic data by the target engine to generate a target document including the dynamic data.
[0013] In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above document configuration method are implemented.
[0014] Fourthly, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above document configuration method are implemented.
[0015] This application provides a document configuration method, device, computer device and storage medium. Obtain the component type, component style, component parameters, and event listener corresponding to each preset document type, and form the component information corresponding to each preset document type by the component type, component style, component parameters, and event listener corresponding to each preset document type; adopt the JSON data structure to save the component information corresponding to each preset document type, and obtain the preset configuration file corresponding to each preset document type; obtain dynamic data and the target document type, match the target document type with multiple preset document types, and select the preset configuration file corresponding to the successfully matched preset document type as the target configuration file; write the dynamic data into the target configuration file to obtain the target configuration file carrying the dynamic data; input the target configuration file carrying the dynamic data into the target engine; through the target engine, render the target configuration file carrying the dynamic data to generate a target document containing dynamic data. The beneficial effects are in two aspects. On the one hand, through the target engine, the target configuration file carrying the dynamic data is rendered to generate a target document containing dynamic data. Since there is no need for manual configuration, the configuration time of the dynamic data of the target document is reduced, which is beneficial to improving the configuration efficiency of the dynamic data of the target document. On the other hand, due to automatic generation and not being affected by manual intervention, it is beneficial to improve the reliability of the generated target document. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.
[0017] Figure 1 is a schematic diagram of an application environment of the document configuration method in an embodiment of the present invention; Figure 2 is a flowchart of a document configuration method provided by an embodiment of the present invention; Figure 3 is Figure 2 a schematic flowchart of a specific implementation manner of step S23 in Figure 4 is Figure 2 a schematic flowchart of a specific implementation manner of step S25 in Figure 5 isFigure 2 Schematic flowchart of a specific implementation of step S26 in Figure 6 Schematic structural diagram of a document configuration device in an embodiment of the present invention; Figure 7 Schematic structural diagram of a computer device in an embodiment of the present invention. Specific implementation mode
[0018] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0019] Please refer to Figure 1 , Figure 1 which is a schematic application environment diagram of a document configuration method in an embodiment of the present invention. The document configuration method provided by the embodiments of the present invention can be applied in an application environment such as Figure 1 , where the client communicates with the server through a network.
[0020] The server obtains the component type, component style, component parameters, and event listener corresponding to each preset document type through the client, and forms the component information corresponding to each preset document type by combining the component type, component style, component parameters, and event listener corresponding to each preset document type; Adopt the JSON data structure to save the component information corresponding to each preset document type, and obtain the preset configuration file corresponding to each preset document type; Obtain the dynamic data and the target document type, match the target document type with multiple preset document types, and select the preset configuration file corresponding to the successfully matched preset document type as the target configuration file; Write the dynamic data into the target configuration file to obtain the target configuration file carrying the dynamic data; Input the target configuration file carrying the dynamic data into the target engine; Through the target engine, render the target configuration file carrying the dynamic data to generate a target document containing the dynamic data.
[0021] In the solutions implemented by the above document configuration method, apparatus, device, and medium, the beneficial effects are in two aspects. On the one hand, through the target engine, the target configuration file carrying the dynamic data is rendered to generate a target document containing the dynamic data. Since there is no need for manual configuration, the configuration time of the dynamic data of the target document is reduced, which is beneficial to improving the configuration efficiency of the dynamic data of the target document. On the other hand, due to automatic generation and not being affected by manual intervention, it is beneficial to enhance the reliability of the generated target document.
[0022] Among them, the device running the client is simply referred to as: client device.
[0023] Among them, the device running the server is simply referred to as: server device.
[0024] Among them, the client device includes but is not limited to smart phones, personal computers, vehicle networking terminals, tablet computers, and portable wearable devices.
[0025] Among them, the server device can be implemented by an independent server or a server cluster composed of multiple servers. The present invention will be described in detail below through specific embodiments.
[0026] Please refer to Figure 2 , Figure 2 , which is a schematic flowchart of a document configuration method provided by an embodiment of the present invention, including the following steps: S21, obtain the component type, component style, component parameters, and event listener corresponding to each preset document type, and form the component information corresponding to each preset document type by combining the component type, component style, component parameters, and event listener corresponding to each preset document type; Among them, the preset document type is a preset document type. The document type refers to different categories divided according to the nature, use, and content of the document.
[0027] Among them, different document types each carry specific information and functions. For example, notice documents are used to convey important information or arrange matters to ensure that relevant personnel can understand and respond in a timely manner; report documents are used to summarize work progress, analyze problems, and put forward suggestions to provide a basis for decision-making; request documents are official documents for subordinates to request instructions or approvals from superiors, reflecting the hierarchical relationship and communication process within the organization.
[0028] Among them, the component type is the type of the component, including buttons, input boxes, and drop-down menus. Each component type has its specific function and use.
[0029] Among them, the component style is the appearance manifestation of the component, including color, font, border, shadow, as well as layout, alignment, and spacing. The component style determines the aesthetics and user experience of the component.
[0030] Among them, component parameters are parameters that control components. For example, the click event of a button, the default value of an input box, and the option list of a dropdown menu. Component parameters enable components to respond accordingly based on user operations or system states.
[0031] Among them, an event listener is a mechanism for listening to events that occur on a component. Event listeners are usually closely related to the component type. Different types of components will trigger different events. For example, a button component may listen for click events, while a text box component may listen for input events. By configuring event listeners for components, users can achieve functions such as instant feedback on user behavior, data validation, and status updates, thereby enhancing interactivity and responsiveness and improving the user experience.
[0032] Exemplarily, obtain the component type, component style, component parameters, and event listener corresponding to each preset document type, and form the component type, component style, component parameters, and event listener corresponding to each preset document type into the component information corresponding to each preset document type, including: Obtain a preset department list and display the department list, where the department list includes multiple department identifiers; Obtain a user operation. According to the user operation, obtain the department identifier specified in the department list, and obtain multiple preset document types corresponding to the specified department identifier; Obtain the component type, component style, component parameters, and event listener corresponding to each preset document type, and form the component type, component style, component parameters, and event listener corresponding to each preset document type into the component information corresponding to each preset document type.
[0033] Among them, the department identifier is the unique identifier of the department, and different departments correspond to different department identifiers.
[0034] Among them, obtaining multiple preset document types corresponding to the specified department identifier ensures the pertinence and practicality of the preset document types, enabling each department to obtain preset document types related to its work, which is conducive to improving the operation efficiency of the department.
[0035] S22, adopt the JSON data structure to save the component information corresponding to each preset document type, and obtain the preset configuration file corresponding to each preset document type; Among them, the step of adopting the JSON data structure to save the component information corresponding to each preset document type and obtaining the preset configuration file corresponding to each preset document type includes: Read the save instruction in the preset file; Execute the saving instruction, adopt the JSON data structure, save the component information corresponding to each preset document type, and obtain the preset configuration file corresponding to each preset document type.
[0036] Among them, the full Chinese name of JSON is: JavaScript Object Notation, and the full English name of JSON is: JavaScript Object Notation. The JSON data structure is a lightweight data representation format.
[0037] Among them, the JSON data structure allows data exchange between applications written in different programming languages. By adopting the JSON data structure to save the component information corresponding to each preset document type, the preset configuration file corresponding to each preset document type is obtained. The preset configuration file can be transmitted and processed in a standardized format between different systems and applications, which is conducive to improving the compatibility of the preset configuration file.
[0038] S23. Obtain the dynamic data and the target document type, match the target document type with multiple preset document types, and select the preset configuration file corresponding to the successfully matched preset document type as the target configuration file; Among them, the target document type is the specified document type.
[0039] Among them, selecting the preset configuration file corresponding to the successfully matched preset document type as the target configuration file greatly improves the configuration efficiency. Because the user does not need to create the target configuration file from scratch, but can directly use the preset configuration file corresponding to the successfully matched preset document type, which can save the configuration time of the target configuration file and thus significantly improve the configuration efficiency of the target configuration file.
[0040] S24. Write the dynamic data into the target configuration file to obtain the target configuration file carrying the dynamic data; Among them, writing the dynamic data into the target configuration file to obtain the target configuration file carrying the dynamic data includes: Obtain the document name, document issuing authority name, document number, date of issue, party information, execution basis, execution matters, execution method, administrative reconsideration information, and administrative litigation information in the dynamic data; Get the first placeholder, the second placeholder, the third placeholder, the fourth placeholder, the fifth placeholder, the sixth placeholder, the seventh placeholder, the eighth placeholder, the ninth placeholder, and the tenth placeholder in the target configuration file, replace the first placeholder with the document name, replace the second placeholder with the name of the issuing authority, replace the third placeholder with the document number, replace the fourth placeholder with the date of writing, replace the fifth placeholder with the party information, replace the sixth placeholder with the execution basis, replace the seventh placeholder with the execution matter, replace the eighth placeholder with the execution method, replace the ninth placeholder with the administrative reconsideration information, and replace the tenth placeholder with the administrative litigation information to obtain the target configuration file carrying the dynamic data.
[0041] Among them, the first placeholder, the second placeholder, the third placeholder, the fourth placeholder, the fifth placeholder, the sixth placeholder, the seventh placeholder, the eighth placeholder, the ninth placeholder, and the tenth placeholder are different placeholders.
[0042] Among them, the document name is the name of the document type, such as Administrative Enforcement Decision and Notice of Correction.
[0043] The name of the issuing authority is the name of the issuing authority.
[0044] The document number is a unique number consisting of numbers and letters. Among them, the date of writing is the date of production or publication, usually expressed in Arabic numerals, including year, month, and day.
[0045] Among them, the party information includes the party’s name, the party’s contact information, and the party’s address.
[0046] Among them, the execution methods include compulsory execution and urging execution.
[0047] Among them, administrative reconsideration information is information on administrative reconsideration.
[0048] Among them, administrative litigation information is information on administrative litigation.
[0049] Among them, dynamic data is written into the target configuration file to obtain the target configuration file carrying the dynamic data, and the target configuration file carrying the dynamic data can automatically adjust its behavior and parameters according to real-time conditions or environmental changes without manually modifying the code or restarting the service. This dynamic configuration capability enables the target configuration file of the dynamic data to quickly respond to changes in external events or user needs, thereby improving the response speed and user experience of the target configuration file of the dynamic data.
[0050] Among them, dynamic data is automatically captured, and the dynamic data is written into the target configuration file to obtain the target configuration file carrying the dynamic data, without manual configuration. This not only simplifies the configuration management process but also reduces the risk brought by manual configuration errors.
[0051] S25, input the target configuration file carrying the dynamic data into the target engine; Among them, when the target configuration file carrying the dynamic data is input into the target engine, the target engine usually has specially designed data parsing and processing algorithms, and can quickly process the target configuration file carrying the dynamic data, accelerating the data processing speed of the target configuration file carrying the dynamic data.
[0052] S26, through the target engine, render the target configuration file carrying the dynamic data to generate a target document containing the dynamic data.
[0053] Among them, after rendering the target configuration file carrying the dynamic data through the target engine to generate a target document containing the dynamic data, the document configuration method includes: Create a storage area corresponding to the target document type, store the target document in the storage area, create an access interface for the storage area, read the target document through the access interface, create a display window, and display the target document through the display window.
[0054] Among them, create a display window and display the target document through the display window. The visual display of the target document is beneficial to enhancing the information transmission effect.
[0055] In the embodiment of the present invention, the beneficial effects are in two aspects. On the one hand, through the target engine, the target configuration file carrying the dynamic data is rendered to generate a target document containing the dynamic data. Since there is no need for manual configuration, the configuration time of the dynamic data of the target document is reduced, which is beneficial to improving the configuration efficiency of the dynamic data of the target document. On the other hand, due to automatic generation and not being affected by manual intervention, it is beneficial to improving the reliability of the generated target document.
[0056] Please refer to Figure 3 , Figure 3 is Figure 2 a schematic flowchart of a specific implementation manner of step S23 in S31, obtain the application program interface provided by the database, and through the application program interface, obtain the target information in the database; S32. Obtain the dynamic data and the target document type in the target information, match the target document type with multiple preset document types, and select the preset configuration file corresponding to the successfully matched preset document type as the target configuration file.
[0057] In the embodiment of the present invention, selecting the preset configuration file corresponding to the successfully matched preset document type as the target configuration file significantly improves the configuration efficiency. Because the user does not need to create the target configuration file from scratch, but can directly utilize the preset configuration file, thus reducing the repetitive labor and time cost.
[0058] Please refer to Figure 4 , Figure 4 is Figure 2 a schematic flowchart of a specific implementation manner of step S25 in S41. Obtain the evaluation value corresponding to each template engine, and select the template engine with the largest evaluation value as the target engine; Exemplarily, obtaining the evaluation value corresponding to each template engine and selecting the template engine with the largest evaluation value as the target engine includes: Obtain the loading time corresponding to each template engine, and select the template engine with a loading time less than the preset time as the preferred engine; Obtain the call times corresponding to each preferred engine and the score corresponding to each preferred engine; Select the product of the call times corresponding to each preferred engine and the score corresponding to each preferred engine as the evaluation value corresponding to each preferred engine, and select the preferred engine with the largest evaluation value as the target engine.
[0059] The evaluation value corresponding to each preferred engine = the call times corresponding to each preferred engine × the score corresponding to each preferred engine.
[0060] Among them, the evaluation value corresponding to each preferred engine is used to evaluate the reliability of each preferred engine. The higher the evaluation value corresponding to each preferred engine, the higher the reliability of each preferred engine, and the lower the evaluation value corresponding to each preferred engine, the lower the reliability of each preferred engine.
[0061] For ease of explanation, an example is given as follows: For example, there are multiple preferred engines, namely preferred engine 1, preferred engine 2, and preferred engine 3; Select the product of the call times corresponding to preferred engine 1 and the score corresponding to preferred engine 1 as the evaluation value corresponding to preferred engine 1; Select the product of the call times corresponding to preferred engine 2 and the score corresponding to preferred engine 2 as the evaluation value corresponding to preferred engine 2; Select the product of the number of calls corresponding to the preferred engine 3 and the score corresponding to the preferred engine 3 as the evaluation value corresponding to the preferred engine 3; Wherein, when the evaluation value corresponding to the preferred engine 1 is greater than the evaluation value corresponding to the preferred engine 2 and the evaluation value corresponding to the preferred engine 1 is greater than the evaluation value corresponding to the preferred engine 3, select the preferred engine 1 as the target engine.
[0062] Wherein, when the evaluation value corresponding to the preferred engine 2 is greater than the evaluation value corresponding to the preferred engine 1 and the evaluation value corresponding to the preferred engine 2 is greater than the evaluation value corresponding to the preferred engine 3, select the preferred engine 2 as the target engine.
[0063] Wherein, when the evaluation value corresponding to the preferred engine 3 is greater than the evaluation value corresponding to the preferred engine 1 and the evaluation value corresponding to the preferred engine 3 is greater than the evaluation value corresponding to the preferred engine 2, select the preferred engine 3 as the target engine.
[0064] S42, Read the input instruction, execute the input instruction, and input the target configuration file carrying the dynamic data into the target engine.
[0065] In the embodiment of the present invention, read the input instruction, execute the input instruction, and input the target configuration file carrying the dynamic data into the target engine. The target engine usually has a powerful parsing ability and can efficiently process the target configuration file carrying the dynamic data.
[0066] Please refer to Figure 5 , Figure 5 is Figure 2 a schematic flowchart of a specific implementation manner of step S26 in S51, Parse the target configuration file carrying the dynamic data through the target engine to obtain the parsed target configuration file; S52, Read the rendering instruction, execute the rendering instruction, and render the parsed target configuration file to generate a target document containing dynamic data.
[0067] In the embodiment of the present invention, read the rendering instruction, execute the rendering instruction, and render the parsed target configuration file to generate a target document containing dynamic data. Since there is no need for manual configuration, the configuration time of the dynamic data of the target document is reduced, which is beneficial to improving the configuration efficiency of the dynamic data of the target document.
[0068] Please refer to Figure 6 , Figure 6 is a schematic structural diagram of a document configuration device in an embodiment of the present invention, as Figure 6As shown, the document configuration device includes a first acquisition module 101, a storage module 102, a second acquisition module 103, a writing module 104, an input module 105, and a generation module 106. The detailed descriptions of each functional module are as follows: The first acquisition module 101 is configured to acquire the component type, component style, component parameters, and event listener corresponding to each preset document type, and form the component information corresponding to each preset document type by combining the component type, component style, component parameters, and event listener corresponding to each preset document type; The storage module 102 is configured to store the component information corresponding to each preset document type in a JSON data structure to obtain a preset configuration file corresponding to each preset document type; The second acquisition module 103 is configured to acquire dynamic data and a target document type, match the target document type with multiple preset document types, and select the preset configuration file corresponding to the successfully matched preset document type as the target configuration file; The writing module 104 is configured to write the dynamic data into the target configuration file to obtain the target configuration file carrying the dynamic data; The input module 105 is configured to input the target configuration file carrying the dynamic data into a target engine; The generation module 106 is configured to render the target configuration file carrying the dynamic data through the target engine to generate a target document containing the dynamic data.
[0069] In the embodiments of the present invention, the beneficial effects are in two aspects. On the one hand, through the target engine, the target configuration file carrying the dynamic data is rendered to generate a target document containing the dynamic data. Since there is no need for manual configuration, the configuration time of the dynamic data of the target document is reduced, which is beneficial to improving the configuration efficiency of the dynamic data of the target document. On the other hand, due to automatic generation and no influence from manual intervention, it is beneficial to improve the reliability of the generated target document.
[0070] For the specific limitations of the document configuration device, reference can be made to the limitations on the document configuration method in the above text, which will not be elaborated here.
[0071] Each module in the above document configuration device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor in the computer device in hardware form or be independent of it, or can be stored in the memory in the computer device in software form to facilitate the processor to call and execute the operations corresponding to the above modules.
[0072] Please refer to Figure 7 , Figure 7It is another schematic structural diagram of a computer device in an embodiment of the present invention. In one embodiment, a computer device is provided. The computer device is a server device or a client device, and its internal structural diagram can be as shown in Figure 7 shown. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with external devices. When the computer program is executed by the processor, it can implement the functions or steps of a document configuration method.
[0073] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor.
[0074] It should be noted that the functions or steps that can be achieved by the above computer-readable storage medium or computer device can be correspondingly referred to the relevant descriptions of the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0075] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU for short), a graphics processing unit (GPU for short), and a network processor (NP for short); it can also be a digital signal processor (DSP for short), an application-specific integrated circuit (ASIC for short), a field-programmable gate array (FPGA for short), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0076] The above description and the drawings fully illustrate the embodiments of the present disclosure, enabling those skilled in the art to practice them. In this article, what each embodiment focuses on can be the differences from other embodiments, and the same or similar parts among the various embodiments can be referred to each other. For the methods and products disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, the relevant parts can be referred to the description of the method part.
[0077] Those skilled in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner may depend on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the embodiments of the present disclosure. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0078] In the embodiments disclosed herein, the disclosed methods, products (including but not limited to devices, equipment) can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units can be merely a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some sub-samples can be ignored or not executed. In addition, the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of devices or units can be electrical, mechanical, or other forms. The units described as separate components can be or can not be physically separated, and the components displayed as units can be or can not be physical units, that is, they can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to implement this embodiment. In addition, in the embodiments of the present disclosure, each functional unit can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0079] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code, which contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the accompanying drawings. For example, two consecutive blocks may in fact be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may in fact be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A document configuration method, characterized in that: include: Obtain the component type, component style, component parameters, and event listener corresponding to each preset document type, and combine the component type, component style, component parameters, and event listener corresponding to each preset document type into component information corresponding to each preset document type; Use JSON data structure to save component information corresponding to each preset document type, and obtain the preset configuration file corresponding to each preset document type; Acquire dynamic data and a target document type, match the target document type with a plurality of preset document types, and select a preset configuration file corresponding to a successfully matched preset document type as the target configuration file; Writing dynamic data into the target configuration file to obtain the target configuration file carrying the dynamic data; inputting the target configuration file carrying the dynamic data into a target engine; The target configuration file carrying the dynamic data is rendered through a target engine to generate a target document containing the dynamic data.
2. The document configuration method according to claim 1, characterized in that: The JSON data structure is used to save the component information corresponding to each preset document type, and the preset configuration file corresponding to each preset document type is obtained, including: Read the save instructions in the preset file; The save instruction is executed, and the component information corresponding to each preset document type is saved using a JSON data structure, so as to obtain a preset configuration file corresponding to each preset document type.
3. The document configuration method according to claim 1, characterized in that: The acquiring of dynamic data and a target document type, matching the target document type with a plurality of preset document types, and selecting a preset configuration file corresponding to a successfully matched preset document type as the target configuration file includes: Obtain the application program interface provided by the database, and obtain target information in the database through the application program interface; The dynamic data and the target document type in the target information are obtained, the target document type is matched with a plurality of preset document types, and a preset configuration file corresponding to the preset document type that is successfully matched is selected as the target configuration file.
4. The document configuration method according to claim 1, characterized in that: Writing the dynamic data into the target configuration file to obtain the target configuration file carrying the dynamic data includes: Obtain the document name, issuing authority name, document number, date of writing, party information, execution basis, execution matters, execution method, administrative reconsideration information, and administrative litigation information in dynamic data; Get the first placeholder, the second placeholder, the third placeholder, the fourth placeholder, the fifth placeholder, the sixth placeholder, the seventh placeholder, the eighth placeholder, the ninth placeholder, and the tenth placeholder in the target configuration file, replace the first placeholder with the document name, replace the second placeholder with the name of the issuing authority, replace the third placeholder with the document number, replace the fourth placeholder with the date of writing, replace the fifth placeholder with the party information, replace the sixth placeholder with the execution basis, replace the seventh placeholder with the execution matter, replace the eighth placeholder with the execution method, replace the ninth placeholder with the administrative reconsideration information, and replace the tenth placeholder with the administrative litigation information to obtain the target configuration file carrying the dynamic data.
5. The document configuration method according to claim 1, characterized in that: The step of inputting the target configuration file carrying the dynamic data into the target engine comprises: Get the evaluation value corresponding to each template engine, and select the template engine with the largest evaluation value as the target engine; The input instruction is read, the input instruction is executed, and the target configuration file carrying the dynamic data is input into the target engine.
6. The document configuration method according to claim 1, characterized in that: The target configuration file carrying the dynamic data is rendered by the target engine to generate a target document containing the dynamic data, including: Parsing the target configuration file carrying the dynamic data through a target engine to obtain the parsed target configuration file; Read the rendering instruction, execute the rendering instruction, render the parsed target configuration file, and generate a target document containing dynamic data.
7. The document configuration method according to claim 1, characterized in that: After rendering the target configuration file carrying the dynamic data through the target engine to generate a target document containing the dynamic data, the document configuration method includes: Create a storage area corresponding to the target document type, store the target document in the storage area, create an access interface for the storage area, read the target document through the access interface, create a display window, and display the target document through the display window.
8. A document configuration device, characterized in that: include: The first acquisition module is used to acquire the component type, component style, component parameters, and event listener corresponding to each preset document type, and combine the component type, component style, component parameters, and event listener corresponding to each preset document type into component information corresponding to each preset document type; A saving module is used to save the component information corresponding to each preset document type using a JSON data structure, and obtain a preset configuration file corresponding to each preset document type; The second acquisition module is used to acquire dynamic data and a target document type, match the target document type with a plurality of preset document types, and select a preset configuration file corresponding to a successfully matched preset document type as the target configuration file; A writing module, used for writing dynamic data into the target configuration file to obtain the target configuration file carrying the dynamic data; An input module, used for inputting the target configuration file carrying the dynamic data into a target engine; The generation module is used to render the target configuration file carrying the dynamic data through a target engine to generate a target document containing the dynamic data.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the document configuration method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the document configuration method as described in any one of claims 1 to 7 are implemented.