A method and system for dynamically generating business forms
By receiving client requests in the information management system, analyzing and constructing structured data, and dynamically generating business forms, the problem of fixed design of business forms in the existing technology is solved, and more efficient information interaction is achieved.
Patent Information
- Application Number
- CN202410899761.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-07-05
AI Technical Summary
The business forms in the existing information management system are fixedly designed during the development stage and cannot be dynamically adjusted according to the business form and content, and cannot meet diversified business needs.
By receiving access requests from the client device, obtaining the form data of the target business form, analyzing the relationship characteristic data in the additional data, constructing structured data, and embed the main content and structured data on the business system page to dynamically generate business forms.
It realizes adaptive adjustment of business forms, enhances information interaction capabilities, and improves the interaction efficiency of the information management system.
Smart Images

Figure CN118861457B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to a method and system for dynamically generating a business form. Background Art
[0002] With the development and progress of Internet technology and information technology, information management systems have gradually become an indispensable work platform for enterprises. Various business forms are the core elements of the information management system for users, and the operation of business forms is the main means of information interaction between users and information management systems. However, in existing information management systems, all business forms are fixed forms designed together with the system page that carries the business form during the development phase. That is, after the business form is launched on the system, its content and style are fixed and cannot be adaptively adjusted according to the business form and business content, and cannot meet the increasingly diverse business needs. Summary of the invention
[0003] Based on the above problems, the present invention proposes a method and system for dynamically generating business forms, which can adaptively adjust the content and style of business forms, enhance the information interaction capability of business forms, and improve the interaction efficiency of information management system.
[0004] In view of this, a first aspect of the present invention provides a method for dynamically generating a business form, comprising:
[0005] Receiving an access request submitted by a client device to access a business system page including a target business form;
[0006] Acquire form data of the target business form, wherein the form data includes the main content and additional data of the target business form, and the additional data is data submitted by the user in the form of an attachment;
[0007] Parsing the relationship characteristic data of the target business form from the additional data, the relationship characteristic data being text data having key-value structure characteristics in the additional data;
[0008] constructing the relationship feature data into structured data;
[0009] Embedding the main content of the target business form and the structured data into the business system page;
[0010] The business system page is sent to the client device in response to an access request from the client device.
[0011] Furthermore, the step of parsing the relationship characteristic data of the target business form from the additional data specifically includes:
[0012] Obtaining text content in the additional data;
[0013] Extracting words whose part of speech is noun from the text content to construct a first main word list of the additional data;
[0014] Obtaining candidate triples with words in the first main word list as main words from a pre-constructed knowledge graph;
[0015] Matching the object words in the candidate triples with the text content to determine a target triple, wherein the target triple is a candidate triple whose object words in the text content have a matching degree greater than a preset matching degree threshold;
[0016] The relational feature data is constructed using the relational word of the target triple as a key name and the object word as a key value.
[0017] Furthermore, the step of matching the object word in the candidate triple with the text content to determine the target triple specifically includes:
[0018] Performing word segmentation processing on the text content to obtain a word segmentation list of the text content;
[0019] Calculating the semantic similarity between the object word of the candidate triple and each word in the word list;
[0020] Determine whether there is a word in the word list whose semantic similarity with the object word of the candidate triple is greater than a preset similarity threshold;
[0021] When there is a segmentation in the segmentation list whose semantic similarity with the object word of the candidate triple is greater than a preset similarity threshold, the candidate triple is determined as the target triple.
[0022] Furthermore, before the step of obtaining candidate triples with words in the first main word list as main words from the pre-constructed knowledge graph, it also includes:
[0023] Traverse the business forms in the information management system;
[0024] Determine the currently traversed business form as the target business form;
[0025] Obtain the main content of the target business form;
[0026] Parsing the relationship characteristic data of the target business form from the main content, the relationship characteristic data being text data having key-value structure characteristics in the main content;
[0027] constructing the relationship feature data into structured data;
[0028] Constructing a temporary triple with the key name of each set of key-value pairs in the structured data being the relational word and the key value being the object word;
[0029] identifying a subject word corresponding to each temporary triple from the subject content;
[0030] The subject word is filled into the temporary triple to obtain a complete triple and then written into the knowledge graph.
[0031] Furthermore, the step of constructing the relationship feature data into structured data specifically includes:
[0032] Extracting subject words from the target triples to construct a second subject word list;
[0033] Grouping the target triples based on each main word in the second main word list;
[0034] Merge each set of target triples into an independent structured data.
[0035] Furthermore, the step of merging each set of target triples into an independent structured data specifically includes:
[0036] Denote the i-th target triplet as T ij [S i ,R ij ,O ij ], where i is from 1 to n group A positive integer between group is the number of groups of the target triplet, j is 1 to n i A positive integer between i is the number of triplets in the i-th group of target triplets, S i is the main word of the target triplet of the i-th group, R ij is the relation word of the jth triple in the i-th target triple, O ij is the object word of the hth triple in the i-th group of target triples;
[0037] The main word S of the i-th group of target triples i Determine the first-level nested key name of the i-th structured data;
[0038] The relation word R of the jth triple in the i-th target triple ij and the object word O ij Determine the jth key-value pair of the second nesting layer of the i-th structured data;
[0039] The second-level nested key-value pairs are merged into the first-level nested key-values of the i-th structured data.
[0040] Furthermore, the step of embedding the main content of the target business form and the structured data into the business system page specifically includes:
[0041] Generating a first display area in the business system page for presenting the main content of the target business form;
[0042] Embedding the main content of the target business form into the first display area;
[0043] Constructing a parameter list corresponding to the structured data, wherein the parameter list is a parameter symbol list corresponding one-to-one to the structured data;
[0044] generating an interactive area associated with the parameter list on the business system page, wherein the business system page includes an interactive script for responding to a user's operation in the interactive area and using the parameters in the parameter list as interactive parameters;
[0045] The step of sending the business system page to the client device in response to the access request of the client device specifically includes:
[0046] In response to the access request submitted by the client device, the business system page is returned to the client device using the parameter list as a page parameter.
[0047] Furthermore, after the step of sending the business system page to the client device in response to the access request of the client device, the method further includes:
[0048] receiving a data interaction request generated by executing the interaction script and sent by the client device, wherein the data interaction request includes interaction parameters associated with the interaction area;
[0049] Acquire structured data corresponding to the interaction parameter, wherein the structured data is constructed based on the relationship feature data parsed from the additional data;
[0050] In response to the data interaction request submitted by the client device, the structured data is returned to the client device.
[0051] Furthermore, the step of embedding the main content of the target business form and the structured data into the business system page also includes:
[0052] Generating a second display area in the business system page for presenting the additional data of the target business form, wherein the second display area is in a hidden state by default;
[0053] In the step of generating an interactive area associated with the parameter list on the business system page, the interactive area is used to receive the user's operation to call the interactive script, so that the client device sends the data interaction request and configures the second display area to a display state after receiving the structured data.
[0054] A second aspect of the present invention provides a system for dynamically generating a business form, comprising:
[0055] An access request receiving module, used to receive an access request submitted by a client device to access a business system page containing a target business form;
[0056] A form data acquisition module, used to acquire the form data of the target business form, wherein the form data includes the main content and additional data of the target business form, wherein the additional data is data submitted by the user in the form of an attachment;
[0057] A relationship feature parsing module, used for parsing the relationship feature data of the target business form from the additional data, wherein the relationship feature data is text data with key-value structure features in the additional data;
[0058] A structured data construction module, used to construct the relationship feature data into structured data;
[0059] A form data embedding module, used to embed the main content of the target business form and the structured data into the business system page;
[0060] The access request response module is used to send the business system page to the client device in response to the access request of the client device.
[0061] The present invention proposes a method and system for dynamically generating a business form, which receives an access request submitted by a client device to access a business system page containing a target business form, obtains form data of the target business form, the form data includes the main content and additional data of the target business form, parses the relationship feature data of the target business form from the additional data, the relationship feature data is text data with key-value structure features in the additional data, constructs the relationship feature data into structured data, embeds the main content of the target business form and the structured data into the business system page, sends the business system page to the client device in response to the access request of the client device, can adaptively adjust the content and style of the business form, enhances the information interaction capability of the business form, and improves the interaction efficiency of the information management system. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1is a flow chart of a method for dynamically generating a business form provided by an embodiment of the present invention;
[0063] Figure 2 The present invention is a schematic block diagram of a system for dynamically generating a business form according to an embodiment of the present invention. DETAILED DESCRIPTION
[0064] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0065] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0066] In the description of the present invention, the term "multiple" refers to two or more. Unless otherwise clearly defined, the orientation or positional relationship indicated by the terms "upper", "lower", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation of the present invention. The terms "connection", "installation", "fixation", etc. should be understood in a broad sense. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be directly connected or indirectly connected through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances. In addition, the terms "first", "second", etc. are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first", "second", etc. can explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, the meaning of "multiple" is two or more.
[0067] In the description of this specification, the description of the terms "one embodiment", "some implementations", "specific embodiments", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0068] A method and system for dynamically generating a business form according to some embodiments of the present invention will be described below with reference to the accompanying drawings.
[0069] like Figure 1 As shown, the first aspect of the present invention provides a method for dynamically generating a business form, comprising:
[0070] Receiving an access request submitted by a client device to access a business system page including a target business form;
[0071] Acquire form data of the target business form, wherein the form data includes the main content and additional data of the target business form, and the additional data is data submitted by the user in the form of an attachment;
[0072] Parsing the relationship characteristic data of the target business form from the additional data, the relationship characteristic data being text data having key-value structure characteristics in the additional data;
[0073] constructing the relationship feature data into structured data;
[0074] Embedding the main content of the target business form and the structured data into the business system page;
[0075] The business system page is sent to the client device in response to an access request from the client device.
[0076] Specifically, the business form referred to in the present invention refers to an electronic data form embedded in a specific business system page in the information management system in a standardized data structure in order to achieve certain business purposes such as information display, information entry, information submission, etc., such as a process approval form, a data report form, etc. The business system page refers to a page used for information display, information entry, and information submission in the information management system. The business form is usually presented in a form or a form similar to a form in the business system page, that is, the main content of the business form is usually in the form of a key-value pair, consisting of multiple key names (or field names) and corresponding key values (or field values), and one key name can correspond to one or more key values. In the step of receiving an access request submitted by a client device to access a business system page containing a target business form, the target business form refers to the business form contained in the business system page to be accessed by the access request submitted by the client device.
[0077] The main content of the business form is the content directly presented in the form of text or graphics on the business system page. The main content includes but is not limited to basic information in the business form such as form name, form number, form type, submission number, name of the submitter, etc., and business item information in the business form such as business item name, business item attributes, business item content, etc. The additional data of the business form is the content submitted by the user and attached to the business form in the form of a file, which is what we usually call an attachment, such as a document to be approved or a supporting document required for approval such as a contract document, invoice document, business license or sick leave note.
[0078] The key-value structure feature is a feature with a key name and a key-value relationship structure, so the relationship feature data is a set of data that can be associated with a key name and a key value, for example, "Party A: XXX Company" has "Party A" as the key name and "XXX Company" as the key value, and "Contract Amount: XXX Yuan" has "Contract Amount" as the key name and "XXX Yuan" as the key value. The relationship feature data is usually presented in the form of paragraphs, text blocks or tables in the additional data, so it is necessary to perform structured processing on it to generate structured data with a key-value pair structure. The structured data can be JSON (JavaScript Object Notation) data or XML (Extensible Markup Language) data, so that it is easier to be recognized by the information management system and presented on the business system page.
[0079] Furthermore, after the step of parsing the relationship characteristic data of the target business form from the additional data, the method further includes removing key-value pairs that are repeated in the main content of the target business form from the relationship characteristic data.
[0080] Furthermore, the step of parsing the relationship characteristic data of the target business form from the additional data specifically includes:
[0081] Obtaining text content in the additional data;
[0082] Extracting words whose part of speech is noun from the text content to construct a first main word list of the additional data;
[0083] Obtaining candidate triples with words in the first main word list as main words from a pre-constructed knowledge graph;
[0084] Matching the object words in the candidate triples with the text content to determine a target triple, wherein the target triple is a candidate triple whose object words in the text content have a matching degree greater than a preset matching degree threshold;
[0085] The relational feature data is constructed using the relational word of the target triple as a key name and the object word as a key value.
[0086] Specifically, the additional data of the business form, i.e., its attachment, can be a document file consisting of text content and / or multimedia content, such as a word document, a pdf document, etc., can be a multimedia document such as an audio document, a video document, etc., or can be a compressed document such as a zip document, a rar document, etc.
[0087] Furthermore, in the step of obtaining the text content in the additional data, when the additional data is in a picture format, text recognition is performed on the additional data to obtain the corresponding text content. The picture format referred to herein includes a PDF file format composed of pictures.
[0088] Furthermore, in the step of obtaining the text content in the additional data, when the additional data is multimedia data including audio data, the audio data is extracted from the additional data, and speech recognition is performed on the audio data to obtain the corresponding text content.
[0089] Furthermore, the step of extracting words whose part of speech is noun from the text content to construct the first main word list of the additional data specifically includes:
[0090] Performing word segmentation processing on the text content to obtain a word segmentation list of the text content;
[0091] Performing part-of-speech recognition on each word in the word segmentation list to obtain the part-of-speech of each word;
[0092] The segmented words whose part of speech is noun are extracted from the segmented word list to construct the first main word list.
[0093] The knowledge graph is a proprietary knowledge base with structured data features built for enterprises in an information management system. The data in the knowledge graph are stored in triples as basic storage units. Each triple is composed of a subject word, a relation word and an object word. For example, in the triple ["Company A", "Customer", "Company B"], "Company A" is the subject word, "Customer" is the relation word, and "Company B" is the object word. The whole is used to indicate that the relationship between Company B and Company A is a customer relationship, that is, Company B is a customer of Company A.
[0094] Furthermore, the step of matching the object word in the candidate triple with the text content to determine the target triple specifically includes:
[0095] Performing word segmentation processing on the text content to obtain a word segmentation list of the text content;
[0096] Calculating the semantic similarity between the object word of the candidate triple and each word in the word list;
[0097] Determine whether there is a word in the word list whose semantic similarity with the object word of the candidate triple is greater than a preset similarity threshold;
[0098] When there is a segmentation in the segmentation list whose semantic similarity with the object word of the candidate triple is greater than a preset similarity threshold, the candidate triple is determined as the target triple.
[0099] Furthermore, the step of calculating the semantic similarity between the object word of the candidate triple and each word in the word list specifically includes:
[0100] Generate a first word vector corresponding to the object word of the candidate triple;
[0101] Traverse the word list to perform the steps for each word in the word list:
[0102] Determine the currently traversed word in the word list as the target word;
[0103] Generate a second word vector for the target word;
[0104] Calculating the cosine similarity between the first word vector and the second word vector;
[0105] The cosine similarity between the first word vector and the second word vector is determined as the semantic similarity between the object word of the candidate triple and each word in the word segmentation list.
[0106] In the technical solution of the above-mentioned embodiment, a pre-trained bag-of-words model can be used to realize the vectorization of words, that is, in the steps of generating the first word vector corresponding to the object word of the candidate triple and generating the second word vector of the target word segmentation, the first word vector and the second word vector corresponding to the object word and the target word segmentation are generated by a pre-trained bag-of-words model.
[0107] Furthermore, before the step of obtaining candidate triples with words in the first main word list as main words from the pre-constructed knowledge graph, it also includes:
[0108] Traverse the business forms in the information management system;
[0109] Determine the currently traversed business form as the target business form;
[0110] Obtain the main content of the target business form;
[0111] Parsing the relationship characteristic data of the target business form from the main content, the relationship characteristic data being text data having key-value structure characteristics in the main content;
[0112] constructing the relationship feature data into structured data;
[0113] Constructing a temporary triple with the key name of each set of key-value pairs in the structured data being the relational word and the key value being the object word;
[0114] identifying a subject word corresponding to each temporary triple from the subject content;
[0115] The subject word is filled into the temporary triple to obtain a complete triple and then written into the knowledge graph.
[0116] Specifically, most of the main content of the business form is presented in the form of key-value pairs. The key name and key value of each key-value pair can be directly obtained based on the data structure of the main content stored in the database and / or the positional relationship of the main content presented on the business system page. Therefore, the step of parsing the relationship feature data of the target business form in the main content is easier to implement.
[0117] Furthermore, before the step of identifying the subject word corresponding to each temporary triplet from the subject content, the method further includes configuring a subject word field corresponding to each key-value pair for the subject content of each business form.
[0118] Take a contract approval form as an example. Its structured data may contain key-value pairs including ["Applicant", "XXX"], ["Contract Name", "XXX Contract"], ["Contract Number", "XXX"], ["Party A", "Company A"], ["Party B", "Company B"]. In this case, the key value in "Contract Number" can be used as the main word of most key-value pairs in the contract approval form. For example, ["Applicant", "XXX"], ["Contract Name", "XXX Contract"], ["Party A", "Company A"], ["Party B", "Company B"] can all use the key value in "Contract Number" as their main word. However, it should be noted that there are usually some key-value pairs related to the applicant itself in the main content of the contract approval form, such as ["Work Number", "XXX"], ["Department", "XXX Department"], ["Telephone", "XXX"], etc., and their main words are the key values in "Applicant".
[0119] Furthermore, the step of constructing the relationship feature data into structured data specifically includes:
[0120] Extracting subject words from the target triples to construct a second subject word list;
[0121] Grouping the target triples based on each main word in the second main word list;
[0122] Merge each set of target triples into an independent structured data.
[0123] Specifically, the target triple is one or more triples extracted from the additional data of the target business form, so the target triple can be multiple triples, and because they are all extracted from the additional data of the same business form, when there are multiple target triples, there may be multiple target triples with the same subject words. The same subject word means that these target triples belong to the same category of data, and vice versa, different subject words indicate that the information in the triple belongs to different categories. Therefore, using the subject word as the basis for grouping can clearly define the information category corresponding to the target triple, so as to use it as its display method on the business system page.
[0124] Furthermore, the step of extracting subject words from the target triples to construct a second subject word list specifically includes:
[0125] Extract the main words of each target triple to build a temporary main word list;
[0126] The temporary subject word list is deduplicated to obtain the second subject word list.
[0127] Furthermore, after the step of constructing the relationship feature data into structured data, the method further includes associating the structured data with the additional data and storing them in a database.
[0128] Furthermore, the step of merging each set of target triples into an independent structured data specifically includes:
[0129] Denote the i-th target triplet as T ij [S i ,R ij ,O ij ], where i is from 1 to n group A positive integer between group is the number of groups of the target triplet, j is 1 to n i A positive integer between i is the number of triplets in the i-th group of target triplets, S i is the main word of the target triplet of the i-th group, R ij is the relation word of the jth triple in the i-th target triple, O ij is the object word of the hth triple in the i-th group of target triples;
[0130] The main word S of the i-th group of target triples i Determine the first-level nested key name of the i-th structured data;
[0131] The relation word R of the jth triple in the i-th target triple ij and the object word O ij Determine the jth key-value pair of the second nesting layer of the i-th structured data;
[0132] The second-level nested key-value pairs are merged into the first-level nested key-values of the i-th structured data.
[0133] Since the target triples of each group are divided according to their same main words, for the n target triples of the i-th group i triples, whose main word S i It can be seen that in the technical solution of the above implementation mode, n group is the number of groups of the target triples, and is also the number of main words in the second main word list.
[0134] The following is an example structure of the i-th structured data obtained by combining the i-th set of target triples:
[0135]
[0136] Furthermore, the step of embedding the main content of the target business form and the structured data into the business system page specifically includes:
[0137] Generating a first display area in the business system page for presenting the main content of the target business form;
[0138] Embedding the main content of the target business form into the first display area;
[0139] Constructing a parameter list corresponding to the structured data, wherein the parameter list is a parameter symbol list corresponding one-to-one to the structured data;
[0140] generating an interactive area associated with the parameter list on the business system page, wherein the business system page includes an interactive script for responding to a user's operation in the interactive area and using the parameters in the parameter list as interactive parameters;
[0141] The step of sending the business system page to the client device in response to the access request of the client device specifically includes:
[0142] In response to the access request submitted by the client device, the business system page is returned to the client device using the parameter list as a page parameter.
[0143] Specifically, in the step of constructing a parameter list corresponding to the structured data, a parameter symbol corresponding to each structured data is generated, and each parameter symbol is used to uniquely represent the corresponding structured data, which can be any variable symbol of a custom configuration. Preferably, the subject words in the structured data are configured as parameter symbols corresponding to the structured data, that is, in the step of constructing a parameter list corresponding to the structured data, the second subject word list can be directly reused as the parameter list.
[0144] The interactive area may be a form control display area composed of one or more combinations of a list control, a label control, a text box control, a check box control, and a button control. The form controls in the interactive area are associated with the interactive script and the parameter symbols in the parameter list through codes, so that when a user operates the form controls in the interactive area, the interactive script is called with the parameter symbols in the parameter list as interactive parameters to perform corresponding interactive actions, such as requesting structured data corresponding to the interactive parameters from a back-end database.
[0145] Furthermore, after the step of sending the business system page to the client device in response to the access request of the client device, the method further includes:
[0146] receiving a data interaction request generated by executing the interaction script and sent by the client device, wherein the data interaction request includes interaction parameters associated with the interaction area;
[0147] Acquire structured data corresponding to the interaction parameter, wherein the structured data is constructed based on the relationship feature data parsed from the additional data;
[0148] In response to the data interaction request submitted by the client device, the structured data is returned to the client device.
[0149] Specifically, the interaction parameters associated with the interaction area are parameters corresponding to each parameter symbol in the parameter list, which are generated in the step of generating the interaction area associated with the parameter list on the business system page. Preferably, the parameter symbols in the parameter list can be directly reused as the interaction parameters of the interaction area.
[0150] Furthermore, after the step of constructing a parameter list corresponding to the structured data, the method further includes associating parameter symbols in the parameter list with the structured data and storing them in a database.
[0151] Furthermore, the step of obtaining structured data corresponding to the interaction parameter specifically includes:
[0152] Determine a parameter symbol corresponding to the interaction parameter;
[0153] The structured data corresponding to the interaction parameter is read from a database according to the parameter symbol.
[0154] Furthermore, the step of embedding the main content of the target business form and the structured data into the business system page also includes:
[0155] Generating a second display area in the business system page for presenting the additional data of the target business form, wherein the second display area is in a hidden state by default;
[0156] In the step of generating an interactive area associated with the parameter list on the business system page, the interactive area is used to receive the user's operation to call the interactive script, so that the client device sends the data interaction request and configures the second display area to a display state after receiving the structured data.
[0157] In the technical solution of the above implementation, in the default state, that is, when the user does not perform an operation in the interaction area, the second display area is not displayed on the business system page. The size of the second display area is determined according to the number of interaction parameters associated with the user's operation in the interaction area, or more precisely, according to the number of structured data corresponding to the interaction parameters.
[0158] like Figure 2 As shown, the second aspect of the present invention provides a system for dynamically generating a business form, comprising:
[0159] An access request receiving module, used to receive an access request submitted by a client device to access a business system page containing a target business form;
[0160] A form data acquisition module, used to acquire the form data of the target business form, wherein the form data includes the main content and additional data of the target business form, wherein the additional data is data submitted by the user in the form of an attachment;
[0161] A relationship feature parsing module, used for parsing the relationship feature data of the target business form from the additional data, wherein the relationship feature data is text data with key-value structure features in the additional data;
[0162] A structured data construction module, used to construct the relationship feature data into structured data;
[0163] A form data embedding module, used to embed the main content of the target business form and the structured data into the business system page;
[0164] The access request response module is used to send the business system page to the client device in response to the access request of the client device.
[0165] Specifically, the business form referred to in the present invention refers to an electronic data form embedded in a specific business system page in the information management system in a standardized data structure in order to achieve certain business purposes such as information display, information entry, information submission, etc., such as a process approval form, a data report form, etc. The business system page refers to a page used for information display, information entry, and information submission in the information management system. The business form is usually presented in a form or a form similar to a form in the business system page, that is, the main content of the business form is usually in the form of a key-value pair, consisting of multiple key names (or field names) and corresponding key values (or field values), and one key name can correspond to one or more key values. In the step of receiving an access request submitted by a client device to access a business system page containing a target business form, the target business form refers to the business form contained in the business system page to be accessed by the access request submitted by the client device.
[0166] The main content of the business form is the content directly presented in the form of text or graphics on the business system page. The main content includes but is not limited to basic information in the business form such as form name, form number, form type, submission number, name of the submitter, etc., and business item information in the business form such as business item name, business item attributes, business item content, etc. The additional data of the business form is the content submitted by the user and attached to the business form in the form of a file, which is what we usually call an attachment, such as a document to be approved or a supporting document required for approval such as a contract document, invoice document, business license or sick leave note.
[0167] The key-value structure feature is a feature with a key name and a key-value relationship structure, so the relationship feature data is a set of data that can be associated with a key name and a key value, for example, "Party A: XXX Company" has "Party A" as the key name and "XXX Company" as the key value, and "Contract Amount: XXX Yuan" has "Contract Amount" as the key name and "XXX Yuan" as the key value. The relationship feature data is usually presented in the form of paragraphs, text blocks or tables in the additional data, so it is necessary to perform structured processing on it to generate structured data with a key-value pair structure. The structured data can be JSON (JavaScript Object Notation) data or XML (Extensible Markup Language) data, so that it is easier to be recognized by the information management system and presented on the business system page.
[0168] Furthermore, the system for dynamically generating business forms further comprises a duplicate key-value pair elimination module, and the duplicate key-value pair elimination module is used to eliminate the key-value pairs that are duplicated in the main content of the target business form from the relationship feature data.
[0169] Furthermore, the relationship feature analysis module specifically includes:
[0170] A text content acquisition module, used to acquire the text content in the additional data;
[0171] A first main word list construction module, used for extracting words with the part of speech of noun from the text content to construct a first main word list of the additional data;
[0172] A candidate triple acquisition module, used to acquire candidate triples with words in the first main word list as main words from a pre-constructed knowledge graph;
[0173] A target triplet determination module, used for matching the object words in the candidate triplet with the text content to determine a target triplet, wherein the target triplet is a candidate triplet whose object word in the text content has a matching degree greater than a preset matching degree threshold;
[0174] The relation feature data construction module is used to construct the relation feature data using the relation word of the target triple as the key name and the object word as the key value.
[0175] Specifically, the additional data of the business form, i.e., its attachment, can be a document file consisting of text content and / or multimedia content, such as a word document, a pdf document, etc., can be a multimedia document such as an audio document, a video document, etc., or can be a compressed document such as a zip document, a rar document, etc.
[0176] Furthermore, the text content acquisition module is also used to perform text recognition on the additional data to obtain the corresponding text content when the additional data is in a picture format. The picture format referred to herein includes a PDF file format composed of pictures.
[0177] Furthermore, the text content acquisition module is also used to extract the audio data from the additional data when the additional data is multimedia data including audio data, and perform speech recognition on the audio data to obtain corresponding text content.
[0178] Furthermore, the first subject word list construction module specifically includes:
[0179] A text segmentation module, used to perform segmentation processing on the text content to obtain a segmentation list of the text content;
[0180] A part-of-speech recognition module, used to perform part-of-speech recognition on each word in the word segmentation list to obtain the part-of-speech of each word;
[0181] The first main word list construction module is specifically used to extract the segmented words whose part of speech is noun from the segmented word list to construct the first main word list.
[0182] The knowledge graph is a proprietary knowledge base with structured data features built for enterprises in an information management system. The data in the knowledge graph are stored in triples as basic storage units. Each triple is composed of a subject word, a relation word and an object word. For example, in the triple ["Company A", "Customer", "Company B"], "Company A" is the subject word, "Customer" is the relation word, and "Company B" is the object word. The whole is used to indicate that the relationship between Company B and Company A is a customer relationship, that is, Company B is a customer of Company A.
[0183] Furthermore, the target triplet determination module specifically includes:
[0184] A text segmentation module, used to perform segmentation processing on the text content to obtain a segmentation list of the text content;
[0185] A semantic similarity calculation module, used for calculating the semantic similarity between the object word of the candidate triple and each word in the word list;
[0186] A similarity threshold judgment module is used to judge whether there is a word in the word list whose semantic similarity with the object word of the candidate triple is greater than a preset similarity threshold;
[0187] The target triplet determination module is specifically configured to determine the candidate triplet as the target triplet when there is a segmentation in the segmentation list whose semantic similarity with the object word of the candidate triplet is greater than a preset similarity threshold.
[0188] Furthermore, the semantic similarity calculation module specifically includes:
[0189] A first word vector generating module, used to generate a first word vector corresponding to the object word of the candidate triple;
[0190] A word segmentation list traversal module is used to traverse the word segmentation list to traverse each word in the word segmentation list.
[0191] Furthermore, the word segmentation list traversal module specifically includes:
[0192] A target segmentation determination module, used to determine the segmentation currently traversed in the segmentation list as the target segmentation;
[0193] A second word vector generating module, used to generate a second word vector for the target word segmentation;
[0194] A cosine similarity calculation module, used to calculate the cosine similarity between the first word vector and the second word vector;
[0195] A semantic similarity determination module is used to determine the cosine similarity between the first word vector and the second word vector as the semantic similarity between the object word of the candidate triple and each word in the word segmentation list.
[0196] In the technical solution of the above-mentioned embodiment, a pre-trained bag-of-words model can be used to realize the vectorization of words, that is, in the steps of generating the first word vector corresponding to the object word of the candidate triple and generating the second word vector of the target word segmentation, the first word vector and the second word vector corresponding to the object word and the target word segmentation are generated by a pre-trained bag-of-words model.
[0197] Furthermore, the system for dynamically generating business forms also includes a knowledge graph construction module, and the knowledge graph construction module specifically includes:
[0198] The business form traversal module is used to traverse the business forms in the information management system;
[0199] A target business form determination module is used to determine the currently traversed business form as the target business form;
[0200] A main content acquisition module, used to acquire the main content of the target business form;
[0201] A relationship feature parsing module, used for parsing the relationship feature data of the target business form from the main content, wherein the relationship feature data is text data with key-value structure features in the main content;
[0202] A structured data construction module, used to construct the relationship feature data into structured data;
[0203] A temporary triple building module, used to build a temporary triple with the key name of each set of key-value pairs in the structured data being a relational word and the key value being an object word;
[0204] A subject word recognition module, used to recognize the subject word corresponding to each temporary triple from the subject content;
[0205] The knowledge graph construction module is specifically used to fill the subject words into the temporary triples to obtain complete triples and then write them into the knowledge graph.
[0206] Specifically, most of the main content of the business form is presented in the form of key-value pairs. The key name and key value of each key-value pair can be directly obtained based on the data structure of the main content stored in the database and / or the positional relationship of the main content presented on the business system page. Therefore, the step of parsing the relationship feature data of the target business form in the main content is easier to implement.
[0207] Furthermore, the knowledge graph construction module also includes a main word field configuration module, which is used to configure the main word field corresponding to each key-value pair for the main content of each business form.
[0208] Take a contract approval form as an example. Its structured data may contain key-value pairs including ["Applicant", "XXX"], ["Contract Name", "XXX Contract"], ["Contract Number", "XXX"], ["Party A", "Company A"], ["Party B", "Company B"]. In this case, the key value in "Contract Number" can be used as the main word of most key-value pairs in the contract approval form. For example, ["Applicant", "XXX"], ["Contract Name", "XXX Contract"], ["Party A", "Company A"], ["Party B", "Company B"] can all use the key value in "Contract Number" as their main word. However, it should be noted that there are usually some key-value pairs related to the applicant itself in the main content of the contract approval form, such as ["Work Number", "XXX"], ["Department", "XXX Department"], ["Telephone", "XXX"], etc., and their main words are the key values in "Applicant".
[0209] Furthermore, the structured data building module specifically includes:
[0210] A second main word list construction module, used for extracting main words from the target triples to construct a second main word list;
[0211] A target triple grouping module, configured to group the target triples based on each subject word in the second subject word list;
[0212] The target triplet merging module is used to merge each set of target triples into an independent structured data.
[0213] Specifically, the target triple is one or more triples extracted from the additional data of the target business form, so the target triple can be multiple triples, and because they are all extracted from the additional data of the same business form, when there are multiple target triples, there may be multiple target triples with the same subject words. The same subject word means that these target triples belong to the same category of data, and vice versa, different subject words indicate that the information in the triple belongs to different categories. Therefore, using the subject word as the basis for grouping can clearly define the information category corresponding to the target triple, so as to use it as its display method on the business system page.
[0214] Furthermore, the second subject word list construction module specifically includes:
[0215] A temporary subject word list construction module is used to extract the subject words of each target triple to construct a temporary subject word list;
[0216] The second main word list construction module is specifically used to perform a deduplication process on the temporary main word list to obtain the second main word list.
[0217] Furthermore, the system for dynamically generating business forms also includes a data persistence module, and the data persistence module is used to associate the structured data with the additional data and store them in a database.
[0218] Furthermore, the target triple group merging module specifically includes:
[0219] The target triplet definition module is used to represent the i-th target triplet as T ij [S i ,R ij ,O ij ], where i is from 1 to n group A positive integer between group is the number of groups of the target triplet, j is 1 to n i A positive integer between i is the number of triplets in the i-th group of target triplets, S i is the main word of the target triplet of the i-th group, R ij is the relation word of the jth triple in the i-th target triple, O ij is the object word of the jth triple in the i-th group of target triples;
[0220] The first-level key name nesting module is used to convert the main word S of the i-th group of target triples i Determine the first-level nested key name of the i-th structured data;
[0221] The second layer of nesting module is used to embed the relation word R of the jth triple in the i-th group of target triples. ij and the object word O ij Determine the jth key-value pair of the second nesting layer of the i-th structured data;
[0222] The first-level key-value nesting module is used to merge the second-level nested key-value pairs into the first-level nested key values of the i-th structured data.
[0223] Since the target triples of each group are divided according to their same main words, for the n target triples of the i-th group i triples, whose main word S i It can be seen that in the technical solution of the above implementation mode, n group is the number of groups of the target triples, and is also the number of main words in the second main word list.
[0224] The following is an example structure of the i-th structured data obtained by combining the i-th set of target triples:
[0225]
[0226] Furthermore, the form data embedding module specifically includes:
[0227] A first display area generating module, used to generate a first display area for presenting the main content of the target business form in the business system page;
[0228] A main content embedding module, used for embedding the main content of the target business form into the first display area;
[0229] A parameter list construction module, used to construct a parameter list corresponding to the structured data, wherein the parameter list is a parameter symbol list corresponding one-to-one to the structured data;
[0230] An interactive area generating module, used to generate an interactive area associated with the parameter list on the business system page, wherein the business system page includes an interactive script for responding to user operations in the interactive area and using parameters in the parameter list as interactive parameters;
[0231] The access request response module is specifically configured to respond to the access request submitted by the client device and return the business system page to the client device using the parameter list as a page parameter.
[0232] Specifically, in the parameter list construction module, a parameter symbol corresponding to each structured data is generated, and each parameter symbol is used to uniquely represent the corresponding structured data, which can be any variable symbol of a custom configuration. Preferably, the subject words in the structured data are configured as parameter symbols corresponding to the structured data, that is, in the parameter list construction module, the second subject word list can be directly reused as the parameter list.
[0233] The interactive area may be a form control display area composed of one or more combinations of a list control, a label control, a text box control, a check box control, and a button control. The form controls in the interactive area are associated with the interactive script and the parameter symbols in the parameter list through codes, so that when a user operates the form controls in the interactive area, the interactive script is called with the parameter symbols in the parameter list as interactive parameters to perform corresponding interactive actions, such as requesting structured data corresponding to the interactive parameters from a back-end database.
[0234] Furthermore, the system for dynamically generating a business form also includes:
[0235] A data interaction request receiving module, configured to receive a data interaction request generated by executing the interaction script and sent by the client device, wherein the data interaction request includes interaction parameters associated with the interaction area;
[0236] A structured data acquisition module, used to acquire structured data corresponding to the interaction parameter, wherein the structured data is constructed based on the relationship feature data parsed from the additional data;
[0237] The data interaction request response module is used to return the structured data to the client device in response to the data interaction request submitted by the client device.
[0238] Specifically, the interaction parameters associated with the interaction area are parameters corresponding to each parameter symbol in the parameter list, which are generated in the step of generating the interaction area associated with the parameter list on the business system page. Preferably, the parameter symbols in the parameter list can be directly reused as the interaction parameters of the interaction area.
[0239] Furthermore, the data persistence module is also used to associate the parameter symbols in the parameter list with the structured data and store them in a database.
[0240] Furthermore, the structured data acquisition module specifically includes a parameter symbol determination module, which is used to determine the parameter symbol corresponding to the interaction parameter; the structured data acquisition module is specifically used to read the structured data corresponding to the interaction parameter from the database according to the parameter symbol.
[0241] Furthermore, the form data embedding module also includes:
[0242] A second display area generating module, used to generate a second display area for presenting the additional data of the target business form in the business system page, wherein the second display area is hidden by default;
[0243] The interactive area is used to receive a user's operation to call the interactive script, so that the client device sends the data interaction request and configures the second display area to a display state after receiving the structured data.
[0244] In the technical solution of the above implementation, in the default state, that is, when the user does not perform an operation in the interaction area, the second display area is not displayed on the business system page. The size of the second display area is determined according to the number of interaction parameters associated with the user's operation in the interaction area, or more precisely, according to the number of structured data corresponding to the interaction parameters.
[0245] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0246] According to the embodiments of the present invention as described above, these embodiments do not describe all the details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and changes can be made based on the above description. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can make good use of the present invention and the modified use based on the present invention. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A method for dynamically generating a business form, characterized in that: include: Receiving an access request submitted by a client device to access a business system page including a target business form; Acquire form data of the target business form, wherein the form data includes the main content and additional data of the target business form, and the additional data is data submitted by the user in the form of an attachment; Parsing the relationship characteristic data of the target business form from the additional data, the relationship characteristic data being text data having key-value structure characteristics in the additional data; constructing the relationship feature data into structured data; Embedding the main content of the target business form and the structured data into the business system page; sending the business system page to the client device in response to an access request from the client device; The step of parsing the relationship characteristic data of the target business form from the additional data specifically includes: Obtaining text content in the additional data; Extracting words whose part of speech is noun from the text content to construct a first main word list of the additional data; Obtaining candidate triples with words in the first main word list as main words from a pre-constructed knowledge graph; Matching the object words in the candidate triples with the text content to determine a target triple, wherein the target triple is a candidate triple whose object words in the text content have a matching degree greater than a preset matching degree threshold; The relational feature data is constructed using the relational word of the target triple as the key name and the object word as the key value. The step of constructing the relationship feature data into structured data specifically includes: Extracting subject words from the target triples to construct a second subject word list; Grouping the target triples based on each main word in the second main word list; Merge each set of target triples into an independent structured data.
2. The method for dynamically generating a business form according to claim 1, characterized in that: The step of matching the object word in the candidate triple with the text content to determine the target triple specifically includes: Performing word segmentation processing on the text content to obtain a word segmentation list of the text content; Calculating the semantic similarity between the object word of the candidate triple and each word in the word list; Determine whether there is a word in the word list whose semantic similarity with the object word of the candidate triple is greater than a preset similarity threshold; When there is a segmentation in the segmentation list whose semantic similarity with the object word of the candidate triple is greater than a preset similarity threshold, the candidate triple is determined as the target triple.
3. The method for dynamically generating a business form according to claim 1, characterized in that: Before the step of obtaining candidate triples with words in the first main word list as main words from the pre-constructed knowledge graph, the method further includes: Traverse the business forms in the information management system; Determine the currently traversed business form as the target business form; Obtain the main content of the target business form; Parsing the relationship characteristic data of the target business form from the main content, the relationship characteristic data being text data having key-value structure characteristics in the main content; constructing the relationship feature data into structured data; Constructing a temporary triple with the key name of each set of key-value pairs in the structured data being the relational word and the key value being the object word; identifying a subject word corresponding to each temporary triple from the subject content; The subject word is filled into the temporary triple to obtain a complete triple and then written into the knowledge graph.
4. The method for dynamically generating a business form according to claim 1, characterized in that: The steps of merging each set of target triples into an independent structured data include: Denote the i-th target triplet as T ij [S i , R ij , O ij ], where i is from 1 to n group A positive integer between group is the number of groups of the target triplet, j is 1 to n i A positive integer between i is the number of triplets in the i-th group of target triplets, S i is the main word of the target triplet of the i-th group, R ij is the relation word of the jth triple in the i-th target triple, O ij is the object word of the jth triple in the i-th group of target triples; The main word S of the i-th group of target triples i Determine the first-level nested key name of the i-th structured data; The relation word R of the jth triple in the i-th target triple ij and the object word O ij Determine the jth key-value pair of the second nesting layer of the i-th structured data; The second-level nested key-value pairs are merged into the first-level nested key-values of the i-th structured data.
5. The method for dynamically generating a business form according to claim 1, characterized in that: The step of embedding the main content of the target business form and the structured data into the business system page specifically includes: Generating a first display area in the business system page for presenting the main content of the target business form; Embedding the main content of the target business form into the first display area; Constructing a parameter list corresponding to the structured data, wherein the parameter list is a parameter symbol list corresponding one-to-one to the structured data; generating an interactive area associated with the parameter list on the business system page, wherein the business system page includes an interactive script for responding to a user's operation in the interactive area and using the parameters in the parameter list as interactive parameters; The step of sending the business system page to the client device in response to the access request of the client device specifically includes: In response to the access request submitted by the client device, the business system page is returned to the client device using the parameter list as a page parameter.
6. The method for dynamically generating a business form according to claim 5, characterized in that: After the step of sending the business system page to the client device in response to the access request of the client device, the method further includes: receiving a data interaction request generated by executing the interaction script and sent by the client device, wherein the data interaction request includes interaction parameters associated with the interaction area; Acquire structured data corresponding to the interaction parameter, wherein the structured data is constructed based on the relationship feature data parsed from the additional data; In response to the data interaction request submitted by the client device, the structured data is returned to the client device.
7. The method for dynamically generating a business form according to claim 6, characterized in that: The step of embedding the main content of the target business form and the structured data into the business system page also includes: Generating a second display area in the business system page for presenting the additional data of the target business form, wherein the second display area is in a hidden state by default; In the step of generating an interactive area associated with the parameter list on the business system page, the interactive area is used to receive the user's operation to call the interactive script, so that the client device sends the data interaction request and configures the second display area to a display state after receiving the structured data.
8. A system for dynamically generating business forms, characterized in that: include: An access request receiving module, used to receive an access request submitted by a client device to access a business system page containing a target business form; A form data acquisition module, used to acquire the form data of the target business form, wherein the form data includes the main content and additional data of the target business form, wherein the additional data is data submitted by the user in the form of an attachment; A relationship feature parsing module, used for parsing the relationship feature data of the target business form from the additional data, wherein the relationship feature data is text data with key-value structure features in the additional data; A structured data construction module, used to construct the relationship feature data into structured data; A form data embedding module, used to embed the main content of the target business form and the structured data into the business system page; An access request response module, configured to send the business system page to the client device in response to the access request of the client device; The relationship feature analysis module specifically includes: A text content acquisition module, used to acquire the text content in the additional data; A first main word list construction module, used for extracting words with the part of speech of noun from the text content to construct a first main word list of the additional data; A candidate triple acquisition module, used to acquire candidate triples with words in the first main word list as main words from a pre-constructed knowledge graph; A target triplet determination module, used for matching the object words in the candidate triplet with the text content to determine a target triplet, wherein the target triplet is a candidate triplet whose object word in the text content has a matching degree greater than a preset matching degree threshold; A relational feature data construction module, used to construct the relational feature data using the relational word of the target triple as a key name and the object word as a key value; The structured data building module specifically includes: A second main word list construction module, used for extracting main words from the target triples to construct a second main word list; A target triple grouping module, configured to group the target triples based on each subject word in the second subject word list; The target triplet merging module is used to merge each set of target triples into an independent structured data.
Citation Information
Patent Citations
System, method, and apparatus for implementing data upload, processing, and predictive query API exposure
CN110309119A
Dynamic page generation method and device, electronic equipment and storage medium
CN118113963A