Document verification method and device, electronic device and storage medium
By parsing and comparing the service request and response parameters of the target document, the problem of synchronous update of design changes in the document management system is solved, the R&D efficiency and document effectiveness are improved, and the integrity of R&D assets is ensured.
Patent Information
- Application Number
- CN202310196905.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-02
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2043-03-02
AI Technical Summary
Existing document management systems have difficulty in synchronously updating design changes during the continuous development process, resulting in inconsistencies between R&D design documents and actual delivered products, low R&D efficiency, lack of validity verification, neglect of the professionalism of R&D design, and shrinkage of R&D assets.
By parsing the target document, obtaining the service request and expected response parameters, initiating a service request to the target software system, comparing the actual response with the expected response, determining the effectiveness of technical and business elements, and then judging the validity of the document.
It achieves timely validity verification of R&D documents, improves R&D efficiency, ensures the validity of R&D assets, and is suitable for the R&D team management model of continuous development and operation and maintenance.
Smart Images

Figure CN116185490B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial technology, and in particular to a document verification method and device, electronic device, and storage medium. Background Art
[0002] Currently, document management systems are used in a wide range of scenarios. For example, R&D project lifecycle management uses modular components to implement process management for categorized project documents; requirements management systems under agile R&D models enable rapid search by centrally managing documents and change history data; scientific research project management systems modularize users, projects, and outcomes to achieve project process management; internal and external collaborative office management systems based on project documents enable multi-person collaboration by isolating underlying databases; and version analysis methods based on business architecture can evaluate project completion rates within program products by matching requirements with architecture. Current document management systems are primarily tailored to different use cases, all with the primary goal of addressing process management.
[0003] In related technologies, document management still aims at "managing documents", such as document backup and search. However, the problem of continuous document updates faced by continuous development (DevOps) has not been paid attention to. That is, changes in relevant documents during the development phase, such as database design changes, are difficult to be updated synchronously to the design document management system. As a result, after the project development is completed and delivered, there are differences in solutions between the R&D design documents in the actual system and the delivered products. Then, in the next iterative design, it is impossible to directly refer to the previous design documents, and relevant parameters must be sorted out based on the actual delivered products. Especially in cross-team development, if changes are not updated and synchronized in a timely manner, the overall R&D efficiency will be reduced.
[0004] Therefore, document management in related technologies has the following shortcomings: (1) R&D is inefficient and time-consuming. Delayed design documents hinder cross-team R&D, and invalid design documents make continuous design take a long time to reorganize documents; (2) Lack of validity verification. Design changes in continuous development are ignored, and the current R&D design system cannot verify the technical validity of documents, which leads to deviations between reality and design; (3) Ignoring the particularity of R&D design. The current R&D design management system is still functionally for storage, backup and search purposes, ignoring the particularity of R&D design, that is, there are documents but they are not usable. Complex and professional documents require certain professional knowledge, which is difficult for a large enterprise to maintain by relying on personnel. A dedicated system must be required to effectively manage relevant documents; (4) R&D assets are shrinking. A lot of documents have accumulated over the years, but effective R&D documents are difficult to control, which actually causes the shrinkage of enterprise R&D assets.
[0005] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention
[0006] The embodiments of the present invention provide a document verification method and device, an electronic device, and a storage medium, so as to at least solve the technical problem in related arts that it is difficult to determine the validity of R&D documents.
[0007] According to one aspect of an embodiment of the present invention, a document verification method is provided, comprising: parsing a target document to obtain service request parameters and expected service response parameters, wherein the target document comprises: at least one element to be verified, each of the element to be verified comprising: a preset service request and a preset service response, the target document corresponds to a target software system, the expected service response parameters are pre-configured service response parameters corresponding to the service request parameters, and the target software system is a software system designed and implemented according to the target document; initiating a service request to the target software system based on the service request parameters, wherein the target software system returns actual service response parameters based on the service request; determining the technical efficiency of preset technical elements and the business efficiency of preset business elements in the target document based on the expected service response parameters and the actual service response parameters, wherein the preset technical elements are elements pre-configured according to the technical methods used by the target software system, and the preset business elements are elements pre-configured according to the business functions implemented by the target software system; and determining the validity of the target document based on the technical efficiency and the business efficiency.
[0008] Optionally, before parsing the target document, it also includes: determining technical elements and business elements based on business requirements, wherein the technical elements are the technical methods used by the target software system, the business elements are the business functions implemented by the target software system, and the business functions are functions implemented by at least one of the technical elements; configuring preset service requests and preset service responses for each of the technical elements and each of the business elements; and constructing the elements to be verified in the target document based on all the preset service requests and all the preset service responses.
[0009] Optionally, the step of configuring a preset service request and a preset service response for each of the technical elements and each of the business elements includes: determining the element type of each of the technical elements; configuring a service request format for each of the element types to obtain a service request format library, wherein each of the service request formats in the service request format library corresponds to one of the element types; selecting the service request format corresponding to the element type of the technical element from the service request format library, and configuring the preset service request of the technical element based on the service request format; and configuring the preset service response based on the preset service request.
[0010] Optionally, the step of constructing the elements to be verified in the target document based on all the preset service requests and all the preset service responses includes: configuring preset technical elements based on the technical elements, wherein the preset technical elements include: the preset service requests and the preset service responses corresponding to the technical elements; determining business elements belonging to the same business function, and characterizing the business elements belonging to the same business function as sub-business elements, and configuring preset business elements, wherein the preset business elements include: at least one sub-business element, the sub-business element is a business function point realized by being composed of at least one technical element, the sub-business element includes: the preset service request and the preset service response corresponding to the business element, and the same business function includes: a function with business data dependency; constructing the elements to be verified in the target document based on the preset technical elements and the preset business elements.
[0011] Optionally, before determining the technical effectiveness of the preset technical elements and the business effectiveness of the preset business elements in the target document based on the expected service response parameters and the actual service response parameters, it also includes: verifying the legality of each preset element in the target document based on the service request format library, wherein the preset elements include: the preset technical elements and the preset business elements; when the request format of the preset service request corresponding to the preset element is consistent with the service request format corresponding to the element type of the preset element in the service request format library, determining that the preset element has passed the legality check.
[0012] Optionally, after determining that the preset element passes the legality check, it also includes: comparing the expected service response parameters corresponding to the preset technical element that passes the legality check with the actual service response parameters, and determining that the preset technical element is a valid preset technical element when the expected service response parameters are consistent with the actual service response parameters; comparing the expected service response parameters corresponding to the sub-business element that passes the legality check with the actual service response parameters, and determining that the sub-business element is a valid sub-business element when the expected service response parameters are consistent with the actual service response parameters; determining that the preset business element is a valid preset business element when all the sub-business elements in the preset business element are valid sub-business elements.
[0013] Optionally, the step of determining the technical effectiveness of the preset technical elements and the business effectiveness of the preset business elements in the target document based on the expected service response parameters and the actual service response parameters includes: determining a first quantity based on the number of valid preset technical elements and the number of valid sub-business elements; determining a second quantity based on the number of preset technical elements and the number of sub-business elements; determining the ratio between the first quantity and the second quantity as the technical effectiveness of the preset technical elements; and determining the ratio between the number of valid preset business elements and the number of preset business elements as the business effectiveness of the preset business elements.
[0014] Optionally, before determining the validity of the target document based on the technical effectiveness and the business effectiveness, it also includes: when the expected service response parameter corresponding to the preset element is inconsistent with the actual service response parameter, recording the preset element in the failure element library; when the technical effectiveness is greater than a preset technical threshold and the business effectiveness is greater than a preset business threshold, determining that the target document is a valid document; when the technical effectiveness is less than or equal to the preset technical threshold or the business effectiveness is less than or equal to the preset business threshold, adjusting all the preset elements in the failure element library, and updating the target document based on the adjusted preset elements.
[0015] According to another aspect of an embodiment of the present invention, a document verification device is provided, comprising: a parsing unit, configured to parse a target document to obtain service request parameters and expected service response parameters, wherein the target document comprises: at least one element to be verified, each element to be verified comprising: a preset service request and a preset service response, the target document corresponds to a target software system, the expected service response parameters are pre-configured service response parameters corresponding to the service request parameters, and the target software system is a software system designed and implemented according to the target document; an initiating unit, configured to initiate a service request to the target software system based on the service request parameters, wherein the target software system returns actual service response parameters based on the service request; a first determining unit, configured to determine, based on the expected service response parameters and the actual service response parameters, a technical efficiency of preset technical elements and a business efficiency of preset business elements in the target document, wherein the preset technical elements are elements pre-configured according to technical methods used by the target software system, and the preset business elements are elements pre-configured according to business functions implemented by the target software system; and a second determining unit, configured to determine the validity of the target document based on the technical efficiency and the business efficiency.
[0016] Optionally, the verification device also includes: a first determination module, used to determine technical elements and business elements based on business requirements before parsing the target document, wherein the technical elements are the technical methods used by the target software system, the business elements are the business functions implemented by the target software system, and the business functions are functions implemented by at least one of the technical elements; a first configuration module, used to configure a preset service request and a preset service response for each of the technical elements and each of the business elements; a first construction module, used to construct the elements to be verified in the target document based on all the preset service requests and all the preset service responses.
[0017] Optionally, the first configuration module includes: a first determination submodule, used to determine the element type of each of the technical elements; a first configuration submodule, used to configure the service request format for each of the element types to obtain a service request format library, wherein each of the service request formats in the service request format library corresponds to one of the element types; a first selection submodule, used to select the service request format corresponding to the element type of the technical element from the service request format library, and configure the preset service request of the technical element based on the service request format; a second configuration submodule, used to configure the preset service response based on the preset service request.
[0018] Optionally, the first construction module includes: a third configuration sub-module, used to configure pre-set technical elements based on the technical elements, wherein the pre-set technical elements include: the pre-set service request and the pre-set service response corresponding to the technical elements; a fourth configuration sub-module, used to determine the business elements belonging to the same business function, and represent the business elements belonging to the same business function as sub-business elements, and configure pre-set business elements, wherein the pre-set business elements include: at least one sub-business element, the sub-business element is a business function point realized by being composed of at least one technical element, the sub-business element includes: the pre-set service request and the pre-set service response corresponding to the business element, and the same business function includes: a function with business data dependency; the first construction sub-module is used to construct the elements to be verified in the target document based on the pre-set technical elements and the pre-set business elements.
[0019] Optionally, the verification device also includes: a first verification module, which is used to verify the legality of each preset element in the target document based on the service request format library before determining the technical effectiveness of the preset technical elements and the business effectiveness of the preset business elements in the target document based on the expected service response parameters and the actual service response parameters, wherein the preset elements include: the preset technical elements and the preset business elements; a second determination module, which is used to determine that the preset element has passed the legality check when the request format of the preset service request corresponding to the preset element is consistent with the service request format corresponding to the element type of the preset element in the service request format library.
[0020] Optionally, the verification device also includes: a first comparison module, which is used to compare the expected service response parameters corresponding to the preset technical elements that have passed the legality verification with the actual service response parameters after determining that the preset elements have passed the legality verification, and determine that the preset technical elements are valid preset technical elements when the expected service response parameters are consistent with the actual service response parameters; a second comparison module, which is used to compare the expected service response parameters corresponding to the sub-business elements that have passed the legality verification with the actual service response parameters, and determine that the sub-business elements are valid sub-business elements when the expected service response parameters are consistent with the actual service response parameters; a third determination module, which is used to determine that the preset business element is a valid preset business element when all the sub-business elements in the preset business elements are valid sub-business elements.
[0021] Optionally, the first determination unit includes: a fourth determination module, used to determine the first quantity based on the number of the valid pre-set technical elements and the number of the valid sub-business elements; a fifth determination module, used to determine the second quantity based on the number of the pre-set technical elements and the number of the sub-business elements; a sixth determination module, used to determine the ratio between the first quantity and the second quantity as the technical efficiency of the pre-set technical elements; and a seventh determination module, used to determine the ratio between the number of the valid pre-set business elements and the number of the pre-set business elements as the business efficiency of the pre-set business elements.
[0022] Optionally, the verification device also includes: a first recording module for recording the preset elements in a failure element library when the expected service response parameters corresponding to the preset elements are inconsistent with the actual service response parameters before determining the validity of the target document based on the technical efficiency and the business efficiency; an eighth determination module for determining that the target document is a valid document when the technical efficiency is greater than a preset technical threshold and the business efficiency is greater than a preset business threshold; a first adjustment module for adjusting all the preset elements in the failure element library when the technical efficiency is less than or equal to the preset technical threshold or the business efficiency is less than or equal to the preset business threshold, and updating the target document based on the adjusted preset elements.
[0023] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned document verification method.
[0024] According to another aspect of an embodiment of the present invention, an electronic device is also provided, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned document verification method.
[0025] In the present disclosure, a target document is parsed to obtain service request parameters and expected service response parameters, a service request is initiated to a target software system based on the service request parameters, the technical efficiency of pre-set technical elements and the business efficiency of pre-set business elements in the target document are determined based on the expected service response parameters and the actual service response parameters, and the validity of the target document is determined based on the technical efficiency and the business efficiency. In the present disclosure, the target document to be verified can be parsed first to obtain service request parameters and expected service response parameters, and then a service request is initiated to a target software system generated based on the target document based on the service request parameters to obtain actual service response parameters. By comparing the expected service response parameters and the actual service response parameters, it is possible to promptly determine whether the target document is a valid document and promptly maintain the validity of the target document, thereby solving the technical problem in related technologies that it is difficult to determine the validity of R&D documents. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0027] Figure 1 is a flowchart of an optional document verification method according to an embodiment of the present invention;
[0028] Figure 2 is a schematic diagram of an optional document management system according to an embodiment of the present invention;
[0029] Figure 3 is a schematic diagram of an optional document verification device according to an embodiment of the present invention;
[0030] Figure 4 The present invention is a hardware structure block diagram of an electronic device (or mobile device) for a document verification method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] To facilitate those skilled in the art to understand the present invention, some of the terms or nouns involved in the embodiments of the present invention are explained below:
[0034] Service: refers to the functional points of R&D and design;
[0035] Service Request: refers to a test request issued based on the functional points designed by R&D;
[0036] Service response: refers to the result of the system response after a service request is issued.
[0037] It should be noted that the document verification method and device in the present disclosure can be used in the field of financial technology when verifying documents, and can also be used in any field other than the field of financial technology when verifying documents. The present disclosure does not limit the application field of the document verification method and device.
[0038] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation portals for users to choose to authorize or refuse. For example, an interface is set up between this system and the relevant users or institutions. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or institution through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or institution.
[0039] The following embodiments of the present invention can be applied to various systems / applications / devices for verifying documents. The verification of R&D documents in the present invention can be applied to application scenarios of document management with R&D and design as the goal.
[0040] In order to adapt to the management of R&D design documents under the R&D model of continuous development and continuous operation and maintenance, the present invention proposes a R&D design document management method. The core problem to be solved by the present invention is the validity of R&D design documents, that is, the problem that design changes during the R&D process make the delivered products inconsistent with the actual design documents. By verifying the technical points of R&D design documents and delivered products, the validity of key design points is ensured, which can solve the problem that professional R&D documents are difficult to maintain and have reduced validity. The present invention is suitable for the R&D team management model of continuous development and operation and maintenance, can improve the efficiency of R&D, and ensure the validity of R&D assets.
[0041] The present invention will be described in detail below with reference to various embodiments.
[0042] Example 1
[0043] According to an embodiment of the present invention, an embodiment of a document verification method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0044] Figure 1 is a flow chart of an optional document verification method according to an embodiment of the present invention, such as Figure 1 As shown, the method includes the following steps:
[0045] Step S101, parse the target document to obtain service request parameters and expected service response parameters, wherein the target document includes: at least one element to be verified, each element to be verified includes: a preset service request and a preset service response, the target document corresponds to a target software system, the expected service response parameters are pre-configured service response parameters corresponding to the service request parameters, and the target software system is a software system designed and implemented based on the target document.
[0046] Step S102: Initiate a service request to the target software system based on the service request parameters, wherein the target software system returns actual service response parameters based on the service request.
[0047] Step S103, based on the expected service response parameters and the actual service response parameters, determine the technical efficiency of the pre-set technical elements and the business efficiency of the pre-set business elements in the target document, wherein the pre-set technical elements are elements pre-configured according to the technical methods used by the target software system, and the pre-set business elements are elements pre-configured according to the business functions implemented by the target software system.
[0048] Step S104: Determine the validity of the target document based on the technical efficiency and the business efficiency.
[0049] Through the above steps, the target document can be parsed to obtain service request parameters and expected service response parameters, and based on the service request parameters, a service request can be initiated to the target software system. Based on the expected service response parameters and the actual service response parameters, the technical efficiency of the pre-set technical elements and the business efficiency of the pre-set business elements in the target document can be determined. Based on the technical efficiency and the business efficiency, the validity of the target document can be determined. In an embodiment of the present invention, the target document to be verified can be parsed first to obtain service request parameters and expected service response parameters, and then a service request can be initiated to the target software system generated based on the target document according to the service request parameters to obtain actual service response parameters. By comparing the expected service response parameters and the actual service response parameters, it can be determined in a timely manner whether the target document is a valid document, and the validity of the target document can be maintained in a timely manner, thereby solving the technical problem in the related art that it is difficult to determine the validity of R&D documents.
[0050] The embodiment of the present invention is described in detail below in conjunction with the above steps.
[0051] An optional embodiment, before parsing the target document, also includes: determining technical elements and business elements based on business needs, wherein the technical elements are the technical methods used by the target software system, the business elements are the business functions implemented by the target software system, and the business functions are functions implemented by at least one technical element; configuring a preset service request and a preset service response for each technical element and each business element; and constructing the elements to be verified in the target document based on all preset service requests and all preset service responses.
[0052] In an embodiment of the present invention, a service request (including service requests for technical elements and business elements) can be set first to construct a research and development design document (i.e., the target document to be verified, also known as a research and development document). A research and development design document describes the specific technical solution for the implementation of a software system, which contains several key technical elements and business elements. Each key technical element is a way to implement a certain function. For example, network communication protocols, database table structures (including table field lengths and types), APIs (Application Programming Interfaces), etc. are all key technical elements. In a specific software system design, each technical element has specific parameters, including number, type, and field length. Key business elements are the logic of the business process. For key technical elements and key business elements, verification service requests can be set, such as the definition of API interface requests (including naming, request message parameter number, type, and field length, and corresponding results), database table data requests (including field number, type, and maximum length, and corresponding results), and the sequential dependencies between the processes before and after the business request.
[0053] In an embodiment of the present invention, the specific process of constructing a target document (i.e., a research and development document to be verified, also known as a research and development design document) is as follows: first, based on the business requirements of the business (i.e., the business that needs to build a software system) (i.e., the technical methods required to implement the business and the business functions implemented by the business, etc.), determine the technical elements and business elements. The technical elements are the technical methods used by the target software system (i.e., the software system that needs to be built according to the target document), and the business elements are the business functions implemented by the target software system (including the logic of the business process, etc.). The business function is a function implemented by at least one technical element (i.e., each business function can be a business function implemented by one or more technical elements). Afterwards, a preset service request (i.e., the service request that the technical element or business element needs to make) and a preset service response (i.e., the service response expected to be returned after the service request is made) can be configured for each technical element and each business element. Then, based on all the preset service requests and all the preset service responses, the elements to be verified in the target document are constructed (the elements to be verified include: the technical elements to be verified and the business elements).
[0054] Optionally, the steps of configuring a preset service request and a preset service response for each technical element and each business element include: determining the element type of each technical element; configuring a service request format for each element type to obtain a service request format library, wherein each service request format in the service request format library corresponds to an element type; selecting a service request format corresponding to the element type of the technical element from the service request format library, and configuring the preset service request of the technical element based on the service request format; and configuring the preset service response based on the preset service request.
[0055] In an embodiment of the present invention, the element type of each technical element (i.e., the type of service request that the technical element needs to perform) can be determined first, and then the corresponding service request format can be configured according to the element type (i.e., the service request format can be configured for each element type) to obtain a service request format library (each service request format in the service request format library corresponds to an element type). Then, a service request format corresponding to the element type of the technical element can be selected from the service request format library, and a preset service request of the technical element can be configured based on the service request format (i.e., according to the type of service request that each element needs to perform, a corresponding service request format can be selected from the service request format library, and then a corresponding preset service request can be configured based on the service request format). Afterwards, according to the preset service request, the corresponding expected return service response can be configured (i.e., based on the preset service request, the preset service response can be configured).
[0056] Optionally, the step of constructing the elements to be verified in the target document based on all preset service requests and all preset service responses includes: configuring the preset technical elements based on the technical elements, wherein the preset technical elements include: preset service requests and preset service responses corresponding to the technical elements; determining the business elements belonging to the same business function, and representing the business elements belonging to the same business function as sub-business elements, and configuring the preset business elements, wherein the preset business elements include: at least one sub-business element, the sub-business element is a business function point realized by being composed of at least one technical element, the sub-business element includes: preset service requests and preset service responses corresponding to the business element, and the same business function includes: functions with business data dependence; constructing the elements to be verified in the target document based on the preset technical elements and the preset business elements.
[0057] In the embodiment of the present invention, in the R&D document, the content to be verified can be identified by pre-set elements (including pre-set technical elements and pre-set business elements), and the pre-set elements can set identifiers (such as <e>< / e> ), used to identify the content to be verified within the parsed identifier.
[0058] In the embodiment of the present invention, the pre-set elements can be divided into pre-set technical elements and pre-set business elements according to the technical methods and business functions used, and are marked according to the pre-set element tags. For example, the tags of the pre-set technical elements can be set to <t>< / t> , the labels of pre-set business elements can be set to ), used to identify the content within the parsing tag. Among them, the pre-set technical elements are atomic and are a technical method verification module. The pre-set technical elements can be classified according to technical applications, such as the database (MySQL) technical elements can be set to<T Type=“MySQL”> , the network (HTTPS) technical element can be set to<T Type=“HTTPS”> A pre-set business element contains one or more sub-business elements. A sub-business element is a business function point realized by one or more technical elements. Multiple sub-business elements of the same pre-set business element are related, such as the second sub-business depends on the data generated by the first sub-business.
[0059] In the embodiment of the present invention, the pre-set technical elements include a pre-set service request and a pre-set service response, which are used for verifying the service request and service response results of subsequent technical elements. <request>< / request> ) is used to identify and parse a preset service request. A preset service request also has a preset service request type tag and preset service request content. The preset service request type tag can be set to Type="POST" to identify the preset service request type and preset service request method. The preset service request content is used for preset service request testing.
[0060] In the embodiment of the present invention, the preset service element includes one or more preset sub-service elements, and the identifiers thereof can be set as follows: <subb>< / subb> The preset sub-business element includes a preset service request and a preset response request. The preset service request and the preset response request included in the preset sub-business element are a technical element, and multiple preset sub-business elements have a sequential identifier such as<subB order=1> , used to identify the order of pre-set sub-business elements and verify them according to the pre-set sub-business logical order.
[0061] In an embodiment of the present invention, after determining the technical elements and business elements required for the target document, pre-set technical elements can be configured based on the technical elements (the pre-set technical elements include: pre-set service requests and pre-set service responses corresponding to the technical elements), and then business elements belonging to the same business function (for example, functions with business data dependencies belong to the same function) are determined, and the business elements belonging to the same business function are characterized as sub-business elements. Then, pre-set business elements are configured based on all sub-business elements belonging to the same business function (the pre-set business elements include: at least one sub-business element, the sub-business element is a business function point realized by being composed of at least one technical element, and the sub-business element includes: pre-set service requests and pre-set service responses corresponding to the business elements). Then, based on the pre-set technical elements and pre-set business elements, the technical elements and business elements to be verified in the target document are constructed.
[0062] In this embodiment of the present invention, the constructed R&D documents can be uploaded to the system and associated with the corresponding designers, developers (i.e., team members related to the project), and system operation and maintenance personnel, as R&D assets. During the design and development phase, the system can verify the R&D documents daily according to the set service requests.
[0063] Step S101, parse the target document to obtain service request parameters and expected service response parameters, wherein the target document includes: at least one element to be verified, each element to be verified includes: a preset service request and a preset service response, the target document corresponds to a target software system, the expected service response parameters are pre-configured service response parameters corresponding to the service request parameters, and the target software system is a software system designed and implemented based on the target document.
[0064] In an embodiment of the present invention, after obtaining the research and development document to be verified (i.e., the target document), the service request parameters and service response parameters defined in the target document can be parsed (i.e., the target document is parsed to obtain the service request parameters and expected service response parameters). Specifically, at least one element to be verified defined in the target document (each element to be verified corresponds to a preset service request and a preset service response) can be parsed to obtain the corresponding service request parameters and expected service response parameters. Among them, the service request parameters are the specific parameters of the preset service request in the target document, and the service response parameters are the specific parameters of the preset service response expected to be returned for the preset service request in the target document (i.e., the expected service response parameters, which are pre-configured service response parameters corresponding to the service request parameters).
[0065] In this embodiment, each target document corresponds to a target software system (ie, each R&D document corresponds to a product delivered according to its document content, and the target software system is a software system designed and implemented according to the target document).
[0066] Step S102: Initiate a service request to the target software system based on the service request parameters, wherein the target software system returns actual service response parameters based on the service request.
[0067] In an embodiment of the present invention, a test service request is issued based on the parsed service request parameters (i.e., a service request is initiated to the target software system based on the service request parameters), and the target software system can return actual service response parameters (i.e., the response parameters actually returned after the actual application software system executes the service request) based on the service request.
[0068] Optionally, before determining the technical effectiveness of the preset technical elements and the business effectiveness of the preset business elements in the target document based on the expected service response parameters and the actual service response parameters, it also includes: verifying the legality of each preset element in the target document based on the service request format library, wherein the preset elements include: preset technical elements and preset business elements; when the request format of the preset service request corresponding to the preset element is consistent with the service request format corresponding to the element type of the preset element in the service request format library, it is determined that the preset element has passed the legality check.
[0069] In an embodiment of the present invention, the legality of the preset elements can be verified based on the service request type label (i.e., the preset service request type label) required by the technical elements. The preset elements that conform to the defined format are legal preset elements, otherwise they are invalid preset elements. Specifically: based on the service request format library, the legality of each preset element (i.e., the preset technical element, the preset business element) in the target document can be verified. If the request format of the preset service request corresponding to the preset element is consistent with the service request format corresponding to the element type of the preset element in the service request format library (i.e., the service request format in the preset element conforms to the defined format), it can be determined that the preset element has passed the legality check, otherwise it can be directly determined that the preset element is an invalid preset element.
[0070] Optionally, after determining that the preset element passes the legality check, it also includes: comparing the expected service response parameters corresponding to the preset technical element that passes the legality check with the actual service response parameters, and determining that the preset technical element is a valid preset technical element when the expected service response parameters are consistent with the actual service response parameters; comparing the expected service response parameters corresponding to the sub-business element that passes the legality check with the actual service response parameters, and determining that the sub-business element is a valid sub-business element when the expected service response parameters are consistent with the actual service response parameters; and determining that the preset business element is a valid pre-set business element when all sub-business elements in the preset business element are valid sub-business elements.
[0071] In the embodiment of the present invention, after the legitimacy check, it is necessary to verify the validity of the pre-set elements that have passed the legitimacy. The actual response parameters of the service request can be parsed to determine whether they meet the defined expected service response parameters. If they meet the expectations, the service is valid; otherwise, the service is invalid. Specifically:
[0072] For pre-set technical elements, you can test them according to the pre-set service request, and compare the actual service response obtained with the pre-set service response. If it complies with the pre-set service response, it is a valid pre-set technical element; otherwise, it is an invalid pre-set technical element (that is, compare the expected service response parameters corresponding to the pre-set technical elements that have passed the legality check with the actual service response parameters, and if the expected service response parameters are consistent with the actual service response parameters, determine that the pre-set technical element is a valid pre-set technical element).
[0073] For pre-set business elements, they can be verified in order of pre-set sub-business elements. The verification method of pre-set sub-business elements is consistent with the verification method of pre-set technical elements (that is, the actual service response obtained is compared with the pre-set service response. If it meets the pre-set service response, it is a valid pre-set sub-business element, otherwise it is an invalid pre-set sub-business element) (that is, compare the expected service response parameters and actual service response parameters corresponding to the sub-business elements that have passed the legality verification, and when the expected service response parameters are consistent with the actual service response parameters, determine that the sub-business element is a valid sub-business element). If all the pre-set sub-businesses of the pre-set business element are valid, the pre-set business element is valid, otherwise it is invalid (that is, when all the sub-business elements in the pre-set business element are valid sub-business elements, determine that the pre-set business element is a valid pre-set business element).
[0074] Step S103, based on the expected service response parameters and the actual service response parameters, determine the technical efficiency of the pre-set technical elements and the business efficiency of the pre-set business elements in the target document, wherein the pre-set technical elements are elements pre-configured according to the technical methods used by the target software system, and the pre-set business elements are elements pre-configured according to the business functions implemented by the target software system.
[0075] In an embodiment of the present invention, the effectiveness of the target document can be calculated, that is, the ratio of effective services to all defined services (that is, based on the expected service response parameters and the actual service response parameters, the technical effectiveness of the pre-set technical elements and the business effectiveness of the pre-set business elements in the target document are determined, and the pre-set technical elements are elements pre-configured according to the technical methods used by the target software system, and the pre-set business elements are elements pre-configured according to the business functions implemented by the target software system), and then whether the target document is a valid document can be judged based on the effectiveness.
[0076] Optionally, the steps of determining the technical effectiveness of pre-set technical elements and the business effectiveness of pre-set business elements in the target document based on the expected service response parameters and the actual service response parameters include: determining a first quantity based on the number of valid pre-set technical elements and the number of valid sub-business elements; determining a second quantity based on the number of pre-set technical elements and the number of sub-business elements; determining the ratio between the first quantity and the second quantity as the technical effectiveness of the pre-set technical elements; and determining the ratio between the number of valid pre-set business elements and the number of pre-set business elements as the business effectiveness of the pre-set business elements.
[0077] In an embodiment of the present invention, a first quantity can be determined based on the number of valid pre-set technical elements and the number of valid sub-business elements, and a second quantity can be determined based on the number of pre-set technical elements and the number of sub-business elements. The ratio between the first quantity and the second quantity is then determined as the technical efficiency of the pre-set technical elements, and the ratio between the number of valid pre-set business elements and the number of pre-set business elements is determined as the business efficiency of the pre-set business elements. The formula for calculating the efficiency of the pre-set technical elements of the R&D document is as follows:
[0078]
[0079] Among them, η t The effectiveness of pre-setting technical elements for R&D documents; t The number of effective pre-set technical elements; b The number of valid pre-set sub-services; a t The number of pre-set technical elements; a b The number of pre-set sub-services.
[0080] The formula for calculating the effectiveness of the preset business elements of R&D documents is as follows:
[0081]
[0082] Among them, η b The effectiveness of pre-setting business elements for R&D documents; B The number of valid pre-set business elements; a B Preset the number of services.
[0083] Step S104: Determine the validity of the target document based on the technical efficiency and the business efficiency.
[0084] In an embodiment of the present invention, the validity of the target document can be determined based on the technical efficiency and business efficiency of the target document. Specifically, a threshold can be determined first. If the technical efficiency and business efficiency both meet the set threshold range, it can be determined that the target document is a valid document (that is, all elements of the target document are consistent with the actual software system).
[0085] Optionally, before determining the validity of the target document based on the technical effectiveness and the business effectiveness, it also includes: when the expected service response parameters corresponding to the preset elements are inconsistent with the actual service response parameters, recording the preset elements in the failure element library; when the technical effectiveness is greater than the preset technical threshold and the business effectiveness is greater than the preset business threshold, determining that the target document is a valid document; when the technical effectiveness is less than or equal to the preset technical threshold or the business effectiveness is less than or equal to the preset business threshold, adjusting all preset elements in the failure element library, and updating the target document based on the adjusted preset elements.
[0086] In an embodiment of the present invention, operations and maintenance personnel can set warning thresholds based on efficiency (i.e., preset technical thresholds and preset business thresholds). For example, if both are below 98%, an alarm will be issued. The system can automatically send key technical elements and key business elements that fail verification to designated designers and developers until the elements of the R&D design document are consistent with the actual software product. Therefore, R&D documents can be updated and change notifications can be issued in a timely manner, thereby ensuring the validity of the documents and improving the efficiency of team collaboration.
[0087] In an embodiment of the present invention, when the expected service response parameters corresponding to the preset elements are inconsistent with the actual service response parameters, the corresponding preset elements can be recorded in the failure element library. If the technical efficiency is greater than the preset technical threshold and the business efficiency is greater than the preset business threshold, it can be determined that the target document is a valid document and no processing is required. If the technical efficiency is less than or equal to the preset technical threshold or the business efficiency is less than or equal to the preset business threshold, all the preset elements in the failure element library can be adjusted, and then the adjusted preset elements are used to update the target document until all elements of the R&D document are consistent with the actual software system.
[0088] The following describes in detail another optional specific implementation.
[0089] Figure 2 is a schematic diagram of an optional document management system according to an embodiment of the present invention, such as Figure 2 As shown, it includes: service parameter module, service request module, service response module, system management module, data storage module, service environment module, central processing module, etc., among which, the service parameter module is used to define the input and output parameters of the service; the service request module is used to parse the service parameters and issue service requests; the service response module is used to parse the response parameters of the service request; the system management module is used to manage the associated design, development and maintenance personnel, document service validity and issue notifications when changes occur; the data storage module is used to record and store R&D design documents, service requests and service response data; the service operating environment module is used to provide a testing environment for service requests; the central processing module is used to coordinate the work of each sub-module and perform performance management on the document management system.
[0090] In this embodiment, services are key functions designed for R&D, including computing, networking, storage, external interface service dependencies, and the logical relationships between designed services. The process for managing R&D documents is as follows:
[0091] (1) You can first set up a service request (technical elements and business elements) and build a research and development document based on the service request. A research and development document is a specific technical solution that describes the implementation of a software system, which contains several key technical elements. Each key technical element is a way to achieve a certain function. Key technical elements, such as network communication protocols, database table structures (including table field lengths and types), APIs, etc., have specific parameters (including number, type, and field length) in specific software system designs. Key business elements are the logic of the business process. For key technical elements and key business elements, you can set up verification service requests, such as the definition of API interface requests (including naming, number, type, and field length of request message parameters, and corresponding results), database table data requests (number, type, and maximum length of fields, and corresponding results), and the sequential dependencies of the processes before and after the business request. Then upload the research and development document to the system for legality verification.
[0092] (2) After uploading the system, the corresponding designers, developers (team members related to the project) and system operation and maintenance personnel can be associated as R&D assets. During the design and development phase, the system verifies the documents according to the set service requests every day.
[0093] (3) Document verification. Based on the service request in the R&D document, the system sends a service request to the software system and obtains the actual service response result. For each key technical and business element, the system analyzes the service response and compares it with the service setting result. When the actual service response result is completely consistent with the result of the service request setting, the element verification passes; otherwise, the system will record the element that failed the verification and the specific content. After all elements are verified, the ratio of technical elements that passed the verification to all elements is calculated, that is, the effectiveness of the R&D document.
[0094] (4) Change notification. Operation and maintenance personnel can set warning thresholds based on efficiency, such as issuing an alarm if the efficiency is below 98%. The system automatically sends key technical elements and key business elements that fail verification to designated designers and developers until the elements of the R&D design document are consistent with the actual software product. Therefore, R&D design documents can be updated and change notifications can be made in a timely manner, thereby ensuring the validity of the documents and improving the efficiency of team collaboration.
[0095] (5) Continuous design. When the software product needs to be expanded or optimized, the system R&D documentation is the fastest way to understand the system design and add new content. Repeat steps (1)-(4) to complete a new round of R&D, achieving continuous design and continuous development.
[0096] In the embodiments of the present invention, the problem of the validity of R&D documents can be solved. By maintaining the key elements in the R&D documents in R&D where the professionalism of the maintenance content is very high, the validity of the documents can be guaranteed, thereby solving the problem of maintaining the validity of large-scale R&D documents, accumulating effective R&D assets, and improving the efficiency of continuous R&D.
[0097] The following describes it in detail with reference to another embodiment.
[0098] Example 2
[0099] A document verification device provided in this embodiment includes multiple implementation units, each implementation unit corresponding to each implementation step in the above-mentioned embodiment 1.
[0100] Figure 3 is a schematic diagram of an optional document verification device according to an embodiment of the present invention, such as Figure 3 As shown, the verification device may include: a parsing unit 30, an initiating unit 31, a first determining unit 32, and a second determining unit 33, wherein:
[0101] A parsing unit 30 is configured to parse a target document to obtain service request parameters and expected service response parameters, wherein the target document includes at least one element to be verified, each element to be verified includes a preset service request and a preset service response, the target document corresponds to a target software system, the expected service response parameters are pre-configured service response parameters corresponding to the service request parameters, and the target software system is a software system designed and implemented based on the target document;
[0102] The initiating unit 31 is configured to initiate a service request to a target software system based on the service request parameters, wherein the target software system returns actual service response parameters based on the service request;
[0103] A first determining unit 32 is configured to determine, based on the expected service response parameters and the actual service response parameters, the technical effectiveness of pre-set technical elements and the business effectiveness of pre-set business elements in the target document, wherein the pre-set technical elements are elements pre-configured based on the technical methods used by the target software system, and the pre-set business elements are elements pre-configured based on the business functions implemented by the target software system;
[0104] The second determining unit 33 is configured to determine the validity of the target document based on the technical efficiency and the business efficiency.
[0105] The above-mentioned verification device can parse the target document through the parsing unit 30 to obtain service request parameters and expected service response parameters, initiate a service request to the target software system based on the service request parameters through the initiating unit 31, determine the technical efficiency of the preset technical elements and the business efficiency of the preset business elements in the target document based on the expected service response parameters and the actual service response parameters through the first determining unit 32, and determine the validity of the target document based on the technical efficiency and the business efficiency through the second determining unit 33. In an embodiment of the present invention, the target document to be verified can be parsed first to obtain service request parameters and expected service response parameters, and then a service request can be initiated to the target software system generated based on the target document according to the service request parameters to obtain actual service response parameters. By comparing the expected service response parameters and the actual service response parameters, it is possible to promptly determine whether the target document is a valid document and promptly maintain the validity of the target document, thereby solving the technical problem in the related art that it is difficult to determine the validity of R&D documents.
[0106] Optionally, the verification device also includes: a first determination module, used to determine technical elements and business elements based on business requirements before parsing the target document, wherein the technical elements are the technical methods used by the target software system, the business elements are the business functions implemented by the target software system, and the business functions are functions implemented by at least one technical element; a first configuration module, used to configure preset service requests and preset service responses for each technical element and each business element; a first construction module, used to construct the elements to be verified in the target document based on all preset service requests and all preset service responses.
[0107] Optionally, the first configuration module includes: a first determination submodule, used to determine the element type of each technical element; a first configuration submodule, used to configure the service request format for each element type to obtain a service request format library, wherein each service request format in the service request format library corresponds to an element type; a first selection submodule, used to select a service request format corresponding to the element type of the technical element from the service request format library, and configure the preset service request of the technical element based on the service request format; a second configuration submodule, used to configure the preset service response based on the preset service request.
[0108] Optionally, the first construction module includes: a third configuration sub-module, used to configure pre-set technical elements based on technical elements, wherein the pre-set technical elements include: pre-set service requests and pre-set service responses corresponding to the technical elements; a fourth configuration sub-module, used to determine business elements belonging to the same business function, and represent the business elements belonging to the same business function as sub-business elements, and configure pre-set business elements, wherein the pre-set business elements include: at least one sub-business element, the sub-business element is a business function point realized by being composed of at least one technical element, the sub-business element includes: pre-set service requests and pre-set service responses corresponding to the business element, and the same business function includes: functions with business data dependence; the first construction sub-module is used to construct the elements to be verified in the target document based on the pre-set technical elements and pre-set business elements.
[0109] Optionally, the verification device also includes: a first verification module, which is used to verify the legality of each preset element in the target document based on the service request format library before determining the technical effectiveness of the preset technical elements and the business effectiveness of the preset business elements in the target document based on the expected service response parameters and the actual service response parameters, wherein the preset elements include: preset technical elements and preset business elements; a second determination module, which is used to determine that the preset element passes the legality check when the request format of the preset service request corresponding to the preset element is consistent with the service request format corresponding to the element type of the preset element in the service request format library.
[0110] Optionally, the verification device also includes: a first comparison module, which is used to compare the expected service response parameters and actual service response parameters corresponding to the preset technical elements that have passed the legality verification after determining that the preset elements have passed the legality verification, and determine that the preset technical elements are valid preset technical elements when the expected service response parameters are consistent with the actual service response parameters; a second comparison module, which is used to compare the expected service response parameters and actual service response parameters corresponding to the sub-business elements that have passed the legality verification, and determine that the sub-business elements are valid sub-business elements when the expected service response parameters are consistent with the actual service response parameters; a third determination module, which is used to determine that the preset business elements are valid pre-set business elements when all sub-business elements in the preset business elements are valid sub-business elements.
[0111] Optionally, the first determination unit includes: a fourth determination module, used to determine the first quantity based on the number of valid pre-set technical elements and the number of valid sub-business elements; a fifth determination module, used to determine the second quantity based on the number of pre-set technical elements and the number of sub-business elements; a sixth determination module, used to determine the ratio between the first quantity and the second quantity as the technical efficiency of the pre-set technical elements; and a seventh determination module, used to determine the ratio between the number of valid pre-set business elements and the number of pre-set business elements as the business efficiency of the pre-set business elements.
[0112] Optionally, the verification device also includes: a first recording module for recording the preset elements in the failure element library before determining the validity of the target document based on the technical efficiency and the business efficiency when the expected service response parameters corresponding to the preset elements are inconsistent with the actual service response parameters; an eighth determination module for determining that the target document is a valid document when the technical efficiency is greater than a preset technical threshold and the business efficiency is greater than a preset business threshold; a first adjustment module for adjusting all preset elements in the failure element library when the technical efficiency is less than or equal to the preset technical threshold or the business efficiency is less than or equal to the preset business threshold, and updating the target document based on the adjusted preset elements.
[0113] The above-mentioned verification device may also include a processor and a memory. The above-mentioned parsing unit 30, initiating unit 31, first determination unit 32, second determination unit 33, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0114] The processor includes a kernel that retrieves the corresponding program unit from the memory. One or more kernels can be configured, and kernel parameters can be adjusted to determine the validity of the target document based on technical efficiency and business efficiency.
[0115] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0116] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: parsing the target document, obtaining service request parameters and expected service response parameters, initiating a service request to the target software system based on the service request parameters, determining the technical efficiency of pre-set technical elements and the business efficiency of pre-set business elements in the target document based on the expected service response parameters and the actual service response parameters, and determining the validity of the target document based on the technical efficiency and the business efficiency.
[0117] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored computer program, wherein when the computer program runs, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned document verification method.
[0118] According to another aspect of an embodiment of the present invention, an electronic device is also provided, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement the above-mentioned document verification method.
[0119] Figure 4 FIG. 1 is a hardware structure diagram of an electronic device (or mobile device) for a document verification method according to an embodiment of the present invention. Figure 4 As shown, the electronic device may include one or more ( Figure 4 (As shown in the figure, 402a, 402b, ..., 402n are used) processor 402 (processor 402 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), memory 404 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a keyboard, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 4 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 4 More or fewer components than shown, or with Figure 4 Different configurations shown.
[0120] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0121] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0122] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0123] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0124] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0125] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store program codes.
[0126] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A document verification method, characterized in that: include: Parsing a target document to obtain service request parameters and expected service response parameters, wherein the target document includes: at least one element to be verified, each element to be verified includes: a preset service request and a preset service response, the target document corresponds to a target software system, the expected service response parameters are pre-configured service response parameters corresponding to the service request parameters, and the target software system is a software system designed and implemented based on the target document; Initiating a service request to the target software system based on the service request parameters, wherein the target software system returns actual service response parameters based on the service request; Determining, based on the expected service response parameters and the actual service response parameters, the technical effectiveness of pre-set technical elements and the business effectiveness of pre-set business elements in the target document, wherein the pre-set technical elements are elements pre-configured according to the technical methods used by the target software system, and the pre-set business elements are elements pre-configured according to the business functions implemented by the target software system; Determining the validity of the target document based on the technical effectiveness and the business effectiveness; Among them, the expected service response parameter corresponding to the preset technical element that has passed the legality check is compared with the actual service response parameter, and when the expected service response parameter is consistent with the actual service response parameter, the preset technical element is determined to be a valid preset technical element; the expected service response parameter corresponding to the sub-business element that has passed the legality check is compared with the actual service response parameter, and when the expected service response parameter is consistent with the actual service response parameter, the sub-business element is determined to be a valid sub-business element; when all the sub-business elements in the preset business element are valid sub-business elements, the preset business element is determined to be a valid preset business element; Among them, the first quantity is determined based on the number of the valid pre-set technical elements and the number of the valid sub-business elements; the second quantity is determined based on the number of the pre-set technical elements and the number of the sub-business elements; the ratio between the first quantity and the second quantity is determined as the technical efficiency of the pre-set technical elements; and the ratio between the number of the valid pre-set business elements and the number of the pre-set business elements is determined as the business efficiency of the pre-set business elements.
2. The verification method according to claim 1, wherein: Before parsing the target document, also include: Determine technical elements and business elements based on business requirements, wherein the technical elements are the technical methods used by the target software system, and the business elements are the business functions implemented by the target software system, and the business functions are functions implemented by at least one of the technical elements; Configuring a preset service request and a preset service response for each of the technical elements and each of the business elements; Based on all the preset service requests and all the preset service responses, elements to be verified in the target document are constructed.
3. The verification method according to claim 2, wherein: The step of configuring a preset service request and a preset service response for each of the technical elements and each of the business elements includes: Determine the element type of each of the technical elements; Configuring a service request format for each element type to obtain a service request format library, wherein each service request format in the service request format library corresponds to one element type; selecting the service request format corresponding to the element type of the technical element from the service request format library, and configuring the preset service request of the technical element based on the service request format; The preset service response is configured based on the preset service request.
4. The verification method according to claim 3, wherein: The step of constructing the elements to be verified in the target document based on all the preset service requests and all the preset service responses includes: Based on the technical elements, configuring pre-set technical elements, wherein the pre-set technical elements include: the pre-set service request and the pre-set service response corresponding to the technical elements; Determining business elements belonging to the same business function, characterizing the business elements belonging to the same business function as sub-business elements, and configuring pre-set business elements, wherein the pre-set business elements include: at least one sub-business element, the sub-business element is a business function point implemented by being composed of at least one technical element, the sub-business element includes: the pre-set service request and the pre-set service response corresponding to the business element, and the same business function includes: a function having business data dependency; Based on the preset technical elements and the preset business elements, elements to be verified in the target document are constructed.
5. The verification method according to claim 4, wherein: Before determining the technical efficiency of the preset technical elements and the business efficiency of the preset business elements in the target document based on the expected service response parameters and the actual service response parameters, the method further includes: Based on the service request format library, verifying the legitimacy of each preset element in the target document, wherein the preset elements include: the preset technical elements and the preset business elements; When the request format of the preset service request corresponding to the preset element is consistent with the service request format corresponding to the element type of the preset element in the service request format library, it is determined that the preset element passes the legality check.
6. The verification method according to claim 5, characterized in that: Before determining the validity of the target document based on the technical effectiveness and the business effectiveness, the method further includes: In the case where the expected service response parameter corresponding to the preset element is inconsistent with the actual service response parameter, recording the preset element in a failure element library; When the technical efficiency is greater than a preset technical threshold and the business efficiency is greater than a preset business threshold, determining that the target document is a valid document; When the technical efficiency is less than or equal to the preset technical threshold or the business efficiency is less than or equal to the preset business threshold, all the preset elements in the failure element library are adjusted, and the target document is updated based on the adjusted preset elements.
7. A document verification device, characterized in that: include: a parsing unit, configured to parse a target document to obtain service request parameters and expected service response parameters, wherein the target document includes: at least one element to be verified, each of the elements to be verified includes: a preset service request and a preset service response, the target document corresponds to a target software system, the expected service response parameters are pre-configured service response parameters corresponding to the service request parameters, and the target software system is a software system designed and implemented based on the target document; an initiating unit, configured to initiate a service request to the target software system based on the service request parameters, wherein the target software system returns actual service response parameters based on the service request; a first determining unit, configured to determine, based on the expected service response parameters and the actual service response parameters, a technical efficiency of pre-set technical elements and a business efficiency of pre-set business elements in the target document, wherein the pre-set technical elements are elements pre-configured according to technical methods used by the target software system, and the pre-set business elements are elements pre-configured according to business functions implemented by the target software system; a second determining unit, configured to determine the validity of the target document based on the technical efficiency and the business efficiency; The verification device further includes: a first comparison module, configured to compare the expected service response parameter corresponding to the preset technical element that has passed the legality verification with the actual service response parameter, and determine that the preset technical element is a valid preset technical element if the expected service response parameter is consistent with the actual service response parameter; a second comparison module, configured to compare the expected service response parameter corresponding to the sub-business element that has passed the legality verification with the actual service response parameter, and determine that the sub-business element is a valid sub-business element if the expected service response parameter is consistent with the actual service response parameter; and a third determination module, configured to determine that the preset business element is a valid preset business element if all the sub-business elements in the preset business element are valid sub-business elements; The first determination unit includes: a fourth determination module, used to determine the first quantity based on the number of the valid pre-set technical elements and the number of the valid sub-business elements; a fifth determination module, used to determine the second quantity based on the number of the pre-set technical elements and the number of the sub-business elements; a sixth determination module, used to determine the ratio between the first quantity and the second quantity as the technical efficiency of the pre-set technical elements; and a seventh determination module, used to determine the ratio between the number of the valid pre-set business elements and the number of the pre-set business elements as the business efficiency of the pre-set business elements.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the document verification method according to any one of claims 1 to 6.
9. An electronic device, characterized in that: The invention comprises one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the document verification method described in any one of claims 1 to 6.
Citation Information
Patent Citations
Webpage request processing method and device, electronic equipment and storage medium
CN113467855A
Interface testing method and device, electronic equipment and medium
CN114666258A