Form generation method and device, medium and product
Through electronic equipment automation to determine user needs and build structured tables, the problem of low table generation efficiency is solved, and structured data forms that match user needs are quickly generated, which improves generation efficiency and accuracy.
Patent Information
- Application Number
- CN202510851630.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-06-24
AI Technical Summary
In the prior art, table generation efficiency is low, data search efficiency is low, accuracy is low and flexibility is poor. It is difficult to quickly generate structured data forms that match user needs in complex data structures.
Through electronic devices, the demand data and target files corresponding to user needs are determined automatically, and the structured table is constructed based on the structural relationship between the target data, and the corresponding data form is generated.
It realizes the rapid generation of multi-type structured data forms that match user needs, improves the efficiency and accuracy of table generation, and reduces labor costs and time consumption.
Smart Images

Figure CN120373274A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and particularly to a form generation method, device, medium, and product. Background Art
[0002] In the process of data processing (such as test data processing), users usually construct data tables by manually searching for data, adding data, etc., in order to display data in tabular form.
[0003] However, in business scenarios with a large amount of data and complex data types, the above data processing method has problems such as low data search efficiency, low accuracy, and poor flexibility, resulting in low form generation efficiency. Summary of the Invention
[0004] This application provides a form generation method, device, medium, and product to at least solve the problem of low form generation efficiency in related technologies.
[0005] This application provides a form generation method, including:
[0006] Responding to receiving a form generation request, determining first demand data corresponding to the form generation request and at least one target file;
[0007] Based on each target file, determining multiple first target data corresponding to the first demand data;
[0008] Determining the structural relationship between each first target data, and constructing at least one first structured table based on the structural relationship; wherein, the first structured table includes at least one first data column;
[0009] Writing each first target data into the corresponding first structured table to obtain at least one first target form.
[0010] This application also provides a form generation device, including:
[0011] A first determination module, configured to respond to receiving a form generation request, and determine first demand data corresponding to the form generation request and at least one target file;
[0012] A second determination module, configured to determine multiple first target data corresponding to the first demand data based on each target file;
[0013] A first construction module, configured to determine the structural relationship between each first target data, and construct at least one first structured table based on the structural relationship; wherein, the first structured table includes at least one first data column;
[0014] The first generation module is configured to write each first target data into a corresponding first structured table to obtain at least one first target form.
[0015] This application also provides an electronic device, including: a memory for storing a computer program; a processor for implementing the steps of any of the above form generation methods when executing the computer program.
[0016] This application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above form generation methods are implemented.
[0017] This application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of any of the above form generation methods are implemented.
[0018] Through this application, since the electronic device can automatically determine the demand data and target files corresponding to the user's needs, match the corresponding target data from the target files, and then construct the corresponding structured table based on the structural relationship between the target data and generate the corresponding data form, it can solve the technical problem of low form generation efficiency in the related art and achieve the technical effect of quickly generating structured data forms of multiple types that match the user's needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] To more clearly illustrate the embodiments of this application, the following will briefly introduce the drawings required for the embodiments. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0020] Figure 1 It is an application schematic diagram of a form generation system provided by an embodiment of this application;
[0021] Figure 2 It is a flowchart of a form generation method provided by an embodiment of this application;
[0022] Figure 3 It is one of the application schematic diagrams of a form generation method provided by an embodiment of this application;
[0023] Figure 4 It is another application schematic diagram of a form generation method provided by an embodiment of this application;
[0024] Figure 5 It is the third application schematic diagram of a form generation method provided by an embodiment of this application;
[0025] Figure 6 The fourth application schematic diagram of a form generation method provided by an embodiment of the present application;
[0026] Figure 7 The fifth application schematic diagram of a form generation method provided by an embodiment of the present application;
[0027] Figure 8 The sixth application schematic diagram of a form generation method provided by an embodiment of the present application;
[0028] Figure 9 The seventh application schematic diagram of a form generation method provided by an embodiment of the present application;
[0029] Figure 10 The structural schematic diagram of a form generation device provided by an embodiment of the present application;
[0030] Figure 11 The structural schematic diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0031] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0032] It should be noted that in the description of the present application, the terms "include", "comprise" or any other variant thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0033] An agent refers to an entity that can perceive the environment and take actions to achieve specific goals. An agent can be software, hardware or a system, and has autonomy, adaptability and interaction capabilities. An agent perceives changes in the environment (such as through sensors or data input), makes judgments and decisions based on the knowledge and algorithms learned by itself, and then executes actions to affect the environment or achieve a predetermined goal.
[0034] The Voltage Regulation Test System (VRTS) is a comprehensive test system specifically designed to evaluate the performance and stability of voltage regulation devices (such as automatic voltage regulators). It can simulate scenarios such as voltage fluctuations and load changes in a real power grid environment, and measure key parameters such as the response time, accuracy, and regulation ability of the device to effectively maintain the stability of the output voltage under various conditions.
[0035] Natural Language Processing (NLP) is a discipline that studies how to enable computers to understand, process, and generate human language.
[0036] Fully Integrated Voltage Regulator (FIVR) is a technology that directly integrates the Voltage Regulation Module (VRM) into the CPU.
[0037] During the data processing process, users usually construct data tables by manually searching for data, adding data, etc., to display data in tabular form.
[0038] Taking the test data processing process of the Central Processing Unit (CPU) Voltage Regulation Test System (VRTS) as an example, this system will generate test data including various test types such as DC calibration, transient scanning, and thermal drift, as well as test data for multiple designed Central Processing Units (CPUs).
[0039] When users search for and add data in a complex data structure to construct a voltage regulation test table, they need to manually traverse the storage directory structure of hierarchical data level by level, locate the data files containing voltage test data, perform data matching on each data file one by one, perform cross-platform data migration on the data in the data files, execute format standardization operations (such as data alignment, unit conversion, and abnormal data annotation, etc.), and perform manual data comparison. Or, when users are in the form generation process based on scripts, the data files can be located through the scripts, but users still need to manually parse the data and perform manual data migration operations. Therefore, it takes a long time and has a high error rate. At the same time, there are problems such as it is difficult to identify the corresponding relationship between test types and test data (such as the data mapping between different configurations and different CPU models in the FIVR test items of voltage regulation tests), and it is impossible to search and match when the test data type or storage path changes, resulting in low data search efficiency, low accuracy, and poor flexibility, making the form generation efficiency low.
[0040] To solve the above technical problems, embodiments of the present application provide a form generation method, device, medium, and product, which can automatically determine demand data and target files corresponding to user requirements through an electronic device, and match corresponding target data from the target files, thereby constructing a corresponding structured table based on the structural relationships between the target data, obtaining a corresponding data form. Therefore, the technical problem of low form generation efficiency in related technologies can be solved, and the technical effect of quickly generating structured data forms of multiple types that match user requirements can be achieved.
[0041] To enable those skilled in the art of this technology to better understand the solution of the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0042] Combined with the specific application environment architecture or specific hardware architecture on which the execution of the form generation method depends, the specific application environment architecture or specific hardware architecture is described herein. Figure 1 It is an application schematic diagram of a form generation system provided by an embodiment of the present application.
[0043] See Figure 1 , the form generation system 100 includes an electronic device 101 and at least one knowledge base ( Figure 1 only 3 are shown in the figure). The electronic device 101 is communicatively connected to each knowledge base, and each knowledge base includes at least one associated file.
[0044] Among them, in response to receiving a form generation request, the electronic device 101 determines demand data corresponding to the form generation request, and determines target files in at least one target knowledge base ( Figure 1 knowledge base 102 in the figure) based on the demand file, thereby obtaining target data in the target files, determining the structural relationships of the target data, and thus constructing a structured table. Write the target data into the structured table to obtain a target form.
[0045] Among them, the knowledge base can be used to indicate a self-service repository or library stored in the storage space of an external terminal device (such as an external electronic device, a server, or a cloud server) communicatively connected to the electronic device.
[0046] In this way, the form generation system 100 can automatically determine target files among a large number of associated files and match target data corresponding to the demand data, realize automatic structured table output, realize intelligent agent closed-loop optimization and hierarchical semantic matching operations, improve form generation efficiency and accuracy, and save time costs and labor costs. Moreover, it can be applied to various data processing scenarios. By adjusting and optimizing the system, an efficient and intelligent data processing process can be realized in multiple data processing tasks, and the accuracy and efficiency of data processing can be improved.
[0047] Figure 2It is a schematic flowchart of the form generation method provided by the embodiment of this application. As Figure 2 shown, the embodiment of this application provides a form generation method, and the method is described in detail as follows:
[0048] S201: In response to receiving a form generation request, determine first requirement data corresponding to the form generation request and at least one target file.
[0049] Optionally, in response to receiving a form generation request, parse the form generation request to obtain the first requirement data carried therein, and based on the first requirement data, determine at least one target file among multiple associated files associated with the current electronic device.
[0050] Among them, the form generation request is an instruction or request for instructing the electronic device to generate a structured form corresponding to the requirement data. The form generation request can be an instruction or request sent by the user through the user terminal, or can be an instruction or request automatically generated based on the user's operation on the current electronic device (such as pressing an external button, clicking or dragging on the screen of the current electronic device, etc.).
[0051] Optionally, the requirement data includes tokens (which can also be called tokens or characters) associated with the structured form required by the user, and it includes at least one of the target device, data type, etc. The electronic device is communicatively connected to multiple associated files, and based on the requirement data, at least one key file that matches the requirement data can be determined and determined as the target file.
[0052] S202: Based on each target file, determine multiple first target data corresponding to the first requirement data.
[0053] Optionally, retrieve among the data in each target file to determine multiple data that match the first requirement data and determine them as the first target data.
[0054] Optionally, the current electronic device can, based on the agent, determine a form generation strategy based on the first requirement data. The form generation strategy can include a first strategy of selecting one from multiple preset tables based on the first requirement data and determining it as the target table, and generating a corresponding target form based on the target data corresponding to the first requirement data and the above target table. Or, it can include a second strategy of constructing a structured table based on the first requirement data, and generating a target form based on the target data corresponding to the first requirement data and the above structured table. Among them, the preset table indicates a pre-constructed structured table including at least one first data column. In the embodiment of this application, the form generation strategy is mainly described by taking the second strategy as an example.
[0055] S203: Determine the structural relationship between each first target data, and construct at least one first structured table based on the structural relationship; wherein the first structured table includes at least one first data column.
[0056] Optionally, the structural relationship includes but is not limited to a subordinate relationship and a non-subordinate relationship. Among them, the non-subordinate relationship is used to indicate that there is no subordinate relationship between the target data, and can be used as the name of a parallel table. The subordinate relationship is used to indicate that there is a subordinate relationship between the target data, and the data columns under each table can be determined based on the subordinate relationship.
[0057] Optionally, the first target data includes but is not limited to the first requirement data (such as including the target device, data type) and keyword elements. The target device is used to indicate the target object of the constructed structured form. The data type is used to indicate each data item of the constructed structured form. The keyword element is the table filling data determined based on the requirement data. For example, the form generation request is: construct the voltage test data and current test data table of the central processing unit CPU zero. The target object of the constructed structured form is the central processing unit CPU zero, which can also be called the target device. The data items of the constructed structured form include voltage test data and current test data tables, and the voltage test data and current test data can also be called data types. The keyword elements matched based on the requirement data include 10V, 20V, 10mA, and 20mA. Then 10V and 20V are the table filling data corresponding to the data type (voltage test data), and 10mA and 20mA are the table filling data corresponding to the data type (current test data).
[0058] S204: Write each first target data into a corresponding first structured table to obtain at least one first target form.
[0059] Optionally, each first target data is written into a first data column of a corresponding first structured table to obtain at least one first target form.
[0060] Figures 3 to 8 A schematic diagram of an application of a form generation method provided in an embodiment of the present application.
[0061] See also Figure 3 The electronic device includes an associated file access layer, a data retrieval decision center, a data matching engine, a form generation module and a user interaction layer, and the associated file access layer, the data retrieval decision center, the data matching engine, the form generation module and the user interaction layer are connected in sequence.
[0062] Among them, Figure 4As shown, the associated file access layer is used to implement functions such as target file access, data screening, deletion of invalid data, format conversion, and hash verification. Specifically, it includes reading data from the associated file, screening the above data (such as deleting invalid characters), converting the data format, and performing hash value verification to ensure file integrity and exclude damaged files. Among them, the associated file can be a text file, a plain text table data (Comma-Separated Values, CSV) file, a HyperText Markup Language html file, etc. Invalid characters can include, but are not limited to, file header comment characters, garbled characters, invalid identifiers, etc.
[0063] Exemplarily, through a file system interface (for example, the files-process-iter(file_path) interface written in the open-source programming language Python), the data in the target file (such as the voltage test system test data file, FIVR Transient setup) corresponding to the target device in the target knowledge base can be obtained.
[0064] As Figure 5 As shown, the data retrieval decision center is used to implement functions such as determining required data, determining target files, identifying target devices and data types, generating data retrieval strategies, and optimizing data retrieval strategies. Specifically, it can, based on Natural Language Processing (NLP) technology, through a three-level processing process of lexical analysis, syntactic analysis, and semantic understanding, extract the required data (such as target devices, data types, etc.) in the form generation request, and determine the data retrieval strategy based on the structure of the data in the target file. And based on the error information feedback by the user (such as problems like the misalignment of the voltage test system test data FIVR Transient setup), optimize the data retrieval strategy, automatically adjust the file parsing rules, optimize the heuristic function parameters, or supplement the rule library to achieve continuous iterative optimization of the extraction strategy.
[0065] For example, if the form generation request is "Extract all FIVR series test item data for CPU zero and compare", it can accurately identify the folder path corresponding to "CPU zero" and the file corresponding to "FIVR series test items". Among them, the data retrieval strategy can be specifically set according to the structure of the data in the target file. For example, when the data in the target file is unstructured data, a heuristic retrieval algorithm can be used to determine the data retrieval priority strategy based on a preset priority evaluation function (for example, keyword association degree priority evaluation function, path depth weight priority evaluation function), and heuristic retrieval of the target data can be performed based on the above strategy. Or, when the data in the target file is structured data, a data logic (such as file path matching rule logic, field format verification rule logic, etc.) can be extracted based on a language rule inference mechanism based on a conditional chain (such as an if-then conditional chain), so as to match the target data.
[0066] As Figure 6 shown, the data matching engine is used to implement functions such as determining the target file path, determining the target file, matching the target data, extracting the required data, determining the target retrieval range, and data association verification (including target device verification and data type verification). Specifically, it includes locating the target file (for example, constructing a file path index using a database-like indexing technology to locate the target folder and target file), determining the target retrieval range corresponding to the first required data from the target file based on keyword matching and context logic analysis technology, and retrieving the target data corresponding to the first required data within the target retrieval range. For example, for the FIVR Transient setup file, the target numerical data can be identified and extracted according to the context grammar structure of the "Voltage Value" field, and data association verification is performed. For example, based on a preset configuration file (such as a CPU voltage domain correspondence table), a mapping relationship between the target data and the target device is constructed to double-check the target data: verify whether the device to which the target data belongs is the target device (such as confirming that the data belongs to CPU zero or CPU one); verify whether the type corresponding to the target data is the data type corresponding to the form generation request (for example, whether the type corresponding to the target data belongs to the voltage test FIVR Transient setup data) to ensure the accuracy of data retrieval.
[0067] As Figure 7As shown, the form generation module is used to implement functions such as form generation strategy generation (including selecting a preset form or customizing a structured form), form generation, writing target data into corresponding data columns, marking abnormal data, and generating multi-format files (including spreadsheet excel, portable document format pdf, plain text table data CSV). Specifically, it includes selecting a target form from preset forms according to a form generation request, or generating a corresponding structured form based on requirement data. Determine the correspondence between the target data and the structured form (for example, the correspondence between the test data value of the voltage test of the target device CPU zero and the test data of FIVRTransient setup and the data column in the corresponding structured form), and fill the target data into the corresponding structured form.
[0068] Optionally, the form generation module can also automatically match data units (such as the voltage value unit "mV"), and when abnormal data is detected, mark the abnormal data (for example, add a red highlight). Among them, abnormal data includes, but is not limited to, null, data exceeding the preset data range, etc. Among them, the preset data range includes the upper limit value and the lower limit value of the data type corresponding to the data column.
[0069] Optionally, the form generation module can also generate different forms of files based on user needs. For example, spreadsheet excel files (such as pivot tables, analysis charts), portable document format pdf files, plain text table data CSV files, etc., to adapt to different application scenarios such as data analysis, report display, and system integration.
[0070] Exemplarily, the preset form can include a form name (i.e., the corresponding target device), at least one data column (corresponding to the data type), test data cells (corresponding to keyword elements), and other table structures.
[0071] As an example rather than a limitation, configuration such as visual adjustment of the data column order and addition of data analysis columns (such as data month-on-month growth rate, threshold judgment, etc.) can be achieved through the user interface to meet user needs.
[0072] In this way, the form generation system can achieve traversing billions of data in seconds in a distributed environment, automatically locate the target file and the target retrieval range, and extract the target data, reducing the impact of manual intervention and fixed rules on the retrieval efficiency; it can intelligently identify the correspondence between data types, keyword elements corresponding to the data types, and target devices, accurately fill the keyword elements into the form, and based on the form, it can achieve multi-target solutions to complex matching problems such as synonym recognition and context association, reducing the data omission rate and misdetection rate, and can automatically generate a structured form corresponding to the user's needs, add, delete, or modify the format of the structured form based on the user's needs, automatically map the data type and generate multi-format files, reducing the labor cost and processing time.
[0073] As Figure 8 shown, the user interaction interface is a kind of visual operation platform construction, providing functions such as real-time display (including generation progress display, error data display, receiving and displaying update requests, displaying updated requirement data, displaying updated forms, etc.). That is, the user interaction interface supports real-time display, realizes generation progress display (for example, the number of processed target files / total target files during form generation), update requests sent by the user through the user terminal or generated by operating the current electronic device (including requirement update requests and form update requests submitted by the user), determines error data and displays error data (for example, the voltage test FIVR Transient setup file format is abnormal and data cannot be extracted) when detecting error prompt information carried in the update request, as well as corresponding updated requirement data, updated forms, etc. Optionally, the user interaction interface can also generate a detailed error log based on the error data for the user to view through operations.
[0074] Based on this, the form generation system can support various configuration operations such as preset form generation and custom structured form generation, realizing intelligent conversion from data to customized structured forms. Moreover, during the form generation process, it supports real-time receiving of user update requests (for example, a requirement update request for adding a voltage test FIVR Transient setup 2 test data type), automatically triggers an incremental processing mechanism, and directly updates the form without re-retrieving data or restarting the form generation process, improving the generation efficiency.
[0075] Optionally, the electronic device includes a computing device and a storage device. Among them, the computing device is used to determine the target file, retrieve the target data, generate a structured table, and fill the target data to obtain the target form, etc. The storage device is used to store the data in each associated file, the generated target form, etc. Based on this, the computing power of the central processing unit of the electronic device and the requirements for storage space (such as local hard disk or network storage) are relatively high.
[0076] Optionally, before determining multiple first target data corresponding to the first demand data based on each target file, it includes:
[0077] Obtain each data in each associated file;
[0078] In each data, identify and delete invalid data to obtain multiple candidate data;
[0079] Based on the target format, perform format conversion on each candidate data to obtain multiple target format data;
[0080] Determining multiple first target data corresponding to the first demand data based on each target file includes:
[0081] Based on each first demand data, determine a target retrieval range in the target format data of the target file;
[0082] In the target retrieval range, determine at least one keyword element that matches each first demand data to obtain multiple first target data; the multiple first target data include each first demand data and each keyword element.
[0083] Optionally, the current electronic device is communicatively connected to multiple knowledge bases, and each knowledge base includes multiple associated files. Read each data in each associated file, identify invalid data in the read data, and delete the invalid data to obtain multiple candidate data. Perform format conversion on each candidate data based on the target format to obtain multiple target format data. Among them, the target format can be specifically set according to the actual situation. For example, the target format can be a floating-point number format.
[0084] Optionally, the first demand data includes but is not limited to target devices, data types, etc. According to each first demand data, determine the position of each first demand data in the target file based on keyword matching, and based on the context logic analysis technology and the position of each first demand data in the target file, determine the target retrieval range corresponding to each first demand data, so as to retrieve at least one keyword element that matches each first demand data within the target retrieval range to obtain multiple first target data. Among them, the keyword element includes the data value corresponding to the target device and data type in the first demand data. The multiple first target data include each first demand data and each keyword element.
[0085] Optionally, the target retrieval range can be specifically set according to the context corresponding to each first demand data. The target retrieval range includes an upper limit value and a lower limit value. The upper limit value is used to indicate the first quantity of the word elements before the first demand data in the target file. The lower limit range is used to indicate the second quantity of the word elements after the first demand data in the target file. The first quantity and the second quantity can be specifically set according to the actual situation.
[0086] For example, based on the context logic analysis technology, it is determined that the target retrieval range of the first requirement data includes 10 tokens before the first requirement data and 20 tokens after the first requirement data. Taking the position of the first requirement data as i, the target retrieval range is [i - 10, i + 20].
[0087] Optionally, in the target retrieval range, at least one keyword token that matches each first requirement data is determined to obtain multiple first target data, including:
[0088] In the target retrieval range, the first similarity between each first requirement data and each target format data is determined;
[0089] In the target retrieval range, the target format data with the first similarity greater than or equal to the first threshold is determined as the keyword token to obtain multiple first target data.
[0090] Optionally, in the target retrieval range, the first similarity between each first requirement data and each target format data is calculated, and the target format data corresponding to the first similarity greater than or equal to the first threshold is determined as the keyword token corresponding to the first requirement data, as the first target data, and the keyword tokens corresponding to each first requirement data are obtained accordingly to obtain multiple first target data. Among them, the first threshold can be specifically set according to the actual situation. For example, the first threshold is 85%, or the first threshold is 90%.
[0091] Optionally, the structural relationship includes a subordinate relationship and a non - subordinate relationship; the first requirement data includes at least one target device and at least one data type.
[0092] Optionally, the structural relationship between each first target data is determined, and at least one first structured table is constructed based on the structural relationship, including:
[0093] Determine at least one target device that does not have a subordinate relationship among each first target data, and generate a corresponding first structured table based on each target device;
[0094] Identify each data type in each first target data;
[0095] For each target device, determine the data type that has a subordinate relationship with the target device and determine it as the target data type;
[0096] For each target device, generate at least one first data column in the corresponding first structured table based on the corresponding target data type.
[0097] Optionally, at least one target device that does not have a subordinate relationship is determined from each first target data. For each target device, a corresponding first structured table is generated. The first structured table can be used to store data values under each data type that is subordinate to the corresponding target device. The data types in each first target data are identified (such as "voltage test data", "current test data"). For each target device, the data types that have a subordinate relationship with the target device are determined and identified as the target data types corresponding to the target device. For each target device, at least one first data column in the first structured table corresponding to the target device is generated based on the target data type corresponding to the target device, thereby determining the first structured tables corresponding to each target device.
[0098] Exemplarily, the first target database includes CPU Zero, CPU One, CPU Zero - voltage test data, CPU Zero - current test data, CPU One - voltage test data. Then, the first structured tables named CPU Zero and CPU One can be generated respectively according to CPU Zero and CPU One that do not have a subordinate relationship. And it is determined that CPU Zero - voltage test data and CPU Zero - current test data are the target data types that have a subordinate relationship with the target device CPU Zero, and the corresponding first data columns: CPU Zero - voltage test data and CPU Zero - current test data are generated. And it is determined that CPU One - voltage test data is the target data type that has a subordinate relationship with the target device CPU One, and the corresponding first data column: CPU One - voltage test data is generated. The first structured form CPU Zero and the first structured table CPU One are obtained.
[0099] Optionally, each first target data is written into the corresponding first structured table to obtain at least one first target form, including:
[0100] In each first target data, the target keyword elements associated with each target data type are determined;
[0101] For each target data type, the associated target keyword elements are written into the corresponding first data column to obtain at least one first target form.
[0102] Optionally, in each first target data, the data types of each keyword element are determined, and the target data types that match the data types of each keyword element are determined. The keyword elements whose data types match the target data types are determined as the target keyword elements associated with the target data type. For each target data type, the associated target keyword elements are written into the first data column corresponding to the target data type to obtain at least one first target form.
[0103] For example, the keyword elements retrieved from the target file based on the first requirement data include CPU 10mA and 10V. It is determined that the data type of the keyword element 10mA is current test data (CPU zero), and the data type of the keyword element 10V is voltage test data (CPU one). The target data types current test data (CPU zero) and voltage test data (CPU one) that match the data types of the keyword elements 10mA and 10V are determined, and 10mA is filled into the first data column corresponding to the current test data (CPU zero), and 10V is filled into the first data column corresponding to the voltage test data (CPU one).
[0104] Optionally, after obtaining the data in each associated file, it further includes:
[0105] Obtain the first hash value of each associated file;
[0106] After performing format conversion on each candidate data based on the target format to obtain multiple target format data, it includes:
[0107] Calculate the second hash value of each associated file based on the target format data of each associated file;
[0108] For each associated file, compare the first hash value and the second hash value;
[0109] Based on each target file, determining multiple first target data corresponding to the first requirement data includes:
[0110] In the case where the first hash value matches the second hash value, based on each first requirement data, determine the target retrieval range in the target format data of the target file;
[0111] In the target retrieval range, determine at least one keyword element that matches each first requirement data to obtain multiple first target data; the multiple first target data include each first requirement data and each keyword element.
[0112] Optionally, after obtaining the data in each associated file, obtain the first hash value of each associated file. Calculate the second hash value of each associated file based on the target format data in each associated file; for each associated file, compare the corresponding first hash value and the second hash value. In the case where the first hash value matches the second hash value, it is determined that the associated file is not damaged and the file is complete, and perform the steps of determining the target retrieval range and subsequent steps in the target format data of the target file based on each first requirement data to obtain multiple first target data.
[0113] Optionally, after determining the target format data with the first similarity greater than or equal to the first threshold as the keyword element in the target retrieval range to obtain multiple first target data, it includes:
[0114] For each target device, calculate the second similarity between the target device and the corresponding target keyword element;
[0115] For each target data type, calculate the third similarity between the target data type and the corresponding target keyword element;
[0116] Determine the structural relationships between the first target data, and construct at least one first structured table based on the structural relationships, including:
[0117] In the case where each second similarity and each third similarity are greater than or equal to a second threshold, determine the structural relationships between the first target data, and construct at least one first structured table based on the structural relationships.
[0118] Optionally, for each target device, determine the target keyword element corresponding to the target device based on the target data type of the target device, and calculate the second similarity between the target device and the corresponding target keyword element. For each target data type, calculate the third similarity between the target data type and the corresponding target keyword element. In the case where the second similarity between each target device and the corresponding target keyword element and the third similarity between each target data type and the corresponding target keyword element are both greater than or equal to the second threshold, determine that the retrieved target keyword element is indeed the data value corresponding to the first demand data. At this time, execute the steps of determining the structural relationships between the first target data, constructing at least one first structured table based on the structural relationships, and subsequent steps to construct the target form.
[0119] Exemplarily, calculate the second similarity between target device CPU zero and 10 mA, the third similarity between current test data (CPU zero) and 10 mA, the second similarity between target device CPU one and 10 V, and the third similarity between voltage test data (CPU one) and 10 V. In the case where each of the above second similarities and third similarities is greater than or equal to the second threshold, determine the structural relationships between target device CPU zero, target device CPU one, current test data (CPU zero), voltage test data (CPU one), 10 mA, and 10 V, and construct the first structured tables of target device CPU zero and target device CPU one respectively based on the structural relationships.
[0120] Optionally, in response to receiving a form generation request, determine the first demand data and at least one target file corresponding to the form generation request, including:
[0121] In response to receiving a form generation request, parse the form generation request to obtain at least one target device in the form generation request;
[0122] Among multiple associated files, at least one associated file is selected based on each target device and determined as the target file.
[0123] Optionally, in response to receiving a form generation request, parse the form generation request to obtain each token in the form generation request, and identify at least one target device among the tokens. Among multiple associated files, perform keyword matching based on each target device, determine the tokens that match each target device, and determine the at least one associated file where the tokens that match each target device are located as the target file.
[0124] Optionally, the form generation method further includes:
[0125] In response to receiving a requirement update instruction, determine the second requirement data corresponding to the requirement update instruction;
[0126] Preprocess multiple first target data based on the second requirement data to obtain second target data; wherein, the preprocessing includes at least one of deletion processing and addition processing;
[0127] Determine the structural relationship between each second target data, and construct at least one second structured table based on the structural relationship; wherein, the second structured table includes at least one second data column;
[0128] Write each second target data into the corresponding second structured table to obtain at least one second target form.
[0129] Optionally, during the process of generating the first target form or after generating the first target form, in response to receiving a requirement update instruction, determine the second requirement data corresponding to the requirement update instruction (including but not limited to new target devices, new data types), compare the first requirement data and the second requirement data, and preprocess multiple first target data based on the comparison result to obtain second target data. Wherein, the preprocessing includes at least one of deletion processing and addition processing. The second target data includes but not limited to new target devices, new data types, new keyword tokens.
[0130] Exemplarily, compare the first requirement data and the second requirement data, and perform addition processing based on the tokens that exist in the second requirement data but do not exist in the first requirement data. Perform deletion processing based on the tokens that do not exist in the second requirement data but exist in the first requirement data.
[0131] Optionally, the requirement update instruction further includes error data prompt information, update the first target data corresponding to the first requirement data based on the above information (that is, delete the error data and re-perform data retrieval based on the first requirement data), and determine new target data.
[0132] Optionally, determine the structural relationships among the new target devices, new data types, and new keyword elements in each second target data, and construct at least one second structured table corresponding to each new target device based on the structural relationships; the second structured table includes at least one second data column. The second data columns are mapped one by one with the new data types. In the second structured table corresponding to each new target device, write each new keyword element into the second data column mapped by the target data type corresponding to each new keyword element to obtain at least one second target form.
[0133] Optionally, after writing each first target data into the corresponding first structured table to obtain at least one first target form, it further includes:
[0134] In response to receiving a table update instruction, determine at least one third structured table and third target data corresponding to the table update instruction;
[0135] Establish a mapping relationship between each third target data and each third structured table, and write each third target data into the corresponding third structured table based on the mapping relationship to obtain at least one third target form.
[0136] Optionally, after obtaining at least one first target form, in response to receiving a table update instruction, the table update instruction includes at least one of adding a data column and deleting a data column. Process each first structured table based on the table update instruction (such as adding a data column or deleting a data column) to obtain each third structured table corresponding to the table update instruction, and process each first target data, such as deleting some first target data or adding new target data, to obtain third target data. Establish a mapping relationship between each third target data and each third structured table, that is, the target device in the third target data is mapped one by one with the third structured table name, the target data type in the third target data is mapped one by one with the third data column in the third structured table, and the keyword element corresponding to each target data type is mapped with the cell in the corresponding data column. Write each third target data into the corresponding third structured table based on the above mapping relationship to obtain at least one third target form.
[0137] Figure 9 This is the seventh application flowchart of a form generation method provided by an embodiment of the present application.
[0138] See Figure 9, at the start of the form generation method, receive a form generation request, e.g., extract the voltage test data of CPU0, parse the form generation request through an agent, and extract the requirement data, including: extract the target device, e.g., CPU0; and extract the data type, e.g., voltage test data. Analyze the data structure relationship to generate a form generation strategy, such as a first strategy to generate a corresponding target form based on a preset table, or a second strategy to construct a structured table based on the first requirement data and then generate the target form. Based on the requirement data, determine the target file, and based on the requirement data, determine the target retrieval range in the target file and determine multiple target data. Perform target device verification and data type verification based on the multiple target data. When the verification passes (e.g., each second similarity of the target device verification and each third similarity of the data type verification are greater than or equal to the second threshold), based on the form generation strategy and the target data, determine the preset table or generate a structured table, write the target data into the table to obtain the target form. Generate a target format file based on the target format request. Receive a requirement update instruction and / or a table update instruction. When an error prompt is included in the requirement update instruction or the table update instruction, optimize the form generation strategy and return to execute the steps after agent parsing. The error prompt includes error data prompt information. Update the target form based on the requirement update instruction and / or the table update instruction, and the form generation process ends.
[0139] Based on the above form generation method, it is possible to realize the full-process automation processing of multi-source data access, intelligent form generation strategy generation, automated data matching, and visual form output. The hierarchical matching mechanism driven by the agent reduces the data processing time and improves the efficiency of generating data forms. Based on the three-layer matching and verification mechanisms of target file positioning, data type matching, and data association verification, the data retrieval matching degree is improved, and data extraction errors are avoided. Moreover, it can automatically update the data and forms based on the user's update request, reducing the form generation process change cost. And by automatically generating a structured target format file (e.g., excel pivot table, analysis chart), it realizes support for data pivoting and chart generation (such as data curve comparison of the same data type for different devices), enhances the depth and efficiency of data analysis, can quickly locate abnormal data, and improves the data processing efficiency.
[0140] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.
[0141] Figure 10 It is a schematic structural diagram of a form generation device provided by an embodiment of the present application. As Figure 10 shown, an embodiment of the present application also provides a form generation device, including:
[0142] The first determination module 1001 is configured to determine first requirement data corresponding to the form generation request and at least one target file in response to receiving the form generation request;
[0143] The second determination module 1002 is configured to determine a plurality of first target data corresponding to the first requirement data based on each target file;
[0144] The first construction module 1003 is configured to determine the structural relationship between the first target data, and construct at least one first structured table based on the structural relationship; wherein, the first structured table includes at least one first data column;
[0145] The first generation module 1004 is configured to write each first target data into the corresponding first structured table to obtain at least one first target form.
[0146] Optionally, the form generation device includes:
[0147] The first acquisition module is configured to acquire each data in each associated file;
[0148] The recognition module is configured to recognize and delete invalid data in each data to obtain a plurality of candidate data;
[0149] The conversion module is configured to perform format conversion on each candidate data based on the target format to obtain a plurality of target format data;
[0150] The second determination module includes:
[0151] The first determination unit is configured to determine a target retrieval range in the target format data of the target file based on each first requirement data;
[0152] The second determination unit is configured to determine at least one keyword element matching each first requirement data in the target retrieval range to obtain a plurality of first target data; the plurality of first target data includes each first requirement data and each keyword element.
[0153] Optionally, the second determination unit is specifically configured to:
[0154] Determine a first similarity between each first requirement data and each target format data in the target retrieval range;
[0155] In the target retrieval range, determine the target format data with the first similarity greater than or equal to the first threshold as the keyword element to obtain a plurality of first target data.
[0156] Optionally, the structural relationship includes a subordinate relationship and a non-subordinate relationship; the first requirement data includes at least one target device and at least one data type; the first construction module includes:
[0157] A first generation unit, configured to determine at least one target device among the first target data that has no subordinate relationship, and generate a corresponding first structured table based on each target device;
[0158] An identification unit, configured to identify each data type in each first target data;
[0159] A third determination unit, configured to, for each target device, determine the data type that has a subordinate relationship with the target device, and determine it as the target data type;
[0160] A second generation unit, configured to, for each target device, generate at least one first data column in the corresponding first structured table based on the corresponding target data type.
[0161] Optionally, the first generation module is specifically configured to:
[0162] In each first target data, determine target keyword elements that have an associated relationship with each target data type;
[0163] For each target data type, write the associated target keyword elements into the corresponding first data column to obtain at least one first target form.
[0164] Optionally, the form generation device further includes:
[0165] A second acquisition module, configured to acquire the first hash value of each associated file;
[0166] A calculation module, configured to calculate the second hash value of each associated file based on each target format data;
[0167] A comparison module, configured to compare the first hash value and the second hash value for each associated file;
[0168] The second determination module is specifically configured to:
[0169] In the case where the first hash value matches the second hash value, based on each first requirement data, determine a target retrieval range in each target format data of the target file;
[0170] In the target retrieval range, determine at least one keyword element that matches each first requirement data to obtain a plurality of first target data; the plurality of first target data includes each first requirement data and each keyword element.
[0171] Optionally, the second determination unit is specifically configured to:
[0172] For each target device, calculate the second similarity between the target device and the corresponding target keyword element;
[0173] For each target data type, calculate the third similarity between the target data type and the corresponding target keyword element;
[0174] The first construction module is specifically configured to:
[0175] In the case where each second similarity and each third similarity are greater than or equal to the second threshold, determine the structural relationship between each first target data, and construct at least one first structured table based on the structural relationship.
[0176] Optionally, the first determination module is specifically configured to:
[0177] In response to receiving a form generation request, parse the form generation request to obtain at least one target device in the form generation request;
[0178] Among multiple associated files, select at least one associated file based on each target device and determine it as the target file.
[0179] Optionally, the form generation device further includes:
[0180] The third determination module is configured to determine second requirement data corresponding to the requirement update instruction in response to receiving the requirement update instruction;
[0181] The preprocessing module is configured to preprocess multiple first target data based on the second requirement data to obtain second target data; wherein, the preprocessing includes at least one of deletion processing and addition processing;
[0182] The second construction module is configured to determine the structural relationship between each second target data, and construct at least one second structured table based on the structural relationship; wherein, the second structured table includes at least one second data column;
[0183] The second generation module is configured to write each second target data into the corresponding second structured table to obtain at least one second target form.
[0184] Optionally, the form generation device further includes:
[0185] The fourth determination module is configured to determine at least one third structured table and third target data corresponding to the table update instruction in response to receiving the table update instruction;
[0186] The third generation module is configured to establish a mapping relationship between each third target data and each third structured table, and write each third target data into the corresponding third structured table based on the mapping relationship to obtain at least one third target form.
[0187] For the description of the features in the embodiments corresponding to the form generation device, reference can be made to the relevant descriptions in the embodiments corresponding to the form generation method, which will not be elaborated here one by one.
[0188] Figure 11 This is a schematic structural diagram of the electronic device provided by this application. As Figure 11 shown, the electronic device provided in this embodiment includes: at least one processor 1101 and a memory 1102. Optionally, the electronic device further includes a communication component 1103. Among them, the processor 1101, the memory 1102, and the communication component 1103 are connected through a bus.
[0189] In the specific implementation process, at least one processor 1101 executes the computer-executable instructions stored in the memory 1102, so that at least one processor 1101 executes the above-mentioned form generation method embodiment.
[0190] For the specific implementation process of the processor 1101, reference can be made to the above method embodiment, and its implementation principle and technical effects are similar, so they will not be elaborated here in this embodiment.
[0191] In the above embodiment, it should be understood that the processor may be a central processing unit (Central Processing Unit, abbreviated as: CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, abbreviated as: DSP), application-specific integrated circuits (Application Specific Integrated Circuit, abbreviated as: ASIC), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the application can be directly implemented by the execution of the hardware processor, or implemented by the combination of hardware and software modules in the processor.
[0192] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0193] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.
[0194] Embodiments of the present application also provide a computer-readable storage medium storing a computer program, where the computer program is configured to execute the steps in any of the above-described method embodiments for generating a form when running.
[0195] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media such as USB flash drives, read-only memories (ROM for short), random access memories (RAM for short), external hard drives, magnetic disks, or optical discs that can store computer programs.
[0196] Embodiments of the present application also provide a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above-described method embodiments for generating a form.
[0197] Embodiments of the present application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above-described method embodiments for generating a form.
[0198] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0199] The above has provided a detailed introduction to a form generation method, device, medium, and product provided by the present application. Specific examples are used herein to elaborate on the principles and implementation manners of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in the technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
Claims
1. A form generation method, characterized in that, Including: In response to receiving a form generation request, determining first requirement data corresponding to the form generation request and at least one target file; Based on each of the target files, determining a plurality of first target data corresponding to the first requirement data; Determining a structural relationship between each of the first target data, and constructing at least one first structured table based on the structural relationship; wherein, the first structured table includes at least one first data column; Writing each of the first target data into the corresponding first structured table to obtain at least one first target form.
2. The form generation method according to claim 1, characterized in that Before the step of determining, based on each of the target files, a plurality of first target data corresponding to the first requirement data, it includes: Obtaining each data in each associated file; Identifying and deleting invalid data in each of the data to obtain a plurality of candidate data; Performing format conversion on each of the candidate data based on a target format to obtain a plurality of target format data; Determining, based on each of the target files, a plurality of first target data corresponding to the first requirement data, including: Based on each of the first requirement data, determining a target retrieval range in the target format data of the target file; In the target retrieval range, determining at least one keyword element that matches each of the first requirement data to obtain a plurality of first target data; the plurality of first target data includes each of the first requirement data and each of the keyword elements.
3. The form generation method according to claim 2, wherein The step of determining, in the target retrieval range, at least one keyword element that matches each of the first requirement data to obtain a plurality of first target data, includes: Determining a first similarity between each of the first requirement data and each of the target format data in the target retrieval range; In the target retrieval range, determining the target format data with the first similarity greater than or equal to a first threshold as the keyword element to obtain the plurality of first target data.
4. The form generation method according to claim 2, wherein The structural relationship includes a subordinate relationship and a non-subordinate relationship; the first requirement data includes at least one target device and at least one data type; Determining the structural relationship between each of the first target data, and constructing at least one first structured table based on the structural relationship, includes: Determining at least one target device among each of the first target data that does not have a subordinate relationship, and generating a corresponding first structured table based on each of the target devices; Identifying each data type in each of the first target data; For each of the target devices, determining a data type that has a subordinate relationship with the target device, and determining it as a target data type; For each of the target devices, generating at least one first data column in the corresponding first structured table based on the corresponding target data type.
5. The form generation method according to claim 4, wherein The step of writing each of the first target data into the corresponding first structured table to obtain at least one first target form, includes: Determining a target keyword element having an associated relationship with each of the target data types in each of the first target data; For each of the target data types, writing the associated target keyword element into the corresponding first data column to obtain at least one first target form.
6. The form generation method according to claim 2, wherein After the step of obtaining each data in each associated file, it further includes: Obtain the first hash value of each of the associated files; After performing format conversion on each of the candidate data based on the target format to obtain multiple target format data, it includes: Calculate the second hash value of each of the associated files based on each of the target format data; For each of the associated files, compare the first hash value and the second hash value; Based on each of the target files, determine multiple first target data corresponding to the first demand data, including: In the case where the first hash value matches the second hash value, based on each of the first demand data, determine a target retrieval range in each of the target format data of the target file; In the target retrieval range, determine at least one keyword element that matches each of the first demand data to obtain multiple first target data; the multiple first target data include each of the first demand data and each of the keyword elements.
7. The form generation method according to claim 3, wherein After determining the target format data with the first similarity greater than or equal to the first threshold as the keyword element in the target retrieval range to obtain the multiple first target data, it includes: For each target device, calculate the second similarity between the target device and the corresponding target keyword element; For each target data type, calculate the third similarity between the target data type and the corresponding target keyword element; Determine the structural relationship between each of the first target data, and construct at least one first structured table based on the structural relationship, including: In the case where each of the second similarities and each of the third similarities are greater than or equal to the second threshold, determine the structural relationship between each of the first target data, and construct at least one first structured table based on the structural relationship.
8. The form generation method according to claim 1, wherein The step of, in response to receiving a form generation request, determining the first demand data and at least one target file corresponding to the form generation request, includes: In response to receiving a form generation request, parse the form generation request to obtain at least one target device in the form generation request; Among multiple associated files, select at least one associated file based on each of the target devices and determine it as the target file.
9. The form generation method according to any one of claims 1 to 8, characterized in that, The method further includes: In response to receiving a demand update instruction, determine the second demand data corresponding to the demand update instruction; Preprocess the multiple first target data based on the second demand data to obtain second target data; wherein, the preprocessing includes at least one of deletion processing and addition processing; Determine the structural relationship between each of the second target data, and construct at least one second structured table based on the structural relationship; wherein, the second structured table includes at least one second data column; Write each of the second target data into the corresponding second structured table to obtain at least one second target form.
10. The form generation method according to any one of claims 1 to 8, characterized in that, After writing each of the first target data into the corresponding first structured table to obtain at least one first target form, it further includes: In response to receiving a table update instruction, determine at least one third structured table and third target data corresponding to the table update instruction; Establish a mapping relationship between each of the third target data and each third structured table, and write each of the third target data into the corresponding third structured table based on the mapping relationship to obtain at least one third target form.
11. An electronic device, characterized in that, Including: A memory for storing a computer program; A processor for implementing the steps of the form generation method according to any one of claims 1 to 10 when executing the computer program.
12. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of the form generation method according to any one of claims 1 to 10 when executed by a processor.
13. A computer program product, comprising a computer program, characterized in that, The computer program implements the steps of the form generation method according to any one of claims 1 to 10 when executed by a processor.
Citation Information
Patent Citations
Table data generation method and device
CN115841101A
Table generation method and device, equipment and storage medium
CN116205205A
Knowledge graph construction method and device, storage medium and electronic equipment
CN117033527A
Report generation method and device, equipment and medium
CN118821739A
Method and system for dynamically generating business form
CN118861457A