Business template processing method and device, equipment, storage medium and program product

By obtaining and adjusting business templates from template sharing space, the problem of poor template adaptability in different business scenarios is solved, efficient and flexible business template processing is achieved, and the efficiency and accuracy of statistical data processing is improved.

CN119150833APending Publication Date: 2024-12-17MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411174346.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

In different business scenarios, it is difficult for the existing technology to quickly and accurately obtain suitable business templates, resulting in low statistical data processing efficiency, and the existing templates cannot be dynamically adjusted and cannot meet various business needs.

Method used

By obtaining the business templates of the target business scenario from the template sharing space and adjusting them based on the template adjustment parameters, a second business template that meets the preset business conditions is generated to improve the adaptability of the template and the business scenario.

Benefits of technology

It improves the acquisition efficiency and adaptability of business templates, enhances users' freedom to adjust templates and business execution efficiency, reduces errors, and improves work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119150833A_ABST
    Figure CN119150833A_ABST
Patent Text Reader

Abstract

The invention provides a business template processing method and device, equipment, a storage medium and a program product. The method comprises the steps of obtaining a first service template of a target service scene from a template sharing space in response to a template obtaining request for the target service scene, obtaining a template adjustment parameter for the first service template in response to the situation that the first service template does not meet a preset service condition, and adjusting the first service template based on the template adjustment parameter, and obtaining a second service template meeting a preset service condition. Through the service template obtaining method and device, the efficiency of obtaining the service template can be improved, and meanwhile the adaptability of the obtained service template and the target service scene is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to computer technology, and in particular to a method, device, equipment, storage medium and program product for processing a business template. Background Art

[0002] In the process of statistical data, in order to improve the efficiency of statistical data, a table for statistical data, that is, a business template, is often created first, and then the data to be counted is filled in the table to complete the data statistics. For the target business scenario, if the selected business template is appropriate, the business processing can be completed quickly and accurately.

[0003] In different business scenarios and different statistical scenarios, the business templates required for statistical data are not the same. How to determine the appropriate business template for the target business scenario has become one of the hot issues in this field. Summary of the invention

[0004] The embodiments of the present application provide a method, device, storage medium and program product for processing a business template, which can improve the efficiency of obtaining business templates and at the same time improve the adaptability of the obtained business templates to the target business scenario.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] The present application provides a method for processing a service template, the method comprising:

[0007] In response to a template acquisition request for a target business scenario, acquiring a first business template of the target business scenario from a template sharing space;

[0008] In response to the first service template not satisfying a preset service condition, acquiring a template adjustment parameter for the first service template;

[0009] Based on the template adjustment parameters, the first service template is adjusted to obtain a second service template that meets the preset service conditions.

[0010] The embodiment of the present application provides a device for processing a service template, including:

[0011] An acquisition module, configured to, in response to a template acquisition request for a target business scenario, acquire a first business template of the target business scenario from a template sharing space;

[0012] The acquisition module is further configured to acquire a template adjustment parameter for the first service template in response to the first service template not satisfying a preset service condition;

[0013] The adjustment module is used to adjust the first service template based on the template adjustment parameters to obtain a second service template that meets the preset service conditions.

[0014] An embodiment of the present application provides an electronic device, the electronic device comprising:

[0015] A memory for storing computer executable instructions;

[0016] The processor is used to implement the service template processing method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.

[0017] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are executed by a processor, the method for processing a business template provided in the embodiment of the present application is implemented.

[0018] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions. When the computer executable instructions are executed by a processor, the service template processing method provided by the embodiment of the present application is implemented.

[0019] The embodiments of the present application have the following beneficial effects:

[0020] In response to a template acquisition request for a target business scenario, a first business template of the target business scenario is acquired from a template sharing space. Since the template sharing space is a space specially set up for storing business templates, no redundant data is stored in the template sharing space. Therefore, the efficiency of acquiring templates from the template sharing space is higher than the efficiency of querying from a database. That is, by acquiring templates from the template sharing space, the efficiency of acquiring business templates can be improved. In response to the first business template not meeting the preset business conditions, a template adjustment parameter for the first business template is acquired. Based on the template adjustment parameter, the first business template is adjusted to obtain a second business template that meets the preset business conditions. After adjusting the first business template that does not meet the business conditions through the template adjustment parameter, a second business template that meets the business conditions can be obtained. In this way, the user can adjust the business template according to actual needs to obtain a business template that matches the current business, which not only improves the user's freedom and initiative in adjusting the business template, but also improves the adaptability of the business template to the current business. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a first architecture diagram of a service template processing system 100 provided in an embodiment of the present application;

[0022] Figure 2 is a schematic diagram of the structure of an electronic device 500 provided in an embodiment of the present application;

[0023] Figure 3A This is a first flow chart of a method for processing a service template provided in an embodiment of the present application;

[0024] Figure 3B This is a second flow chart of the method for processing a service template provided in an embodiment of the present application;

[0025] Figure 4 It is an overall flow chart of the method for processing a service template provided in an embodiment of the present application;

[0026] Figure 5 It is a detailed flowchart of the method for processing the business template provided in the embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0028] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0029] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0030] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0031] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0032] The relevant data collection and processing in the embodiments of this application should be strictly in accordance with the requirements of relevant laws and regulations when applied in examples, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of authorization of laws and regulations and the personal information subject.

[0033] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0034] 1) Template Sharing Space: Template Sharing Space is an online service function based on cloud computing. Users can store, manage and share template files required in different business scenarios, such as Excel templates, Word templates and PDF templates, through the template sharing space. These template files can be reports, documents, data analysis tables, etc., which can be reused in multiple projects or tasks to improve work efficiency and accuracy. In the template sharing space, users can create their own template library and upload commonly used template files to the cloud for easy access and editing anytime, anywhere. In addition, the sharing function allows team members to use and update these templates together, ensuring that the entire team is using unified standard files, avoiding collaboration problems caused by inconsistent formats or non-standard content.

[0035] 2) Template adjustment parameters: Template adjustment parameters refer to the parameter settings used to adjust the data content in the template file in the template sharing space. These parameters are usually preset values ​​and can be modified through simple operations to adapt to different data input and business needs. In specific business scenarios, template adjustment parameters can help users quickly fill in and generate reports, documents or other data processing tasks. For example, in a financial report template, there may be parameter settings for adjusting the report's time range, accounting period, currency unit, etc.; in a sales report template, there may be parameters for adjusting sales channels, product categories, regions, etc. By adjusting these parameters, users can easily generate customized reports without having to manually enter data every time. This not only improves work efficiency, but also reduces the possibility of errors.

[0036] In the related art, the process of executing a business through an existing business template is as follows: the user logs in to the system, selects the import template type, and clicks on the template to download. Then, the background program reads the imported template according to the requested operation type, and writes the hard-coded title and content information in the program implementation into the table object (WorkBook object). The data of the table object is written to the output stream (OutputStream) object of the service response object (HttpServletResponse). The user downloads the browser page and receives the output stream to complete the download of the table (excel) template file.

[0037] In the above method, although the existing business template can be used to execute business, the downloaded template title and fill content are fixed and hard-coded and embedded in the program code block, and the title and fill content cannot be adjusted dynamically. Every time a new table (Excel) is imported into the template, the program code logic needs to be added, and it cannot be dynamically expanded. It does not support dynamic generation of sheet pages, and does not support dynamic filling of sheet page template data content.

[0038] The embodiments of the present application provide a method, apparatus, device, storage medium and program product for processing a business template, which can improve the efficiency of obtaining business templates and improve the adaptability of the obtained business templates to the target business scenario.

[0039] The following describes an exemplary application of the electronic device provided in the embodiments of the present application. The electronic device provided in the embodiments of the present application can be implemented as various types of terminals such as a laptop computer, a tablet computer, a desktop computer, a set-top box, a mobile device, a smart device, and a vehicle-mounted terminal, and can also be implemented as a server. The following describes an exemplary application when the device is implemented as a server.

[0040] See also Figure 1 , Figure 1 It is a schematic diagram of the architecture of the business template processing system 100 provided in an embodiment of the present application. To implement a processing application supporting a business template, the terminal 400 is connected to the server 200 via a network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.

[0041] In some embodiments, terminal 400 is used to send a template acquisition request to server 200 after responding to the user's template acquisition request; server 200 is used to, in response to the template acquisition request for the target business scenario, obtain a first business template for the target business scenario from the template sharing space, and in response to the first business template not meeting the preset business conditions, obtain template adjustment parameters for the first business template; based on the template adjustment parameters, adjust the first business template to obtain a second business template that meets the preset business conditions, and return the second business template to terminal 400.

[0042] In other embodiments, the terminal 400 is used to obtain a first business template for a target business scenario from a template sharing space after responding to a template acquisition request from a user, and in response to the first business template not satisfying preset business conditions, send a parameter acquisition request for template adjustment parameters to the server 200; the server 200 is used to obtain the template adjustment parameters of the first business template in response to the parameter acquisition request, and return the template adjustment parameters to the terminal 400; after the terminal 400 obtains the template adjustment parameters for the first business template, it adjusts the first business template based on the template adjustment parameters to obtain a second business template that satisfies the preset business conditions.

[0043] See also Figure 2 , Figure 2 is a schematic diagram of the structure of an electronic device 500 provided in an embodiment of the present application, Figure 2 The electronic device 500 shown includes: at least one processor 510, a memory 550, at least one network interface 520 and a user interface 530. The various components in the electronic device 500 are coupled together via a bus system 540. It is understood that the bus system 540 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 540 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 540 is not described in detail. Figure 2 Various buses are labeled as bus system 540 .

[0044] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0045] The user interface 530 includes one or more output devices 531 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0046] The memory 550 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 550 may optionally include one or more storage devices that are physically remote from the processor 510.

[0047] The memory 550 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 550 described in the embodiments of the present application is intended to include any suitable type of memory.

[0048] In some embodiments, the memory 550 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0049] Operating system 551, including system programs for processing various basic system services and performing hardware-related tasks, such as framework layer, core library layer, driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0050] A network communication module 552, used to reach other electronic devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 include: Bluetooth, Wireless Compatibility Authentication (WiFi), and Universal Serial Bus (USB), etc.;

[0051] a presentation module 553 for enabling presentation of information via one or more output devices 531 (e.g., display screen, speaker, etc.) associated with the user interface 530 (e.g., a user interface for operating peripherals and displaying content and information);

[0052] The input processing module 554 is used to detect one or more user inputs or interactions from one of the one or more input devices 532 and translate the detected inputs or interactions.

[0053] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2 The processing device 555 of the business template stored in the memory 550 is shown, which can be software in the form of a program and a plug-in, etc., including the following software modules: an acquisition module 5551 and an adjustment module 5552. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be explained below.

[0054] In other embodiments, the device provided in the embodiments of the present application can be implemented in hardware. As an example, the device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the service template processing method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), digital signal processors (Digital Signal Processor, DSP), programmable logic devices (Programmable Logic Device, PLD), complex programmable logic devices (Complex Programmable Logic Device, CPLD), field programmable gate arrays (Field-Progr ammable Gate Array, FPGA) or other electronic components.

[0055] The following describes the service template processing method provided by the embodiment of the present application. As mentioned above, the electronic device implementing the service template processing method of the embodiment of the present application can be a terminal, a server, or a combination of the two. Therefore, the execution subject of each step will not be repeatedly described below.

[0056] See also Figure 3A , Figure 3A This is a first flow chart of the method for processing a service template provided in an embodiment of the present application, which will be combined with Figure 3A Steps 101 to 103 are shown for explanation.

[0057] In step 101, in response to a template acquisition request for a target business scenario, a first business template of the target business scenario is acquired from a template sharing space.

[0058] As an example, the target business scenario may be a scenario that requires the use of business templates, such as a financial data statistics scenario, a resume filling scenario, a personnel information statistics scenario, and a business information statistics scenario. The business template may be a template in a format such as an Excel template, a Word template, and a PDF template. The specific business template may be selected according to the actual business scenario. For example, when the target business scenario is a financial data statistics scenario, the corresponding business template may be an Excel template, and when the target business scenario is a resume filling scenario, the corresponding business template may be a PDF template.

[0059] As an example, the template sharing space may be an online service function based on cloud computing, through which users can store, manage and share template files required in different business scenarios, such as Excel templates, Word templates and PDF templates.

[0060] As an example, before obtaining the first service template in the template sharing space, it is necessary to first create the first service template and upload it to the template sharing space. The detailed process of creating the first service template is described below.

[0061] In some embodiments, before executing step 101 to obtain the first business template of the target business scenario from the template sharing space, the following technical solution can also be executed: create an initial business template; based on the target business scenario, construct different template types for the initial business template to obtain a dynamic business template and a static business template; store the dynamic business template and the static business template in the template sharing space.

[0062] As an example, an initial business template is first created. The initial business template may be a blank template, ie, a template without any content, or a business template including a blank form. The specific initial business template may be a variety of default templates provided by the template sharing space.

[0063] As an example, according to business requirements, the initial business template is then processed into different template types to obtain a dynamic business template and a static business template. The dynamic business template may be a business template including dynamic data, and the static business template may be a template consisting entirely of data input by the user.

[0064] As an example, the first column of data in dynamic business template A is the number of employees, the second column is the total salary expenditure, and the third column is the average salary of employees. The first column and the second column are both obtained by querying the database, and the third column is calculated based on the first column and the second column.

[0065] The static business template B is a resume template, and the first line of the static business template B is the name, and the second line is the gender. Each data of the static business template B is data input by the user through the terminal.

[0066] As an example, the dynamic service template and the static service template may be stored in the template sharing space. That is, the first service template may be a dynamic service template or a static service template, and the specific template type is determined according to the template acquisition request.

[0067] In some embodiments, obtaining the first business template of the target business scenario from the template sharing space in step 101 can be implemented by the following technical solution: verifying the template acquisition authority of the initiator of the template acquisition request; if the template acquisition authority verification passes, obtaining the first business template of the target business scenario from the template sharing space.

[0068] As an example, before obtaining the first service template, it is necessary to perform authority verification on the initiator of the template acquisition request, so as to provide the first service template to the initiator if the initiator has the authority to obtain the first service template.

[0069] As an example, the method of verifying the template acquisition authority of the initiator may be at least one of the following:

[0070] 1. Username and password verification: Users need to enter the correct username and password to access the system. Usually, the username and password will be compared with the user information stored in the database.

[0071] 2. Multi-factor authentication: In addition to username and password, additional verification factors are required, such as SMS verification code, email link, biometric data, etc. This method can significantly improve account security.

[0072] 3. Role-based access control: Different permissions are assigned according to the user's role. For example, the system can set up roles such as administrator, ordinary user, and visitor, and each role has different access rights.

[0073] 4. Attribute-based access control: Access rights are determined not only based on the user's role, but also based on the user's attributes (such as department, position, etc.). This approach can achieve more fine-grained permission control.

[0074] Through the above method, it is possible to prevent non-related personnel from obtaining business templates in the template sharing space, reduce the possibility of data leakage, and improve the security of business execution.

[0075] In some embodiments, the first business template of the target business scenario obtained from the template sharing space in step 101 can be obtained by: Figure 3B Steps 1011 to 1013 shown implement:

[0076] In step 1011, the template name carried in the template acquisition request is obtained, and the mapping relationship between the template name and the template type in the target business scenario is obtained.

[0077] As an example, the template sharing space assigns a name to each service template when storing each service template. Therefore, there is a mapping relationship between each service template and the name of the service template.

[0078] As an example, user A creates table template A, and the template sharing space names table template A as Table 1. User B creates table template B, and the template sharing space names table template B as Table 2. There is a mapping relationship between table template A and Table 1, and there is a mapping relationship between table template B and Table 2.

[0079] In step 1012, the target template type is queried according to the template name and mapping relationship carried in the template acquisition request, and the target template type includes a static template type and a dynamic template type.

[0080] As an example, if table template A is a dynamic template, table B is a static business template, table template A and table 1 have a mapping relationship, and table template B and table 2 have a mapping relationship. If the template name carried in the template acquisition request is table 1, it is determined that the table template A has a mapping relationship with table 1, and table template A is a dynamic template, so it can be determined that the business template obtained by the template acquisition request is a dynamic template.

[0081] In step 1013, a first business template of a target template type in a target business scenario is obtained from the template sharing space.

[0082] As an example, since dynamic templates and static business templates can be stored separately in the template sharing space, after the template type of the first business template is first obtained, the efficiency of searching for the first business template can be improved. For example, after determining that the target template type of the first business template is a dynamic template, it can be directly searched from the dynamic templates stored in the template sharing space without searching from all business templates stored in the template sharing space.

[0083] Through the above method, the efficiency of obtaining service templates from the template sharing space can be improved.

[0084] In some embodiments, obtaining the first business template of the target template type under the target business scenario from the template sharing space in step 101 can be implemented by the following technical solution: when the target template type is a static template type, obtaining the static business template under the target business scenario from the template sharing space through the service response object processing process, and using the static business template as the first business template; in response to the static business template meeting the preset business conditions, filling the static fill data corresponding to the target business scenario into the static business template.

[0085] As an example, if the target template type is a static template, the file stream of the template that is mapped to the template name is read from the template sharing space according to the template name, and then the obtained file stream is written to the output stream object of HttpServletResponse and returned.

[0086] If it is determined that the returned static business template meets the preset business conditions, that is, the obtained static business template does not need to be modified to execute the corresponding business, the static filling data corresponding to the target business scenario can be filled into the static business template.

[0087] Through the above method, static service templates can be quickly obtained, thereby improving the efficiency of service execution.

[0088] In some embodiments, obtaining the first business template of the target template type corresponding to the target business scenario from the template sharing space in step 101 can be implemented by the following technical solution: when the target template type is a dynamic template type, in response to the first business template meeting the preset business conditions, the dynamic fill data corresponding to the target business scenario is filled into the first business template.

[0089] As an example, when the target template type is a dynamic template type, the template name is matched to the template processing service collection object specification form template service list (specExcelTemplateServiceList). The dynamic template processing service is based on the subclass inheriting the base class specification form template service (Spec ExcelTemplateService) to implement the generate template (buildTemplate) method.

[0090] If it is determined that the returned dynamic business template meets the preset business conditions, that is, the obtained dynamic business template can execute the corresponding business without modification, the dynamic filling data corresponding to the target business scenario can be filled into the dynamic business template.

[0091] In some embodiments, the above-mentioned filling of dynamic filling data corresponding to the target business scenario into the first business template can be achieved through the following technical solution: constructing a filling object and a filling parsing class corresponding to the dynamic business template; based on the filling parsing class, filling the dynamic filling data corresponding to the target business scenario into the filling object to obtain a dynamic business template filled with dynamic filling data.

[0092] As an example, dynamic data is obtained according to the template type to fill the write page (WriteSheet) object of the table author (ExcelWriter), and then the write page (WriteSheet) object is constructed, the dynamic template filling parsing class is defined, and then the dynamic template data is filled and replaced, and the filled and replaced data is written to the write page (WriteSheet) object. Then, the file stream is read from the template shared space and bound to the input stream object of the table author (ExcelWriter), and the ExcelWriter output stream object is set to the output stream object of HttpServletRe sponse to complete the data assembly return.

[0093] Through the above method, dynamic business templates can be quickly obtained, thereby improving the efficiency of business execution.

[0094] In step 102, in response to the first service template not satisfying a preset service condition, a template adjustment parameter for the first service template is obtained.

[0095] As an example, when the first service template does not meet the preset service condition, it indicates that the current first service template cannot execute the corresponding service and needs to be adjusted. In this case, the template adjustment parameter of the first service template needs to be obtained.

[0096] In some embodiments, obtaining the template adjustment parameters for the first business template in step 102 can be implemented by the following technical solution: verifying the template adjustment authority of the initiator; if the template adjustment authority verification passes, obtaining the template adjustment parameters for the first business template.

[0097] As an example, when template adjustment parameters need to be obtained, in order to prevent irrelevant personnel from setting the existing template, the template adjustment authority of the initiator needs to be verified, so that the template adjustment parameters can be obtained after the initiator passes the template adjustment authority verification.

[0098] As an example, the template adjustment authority verification method for the initiator may be at least one of the following:

[0099] 1. Username and password verification: Users need to enter the correct username and password to access the system. Usually, the username and password will be compared with the user information stored in the database.

[0100] 2. Multi-factor authentication: In addition to username and password, additional verification factors are required, such as SMS verification code, email link, biometric data, etc. This method can significantly improve account security.

[0101] 3. Role-based access control: Different permissions are assigned according to the user's role. For example, the system can set up roles such as administrator, ordinary user, and visitor, and each role has different access rights.

[0102] 4. Attribute-based access control: Access rights are determined not only based on the user's role, but also based on the user's attributes (such as department, position, etc.). This approach can achieve more fine-grained permission control.

[0103] In step 103, the first service template is adjusted based on the template adjustment parameters to obtain a second service template that meets the preset service conditions.

[0104] In some embodiments, the first business template is adjusted based on the template adjustment parameters in step 103 to obtain a second business template that meets the preset business conditions. This can be achieved through the following technical solution: obtaining the template difference between the preset business template and the first business template; based on the template adjustment parameters, correcting the template difference to obtain the second business template that meets the preset business conditions.

[0105] As an example, when a user sends a template acquisition request and indicates that a specific business template is needed, the template difference between the preset business template and the first business template can be obtained, and the template difference can be corrected based on the template adjustment parameters to obtain a second business template that meets the preset business conditions.

[0106] As an example, if the preset business template is a table with three rows and four columns, and the first business template is a table with three rows and three columns, at this time, the template difference is that the first business template has one less table column, then one column is added to the first business template to obtain the second business template.

[0107] Through the above manner, the efficiency of adjusting the service template can be improved by adjusting the template in the template sharing space.

[0108] In some embodiments, the adjustment of the first business template based on the template adjustment parameters in step 103 to obtain the second business template that meets the preset business conditions can be achieved through the following technical solutions: structural adjustment processing is performed on the first business template to obtain a third business template that meets the structure indicated by the preset business conditions; based on the template adjustment parameters, logical configuration processing is performed on the blocks in the third business template that are different from the first business template to obtain a second business template that meets the logic indicated by the preset business conditions.

[0109] As an example, the user performs structural adjustment processing on the first service template to obtain a third service template that meets the structure indicated by the preset service condition.

[0110] For example, if the first business template has the number of employees in the first column and the total wages in the second column, and the third business template has the number of employees in the first column, the total wages in the second column, and the average wages of employees in the third column, then the calculation formula for each data included in the third column needs to be set through template adjustment parameters to calculate the average wages of employees in the third column. Then, the business template with the data filled in is used as the second business template.

[0111] Through the above method, users can adjust the business template by themselves, which saves business processes and improves the efficiency of business execution.

[0112] In some embodiments, after executing the above step 103, the following technical solution may also be executed: in response to a synchronization operation on the second service template, the second service template is synchronized to the template sharing space.

[0113] In some embodiments, the above-mentioned synchronization of the second business template to the template sharing space can be achieved through the following technical solution: obtaining the template name of the second business template to be synchronized; in response to the template name being the same as the template name of an existing business template in the template sharing space, modifying the template name of the second business template to obtain the target template name; synchronizing the second business template carrying the target template name to the template sharing space.

[0114] As an example, since the business templates included in the query template sharing space are implemented by the names of the business templates, the business templates stored in the template sharing space need to have unique template names. When the template name of the newly added second business template is the same as the template name of the existing business template in the template sharing space, the template name of the second business template needs to be modified to obtain the target template name. The second business template with the target template name is synchronized to the template sharing space.

[0115] As an example, a business template with the template name Table 3 is stored in the template sharing space. If the template name of the second business template is also Table 3, the template name of the second business template can be modified to Table 4, and then the second business template with the template name Table 4 can be synchronized to the template sharing space.

[0116] Through the above method, it is possible to avoid calling the wrong service template due to duplicate service template names, thereby improving the stability of service execution.

[0117] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.

[0118] The following uses the Excel template as an example to illustrate. Figure 4 , Figure 4 It is an overall flow chart of the method for processing business templates provided in an embodiment of the present application.

[0119] In step 401, a template file is created.

[0120] Create an Excel template file locally based on the business scenario (i.e. the initial business template mentioned above).

[0121] In step 402, the template file is uploaded to the template sharing space.

[0122] Use the package command to upload the locally created Excel template file to the server and save it to the template sharing space of the Excel template.

[0123] In step 403, a template type is selected.

[0124] After the user logs in to the business system, select the template type to be downloaded and click the download button.

[0125] In step 404, the template type selected by the user is determined.

[0126] The background program obtains the download template type and template name, and determines the download template type selected by the current user.

[0127] If the user selects a static service template type, step 405 is executed; if the user selects a dynamic template type, step 406 is executed.

[0128] In step 405, a static service template is generated.

[0129] The download template type selected by the user is a static template. The background program reads the file stream from the template shared space of the Excel template according to the template name, writes it to the OutputStream object of HttpServletResponse and returns it. The foreground user receives the returned output stream object and generates a static Excel template file (i.e., a static business template).

[0130] In step 406, a dynamic service template under the target service scenario is obtained from the template sharing space.

[0131] The download template type selected by the user is a dynamic template. The background program reads the file stream from the shared storage space of the Excel template according to the template name and binds it to the input stream InputStream object of the ExcelWriter object.

[0132] In step 407, a filling object corresponding to the dynamic service template is constructed.

[0133] According to the template type, query the background database to obtain the variable parameters (varParams) of the template filling data object, use the ExcelWriter object to first create a sheet page object write page (WriteSheet), and then use the write page to write (variable parameters, table name) (writeSheet.write(varParams, templateName)) to complete the data filling.

[0134] In step 408, the dynamic filling data corresponding to the target business scenario is filled into the filling object to obtain a dynamic business template filled with the dynamic filling data.

[0135] The output stream of ExcelWriter is written to the OutputStream object of HttpServletResponse and returned. The front-end user receives the returned output stream object and generates an Excel template file.

[0136] Combine the following Figure 5 To explain, Figure 5 It is a detailed flowchart of the method for processing the business template provided in the embodiment of the present application.

[0137] In step 501, a template file is created.

[0138] Create an Excel template file (business template) locally.

[0139] In step 502, the templates are classified.

[0140] Business templates are classified into static template types and dynamic template types according to business scenarios.

[0141] In step 503, a static template file is generated

[0142] The static template type directly generates a static template file.

[0143] In step 504, population variables are defined.

[0144] Dynamic template type, you need to define the dynamic filling variables of the template as table variables ({.templateVar}) in the Excel worksheet. If the business scenario requires, you can also define multiple dynamic filling variables. The rules are table variable 2 ({.templateVar2}), table variable 3 ({.templateVar3}), ..., table variable N ({.templateVarN}). The embodiments of this application only involve the processing of table variables ({.templateVar}).

[0145] In step 505, a dynamic template file is generated.

[0146] Generate dynamic template files based on dynamically populated variables.

[0147] In step 506, the template file is uploaded to the template sharing space.

[0148] Use the packaging command ([copy:downloadtemplate / : / home / finance / Data / template / ]) to upload the locally created template file to the Excel template sharing space ( / home / finance / Data / template / ) on the server.

[0149] In step 507, the template is downloaded.

[0150] The user logs in to the system, selects the template type according to the business scenario, and clicks to download the template.

[0151] In step 508, the template name is obtained.

[0152] The backend download service reads the download template request parameter: template name (templateName).

[0153] In step 509, the template type is obtained.

[0154] Query the mapped template type according to the template name (templateName): (template = serial number enumeration (table class, table name)) (Templates templates = SerializeEnum.valueOf (Templates.class, templateName));

[0155] In step 510, the static template is returned.

[0156] If the downloaded Excel template type is a static template type, the file stream is read from the Excel template shared storage space and written to the OutputStream object of HttpServletResponse and returned.

[0157] File file = new File (templates.getValue ()); \\ read the file stream

[0158] OutputStrem outputStream = HttpServletResponse.getOutputStream(); \\Write to the output stream object

[0159] FileDownLoadUtil.start(outputStream,file); \\Return result

[0160] In step 511, the dynamic template service is called.

[0161] If the downloaded Excel template type is a dynamic template type, the dynamic template processor is called to distribute the dynamic template processing service: Standard table template service header (output stream, table name) (SpecExcelTemplateHandler.hander (outpuStream, templateName))

[0162] In step 512, a dynamic template is generated.

[0163] Dynamic template processing service builds a generated template: According to the template name, it matches the template processing service collection object specification table template service list (specExcelTemplateServiceList). The dynamic template processing service is based on the subclass inheritance base class specification table template service (SpecExcelTemplateService) to implement the template generation (buildTemplate) method, as follows:

[0164] for(SpecExcelTemplateService specExcelTemplateService:specExcelTemplateServiceList){ / / Loop through each SpecExcelTemplateService object in the collection

[0165] if(StringUtils.equals(specExcelTemplateService.templateType(),form.getTemplateName())){ / / Check whether the template type of the current object is the same as the template name provided in the form

[0166] specExcelTemplateService.buildTemplate(outputStream, templateName); / / If the type matches, call the buildTemplate method of the object

[0167] / / The parameter outputStream is the output stream used to write the generated Excel file to the client

[0168] / / The templateName parameter is the name of the template, which may be used to distinguish different templates

[0169] }

[0170] }

[0171] In step 513, dynamic filling data is filled.

[0172] Get the dynamic data source to fill the WriteSheet object of ExcelWriter according to the template type

[0173] Constructing a WriteSheet Object

[0174] WriteSheet writeSheet=ExcelWriter.builderSheet();

[0175] Define dynamic template filling parsing class

[0176] public class ExcelTemplateVarParam{

[0177] / **

[0178] *Excel placeholder variable

[0179] * /

[0180] private String templateVar; / / constructor

[0181] }

[0182] # Dynamic template data filling and replacement:

[0183] List <exceltemplatevarparam>varParams=getTemplateVarList(ExcelTemplateVarParam.class)

[0184] Write the filled replaced data to the writeSheet object

[0185] writeSheet.write(varParams, templateName);

[0186] In step 514, the file stream is bound to the input stream object.

[0187] Read the file stream from the Excel template shared storage space and bind it to the input stream object of ExcelWriter

[0188] File file = new File (templateName); / / create a File object that points to the file named templateName

[0189] FileInputStream fis = new FileInputStream (file); / / Create a FileInputStream object to read data from the file

[0190] ExcelWriter.bindInputStream(fis); / / Use the bindInputStream method of the ExcelWriter class to bind the FileInputStream to the ExcelWriter object. In this way, ExcelWriter can use this input stream to write Excel files

[0191] In step 515, the data assembly is completed and returned.

[0192] Set the ExcelWriter output stream object to the outputstream of HttpServletResponse to complete data assembly and return ExcetWriter.setOutputStream(outputstream);

[0193] Through the above method, when the imported template is classified as a static template: when the template changes with the business scenario and the template import title column needs to be adjusted, the above method does not require adjusting the program code and publishing application upgrades. You can directly modify the original template content and use the packaging command to upload it to the template shared storage space.

[0194] When the imported template is classified as a dynamic template: the Sheet page content of the template imported through Excel can be filled with dynamic template content based on the defined template filling variables. The extensibility of the dynamic filling content data source is achieved.

[0195] It is understandable that in the embodiments of the present application, related data such as user information is involved. When the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards.

[0196] The following continues to describe the exemplary structure of the service template processing device 555 provided in the embodiment of the present application implemented as a software module. In some embodiments, for example Figure 2 As shown, the software modules stored in the service template processing device 555 of the memory 550 may include:

[0197] An acquisition module 5551 is used to respond to a template acquisition request for a target business scenario and acquire a first business template of the target business scenario from a template sharing space;

[0198] The acquisition module 5551 is further configured to acquire a template adjustment parameter for the first service template in response to the first service template not satisfying a preset service condition;

[0199] The adjustment module 5552 is used to adjust the first business template based on the template adjustment parameters to obtain a second business template that meets the preset business conditions.

[0200] In some embodiments, the acquisition module 5551 is also used to verify the template acquisition authority of the initiator of the template acquisition request; if the template acquisition authority verification is passed, obtain the first business template of the target business scenario from the template sharing space; perform template adjustment authority verification on the initiator; if the template adjustment authority verification is passed, obtain the template adjustment parameters for the first business template.

[0201] In some embodiments, the acquisition module 5552 is further used to obtain the template difference between the preset business template and the first business template; based on the template adjustment parameters, the template difference is corrected to obtain a second business template that meets the preset business conditions.

[0202] In some embodiments, the adjustment module 5552 is also used to perform structural adjustment processing on the first business template to obtain a third business template that meets the structure indicated by the preset business conditions; based on the template adjustment parameters, perform logical configuration processing on the blocks in the third business template that are different from the first business template to obtain a second business template that meets the logic indicated by the preset business conditions.

[0203] In some embodiments, the acquisition module 5551 is also used to create an initial business template; based on the target business scenario, construct different template types for the initial business template to obtain a dynamic business template and a static business template; and store the dynamic business template and the static business template in the template sharing space.

[0204] In some embodiments, the acquisition module 5551 is also used to obtain the template name carried by the template acquisition request, and obtain the mapping relationship between the template name and the template type in the target business scenario; query the target template type according to the template name carried by the template acquisition request and the mapping relationship, and the target template type includes a static template type and a dynamic template type; obtain the first business template of the target template type in the target business scenario from the template sharing space.

[0205] In some embodiments, the acquisition module 5551 is also used to, when the target template type is a static template type, obtain the static business template under the target business scenario from the template sharing space through the service response object processing process, and use the static business template as the first business template; in response to the static business template satisfying the preset business conditions, fill the static fill data corresponding to the target business scenario into the static business template.

[0206] In some embodiments, the acquisition module 5551 is further used to fill the dynamic fill data corresponding to the target business scenario into the first business template in response to the first business template satisfying the preset business condition when the target template type is a dynamic template type.

[0207] In some embodiments, the acquisition module 5551 is also used to construct a filling object and a filling parsing class corresponding to the dynamic business template; based on the filling parsing class, the dynamic filling data corresponding to the target business scenario is filled into the filling object to obtain a dynamic business template filled with the dynamic filling data.

[0208] In some embodiments, after obtaining the second business template that meets the preset business conditions, the device also includes: a synchronization module, which is also used to obtain the template name of the second business template to be synchronized; in response to the template name being the same as the template name of an existing business template in the template sharing space, modifying the template name of the second business template to obtain a target template name; and synchronizing the second business template carrying the target template name to the template sharing space.

[0209] The embodiment of the present application provides a computer program product, which includes computer executable instructions, and the computer executable instructions are stored in a computer readable storage medium. The processor of the electronic device reads the computer executable instructions from the computer readable storage medium, and the processor executes the computer executable instructions, so that the electronic device executes the above-mentioned service template processing method of the embodiment of the present application.

[0210] The present application embodiment provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the processor will execute the service template processing method provided by the present application embodiment, for example, Figure 3A The processing method of the business template is shown.

[0211] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.

[0212] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0213] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0214] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.

[0215] In summary, the following beneficial effects can be achieved through the embodiments of the present application:

[0216] In response to a template acquisition request for a target business scenario, a first business template of the target business scenario is acquired from a template sharing space. Since the template sharing space is a space specially set up for storing business templates, no redundant data is stored in the template sharing space. Therefore, the efficiency of acquiring templates from the template sharing space is higher than the efficiency of querying from a database. Thus, by acquiring templates from the template sharing space, the efficiency of acquiring business templates can be improved. In response to the first business template not meeting the preset business conditions, a template adjustment parameter for the first business template is acquired. Based on the template adjustment parameter, the first business template is adjusted to obtain a second business template that meets the preset business conditions. After adjusting the first business template that does not meet the business conditions through the template adjustment parameter, a second business template that meets the business conditions can be obtained. Then, the corresponding business is executed based on the second business template, thereby improving the efficiency of executing the business. In response to a synchronization operation for the second business template, the second business template is synchronized to the template sharing space. By synchronizing the second business template to the template sharing space, the second business template can be downloaded by other terminals that can access the template sharing space, so that when executing a business similar to the business corresponding to the second business template, the second business template can be used directly without recreating a new template or adjusting the existing template, thereby improving the efficiency of executing the business.

[0217] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.< / exceltemplatevarparam>

Claims

1. A method for processing a service template, characterized in that: The method comprises: In response to a template acquisition request for a target business scenario, acquiring a first business template of the target business scenario from a template sharing space; In response to the first service template not satisfying a preset service condition, acquiring a template adjustment parameter for the first service template; Based on the template adjustment parameters, the first service template is adjusted to obtain a second service template that meets the preset service conditions.

2. The method according to claim 1, characterized in that The preset service condition corresponds to a preset service template, and the first service template is adjusted based on the template adjustment parameter to obtain a second service template that meets the preset service condition, including: Acquire a template difference between the preset service template and the first service template; Based on the template adjustment parameters, the template difference is corrected to obtain a second service template that meets the preset service conditions.

3. The method according to claim 1, characterized in that The adjusting the first service template based on the template adjustment parameter to obtain a second service template that meets the preset service condition includes: Performing structural adjustment processing on the first service template to obtain a third service template that meets the structure indicated by the preset service condition; Based on the template adjustment parameters, logic configuration processing is performed on the blocks in the third service template that are different from the first service template to obtain a second service template that meets the logic indicated by the preset service condition.

4. The method according to claim 1, characterized in that The acquiring the first service template of the target service scenario from the template sharing space includes: Obtain the template name carried in the template acquisition request, and obtain the mapping relationship between the template name and the template type in the target business scenario; Querying a target template type according to the template name carried in the template acquisition request and the mapping relationship, where the target template type includes a static template type and a dynamic template type; A first business template of the target template type in the target business scenario is acquired from the template sharing space.

5. The method according to claim 4, characterized in that The method further comprises: In the case where the target template type is a dynamic template type, in response to the first business template satisfying the preset business condition, the dynamic filling data corresponding to the target business scenario is filled into the first business template.

6. The method according to claim 5, characterized in that The step of filling the first business template with the dynamic filling data corresponding to the target business scenario includes: Constructing a filling object and a filling parsing class corresponding to the dynamic business template; Based on the filling parsing class, the dynamic filling data corresponding to the target business scenario is filled into the filling object.

7. A service template processing device, characterized in that: The device comprises: An acquisition module, configured to, in response to a template acquisition request for a target business scenario, acquire a first business template of the target business scenario from a template sharing space; The acquisition module is further configured to acquire a template adjustment parameter for the first service template in response to the first service template not satisfying a preset service condition; The adjustment module is used to adjust the first service template based on the template adjustment parameters to obtain a second service template that meets the preset service conditions.

8. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer executable instructions; The processor is used to implement the method for processing the business template according to any one of claims 1 to 4 when executing the computer executable instructions stored in the memory.

9. A computer-readable storage medium storing computer-executable instructions, characterized in that: When the computer executable instructions are executed by a processor, the method for processing the service template according to any one of claims 1 to 6 is implemented.

10. A computer program product comprising computer executable instructions, characterized in that: When the computer executable instructions are executed by a processor, the method for processing the service template according to any one of claims 1 to 6 is implemented.