File generation method, device and electronic device
By obtaining the label information of the file generation request and applying it to the preset display rules of the file template, the target file is generated, which solves the problem of repeated labor when configuring the file template, and improves the efficiency and accuracy of file generation.
Patent Information
- Application Number
- CN202210745391.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-27
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2042-06-27
Smart Images

Figure CN114925670B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular to a file generation method, device, and electronic device. Background Art
[0002] When configuring file templates, users usually configure some of the same information for multiple templates. For example, a fixed-term labor contract and an open-ended labor contract only have one paragraph with different information. In actual scenarios, thousands of file templates are usually configured, and most of these templates differ only in the presence or absence of a certain paragraph or content information, which causes a lot of repetitive work for users. Summary of the invention
[0003] This disclosure section is provided to introduce concepts in a brief form, which will be described in detail in the detailed description section below. This disclosure section is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0004] In a first aspect, an embodiment of the present disclosure provides a file generation method, comprising: in response to receiving a file generation request, obtaining tag information corresponding to the file generation request; generating a target file based on preset display rules corresponding to the tag information and paragraphs in a file template, wherein the paragraphs in the file template are pre-bound to the tag information, and the display rules are used to indicate the tag information that needs to be hit when the paragraphs in the file template are displayed.
[0005] In a second aspect, an embodiment of the present disclosure provides a file generation device, comprising: an acquisition unit, for acquiring label information corresponding to the file generation request in response to receiving the file generation request; a generation unit, for generating a target file based on preset display rules corresponding to the label information and the paragraphs in the file template, wherein the paragraphs in the file template are pre-bound to the label information, and the display rules are used to indicate the label information that needs to be hit when the paragraphs in the file template are displayed.
[0006] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the file generation method as in the first aspect.
[0007] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the file generation method of the first aspect.
[0008] The file generation method, device and electronic device provided by the embodiments of the present disclosure obtain tag information corresponding to the file generation request in response to receiving the file generation request; and generate a target file based on the preset display rules corresponding to the tag information and the paragraphs in the file template. In this way, the file template can be screened to select the paragraphs that meet the conditions to form the file, thereby reducing the workload of the user when configuring the file. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0010] Figure 1 is a flow chart of an embodiment of a method for generating a file according to the present disclosure;
[0011] Figure 2 is a flowchart of an embodiment of setting display rules in the file generation method according to the present disclosure;
[0012] Figure 3 is a schematic diagram of an application scenario of setting display rules in the file generation method disclosed in the present invention;
[0013] Figure 4 is a flowchart of another embodiment of setting display rules in the file generation method according to the present disclosure;
[0014] Figure 5 is a schematic diagram of another application scenario of setting display rules in the file generation method according to the present disclosure;
[0015] Figure 6 is a flowchart of an embodiment of performing operations on display rules in a file generation method according to the present disclosure;
[0016] Figure 7 is a schematic diagram of an application scenario of performing operations on display rules in the file generation method disclosed in the present invention;
[0017] Figure 8 is a structural schematic diagram of an embodiment of a file generating device according to the present disclosure;
[0018] Fig. 9 is an exemplary system architecture diagram in which various embodiments of the present disclosure may be applied;
[0019] Fig.10 It is a schematic diagram of the structure of a computer system suitable for implementing the electronic device of the embodiment of the present disclosure. DETAILED DESCRIPTION
[0020] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0021] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0022] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0023] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0024] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0025] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0026] Please refer to Figure 1 , shows a process 100 of an embodiment of a file generation method according to the present disclosure. The file generation method comprises the following steps:
[0027] Step 101: in response to receiving a file generation request, obtain tag information corresponding to the file generation request.
[0028] In this embodiment, the execution subject of the file generation method can determine whether a file generation request is received. If a file generation request is received, the execution subject can obtain tag information corresponding to the file generation request.
[0029] In some cases, the file generation request may be a request initiated by a target user for generating a file matching the target user. In this case, it is necessary to obtain the tag information of the target user.
[0030] In other cases, the above file generation request may also be automatically initiated by the server to generate a file matching a certain user. In this case, it is necessary to obtain the tag information of the user.
[0031] In some other cases, the file generation request may be initiated by other users (e.g., employees of the human resources department) to generate a file matching a target user (e.g., an employee to be hired), in which case the tag information of the user needs to be obtained. Alternatively, the request may be initiated to generate a preview file matching selected tag information, in which case the selected tag information needs to be obtained.
[0032] Here, if it is necessary to generate a file matching the target user, the file generation request may include the tag information of the target user.
[0033] As an example, the above-mentioned file may be a labor contract file. In this case, the above-mentioned file generation request may be a request for generating a labor contract file initiated by the system or an employee of the human resources department before the employee joins the company. The above-mentioned file generation request may include the tag information of the employee to be hired. The above-mentioned file generation request may also be a request for previewing a file that meets certain tag information initiated by an employee of the human resources department after executing the display rule setting for the paragraphs in the file template of the labor contract. Here, the above-mentioned tag information may include, but is not limited to: contract date (including but not limited to: execution date, effective date, signing date), contract type (including but not limited to: fixed labor contract or non-fixed labor contract), employee type (including but not limited to: formal or outsourced), department (for example, product department, design department, etc.).
[0034] As another example, the above-mentioned file may also be a leave application file. In this case, the above-mentioned file generation request may be a request initiated by an employee to request the generation of a leave application file, or may be a request initiated by an employee of a human resources department to preview a file that meets certain tag information after executing display rule settings on a paragraph in a leave application file template. Here, the above-mentioned tag information may include but is not limited to: leave type (including but not limited to: personal leave, annual leave, sick leave, maternity leave).
[0035] Step 102: Generate a target file based on the tag information and the preset display rules corresponding to the paragraphs in the file template.
[0036] In this embodiment, the execution entity may generate a target file based on the label information corresponding to the file generation request and the preset display rules corresponding to the paragraphs in the file template. The target file may be a file that conforms to the label information corresponding to the file generation request. The file template is a pre-set file content, and the paragraphs in the file template are usually pre-bound with the label information. The display rules may be used to indicate the label information that needs to be hit when the paragraphs in the file template are displayed. As an example, if the display rule of paragraph A is: leave types include personal leave, paragraph A will only be displayed when the label information "personal leave" is hit.
[0037] Specifically, the execution entity may match the tag information that needs to be hit when displaying each paragraph in the file template with the tag information, determine the matched paragraphs as the paragraphs to be displayed, and generate a target file composed of the paragraphs to be displayed.
[0038] For example, if the file template contains paragraph A and paragraph B, if the display rule corresponding to paragraph A is: the term type includes a fixed term, and the display rule corresponding to paragraph B is: the term type includes an indefinite term. If the above tag information is a fixed term, then the generated target file only contains paragraph A in the file template. If the above tag information is an indefinite term, then the generated target file only contains paragraph B in the file template.
[0039] The method provided by the above embodiment of the present disclosure obtains tag information corresponding to the file generation request in response to receiving the file generation request; generates a target file based on the preset display rules corresponding to the tag information and the paragraphs in the file template. In this way, the file template can be screened to select the paragraphs that meet the conditions to form the file, thereby reducing the workload of the user when configuring the file.
[0040] In some optional implementations, the execution subject may detect whether a preset first operation is performed for a paragraph in the file template. Here, the first operation may include, but is not limited to, a mouse hover operation, a click operation, and a drag operation. If it is detected that the first operation is performed for a paragraph in the file template and the display rule is not set for the paragraph for which the first operation is performed, the execution subject may present a rule setting page. The user may enter the rule content in the rule setting page. If the rule content entered in the rule setting page is received, the execution subject may generate a display rule corresponding to the paragraph for which the first operation is performed. The rule content is usually the tag information that needs to be hit when the paragraph for which the first operation is performed is displayed. It should be noted that the execution subject for setting the display rule may be the execution subject of the file generation method or other electronic devices other than the execution subject of the file generation method.
[0041] In some optional implementations, a rule creation icon may be presented in the rule setting page. After the rule setting page is presented, if the user selects the rule creation icon in the rule setting page, the execution subject may present a rule filling page. The user may enter the rule content in the rule filling page. The execution subject may generate the display rule corresponding to the paragraph targeted by the first operation in response to receiving the rule content entered in the rule setting page in the following manner: the execution subject may determine whether the rule content entered in the rule filling page is received, and the rule content may include: the required hit tag information, which may also be referred to as a rule condition group, and the required hit tag information may include: a tag field, an operator, and a tag value. The user may set multiple required hit tag information for a paragraph. The operator may be included or not included. If the rule content entered in the rule filling page is received, the execution subject may generate the display rule corresponding to the paragraph targeted by the first operation.
[0042] In some optional implementations, an existing rule selection icon may be presented in the rule setting page. After the rule setting page is presented, if the user selects the existing rule selection icon, the execution entity may present a rule selection page. The rule selection page may present at least one existing display rule. The user may select a display rule from the at least one existing display rule presented on the rule selection page. The execution entity may generate a display rule corresponding to the paragraph targeted by the first operation in response to receiving the rule content input in the rule setting page in the following manner: the execution entity may determine whether to select a display rule from the at least one existing display rule. If the user selects a display rule from the at least one existing display rule, the execution entity may determine the selected display rule as the display rule corresponding to the paragraph targeted by the first operation.
[0043] Continue to refer Figure 2 , which shows a process 200 of setting display rules in an embodiment of a file generation method. The process 200 of setting display rules includes the following steps:
[0044] Step 201 : in response to detecting that a preset first operation is performed on a paragraph in a document template and a display rule is not set for the paragraph targeted by the first operation, presenting a setting icon.
[0045] In this embodiment, the execution subject of the document generation method can detect whether a preset first operation is performed on the paragraph in the document template. Here, the first operation can include but is not limited to: a mouse hover operation, a click operation, and a drag operation.
[0046] If it is detected that the first operation is performed on a paragraph in the document template and the paragraph targeted by the first operation is not set with a display rule, the execution subject may present a setting icon. The setting icon may be used to set a display rule for the paragraph. The setting icon may be presented at any position of the paragraph targeted by the first operation, for example, above or to the right of the paragraph.
[0047] Step 202: In response to detecting that a preset second operation is performed on a setting icon, presenting a rule setting page.
[0048] In this embodiment, the execution subject may detect whether a preset second operation is performed on the setting icon. The second operation may include but is not limited to: a click operation and a drag operation.
[0049] If it is detected that the second operation is performed on the setting icon, the execution subject may present a rule setting page, and the user may input the rule content in the rule setting page.
[0050] Step 203: In response to selecting the rule creation icon, a rule filling page is presented.
[0051] Here, a rule creation icon may be presented in the above rule setting page.
[0052] In this embodiment, if the user selects the rule creation icon, the execution subject may present a rule filling page, and the user may enter the rule content in the rule filling page.
[0053] Step 204 , in response to receiving the rule content input on the rule filling page, generating a display rule corresponding to the paragraph targeted by the first operation.
[0054] In this embodiment, the execution subject can determine whether the rule content entered in the rule filling page is received. The rule content can include: required hit tag information, which can also be called a rule condition group. The required hit tag information can include: tag field, operator and tag value. The user can set multiple required hit tag information for a paragraph. The operator can be included or not included.
[0055] If the rule content entered on the rule filling page is received, the execution subject may generate a display rule corresponding to the paragraph targeted by the first operation. As an example, the label field in the rule condition group entered by the user for paragraph A may be: department, the operator may be: contains, and the label value may be: product department. In this case, the generated display rule is: department contains product department, indicating that paragraph A is displayed if the user's department is the product department.
[0056] It should be noted that the user can also fill in the rule name corresponding to the rule condition group in the above rule filling page. For example, the user can name the rule name of the rule condition group whose term type includes a fixed term as a fixed-term labor contract, and can name the rule name of the rule condition group whose term type includes an indefinite term as an indefinite-term labor contract.
[0057] The method provided by the above-mentioned embodiments of the present disclosure presents a setting icon when the display rule of a paragraph has not been set, and presents a rule filling page when an operation is performed on the setting icon, and generates the display rule corresponding to the paragraph using the rule content entered in the rule filling page. In this way, the rule content entered by the user can be generated into the display rule corresponding to the paragraph, thereby providing a display rule setting method.
[0058] See also Figure 3 , Figure 3 FIG. 1 is a schematic diagram of an application scenario of setting display rules in the file generation method according to this embodiment. Figure 3 In the application scenario, the file template 301 includes paragraph A (as shown in icon 302) and paragraph B. When the user hovers the mouse over paragraph A, if the display rule of paragraph A has not been set, the "set display rule" icon 303 is presented. When the user clicks the "set display rule" icon 303, the rule setting page is presented, as shown in icon 304. In the rule setting page shown in icon 304, a rule creation icon is presented, as shown in icon 305. When the user clicks the selection control before the rule creation icon shown in icon 305, the rule content filling area is presented, as shown in icon 306. The user can fill in the label field, operator and label value in the rule content filling area shown in icon 306 to generate the display rule corresponding to paragraph A.
[0059] Continue to refer Figure 4 , which shows a process 400 of another embodiment of setting display rules in a file generation method. The process 400 of setting display rules includes the following steps:
[0060] Step 401 : In response to detecting that a preset first operation is performed on a paragraph in a document template and a display rule is not set for the paragraph targeted by the first operation, presenting a setting icon.
[0061] In this embodiment, the execution subject of the document generation method can detect whether a preset first operation is performed on the paragraph in the document template. Here, the first operation can include but is not limited to: a mouse hover operation, a click operation, and a drag operation.
[0062] If it is detected that the first operation is performed on a paragraph in the document template and the paragraph targeted by the first operation is not set with a display rule, the execution subject may present a setting icon. The setting icon may be used to set a display rule for the paragraph. The setting icon may be presented at any position of the paragraph targeted by the first operation, for example, above or to the right of the paragraph.
[0063] Step 402: In response to detecting that a preset second operation is performed on a setting icon, presenting a rule setting page.
[0064] In this embodiment, the execution subject may detect whether a preset second operation is performed on the setting icon. The second operation may include but is not limited to: a click operation and a drag operation.
[0065] If it is detected that the second operation is performed on the setting icon, the execution subject may present a rule setting page, and the user may input the rule content in the rule setting page.
[0066] Step 403: In response to selecting an existing rule selection icon, a rule selection page is presented.
[0067] Here, an existing rule selection icon may be presented in the above rule setting page.
[0068] In this embodiment, if the user selects the existing rule selection icon, the execution entity may present a rule selection page. The rule selection page may present at least one existing display rule. The user may select a display rule from the at least one existing display rule presented on the rule selection page.
[0069] Step 404: in response to selecting a display rule from at least one existing display rule, determining the selected display rule as the display rule corresponding to the paragraph targeted by the first operation.
[0070] In this embodiment, the execution subject may determine whether to select a display rule from the at least one existing display rule. If the user selects a display rule from the at least one existing display rule, the execution subject may determine the selected display rule as the display rule corresponding to the paragraph targeted by the first operation.
[0071] The method provided by the above-mentioned embodiment of the present disclosure presents a setting icon when the display rule is not set for a paragraph, and presents a rule selection page when an operation is performed on the setting icon, and generates the display rule corresponding to the paragraph using the rule selected in the rule selection page. In this way, the rule selected by the user can be determined as the display rule corresponding to the paragraph, thereby providing another display rule setting method.
[0072] See also Figure 5 , Figure 5 is a schematic diagram of another application scenario of setting display rules in the file generation method according to this embodiment. Figure 5 In the application scenario, the file template 501 includes paragraph A (as shown in icon 502) and paragraph B. When the user hovers the mouse over paragraph A, if the display rule of paragraph A is not set, the "set display rule" icon 503 is presented. When the user clicks the "set display rule" icon 503, the rule setting page is presented, as shown in icon 504. In the rule setting page shown in icon 504, a "select existing rule" icon is presented, as shown in icon 505. When the user clicks the selection control before the "select existing rule" icon 505, the rule selection page is presented, as shown in icon 506. The rule selection page shown in icon 506 presents Rule 1, Rule 2 and Rule 3. When the user selects Rule 1, Rule 1 can be determined as the display rule corresponding to paragraph A.
[0073] Continue to refer Figure 6 , which shows a process 600 of an embodiment of performing operations on display rules in a file generation method. The process 600 of performing operations on display rules includes the following steps:
[0074] Step 601 , in response to detecting that a preset third operation is performed on a paragraph in a document template and a display rule has been set for the paragraph targeted by the third operation, displaying the display rule corresponding to the paragraph targeted by the third operation.
[0075] In this embodiment, the execution subject of the file generation method can detect whether to perform a preset third operation on the paragraph in the above file template. Here, the above third operation can include but is not limited to: a mouse hover operation, a click operation, and a drag operation.
[0076] If it is detected that the third operation is performed on a paragraph in the document template and a display rule has been set for the paragraph targeted by the third operation, the execution subject may display the display rule corresponding to the paragraph targeted by the third operation.
[0077] Step 602 : In response to detecting that a preset fourth operation is performed according to a display rule corresponding to the paragraph targeted by the third operation, a change icon and / or a delete icon is presented.
[0078] In this embodiment, the execution subject may detect whether to execute a preset fourth operation for the display rule corresponding to the paragraph targeted by the third operation. The fourth operation may include but is not limited to: a mouse hover operation, a click operation, and a drag operation.
[0079] If it is detected that the fourth operation is performed on the display rule corresponding to the paragraph targeted by the third operation, the execution subject may present a change icon and / or a delete icon. Here, the change icon may be used to change the display rule, and the delete icon may be used to delete the display rule.
[0080] If the user performs an operation on the change icon (for example, clicks on it), a display rule change page may be displayed, and the user may change the display rule on the display rule change page.
[0081] The method provided by the above-mentioned embodiment of the present disclosure presents the display rules corresponding to the paragraphs, and presents the change icon and / or the delete icon when performing operations on the display rules, so that the display rules can be further processed quickly.
[0082] In some optional implementations, the display area of the paragraph targeted by the third operation may not overlap with the display area of the corresponding display rule. As an example, the display area of the display rule corresponding to the paragraph targeted by the third operation may be located to the left of the display area of the paragraph targeted by the third operation, or may be located to the right of the display area of the paragraph targeted by the third operation.
[0083] In some optional implementations, after displaying the display rule corresponding to the paragraph targeted by the third operation, the execution subject may display a preset mark between the display area of the paragraph targeted by the third operation and the display area of the corresponding display rule, and the mark may be used to indicate the subordinate relationship between the paragraph targeted by the third operation and the corresponding display rule. As an example, the mark may be a blue vertical line, that is, a blue vertical line may be presented between the paragraph targeted by the third operation and the corresponding display rule to indicate that the paragraph targeted by the third operation has a subordinate relationship with the corresponding display rule.
[0084] See also Figure 7 , Figure 7 FIG. 1 is a schematic diagram of an application scenario of performing operations on display rules in the file generation method according to this embodiment. Figure 7 In the application scenario, the file template 701 includes paragraph A, paragraph B and paragraph C. When the user hovers the mouse over paragraph A, if the display rule of paragraph A has been set, the display rule 702 corresponding to paragraph A is presented. When the user hovers the mouse over the display rule 702, the "change" icon 703 and the "delete" icon 704 are presented, wherein the "change" icon 703 is used to change the display rule corresponding to paragraph A, and the "delete" icon 704 is used to delete the display rule corresponding to paragraph A.
[0085] Further references Figure 8As an implementation of the methods shown in the above figures, the present application provides an embodiment of a file generation device, and the device embodiment is similar to Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0086] like Figure 8 As shown, the file generation device 800 of this embodiment includes: an acquisition unit 801 and a generation unit 802. The acquisition unit 801 is used to obtain the tag information corresponding to the file generation request in response to receiving the file generation request; the generation unit 802 is used to generate the target file based on the preset display rules corresponding to the tag information and the paragraphs in the file template, wherein the paragraphs in the file template are pre-bound with the tag information, and the display rules are used to indicate the tag information required to be hit when the paragraphs in the file template are displayed.
[0087] In this embodiment, the specific processing of the acquisition unit 801 and the generation unit 802 of the file generation device 800 can refer to Figure 1 This corresponds to step 101 and step 102 in the embodiment.
[0088] In some optional implementations, the file generation device 800 further includes: a first presentation unit (not shown in the figure) and a display rule generation unit (not shown in the figure). The first presentation unit is used to present a rule setting page in response to detecting that a preset first operation is performed on a paragraph in the file template and the paragraph targeted by the first operation is not set with a display rule; the display rule generation unit is used to generate a display rule corresponding to the paragraph targeted by the first operation in response to receiving a rule content input in the rule setting page.
[0089] In some optional implementations, the first presentation unit may be further used to present a rule setting page in response to detecting that a preset first operation is performed on a paragraph in the file template and display rules are not set for the paragraph targeted by the first operation in the following manner: in response to detecting that a preset first operation is performed on a paragraph in the file template and display rules are not set for the paragraph targeted by the first operation, present a setting icon, wherein the setting icon is used to set display rules for the paragraph; in response to detecting that a preset second operation is performed on the setting icon, present a rule setting page.
[0090] In some optional implementations, the file generation device 800 further includes: a second presentation unit (not shown in the figure). The second presentation unit is used to present a rule filling page in response to selecting a rule creation icon, wherein the rule creation icon is presented in the rule setting page; and the display rule generation unit can be further used to generate a display rule corresponding to the paragraph targeted by the first operation in response to receiving the rule content input in the rule setting page in the following manner: in response to receiving the rule content input in the rule filling page, generate a display rule corresponding to the paragraph targeted by the first operation, wherein the rule content includes: the required hit tag information, and the required hit tag information includes: tag field, operator and tag value.
[0091] In some optional implementations, the file generation device 800 further includes: a third presentation unit (not shown in the figure). The third presentation unit is used to present a rule selection page in response to selecting an existing rule selection icon, wherein the existing rule selection icon is presented in the rule setting page, and the rule selection page presents at least one existing display rule; and the display rule generation unit can be further used to generate a display rule corresponding to the paragraph targeted by the first operation in response to receiving the rule content input in the rule setting page in the following manner: in response to selecting a display rule from the at least one existing display rule, determining the selected display rule as the display rule corresponding to the paragraph targeted by the first operation.
[0092] In some optional implementations, the file generating device 800 further includes: a first display unit (not shown in the figure). The first display unit is used for displaying the display rule corresponding to the paragraph targeted by the third operation in response to detecting that a preset third operation is performed on the paragraph in the file template and the paragraph targeted by the third operation has been set with a display rule.
[0093] In some optional implementations, the file generation device 800 further includes: a fourth presentation unit (not shown in the figure). The fourth presentation unit is used to present a change icon and / or a delete icon in response to detecting that a preset fourth operation is performed on the display rule corresponding to the paragraph targeted by the third operation, wherein the change icon is used to change the display rule, and the delete icon is used to delete the display rule.
[0094] In some optional implementations, the display area of the paragraph targeted by the third operation does not overlap with the display area of the corresponding display rule.
[0095] In some optional implementations, the file generation device 800 further includes: a second display unit (not shown in the figure). The second display unit is used to display a preset mark between the display area of the paragraph targeted by the third operation and the display area of the corresponding display rule, wherein the mark is used to represent the subordinate relationship between the paragraph targeted by the third operation and the corresponding display rule.
[0096] Fig. 9 An exemplary system architecture 900 is shown to which an embodiment of the file generation method of the present disclosure may be applied.
[0097] like Fig. 9 As shown, the system architecture 900 may include terminal devices 9011, 9012, 9013, a network 902, and a server 903. The network 902 is used to provide a medium for communication links between the terminal devices 9011, 9012, 9013 and the server 903. The network 902 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0098] The user can use the terminal devices 9011, 9012, 9013 to interact with the server 903 through the network 902 to send or receive messages, etc. For example, the server 903 can send generated files to the user's terminal devices 9011, 9012, 9013. Various communication client applications can be installed on the terminal devices 9011, 9012, 9013, such as office applications, human resources management applications, and instant messaging software.
[0099] In response to receiving a file generation request, terminal devices 9011, 9012, and 9013 can obtain tag information corresponding to the above file generation request; thereafter, a target file can be generated based on the above tag information and preset display rules corresponding to the paragraphs in the file template, and terminal devices 9011, 9012, and 9013 can present the generated target file.
[0100] Terminal devices 9011, 9012, 9013 can be hardware or software. When terminal devices 9011, 9012, 9013 are hardware, they can be various electronic devices with display screens and supporting information interaction, including but not limited to smart phones, tablet computers, laptop portable computers, etc. When terminal devices 9011, 9012, 9013 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0101] The server 903 may be a server that provides various services. For example, it may be a background server that processes a received file generation request. In response to receiving the file generation request, the server 903 may obtain tag information corresponding to the file generation request; thereafter, based on the tag information and the preset display rules corresponding to the paragraphs in the file template, the target file may be generated, and the server 903 may send the generated target file to the terminal devices 9011, 9012, 9013 for presentation.
[0102] It should be noted that the server 903 can be hardware or software. When the server 903 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server 903 is software, it can be implemented as multiple software or software modules (for example, for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0103] It should also be noted that the file generation method provided in the embodiment of the present disclosure can be executed by the terminal devices 9011, 9012, and 9013, and in this case, the file generation device can be set in the terminal devices 9011, 9012, and 9013. The file generation method provided in the embodiment of the present disclosure can also be executed by the server 903, and in this case, the file generation device can be set in the server 903.
[0104] It should be understood that Fig. 9 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0105] Reference below Fig.10 , which shows an electronic device (eg, Fig. 9 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0106] like Fig.10As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the electronic device 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0107] Typically, the following devices may be connected to the I / O interface 1005: input devices 1006 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1008 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Fig.10 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0108] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 1009, or installed from a storage device 1008, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0109] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0110] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0111] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0112] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: in response to receiving a file generation request, obtains tag information corresponding to the file generation request; generates a target file based on preset display rules corresponding to the tag information and the paragraphs in the file template, wherein the paragraphs in the file template are pre-bound to the tag information, and the display rules are used to indicate the tag information that needs to be hit when the paragraphs in the file template are displayed.
[0113] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0114] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0115] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, an acquisition unit may also be described as "a unit that acquires tag information corresponding to a file generation request in response to receiving a file generation request."
[0116] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0117] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0118] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0119] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0120] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A file generation method, characterized in that: include: In response to receiving a file generation request, acquiring tag information corresponding to the file generation request; Generate a target file based on the preset display rules corresponding to the tag information and the paragraphs in the file template, wherein the paragraphs in the file template are pre-bound with the tag information, and the display rules are used to indicate the tag information that needs to be hit when the paragraphs in the file template are displayed; In response to detecting that a preset first operation is performed on a paragraph in the document template and no display rule is set for the paragraph targeted by the first operation, presenting a rule setting page; In response to receiving the rule content input in the rule setting page, a display rule corresponding to the paragraph targeted by the first operation is generated.
2. The method according to claim 1, characterized in that In response to detecting that a preset first operation is performed on a paragraph in the document template and no display rule is set for the paragraph targeted by the first operation, presenting a rule setting page includes: In response to detecting that a preset first operation is performed on a paragraph in the document template and a display rule is not set for the paragraph targeted by the first operation, presenting a setting icon, wherein the setting icon is used to set a display rule for the paragraph; In response to detecting that a preset second operation is performed on the setting icon, a rule setting page is presented.
3. The method according to claim 1 or 2, characterized in that: After presenting the rule setting page, the method further includes: In response to selecting a rule creation icon, presenting a rule filling page, wherein the rule creation icon is presented in the rule setting page; and The step of generating, in response to receiving the rule content inputted in the rule setting page, a display rule corresponding to the paragraph targeted by the first operation comprises: In response to receiving the rule content entered on the rule filling page, a display rule corresponding to the paragraph targeted by the first operation is generated, wherein the rule content includes: the required hit tag information, and the required hit tag information includes: tag field, operator and tag value.
4. The method according to claim 1 or 2, characterized in that: After presenting the rule setting page, the method further includes: In response to selecting an existing rule selection icon, presenting a rule selection page, wherein the existing rule selection icon is presented in the rule setting page, and the rule selection page presents at least one existing display rule; and The step of generating, in response to receiving the rule content inputted in the rule setting page, a display rule corresponding to the paragraph targeted by the first operation comprises: In response to selecting a display rule from the at least one existing display rule, the selected display rule is determined as the display rule corresponding to the paragraph targeted by the first operation.
5. The method according to claim 1, characterized in that The method further comprises: In response to detecting that a preset third operation is performed on a paragraph in the document template and a display rule has been set for the paragraph targeted by the third operation, the display rule corresponding to the paragraph targeted by the third operation is displayed.
6. The method according to claim 5, characterized in that After displaying the display rule corresponding to the paragraph targeted by the third operation, the method includes: In response to detecting that a preset fourth operation is performed on the display rule corresponding to the paragraph targeted by the third operation, a change icon and / or a delete icon is presented, wherein the change icon is used to change the display rule and the delete icon is used to delete the display rule.
7. The method according to claim 5, characterized in that The display area of the paragraph targeted by the third operation does not overlap with the display area of the corresponding display rule.
8. The method according to claim 7, characterized in that After displaying the display rule corresponding to the paragraph targeted by the third operation, the method further includes: A preset mark is displayed between the display area of the paragraph targeted by the third operation and the display area of the corresponding display rule, wherein the mark is used to represent the subordinate relationship between the paragraph targeted by the third operation and the corresponding display rule.
9. A file generating device, characterized in that: include: an acquiring unit, configured to acquire, in response to receiving a file generation request, label information corresponding to the file generation request; A generating unit, configured to generate a target file based on the tag information and a preset display rule corresponding to a paragraph in a file template, wherein the paragraph in the file template is pre-bound with the tag information, and the display rule is used to indicate the tag information that needs to be hit when the paragraph in the file template is displayed; A first presenting unit, configured to present a rule setting page in response to detecting that a preset first operation is performed on a paragraph in the document template and no display rule is set for the paragraph targeted by the first operation; The display rule generating unit is configured to generate a display rule corresponding to the paragraph targeted by the first operation in response to receiving the rule content input in the rule setting page.
10. An electronic device, characterized in that: include: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.
11. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Document structured data embedding method and system
CN111259202A