Document processing methods, devices, computer equipment and storage media
By determining the target extension parameters in the extended area of the upstream document and generating the target document in combination with fixed parameters, the inconvenience of manually adding fields in traditional document processing is solved, and a convenient document processing workflow is realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-08
- Publication Date
- 2026-03-10
AI Technical Summary
In traditional document processing methods, to meet the needs of downstream documents to add new document fields, it is necessary to manually add the corresponding fields to the upstream documents, which is inconvenient.
By defining the target extension parameters in the extended area of the upstream document and generating the target document in combination with fixed parameters, the direct modification of the upstream document is avoided, thus enabling the generation of downstream documents.
It improves the ease of document processing, reduces direct modifications to upstream documents, and simplifies the process of adding new document fields.
Smart Images

Figure CN116258597B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a document processing method, apparatus, computer equipment, and storage medium. Background Technology
[0002] With the development of computer technology, document processing technology has emerged. This technology allows for the rapid generation of downstream documents that are business-related to upstream documents based on the content data of the upstream documents. For example, a sales order can be used to generate a material issuance notice, and a purchase receipt can be used to generate a purchase invoice.
[0003] Traditional document processing methods map the content data of upstream documents to obtain downstream documents. However, to meet the needs of downstream documents to add new document fields, it is necessary to manually add the corresponding fields to the upstream documents, which is very inconvenient. Summary of the Invention
[0004] Therefore, it is necessary to provide a document processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product that improves convenience in response to the above-mentioned technical problems.
[0005] Firstly, this application provides a document processing method. The method includes:
[0006] Identify the upstream document from which the target document is to be generated; the target document is the downstream document to be generated corresponding to the upstream document.
[0007] The target extension parameters are determined from the extension area associated with the upstream document; the extension area is set according to the extension requirements of the target document to be generated.
[0008] The upstream documents are pushed down to obtain fixed parameters;
[0009] Generate target documents based on fixed parameters and target extended parameters.
[0010] In one embodiment, the upstream document includes a document body; the document body includes pushdown items; the pushdown items are document content items used to push down data; before determining the target extension parameter from the extension region associated with the upstream document, the method further includes:
[0011] Determine the extended area of the upstream document associated with the document body's identifier and the identifier of the pushed-down item, and obtain the extended area associated with the upstream document.
[0012] In one embodiment, an upstream document corresponds to at least one downstream document; the extended area associated with the upstream document includes extended parameters corresponding to at least one downstream document.
[0013] The target extended parameters are determined from the extended region associated with the upstream document, including:
[0014] Determine the structured descriptive data for the target document; structured descriptive data is data used to describe the structure of the target document.
[0015] From the extended parameters corresponding to at least one downstream document, determine the target extended parameter that matches the structured description data.
[0016] In one embodiment, determining the target extended parameter that matches the structured description data from extended parameters corresponding to at least one downstream document includes:
[0017] From the extended fields in the extended parameters, identify the target extended fields that match the document fields in the structured description data;
[0018] Determine the target extension parameters, including the target extension field and the corresponding target extension field values.
[0019] In one embodiment, generating the target document based on fixed parameters and target extended parameters includes:
[0020] Determine the document field type that matches the target extended field;
[0021] Convert the type of the target extended field value to the document field type to obtain the field value after type conversion;
[0022] The document fields are populated based on the field values in the fixed parameters and the field values after type conversion to obtain the target document.
[0023] In one embodiment, generating the target document based on fixed parameters and target extended parameters includes:
[0024] Construct the target document structure based on the structured description data;
[0025] The target document structure is populated with document fields based on the target extended parameters and fixed parameters to generate the target document.
[0026] In one embodiment, the upstream documents to be pushed down to generate the target document include:
[0027] Get the push-down API call request for the document push-down API;
[0028] The upstream document to be pushed down is determined based on the parameters carried in the push-down interface call request.
[0029] Secondly, this application also provides a document processing apparatus. The apparatus includes:
[0030] The determination module is used to determine the upstream document to be pushed down to generate the target document; the target document is the downstream document to be generated corresponding to the upstream document.
[0031] The matching module is used to determine the target extension parameters from the extension area associated with the upstream document; the extension area is set according to the extension requirements of the target document to be generated.
[0032] The generation module is used to push down the upstream documents to obtain fixed parameters; and to generate the target document based on the fixed parameters and the target extended parameters.
[0033] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps in the method described above.
[0034] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the method described above.
[0035] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the method described above.
[0036] The aforementioned document processing method, apparatus, computer equipment, storage medium, and computer program product determine the upstream document to be pushed down to generate the target document. The target document is the downstream document to be generated corresponding to the upstream document. By setting an extension area according to the extension requirements of the target document, the target extension parameters required for generating the target document are determined from the extension area associated with the upstream document. The upstream document is then pushed down to obtain fixed parameters. The target document is then generated based on the fixed parameters and the target extension parameters. By using the extension parameters in the set extension area, the upstream document can be pushed down to generate the target document with extension requirements. The upstream document does not need to have the target extension parameters, that is, the upstream document itself does not need to be changed to achieve the push-down generation of the target document, thus improving the convenience of document processing. Attached Figure Description
[0037] Figure 1 This is an application environment diagram of a document processing method in one embodiment;
[0038] Figure 2 This is a flowchart illustrating a document processing method in one embodiment;
[0039] Figure 3 This is a simplified flowchart of a document processing method in one embodiment;
[0040] Figure 4This is a structural block diagram of a document processing device in one embodiment;
[0041] Figure 5 This is an internal structural diagram of a computer device in one embodiment;
[0042] Figure 6 This is a diagram of the internal structure of a computer device in another embodiment. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0044] The document processing method provided in this application can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on another network server.
[0045] Server 104 can determine the upstream document to be pushed down to generate the target document; the target document is the downstream document to be generated corresponding to the upstream document; it determines the target extended parameters from the extended area associated with the upstream document; the extended area is set according to the extended requirements of the target document to be generated; it performs push-down processing on the upstream document to obtain fixed parameters; and it generates the target document based on the fixed parameters and the target extended parameters. It can be understood that server 104 can send the generated target document to terminal 102. Terminal 102 can display the target document.
[0046] Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0047] In one embodiment, such as Figure 2 As shown, a document processing method is provided, illustrated by applying the method to a computer device. It is understood that the computer device may include at least one of a terminal or a server, and the method may be applied to either the terminal or the server alone, or to a system including both a terminal and a server. In this embodiment, the method includes the following steps:
[0048] S202, Determine the upstream document to be pushed down to generate the target document.
[0049] In this context, the target document is the downstream document to be generated corresponding to the upstream document. Pushdown refers to generating another new, business-related downstream document based on the content of the upstream document. In other words, the target document is a downstream document that has a business relationship with the upstream document. For example, a sales order can be used to push down a delivery notification.
[0050] For example, the target document to be pushed down and the upstream document are associated through document conversion rules. The computer device can determine the upstream document to be pushed down based on the push-down interface call request of the document push-down interface. The computer device can determine the target document to be generated corresponding to the upstream document through the document conversion rules set under the upstream document.
[0051] In one embodiment, the target document may be a process reporting document. The upstream document may be a process planning document.
[0052] S204, determine the target extension parameters from the extension area associated with the upstream document.
[0053] The extended area is set according to the extended requirements of the target document to be generated. Extended requirements refer to the need to add new document fields to the target document. The newly added document fields in the target document must meet the extended requirements of the target document. Target extended parameters are used to indicate the field values under the newly added document fields.
[0054] It should be noted that the extended area can be set based on the extended requirements of at least one downstream document corresponding to the upstream document. The extended parameters in the extended area match the newly added document fields of at least one downstream document. The extended parameters in the extended area do not necessarily match the newly added document fields of the target document exactly. It can be understood that when any downstream document is generated by pushing down an upstream document, the extended parameters that match any of the aforementioned downstream documents can be determined from the extended area to accommodate the extended requirements of any of the aforementioned downstream documents.
[0055] For example, the extended area can be set according to the extended area format based on the extended requirements of the target document. The extended area format is used to indicate the format in which extended parameters are written to the extended area. It is understood that the extended area can include target extended parameters that match the new document fields of the target document. The computer device can determine the extended area associated with the upstream document and determine the target extended parameters that match the document fields of the target document from that extended area.
[0056] In one embodiment, extended parameters may include multiple extended fields. Extended fields may include extended field identifiers and corresponding extended field values. Extended fields in an extended region are represented by mapped extended field identifiers and extended field values. For example, each extended field can be set in the extended region as a key-value pair, with the extended field identifier being the "key" and the extended field value being the "value" mapped to the "key". The extended region format can be a data set including multiple extended fields; for example, the extended field format is Sst_Customers:{Extended Field Identifier 1: Extended Field Value 1, Extended Field Identifier 2: Extended Field Value 2,...}. Extended field identifiers are used to identify extended fields.
[0057] S206, push down the upstream document to obtain fixed parameters; generate the target document based on the fixed parameters and the target extended parameters.
[0058] The fixed parameters are used to indicate the field values under the native document fields of the target document. The native document fields of the target document are document fields that exist in the target document itself, and are not newly added document fields.
[0059] For example, a computer device can push down upstream documents to obtain fixed parameters. These fixed parameters match the original document fields of the target document. The computer device can then populate the target document's fields based on the target extended parameters and the fixed parameters to generate the target document. It is understood that the target document's fields include both newly added document fields and original document fields.
[0060] In one embodiment, the computer device can perform document field mapping processing on the upstream document according to document conversion rules to obtain fixed parameters. Alternatively, the computer device can perform document field mapping processing on the upstream document through a document conversion plugin to obtain fixed parameters.
[0061] In one embodiment, a computer device can determine fixed parameters through a document conversion plugin. It is understood that the document conversion plugin includes logic for assigning values to fields of the target document, such as which fields of the target document need to be assigned which values. The document conversion plugin does not necessarily depend on the content of the upstream document, but fulfilling the extended needs of downstream documents by writing a document conversion plugin is very inconvenient.
[0062] In the above document processing method, the upstream document to be pushed down to generate the target document is determined; the target document is the downstream document to be generated corresponding to the upstream document. By setting an extension area according to the extension requirements of the target document, the target extension parameters required to generate the target document are determined from the extension area associated with the upstream document. The upstream document is then pushed down to obtain fixed parameters; and the target document is generated based on the fixed parameters and the target extension parameters. The target document with extension requirements can be generated by pushing down the upstream document through the extension parameters set in the extension area. The upstream document does not need to have the target extension parameters, that is, the target document can be generated without changing the upstream document itself, which improves the convenience of document processing.
[0063] In one embodiment, the upstream document includes a document body; the document body includes pushdown items; the pushdown items are document content items used to push down data; before determining the target extension parameter from the extension area associated with the upstream document, the method further includes: determining the extension area associated with the upstream document through the identifier of the document body and the identifier of the pushdown items, thereby obtaining the extension area associated with the upstream document.
[0064] For example, the extended region can be associated with the upstream document through the identifier of the document body and the identifier of the pushed-down item. The computer device can perform mapping processing on the pushed-down field in the pushed-down item in the document body to obtain fixed parameters, and determine the extended region associated with the identifier of the document body and the identifier of the pushed-down item, thus obtaining the extended region associated with the upstream document.
[0065] In one embodiment, the extended region can be mapped to the upstream document using the document body identifier and the pushdown item identifier.
[0066] In one embodiment, the computer device can perform document field mapping processing on the pushdown item, mapping the field value of the pushdown field in the pushdown item to the field value of the original document field of the target document, thereby obtaining fixed parameters.
[0067] In one embodiment, a computer device can assign field values from fixed parameters to native document fields of a target document, and assign field values from extended parameters to newly added document fields of the target document, to obtain the target document generated by the pushdown.
[0068] In one embodiment, the computer device can obtain the original document field by determining the document field represented by the field identifier in the fixed parameters, and assign the corresponding field value from the fixed parameters to the original document field. Similarly, the computer device can obtain the new document field by determining the document field represented by the extended field identifier in the target extended parameters, and assign the corresponding extended field value from the target extended parameters to the new document field.
[0069] In one embodiment, the pushdown item can be at least one of a sub-document body or a document body entry.
[0070] In this embodiment, the extended area of the upstream document is determined by associating the document body identifier and the push-down item identifier, thus obtaining the extended area associated with the upstream document. Subsequently, the target document with the extended requirements can be generated by pushing down through the extended parameters in the extended area without modifying the content of the upstream document, which improves convenience.
[0071] In one embodiment, an upstream document corresponds to at least one downstream document; the extended region associated with the upstream document includes extended parameters corresponding to at least one downstream document; determining the target extended parameter from the extended region associated with the upstream document includes: determining the structured description data of the target document; the structured description data is data used to describe the structure of the target document; and determining the target extended parameter that matches the structured description data from the extended parameters corresponding to at least one downstream document.
[0072] For example, an upstream document can be pushed down to generate multiple downstream documents. The extended area can include extended parameters corresponding to each of the multiple downstream documents. It can be understood that the extended area includes the extended parameters corresponding to the target document. The computer device can parse the document fields in the structured description data of the target document. The computer device can determine the target extended parameters from the extended parameters corresponding to at least one downstream document by matching the parsed document fields and extended parameters.
[0073] In one embodiment, the target extended parameters include a target extended field. The parsed document fields include a document field represented by the target extended field identifier. The computer device can compare the identifiers of the parsed document fields with the field identifiers in the extended parameters to determine the target extended field from the extended parameters corresponding to at least one downstream document, thereby obtaining target extended parameters that include the target extended field. It is understood that some of the parsed document fields contain document fields that match the target extended field identifier.
[0074] In one embodiment, the structured description data can be a carrier of document fields, recording the various document fields and their types present in the target document. It can be understood that only by parsing the structured description data can one know what document fields the target document contains and their corresponding types.
[0075] In one embodiment, a computer device can obtain structured description data of a target document, then parse the structured description data to obtain all document fields, and then iteratively match each determined target extended field with the parsed document fields.
[0076] In one embodiment, the structured description data may be, but is not limited to, document metadata. The computer device can determine the target extended parameters that match the document metadata from extended parameters corresponding to at least one downstream document.
[0077] In one embodiment, the structured description data can be class definition data. Class definition data can include attribute information of document objects, which describes the structure of the target document.
[0078] In this embodiment, the structured description data of the target document is determined; from the extended parameters corresponding to at least one downstream document, the target extended parameters that match the structured description data are determined; subsequently, the target extended parameters are used to push down the data to generate the target document with the extended requirements. This does not require modification of the upstream document itself, nor does it require writing code plugins to assign values to newly added document fields in the target document, thus improving convenience.
[0079] In one embodiment, determining the target extended parameter that matches the structured description data from the extended parameters corresponding to at least one downstream document includes: determining the target extended field that matches the document field in the structured description data from the extended fields in the extended parameters; and determining the target extended parameter that includes the target extended field and the corresponding target extended field value.
[0080] For example, a computer device can parse structured description data to obtain various document fields within the structured description data. The computer device can then match each extended field in the extended parameters with the parsed document fields to obtain a field matching result for each extended field. If the field matching result indicates the existence of a document field that matches the extended field, the computer device can determine that extended field as the target extended field. The computer device can then determine target extended parameters that include the target extended field and its corresponding value.
[0081] In one embodiment, the computer device can parse structured description data to obtain the identifiers of each document field. The computer device can compare each extended field identifier in the extended parameters with the respective document field identifiers to obtain the field matching result corresponding to each extended field identifier. It can be understood that if a document field identifier that matches the extended field identifier exists, the computer device can determine that the extended field identifier is the target extended field identifier, and determine the target extended parameters including the target extended field identifier and the corresponding target extended field value.
[0082] In one embodiment, when the target extended field matches a document field, the corresponding target extended field identifier is consistent with the document field identifier.
[0083] In one embodiment, the extended parameters may include document entry data. The document entry data indicates the entry in the target document where the extended field is located. The computer device can match the extended field with each document field under the entry indicated by the document entry data to obtain the field matching structure of the extended field. It is understood that the target document has multiple entries, and setting document entry data in the extended area can save computational resources.
[0084] In this embodiment, the target extended field that matches the document field in the structured description data is determined from the extended fields in the extended parameters; the target extended parameter including the target extended field and the corresponding target extended field value is determined; and the target extended parameter is then used to push down the target extended parameter to generate the target document with the extended requirements. This does not require modification of the upstream document itself, nor does it require writing code plugins to assign values to the newly added document fields in the target document, thus improving convenience.
[0085] In one embodiment, generating a target document based on fixed parameters and target extended parameters includes: determining the document field type of the document field that matches the target extended field; converting the type of the target extended field value into the document field type to obtain the type-converted field value; and performing document field filling processing based on the field value in the fixed parameters and the type-converted field value to obtain the target document.
[0086] For example, after pushing down the upstream document, the computer device can assign fixed parameter field values to the native document fields of the target document. The computer device can determine each document field and its document field type by parsing structured description data. The computer device can determine the document field type of the document field that matches the target extended field. The computer device can convert the type of the target extended field value to the document field type, obtaining the type-converted field value. The computer device can assign the type-converted field value to the new field in the target document that matches the target extended field. After the assignment of values to the native document fields and the new document fields in the target document is completed, the computer device can generate the target document. It can be understood that the type-converted field value can be used as the field value of the document field that matches the target extended field.
[0087] It should be noted that the field values in the fixed parameters are mapped through at least one of the code plugins or document conversion rules. The field values of the fixed parameters conform to the type of the target document's original document fields, and no type conversion is required.
[0088] In one embodiment, a document field type is used to indicate the numeric type of a document field. A document field type may include at least one of a string type or a numeric type.
[0089] In one embodiment, the document field type may include at least one of the following: character type, string type, integer type, or real number type.
[0090] In this embodiment, the document field type of the document field that matches the target extended field is determined; the type of the target extended field value is converted into the document field type to obtain the field value after type conversion; the document field is filled based on the field value after type conversion to obtain the target document. This improves convenience by eliminating the need to modify the upstream document itself or write code plugins to assign values to newly added document fields in the target document.
[0091] In one embodiment, the process of pushing down upstream documents based on target extension parameters to generate target documents includes: constructing a target document structure according to structured description data; and performing document field filling processing on the target document structure according to the target extension parameters to generate the target document.
[0092] For example, a computer device can construct a target document structure by parsing the data structure of the target document described by structured description data. The computer device can then perform document field population processing on the target document structure based on the target extended field values in the target extended parameters to generate the target document.
[0093] In one embodiment, the target document structure includes document fields. A computer device can assign the corresponding target extended field value to the document field in the target document structure that matches the target extended field.
[0094] In one embodiment, if the type of the target extended field value is inconsistent with the document field type of the matching document field, the computer device can determine the type-converted field value and assign the type-converted field value to the document field in the target document structure that matches the target extended field.
[0095] In one embodiment, the computer device can determine the field matching result for each extended field. If the field matching result indicates the existence of a document field that matches the extended field, the extended field is determined to be the target extended field. The computer device can then assign values to the document fields in the target document structure that match the target extended field based on the target extended field value to generate the target document.
[0096] In one embodiment, the fixed parameters include multiple fixed fields. The computer device can populate the target document structure with fields based on the fixed field values. It can be understood that after assigning the fixed field values and target extended field values from the fixed parameters to the document fields in the target document structure, the computer device can obtain the target document.
[0097] In one embodiment, fixed parameters may include fixed fields and corresponding fixed field values. A computer device can determine the document field represented by the fixed field identifier from the target document structure and assign the corresponding fixed field value to that document field to achieve field population processing.
[0098] In this embodiment, the target document structure is constructed according to the structured description data; the document field of the target document structure is filled according to the target extended parameters to generate the target document. There is no need to modify the upstream document itself or write code plugins to implement the separate assignment of new document fields in the target document, which improves convenience.
[0099] In one embodiment, determining the upstream document to be pushed down to generate the target document includes: obtaining a push-down interface call request for the document push-down interface; and determining the upstream document to be pushed down based on the parameters carried in the push-down interface call request.
[0100] For example, a computer device can obtain a push-down interface call request for a document push-down interface. The computer device can parse the parameters carried in the push-down interface call request to obtain push-down parameters. The push-down parameters are used to indicate the upstream document to be pushed down, and the document content in the upstream document used to push down and generate the target document.
[0101] In one embodiment, the document pushdown interface can be a WebAPI (World Wide Web Application Programming Interface).
[0102] In one embodiment, the pushdown parameters may include, but are not limited to, the identifier of the upstream document and the identifier of the pushdown item. The pushdown parameters may also include the identifier of the upstream document and the identifier of the document body.
[0103] In one embodiment, a computer device can determine an extended region associated with an upstream document based on the document body's identifier. It is understood that an extended region can be associated with an upstream document through the document body's identifier. The document body identifier corresponding to the extended region can be configured when setting it up.
[0104] In this embodiment, a push-down interface call request for the document push-down interface is obtained; the upstream document to be pushed down is determined based on the parameters carried in the push-down interface call request; subsequently, the target document is generated by pushing down through the extended parameters in the extended area associated with the upstream document. This eliminates the need to modify the upstream document itself or write code plugins to assign values to newly added document fields in the target document, thus improving convenience.
[0105] In one embodiment, such as Figure 3The diagram illustrates a simplified flowchart of the document processing method. The computer device can obtain a push-down interface call request for the document push-down interface. The computer device can parse the parameters carried in the push-down interface call request to obtain the push-down parameters. The computer device can determine the push-down item indicated by the push-down parameters. The computer device can perform mapping processing on the fields in the push-down item to achieve push-down processing of the upstream document and obtain fixed parameters. The computer device can assign the original document field values from the fixed parameters to the document fields in the target document structure.
[0106] The computer device can parse the extended parameters in the extended area. The computer device can obtain the document metadata of the target document. The computer device can iteratively match each extended field in the extended parameters with the document fields in the document metadata, obtaining the field matching result for each extended field. If the field matching result indicates a successful match, meaning that a document field matching the extended field exists in the document metadata, the computer device can parse the document field type of the document field matching that extended field and determine that extended field is the target extended field. The computer device can convert the type of the target extended field value to the document field type, obtaining the type-converted field value, and assign the type-converted field value to the document field matching the target extended field to generate the target document. The computer device can save the target document.
[0107] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0108] Based on the same inventive concept, this application also provides a document processing apparatus for implementing the document processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more document processing apparatus embodiments provided below can be found in the limitations of the document processing method described above, and will not be repeated here.
[0109] In one embodiment, such as Figure 4As shown, a document processing device 400 is provided, including: a determining module 402, a matching module 404, and a generating module 406, wherein:
[0110] The determination module 402 is used to determine the upstream document to be pushed down to generate the target document; the target document is the downstream document to be generated corresponding to the upstream document.
[0111] Matching module 404 is used to determine the target extension parameters from the extension area associated with the upstream document; the extension area is set according to the extension requirements of the target document to be generated.
[0112] The generation module 406 is used to push down the upstream documents to obtain fixed parameters; and to generate the target document based on the fixed parameters and the target extended parameters.
[0113] In one embodiment, the upstream document includes a document body; the document body includes pushdown items; the pushdown items are document content items used to push down data; the matching module 404 is used to determine the extended area associated with the upstream document through the identifier of the document body and the identifier of the pushdown items, thereby obtaining the extended area associated with the upstream document.
[0114] In one embodiment, an upstream document corresponds to at least one downstream document; the extended region associated with the upstream document includes extended parameters corresponding to at least one downstream document; the matching module 404 is used to determine the structured description data of the target document; the structured description data is data used to describe the structure of the target document; and the target extended parameters that match the structured description data are determined from the extended parameters corresponding to at least one downstream document.
[0115] In one embodiment, the matching module 404 is used to determine, from the extended fields in the extended parameters, a target extended field that matches a document field in the structured description data; and to determine a target extended parameter that includes the target extended field and the corresponding target extended field value.
[0116] In one embodiment, the generation module 406 is used to determine the document field type of the document field that matches the target extended field; convert the type of the target extended field value into the document field type to obtain the type-converted field value; and perform document field filling processing based on the field value in the fixed parameters and the type-converted field value to obtain the target document.
[0117] In one embodiment, the generation module 406 is used to construct a target document structure according to the structured description data; and to perform document field filling processing on the target document structure according to the target extended parameters and fixed parameters to generate the target document.
[0118] In one embodiment, the determining module 402 is used to obtain a push-down interface call request for the document push-down interface; and to determine the upstream document to be pushed down based on the parameters carried in the push-down interface call request.
[0119] Each module in the aforementioned document processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0120] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores upstream documents. The I / O interfaces allow the processor to exchange information with external devices. The communication interface allows communication with external terminals via a network connection. When executed by the processor, the computer program implements a document processing method.
[0121] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 6As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a document processing method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0122] Those skilled in the art will understand that Figure 5 or Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0123] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0124] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0125] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0126] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0127] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0128] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0129] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A document processing method characterized by comprising: The method comprises: determining an upstream document to be pushed down to generate a target document; the target document is a downstream document to be generated corresponding to the upstream document; the upstream document is associated with an extension area including at least one extension parameter corresponding to a downstream document respectively; the extension parameter includes an extension field identifier for identifying an extension field and an extension field value corresponding to the extension field; determining a target extension parameter from the extension area associated with the upstream document, comprising: parsing a document field in structured description data of the target document, and determining the target extension parameter from the extension parameter of the extension area through a matching relationship between the document field and the extension parameter; the extension area is set according to an extension requirement of the target document to be generated; the extension requirement refers to a requirement of adding a document field in the target document; the structured description data is data for describing the structure of the target document; performing push-down processing on the upstream document to obtain fixed parameters, comprising: performing document field mapping processing on the upstream document according to a document conversion rule to obtain fixed parameters; the fixed parameters include document fields and corresponding field values; generating the target document based on the fixed parameters and the target extension parameter.
2. The method of claim 1, wherein, The upstream document includes a document body; the document body includes a push-down item; the push-down item is a document content item for pushing down data; Before the target extension parameter is determined from the extension area associated with the upstream document, the method further comprises: determining the extension area associated with the upstream document through the identification of the document body and the identification of the push-down item.
3. The method of claim 1, wherein, The upstream document corresponds to at least one downstream document; Determining the target extension parameter from the extension parameter of the extension area comprises: determining the target extension parameter matching the structured description data from the extension parameter corresponding to the at least one downstream document respectively.
4. The method of claim 3, wherein, Determining the target extension parameter matching the structured description data from the extension parameter corresponding to the at least one downstream document respectively comprises: determining a target extension field matching the document field in the structured description data from the extension field in the extension parameter; determining a target extension parameter including the target extension field and a corresponding target extension field value.
5. The method of claim 4, wherein, Generating the target document based on the fixed parameters and the target extension parameter comprises: determining a document field type of the document field matching the target extension field; converting the type of the target extension field value into the document field type to obtain a type-converted field value; performing document field filling processing based on the field value in the fixed parameters and the type-converted field value to obtain the target document.
6. The method of claim 3, wherein, Generating the target document based on the fixed parameters and the target extension parameter comprises: constructing a target document structure according to the structured description data; performing document field filling processing on the target document structure according to the target extension parameter and the fixed parameters to generate the target document.
7. The method according to any one of claims 1 to 6, characterized in that, The determining the upstream bill to be pushed down to generate the target bill comprises: Obtaining a push interface call request for a bill push interface; According to the parameters carried by the push interface call request, determining the upstream bill to be pushed down.
8. A document processing apparatus, characterized by comprising: The device comprises: A determining module is configured to determine an upstream bill to be pushed down to generate a target bill; the target bill is a downstream bill to be generated corresponding to the upstream bill; an extension area associated with the upstream bill comprises at least one extension parameter corresponding to a downstream bill respectively; the extension parameter comprises an extension field identifier used to identify an extension field and an extension field value corresponding to the extension field; A matching module is configured to determine a target extension parameter from the extension area associated with the upstream bill, comprising: parsing a bill field in structured description data of the target bill, and determining the target extension parameter from the extension parameter of the extension area through a matching relationship between the bill field and the extension parameter in the extension area; the extension area is set according to an extension requirement of the target bill to be generated; the extension requirement refers to a requirement of adding a bill field in the target bill; the structured description data is data used to describe the structure of the target bill; A generating module is configured to perform push-down processing on the upstream bill to obtain fixed parameters, comprising: performing bill field mapping processing on the upstream bill according to a bill conversion rule to obtain fixed parameters; the fixed parameters comprise a bill field and a corresponding field value; and generating the target bill based on the fixed parameters and the target extension parameter. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor executes the computer program to implement the steps of the method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7.
11. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Data expansion device and data expansion method
CN102508862A
Bill data processing method and apparatus, computer device and storage medium
CN107861991A