Method and device for generating demand document, storage medium and electronic equipment
1. A method for generating a requirement document, the method comprising:
displaying a retrieval interface through a display unit;
acquiring a retrieval condition input by a user through the retrieval interface, and retrieving in an interface code set according to the retrieval condition to obtain a retrieval result;
selecting an interface code from the retrieval result in response to a selection instruction of a user;
and generating a requirement document of the interface code based on a preset generation rule.
2. The method of claim 1, wherein the requirements document includes a document name;
wherein the generating of the requirement document of the interface code based on the preset generation rule includes:
acquiring the area, the project name, the third party system name and the system name of the interface code;
and splicing the area, the project name, the third-party system name, the system name and a preset fixed field to obtain the document name.
3. The method of claim 1 or 2, wherein the requirements document comprises: revising the history record;
wherein the generating of the requirement document of the interface code based on the preset generation rule includes:
analyzing the revision log of the interface code to obtain revision date, version number, revision mode, revision content, demanders and developers;
generating the revision history according to the revision date, the version number, the revision contents, the demander and the developer.
4. The method of claim 3, wherein the requirements document comprises: integrating visual information;
wherein the generating of the requirement document of the interface code based on the preset generation rule includes:
and generating the integrated visual information according to the project name, the PO table name, the interface name, the service type, the data flow direction, the interactive system, the unit field, the abstract field, the unique key and the foreground display field of the interface code.
5. The method of claim 1, 2 or 4, wherein the requirements document comprises: interface specification information;
wherein the generating of the requirement document of the interface code based on the preset generation rule includes:
and generating the interface specification information according to the interface provider, the interface caller, the interface address, the interface method, the calling mode, the input message format and the output message format of the interface code.
6. The method of claim 5, wherein the requirements document comprises: an integration flow chart;
wherein the generating of the requirement document of the interface code based on the preset generation rule includes:
processing logic to obtain the interface code;
generating the integrated flow diagram according to the processing logic.
7. The method of claim 1 or 2 or 4 or 5, wherein the requirements document comprises: field correspondence and integrated process description information.
8. An apparatus for generating a requirements document, the apparatus comprising:
the display unit is used for displaying a retrieval interface;
the query unit is used for acquiring a retrieval condition input by a user through the retrieval interface and retrieving in the interface code set according to the retrieval condition to obtain a retrieval result;
a selection unit for selecting an interface code from the retrieval result in response to a selection instruction of a user;
and the generating unit is used for generating a requirement document of the interface code based on a preset generating rule.
9. A computer storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to carry out the method steps according to any one of claims 1 to 7.
10. An electronic device, comprising: a processor, a memory, and a microphone; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1 to 7.
Background
With the development of computer technology, more and more enterprises deploy information-based systems, the information-based systems generally comprise a plurality of subsystems, in order to realize communication among the subsystems, an integration interface of the subsystem is developed according to a required document, and other subsystems call the integration interface to communicate with the system. The current requirement document is written in a requirement analysis stage, and the codes of the integrated interface can be updated in a subsequent development stage and a subsequent testing stage, but the updating of the codes is difficult to timely and accurately update to the requirement document.
Disclosure of Invention
The method, the device, the storage medium and the electronic equipment for generating the demand document can solve the problem that the demand document is not updated timely in the related technology. The technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a method for generating a requirement document, where the method includes:
displaying a retrieval interface through a display unit;
acquiring a retrieval condition input by a user through the retrieval interface, and retrieving in an interface code set according to the retrieval condition to obtain a retrieval result;
selecting an interface code from the retrieval result in response to a selection instruction of a user;
and generating a requirement document of the interface code based on a preset generation rule.
In a second aspect, an embodiment of the present application provides an apparatus for generating a requirement document, where the apparatus includes:
the display unit is used for displaying a retrieval interface;
the query unit is used for acquiring a retrieval condition input by a user through the retrieval interface and retrieving in the interface code set according to the retrieval condition to obtain a retrieval result;
a selection unit for selecting an interface code from the retrieval result in response to a selection instruction of a user;
and the generating unit is used for generating a requirement document of the interface code based on a preset generating rule.
In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The beneficial effects brought by the technical scheme provided by some embodiments of the application at least comprise:
when a requirement document of an interface code is generated, a retrieval result containing one or more interface codes is obtained by retrieving based on a retrieval interface, one interface code is selected from the retrieval result based on a selection instruction of a user, and then the requirement document of the interface code is generated according to a preset generation rule.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a method for generating a requirement document according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a user interface provided by an embodiment of the present application;
FIG. 3 is a schematic diagram of organization information integration included in a requirements document provided by an embodiment of the present application;
FIG. 4 is a schematic structural diagram of a device for generating a requirement document provided by the present application;
fig. 5 is a schematic structural diagram of an electronic device provided in the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The method for generating the requirement document provided by the embodiment of the present application will be described in detail below with reference to fig. 1 to 3.
Referring to fig. 2, a flow chart of a method for generating a requirement document is provided in an embodiment of the present application. As shown in fig. 2, the method of the embodiment of the present application may include the steps of:
and S101, displaying a retrieval interface through a display unit.
The retrieval interface is a graphical interface for human-computer interaction displayed on a display unit of the electronic device, the retrieval interface comprises a plurality of controls, the types of the controls comprise an input box, a button, a sliding bar and the like, a user can perform interactive operation on the controls through input equipment, and the types of the interactive operation include but are not limited to: mouse interactive operation, keyboard interactive operation or touch interactive operation and the like.
S102, obtaining a retrieval condition input by a user through a retrieval interface, and retrieving in the interface code set according to the retrieval condition to obtain a retrieval result.
The retrieval interface comprises a control of an input box, the input box is used for inputting retrieval conditions, and when the number of the retrieval conditions is multiple, the number of the corresponding input boxes is also multiple. The search condition of the present application may be: the area represents the applicable scope of the interface code, and the third party system name and the integrated application name include: nationwide, Henan, or Hebei, etc.; the name of the third-party system is used for representing the name of the third-party system which is in butt joint with the integrated interface of the system, and the name of the integrated application is used for representing the project name of the interface.
For example: referring to the schematic diagram of the retrieval interface shown in fig. 2, the retrieval interface includes a retrieval input box and a retrieval result display box, after the keyword "nw-nc" is input in the retrieval input box, the retrieved interface codes are displayed in the retrieval result display box, and the user selects one interface code from the retrieved interface codes, as shown in fig. 2, the attribute of the selected interface code is: item name "nw-nc-gldx 7324", version number "1.0.0", item description, frame version number, item type, build time, system group, service group, remark, and the like.
The interface code set comprises a plurality of interface codes, and the interface code set can be deployed in the requirement document generation system for a relational database. The electronic equipment sends a query instruction to the interface code set, the query instruction carries query conditions, the interface code set returns a retrieval result in response to the query instruction, and the retrieval result is displayed on the display unit and comprises the serial number of the interface code, the project name, the project description, the third-party system name, the version number, the frame version number, developers, demanders and the like of the interface code. The project name represents the name of the project where the interface code is located, the project description represents the description of the main information of the project, the name of a third-party system represents the name of the third-party system which is butted by the integration interface of the system, the version number represents the serial number of the version of the interface code, and the frame version number represents the version of a software tool kit for developing the interface code; the developer represents the name of the person who developed the interface code and the demander represents the name of the demander.
S103, one interface code is selected from the retrieval result in response to the selection instruction of the user.
The selection instruction is generated by a user through interactive operation triggering, the type of the interactive operation can be book and mouse interactive operation, keyboard interactive operation or touch interactive operation, and the electronic equipment selects an interface code from the retrieval result based on the selection instruction of the user.
And S104, generating a requirement document of the interface code based on a preset generation rule.
The preset generation rule is a rule predefined by the electronic device, and includes, for example: the electronic equipment acquires the attribute information of the interface codes from the requirement document generation system, analyzes the logic relation of the interface codes, generates a requirement document according to the logic relation and stores the requirement document.
For example: referring to the user interface shown in fig. 2, the user interface includes an export control, and when a trigger operation on the export control is detected, the retrieved interface code generates a requirement document, and then the generated requirement document is exported to a specified path.
In one or more possible embodiments, the requirements document includes a document name;
wherein the generating of the requirement document of the interface code based on the preset generation rule includes:
acquiring the area, the project name, the third party system name and the system name of the interface code;
and splicing the area, the project name, the third-party system name, the system name and a preset fixed field to obtain the document name.
The area represents the applicable range of the interface code, the project name represents the name of the project where the interface code is located, the third-party system name represents the name of a third-party system which is in butt joint with the integration interface of the system, and the system name represents the name of the system for developing the integration interface. The fixed field is a preset designated field, and the fields are spliced to obtain the document name.
In one or more possible embodiments, the requirements document includes: revising the history record;
wherein the generating of the requirement document of the interface code based on the preset generation rule includes:
analyzing the revision log of the interface code to obtain revision date, version number, revision mode, revision content, demanders and developers;
generating the revision history according to the revision date, the version number, the revision contents, the demander and the developer.
The revision date represents the revision date of the interface code, the version number represents the serial number of the version of the interface code, the revision content represents the revision content of the interface code relative to the previous version, the demander represents the name of the demander of the interface code, and the developer represents the name of the person who develops the interface code.
For example: the revision history is represented in tabular form as shown in table 1:
TABLE 1
In one or more possible embodiments, the requirements document includes: integrating visual information;
wherein the generating of the requirement document of the interface code based on the preset generation rule includes:
and generating the integrated visual information according to the project name, the PO table name, the interface name, the service type, the data flow direction, the interactive system, the unit field, the abstract field, the unique key and the foreground display field of the interface code.
Wherein, the item name represents the name of the item where the interface code is located, also called as the SA name; the PO table name represents the name of the table where the interface code is located; the interface name represents the name of the integrated interface; the service type represents the type of the service carried by the integrated interface; the data flow comprises that the system sends service data to a third-party system (namely, the data flow is outward) and the third-party system sends the service data to the system (namely, the data flow is inward); the interactive system represents the system name for calling the integration interface; the unit field indicates the name of the unit where the integrated interface is located; the abstract field represents an abstract of the interface code, and the unique key represents a key value of the interface code; the foreground display field represents a field of the service data which needs to be displayed on the foreground in the integrated interface.
For example: the generated integrated visualization information is shown in table 2:
TABLE 2
In one or more possible embodiments, the requirements document includes: interface specification information;
wherein the generating of the requirement document of the interface code based on the preset generation rule includes:
and generating the interface specification information according to the interface provider, the interface caller, the interface address, the interface method, the calling mode, the input message format and the output message format of the interface code.
Wherein the interface provider represents a name of a system providing the integration interface, that is, a present system name, the interface caller represents a name of a system calling the integration interface, and the interface method represents a method calling the integration interface, for example, the interface method includes: POST or GOT, etc.; the calling address represents the address of the integrated interface, and is generally represented by a URL (uniform resource locator) address, and the calling mode comprises restful or HTTPS or webservice and the like. For example: the interface specification information includes:
an interface calling party: an integration platform;
an interface provider: a user center;
calling mode form: restful;
interface address: POST/necp/mapp/4 a/api/interaction/v 1/org.
In one or more possible embodiments, the requirements document includes: an integration flow chart;
wherein the generating of the requirement document of the interface code based on the preset generation rule includes:
processing logic to obtain the interface code;
generating the integrated flow diagram according to the processing logic.
The integrated flow chart is used for displaying interface calling relations, information is acquired from the receiving module, the processing module and the feedback module according to processing logic in an interface code, a VISIO lane flow chart is generated through conversion, each lane is used for displaying an interface provider and an interface caller related to integrated application, the flow starts to be a system calling an integrated platform interface in the receiving module as the interface caller, the integrated platform in the processing module calls a data receiver system, the feedback module feeds back a processing result to the caller, and after the caller receives feedback, the whole integrated flow is finished.
For example: see fig. 3 for an integration flow diagram including organization information integration.
In one or more possible embodiments, the requirements document includes: field correspondence and integrated process description information.
Wherein, the field corresponding relation is shown in a table form, and the first-level list head comprises: source interface, target interface, integrated processing, source interface second grade list head includes: the field source, the field name and the type, and the target interface secondary list head comprises: field, field name, type. The integration process includes the following categories: direct integration, mapping, integrated processing, default values, and specific rules of integrated processing need to be obtained according to integrated code processing logic, such as field splicing, field interception, and the like.
For example: the field correspondence is shown in table 3:
TABLE 3
According to the implementation logic in the interface code, the integrated process description information of the receiving module, the processing module and the feedback module and various branch flow judgments are generated.
For example: the integrated process description information is: 1. the MDM system calls an integrated platform interface; 2. the integration platform receives and analyzes the electronic file message, assembles the electronic file message and calls an interface; 3. and the integrated platform receives the feedback, assembles a feedback message and feeds back the MDM system. 4. And the integration platform updates the visual integration result. The integrated platform is provided with an integrated interface, and the MDM system is an interface caller for an interface provider.
When the scheme of the embodiment of the application is executed, when a requirement document of the interface codes is generated, a retrieval result containing one or more interface codes is obtained by retrieving based on a retrieval interface, one interface code is selected from the retrieval result based on a selection instruction of a user, then the requirement document of the interface code is generated according to a preset generation rule, the problem that the interface codes and the requirement document are not matched in the related technology is solved, and the function of automatically generating the requirement document according to the interface codes reversely is realized based on a standard interface development framework on the basis of the existing interface development according to the requirement document.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 4, a schematic structural diagram of a generating apparatus of a requirement document provided in an exemplary embodiment of the present application is shown, and hereinafter referred to as the generating apparatus 4. The generating means 4 may be implemented as all or part of an electronic device by software, hardware or a combination of both. The generation device 4 includes: a display unit 401, an inquiry unit 402, a selection unit 403, and a generation unit 404.
A display unit 401 for displaying a retrieval interface;
a query unit 402, configured to obtain a retrieval condition input by a user through the retrieval interface, and retrieve in an interface code set according to the retrieval condition to obtain a retrieval result;
a selecting unit 403, configured to select an interface code from the retrieval result in response to a selection instruction of a user;
a generating unit 404, configured to generate a requirement document of the interface code based on a preset generating rule.
In one or more possible embodiments, the requirements document includes a document name;
wherein the generating of the requirement document of the interface code based on the preset generation rule includes:
acquiring the area, the project name, the third party system name and the system name of the interface code;
and splicing the area, the project name, the third-party system name, the system name and a preset fixed field to obtain the document name.
In one or more possible embodiments, the requirements document includes: revising the history record;
wherein the generating of the requirement document of the interface code based on the preset generation rule includes:
analyzing the revision log of the interface code to obtain revision date, version number, revision mode, revision content, demanders and developers;
generating the revision history according to the revision date, the version number, the revision contents, the demander and the developer.
In one or more possible embodiments, the requirements document includes: integrating visual information;
wherein the generating of the requirement document of the interface code based on the preset generation rule includes:
and generating the integrated visual information according to the project name, the PO table name, the interface name, the service type, the data flow direction, the interactive system, the unit field, the abstract field, the unique key and the foreground display field of the interface code.
In one or more possible embodiments, the requirements document includes: interface specification information;
wherein the generating of the requirement document of the interface code based on the preset generation rule includes:
and generating the interface specification information according to the interface provider, the interface caller, the interface address, the interface method, the calling mode, the input message format and the output message format of the interface code.
In one or more possible embodiments, the requirements document includes: an integration flow chart;
wherein the generating of the requirement document of the interface code based on the preset generation rule includes:
processing logic to obtain the interface code;
generating the integrated flow diagram according to the processing logic.
In one or more possible embodiments, the requirements document includes: field correspondence and integrated process description information.
It should be noted that, when the generating apparatus 4 provided in the foregoing embodiment executes the method for generating a requirement document, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed to different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules, so as to complete all or part of the functions described above. In addition, the generating device of the requirement document and the generating method embodiment of the requirement document provided by the above embodiments belong to the same concept, and details of the implementation process are referred to in the method embodiment, and are not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
An embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, where the instructions are suitable for being loaded by a processor and executing the method steps in the embodiments shown in fig. 2 to fig. 3, and a specific execution process may refer to specific descriptions of the embodiments shown in fig. 2 to fig. 3, which is not described herein again.
The present application further provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the method for generating a requirement document according to the above embodiments.
Please refer to fig. 5, which is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 5, the electronic device 500 may include: at least one processor 501, at least one network interface 504, a user interface 503, memory 505, at least one communication bus 502.
Wherein a communication bus 502 is used to enable connective communication between these components.
The user interface 503 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 503 may also include a standard wired interface and a wireless interface.
The network interface 504 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Processor 501 may include one or more processing cores, among other things. The processor 501 interfaces various components throughout the electronic device 500 using various interfaces and lines to perform various functions of the electronic device 500 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 505 and invoking data stored in the memory 505. Optionally, the processor 501 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable gate Array (FPGA), and Programmable Logic Array (PLA). The processor 501 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 501, but may be implemented by a single chip.
The Memory 505 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 505 includes a non-transitory computer-readable medium. The memory 505 may be used to store instructions, programs, code sets, or instruction sets. The memory 505 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 505 may alternatively be at least one memory device located remotely from the processor 501. As shown in fig. 5, the memory 505, which is a computer storage medium, may include therein an operating system, a network communication module, a user interface module, and the computer program adapted to be loaded by the processor and to carry out the aforementioned method steps.
In the electronic device 500 shown in fig. 5, the user interface 503 is mainly used as an interface for providing input for a user, and acquiring data input by the user; and processor 501 may be configured to invoke a touch operation response application stored in memory 505 and to perform the steps described in the method embodiment of fig. 2 below. The specific process can be shown in fig. 2, and is not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory or a random access memory.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:一种基于文本数据的标准化处理方法及设备