CN117610540A - Model verification method, system, storage medium and electronic equipment - Google Patents

Model verification method, system, storage medium and electronic equipment Download PDF

Info

Publication number
CN117610540A
CN117610540A CN202311705440.2A CN202311705440A CN117610540A CN 117610540 A CN117610540 A CN 117610540A CN 202311705440 A CN202311705440 A CN 202311705440A CN 117610540 A CN117610540 A CN 117610540A
Authority
CN
China
Prior art keywords
model
verification
data
data structure
page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311705440.2A
Other languages
Chinese (zh)
Inventor
许慧
迟伶宇
崔传文
李倩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CVIC Software Engineering Co Ltd
Original Assignee
CVIC Software Engineering Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CVIC Software Engineering Co Ltd filed Critical CVIC Software Engineering Co Ltd
Priority to CN202311705440.2A priority Critical patent/CN117610540A/en
Publication of CN117610540A publication Critical patent/CN117610540A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Abstract

The application provides a model verification method, which comprises the following steps: obtaining a model file, and analyzing the model file to obtain a table data structure; rendering the table data structure to a page; wherein the page contains a verification rule of the service data; collecting the business data contained in the page; and carrying out formula verification on formulas in the table data structure by utilizing the service data to obtain a verification result of the model file. The method and the device do not need to manually collect service data or manually verify the service data in the whole process, and meanwhile, the visualization of the model rules and the automatic verification of the model are realized. The application also provides a model verification system, a storage medium and electronic equipment, which have the beneficial effects.

Description

Model verification method, system, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of data verification, and in particular, to a model verification method, system, storage medium, and electronic device.
Background
Currently, when a service system is applied, the required information is searched manually according to different functions to check, judge and give a result, or the result is obtained by writing and calculating complex code logic, and then the result is input into the system and marked for explanation. The data acquisition is complicated and difficult, accidental errors are easy to occur, the data acquisition only comprises data verification results and descriptions, and the specific data verification process is opaque.
Disclosure of Invention
The purpose of the application is to provide a model verification method, a system, a storage medium and electronic equipment, which can automatically obtain a verification result according to a model without manual verification, and realize the automation, visualization and standardization of model verification.
In order to solve the technical problems, the application provides a model verification method, which comprises the following specific technical scheme:
obtaining a model file, and analyzing the model file to obtain a table data structure;
rendering the table data structure to a page; wherein the page contains a verification rule of the service data;
collecting the business data contained in the page;
and carrying out formula verification on formulas in the table data structure by utilizing the service data to obtain a verification result of the model file.
Optionally, parsing the model file to obtain a table data structure includes:
and calling an exceljs library to analyze the model file into a workbook model data structure.
Optionally, rendering the table data structure to a page includes:
and rendering the workbench model data structure to the page through table and css styles.
Optionally, collecting the service data contained in the page includes:
defining a data acquisition position at a browser end; and automatically acquiring the data of the data acquisition position as the service data.
Optionally, if the data acquisition source is updated, the method further includes:
and adding, deleting or modifying the data acquisition position at the browser end.
Optionally, defining the data acquisition location at the browser side includes:
defining data acquisition positions for the data acquisition sentences, executing data acquisition in parallel, and returning an acquisition result.
Optionally, the performing formula verification on the formulas in the table data structure by using the service data includes:
substituting the business data into a formula in the table data structure, and calculating a result through a hot-formula-parser library;
and carrying out formula verification on the formula result.
The application also provides a model verification system, comprising:
the model acquisition module is used for analyzing the model file to obtain a form data structure due to the acquisition of the model file;
a data rendering module that renders the tabular data structure to a page; wherein the page contains a verification rule of the service data;
the business data acquisition module acquires the business data contained in the page;
and the model verification module is used for carrying out formula verification on the formulas in the table data structure by utilizing the service data to obtain a verification result of the model file.
Optionally, the model acquisition module includes:
and the analysis unit is used for calling the exceljs library to analyze the model file into a workbook model data structure.
Optionally, the data rendering module includes:
and the rendering unit is used for rendering the workbench book model data structure to the page through table and css styles.
Optionally, the service data acquisition module includes:
a position definition unit for defining a data acquisition position at a browser end; and automatically acquiring the data of the data acquisition position as the service data.
Optionally, the service data acquisition module further includes:
and the position updating unit is used for adding, deleting or modifying the data acquisition position at the browser end.
Optionally, the service data acquisition module is a module for defining a data acquisition position for the data acquisition statement, executing data acquisition in parallel, and returning an acquisition result.
Optionally, the model verification module includes:
the calculation unit is used for substituting the service data into a formula in the table data structure and calculating a result through a hot-formula-parameter library;
and the result verification unit is used for carrying out formula verification on the formula result.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method as described above.
The application also provides an electronic device comprising a memory in which a computer program is stored and a processor which when calling the computer program in the memory implements the steps of the method as described above.
The application provides a model verification method, which comprises the following steps: obtaining a model file, and analyzing the model file to obtain a table data structure; rendering the table data structure to a page; wherein the page contains a verification rule of the service data; collecting the business data contained in the page; and carrying out formula verification on formulas in the table data structure by utilizing the service data to obtain a verification result of the model file.
When the method and the device are used for executing model verification, the model file is firstly acquired and analyzed to obtain the form data structure, so that the form data structure is rendered to the page, the verification rule of the model file on the service data is displayed, the service data is acquired afterwards, formula verification is carried out according to a formula in the form data structure, the service data is not required to be acquired manually in the whole process, the service data is not required to be verified manually, visualization of the model rule is realized, and automatic verification of the model is realized.
The application further provides a model verification system, a storage medium and an electronic device, which have the beneficial effects and are not repeated here.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
FIG. 1 is a flowchart of a model verification method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a model verification system according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Referring to fig. 1, fig. 1 is a flowchart of a model verification method according to an embodiment of the present application, where the method includes:
s101: obtaining a model file, and analyzing the model file to obtain a table data structure;
s102: rendering the table data structure to a page; wherein the page contains a verification rule of the service data;
s103: collecting the business data contained in the page;
s104: and carrying out formula verification on formulas in the table data structure by utilizing the service data to obtain a verification result of the model file.
The model file refers to a business data acquisition and processing model located at the browser end. The method is not limited in how to acquire the model file, the model file uploaded by the user can be imported, the model file at the browser end can also be directly acquired, so that the imported model file is analyzed, and the analyzed data is displayed on the browser after being subjected to structure processing, display style setting and component collocation through a series of codes, so that the method is convenient for the user to operate.
The method is not limited in how to analyze the model file, and the analysis results in a table data structure corresponding to the model file, that is, functions in the model are displayed in the form of components in the table in the page. Specifically, an analysis method of an exceljs library can be called to analyze the model file into a workbook model data structure. The ExcelJS library is a JavaScript library for processing Excel files, and the user can create, read and modify the table file by using JavaScript, and the workbook model data structure contains a plurality of workbook objects.
The table data structure is then rendered to the page, and there is no limitation on how the rendering of the table data structure is performed, taking the workbook model data structure as an example, the workbook model data structure may be rendered to the page via table and css styles. For different types of table data structures, the rendering modes of the table data structures can have corresponding differences and are also within the protection scope of the application.
After the table data structure is rendered to the page, a rule item corresponding to the table data structure and a specific rule can be included, wherein the specific rule mainly refers to a judging standard of the rule item applicable to the service data. Taking the age as a rule item for example, if the corresponding rule is set to be less than or equal to 25 years old, when the actual age of the user is detected, the rule item is not met when the user is more than 25 years old, and the user is refused to pass through; if less than or equal to 25 years old, pass through may be admitted.
After that, in step S103, data acquisition is performed, in the related art, information is manually acquired and then entered into the system, or acquired data is written through codes, and the acquisition source is added or adjusted, and the acquisition source can be realized only by changing the codes and then reissuing. According to the embodiment of the application, the data acquisition position can be defined directly at the browser end, automatic data searching is achieved, and the acquisition source of the later-stage update data is also directly added, deleted or modified at the browser end. And the dynamic codes are not needed, and the dynamic codes are updated in real time, so that the method is efficient and convenient. In order to solve the problem that a very large and complex database statement needs to be written to achieve multiple data acquisition, long time is needed to acquire service information after execution. The embodiment of the application can realize small and compact parallel query of database sentences through a multi-element data acquisition technology, define data sources and purposes, greatly reduce query time, and realize visual configuration at a browser end, so that service data sources are clear and response is rapid.
Specifically, when data acquisition is executed, the data acquisition position can be defined through a data acquisition statement, the data acquisition is executed in parallel, and the returned acquisition result contains service data. In order to increase the speed of service data acquisition, service data acquisition may be performed in parallel at a plurality of data acquisition locations.
After the service data is collected, the rules of the model file are maintained. In the related art, whether a data element meets the requirement or is manually checked or controlled by codes is judged, and the rule is not normalized and is not visualized. According to the embodiment of the application, the visualized configuration rules can be realized through the hot-recipe-parameter library and the code processing, the function of analyzing the result according to the configuration rules can be realized, the user only needs to master the grammar of the basic excel, the configuration can be realized, the later-period change rule does not need to wait for changing the edition, the timely application is modified at any time, and the user use operation threshold is reduced. For formulas in the table structure data, the results can be calculated through a hot-formula-parameter library, wherein the hot-formula-parameter library is a JavaScript computing library supporting an Excel formula, and the Excel formula can be analyzed into a computing formula.
The verification result of the model file is mainly the verification result of each formula in the model file, and the verification result can verify whether the function of the model file is normal, namely the specific verification result of each rule, and can also comprise reasons for failing rule verification, and the like.
For the verification result of the formula in the model file, pages can be rendered by using components such as Table, form, button and Tabs through using an AntDesign component library and style writing, so that the verification result can be displayed in a friendly manner, detailed rules and verification results and reasons that each rule passes and does not pass can be displayed, and the user can process in a targeted manner conveniently. The AntDesign component library is a React UI component library based on an Ant Design system, and is mainly used for researching and developing background products in an enterprise level.
When the embodiment of the application is used for executing the model verification, the model file is firstly acquired, and the model file is analyzed to obtain the form data structure, so that the form data structure is rendered to the page, the verification rule of the model file to the service data is displayed, the service data is acquired, formula verification is carried out according to the formula in the form data structure, the service data is not required to be acquired manually in the whole process, the service data is not required to be verified manually, the visualization of the model rule is realized, and the automatic verification of the model is realized. Meanwhile, specific verification rules of the model file are displayed on the page, so that the model verification process is visualized, the user operation is simple, and the mobile terminal and the PC terminal can be supported simultaneously.
In a specific application process of the method, online checking and editing of a browser-side multi-element data model can be achieved based on a reaction frame and js development language, and automatic verification of the model is achieved by using an exceljs library, a hot-format-parameter library and an AntDesign component library. Of course, those skilled in the art may also employ other development languages, databases, and component libraries, which are not intended to be limiting in any way.
The following describes a model verification system provided in an embodiment of the present application, and the model verification system described below and the model verification method described above may be referred to correspondingly.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a model verification system according to an embodiment of the present application, where the system includes:
the model acquisition module is used for analyzing the model file to obtain a form data structure due to the acquisition of the model file;
a data rendering module that renders the tabular data structure to a page; wherein the page contains a verification rule of the service data;
the business data acquisition module acquires the business data contained in the page;
and the model verification module is used for carrying out formula verification on the formulas in the table data structure by utilizing the service data to obtain a verification result of the model file.
Based on the above embodiments, as a preferred embodiment, the model acquisition module includes:
and the analysis unit is used for calling the exceljs library to analyze the model file into a workbook model data structure.
Based on the above embodiments, as a preferred embodiment, the data rendering module includes:
and the rendering unit is used for rendering the workbench book model data structure to the page through table and css styles.
Based on the foregoing embodiments, as a preferred embodiment, the service data acquisition module includes:
a position definition unit for defining a data acquisition position at a browser end; and automatically acquiring the data of the data acquisition position as the service data.
Based on the foregoing embodiment, as a preferred embodiment, the service data acquisition module further includes:
and the position updating unit is used for adding, deleting or modifying the data acquisition position at the browser end.
Based on the above embodiments, as a preferred embodiment, the service data acquisition module is a module for defining a data acquisition position for a data acquisition statement, executing data acquisition in parallel, and returning an acquisition result.
Based on the above embodiments, as a preferred embodiment, the model verification module includes:
the calculation unit is used for substituting the service data into a formula in the table data structure and calculating a result through a hot-formula-parameter library;
and the result verification unit is used for carrying out formula verification on the formula result.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed, implements the steps provided by the above embodiments. The storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The present application also provides an electronic device, referring to fig. 3, and as shown in fig. 3, a block diagram of an electronic device provided in an embodiment of the present application may include a processor 1410 and a memory 1420.
Processor 1410 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc., among others. The processor 1410 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 1410 may also include a main processor and a coprocessor, the main processor being a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1410 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 1410 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 1420 may include one or more computer-readable storage media, which may be non-transitory. Memory 1420 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 1420 is used at least to store a computer program 1421, which, when loaded and executed by the processor 1410, can implement relevant steps in the model verification method performed by the electronic device side as disclosed in any of the foregoing embodiments. In addition, the resources stored by memory 1420 may include an operating system 1422, data 1423, and the like, and the storage may be transient storage or permanent storage. The operating system 1422 may include Windows, linux, android, among other things.
In some embodiments, the electronic device may further include a display 1430, an input-output interface 1440, a communication interface 1450, a sensor 1460, a power supply 1470, and a communication bus 1480.
Of course, the structure of the electronic device shown in fig. 3 does not limit the electronic device in the embodiment of the present application, and the electronic device may include more or fewer components than those shown in fig. 3 or may combine some components in practical applications.
In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. The system provided by the embodiment is relatively simple to describe as it corresponds to the method provided by the embodiment, and the relevant points are referred to in the description of the method section.
Specific examples are set forth herein to illustrate the principles and embodiments of the present application, and the description of the examples above is only intended to assist in understanding the methods of the present application and their core ideas. It should be noted that it would be obvious to those skilled in the art that various improvements and modifications can be made to the present application without departing from the principles of the present application, and such improvements and modifications fall within the scope of the claims of the present application.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A model verification method, comprising:
obtaining a model file, and analyzing the model file to obtain a table data structure;
rendering the table data structure to a page; wherein the page contains a verification rule of the service data;
collecting the business data contained in the page;
and carrying out formula verification on formulas in the table data structure by utilizing the service data to obtain a verification result of the model file.
2. The model verification method of claim 1, wherein parsing the model file to obtain a table data structure comprises:
and calling an exceljs library to analyze the model file into a workbook model data structure.
3. The model validation method of claim 2, wherein rendering the table data structure to a page comprises:
and rendering the workbench model data structure to the page through table and css styles.
4. The model verification method according to claim 1, wherein collecting the business data contained in the page comprises:
defining a data acquisition position at a browser end; and automatically acquiring the data of the data acquisition position as the service data.
5. The method of claim 4, wherein if the data acquisition source is updated, further comprising:
and adding, deleting or modifying the data acquisition position at the browser end.
6. The model verification method according to claim 4, wherein defining the data acquisition location at the browser side comprises:
defining data acquisition positions for the data acquisition sentences, executing data acquisition in parallel, and returning an acquisition result.
7. The model verification method according to claim 1, wherein said using said business data to perform formula verification on formulas in said table data structure comprises:
substituting the business data into a formula in the table data structure, and calculating a result through a hot-formula-parser library;
and carrying out formula verification on the formula result.
8. A model verification system, comprising:
the model acquisition module is used for analyzing the model file to obtain a form data structure due to the acquisition of the model file;
a data rendering module that renders the tabular data structure to a page; wherein the page contains a verification rule of the service data;
the business data acquisition module acquires the business data contained in the page;
and the model verification module is used for carrying out formula verification on the formulas in the table data structure by utilizing the service data to obtain a verification result of the model file.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the model verification method according to any one of claims 1-7.
10. An electronic device comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the steps of the model verification method according to any one of claims 1-7 when the computer program in the memory is invoked by the processor.
CN202311705440.2A 2023-12-11 2023-12-11 Model verification method, system, storage medium and electronic equipment Pending CN117610540A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311705440.2A CN117610540A (en) 2023-12-11 2023-12-11 Model verification method, system, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311705440.2A CN117610540A (en) 2023-12-11 2023-12-11 Model verification method, system, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117610540A true CN117610540A (en) 2024-02-27

Family

ID=89951544

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311705440.2A Pending CN117610540A (en) 2023-12-11 2023-12-11 Model verification method, system, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117610540A (en)

Similar Documents

Publication Publication Date Title
KR101312867B1 (en) Markup based extensibility for user interfaces
US11526481B2 (en) Incremental dynamic document index generation
CN110688307B (en) JavaScript code detection method, device, equipment and storage medium
CN111241454A (en) Method, system and device for generating webpage code
US9471286B2 (en) System and method for providing code completion features for code modules
KR20140048139A (en) Dynamically updating a running page
CN108595171B (en) Object model generation method, device, equipment and storage medium
CN104956362A (en) Analyzing structure of web application
CN107622080B (en) Data processing method and equipment
CN111797336A (en) Webpage parsing method and device, electronic equipment and medium
CN114138244A (en) Method and device for automatically generating model files, storage medium and electronic equipment
CN108846069B (en) Document execution method and device based on markup language
CN117520690B (en) UI (user interface) automation method and related device based on CSS (CSS style) style prerendering contrast
CN103235757B (en) Several apparatus and method that input domain tested object is tested are made based on robotization
US10282398B1 (en) Editing tool for domain-specific objects with reference variables corresponding to preceding pages
CN117234487A (en) Method and device for generating software interface, electronic equipment and storage medium
KR20220058259A (en) Method and apparatus for extracting metadata of thesis
CN112463931A (en) Intelligent analysis method for insurance product clauses and related equipment
US20230195825A1 (en) Browser extension with automation testing support
CN117610540A (en) Model verification method, system, storage medium and electronic equipment
CN115562989A (en) Automatic test sequence conversion method, system, equipment and medium
CN112328246A (en) Page component generation method and device, computer equipment and storage medium
CN116009863B (en) Front-end page rendering method, device and storage medium
CN111125590A (en) Method and device for drawing thermodynamic diagram
CN114154092B (en) Method for translating web pages and related product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination