CN112068813A - Data processing method, apparatus and medium - Google Patents

Data processing method, apparatus and medium Download PDF

Info

Publication number
CN112068813A
CN112068813A CN202010919730.7A CN202010919730A CN112068813A CN 112068813 A CN112068813 A CN 112068813A CN 202010919730 A CN202010919730 A CN 202010919730A CN 112068813 A CN112068813 A CN 112068813A
Authority
CN
China
Prior art keywords
request
data
information
interface document
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010919730.7A
Other languages
Chinese (zh)
Inventor
邓涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202010919730.7A priority Critical patent/CN112068813A/en
Publication of CN112068813A publication Critical patent/CN112068813A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying

Abstract

The application discloses a data processing method, a device, equipment and a medium, which are applied to an interface document development platform, wherein the data processing method comprises the following steps: receiving request information sent by a development module, and verifying request header information in the request information; if the request header information passes verification, acquiring a request mode and an interface request path in the request information; determining a data acquisition mode corresponding to the data request information, acquiring response information corresponding to the request information in an interface document development platform based on the interface request path, the request mode and the data acquisition mode, and feeding back the response information to the development module, wherein the data acquisition mode comprises a mode selected from preset historical interface document data or a mode of inquiring and feeding back from a platform database. The method and the device solve the technical problem that system development efficiency is low in the prior art.

Description

Data processing method, apparatus and medium
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a data processing method, device, and medium.
Background
With the continuous development of computers, software system development becomes an indispensable link, in the prior art, when software system development is performed, a plurality of development modules are required to perform interdependent development or collaborative development, and the collaborative development progress coordination or data coordination difficulty of each development module is high, so that the system development efficiency is low.
Disclosure of Invention
The present application mainly aims to provide a data processing method, apparatus, device and medium, and aims to solve the technical problem of low system development efficiency in the prior art.
In order to achieve the above object, the present application provides a data processing method applied to an interface document development platform, where the data processing method includes:
receiving request information sent by a development module, and verifying request header information in the request information;
if the request header information passes verification, acquiring a request mode and an interface request path in the request information;
determining a data acquisition mode corresponding to the data request information, acquiring response information corresponding to the request information in an interface document development platform based on the interface request path, the request mode and the data acquisition mode, and feeding back the response information to the development module, wherein the data acquisition mode comprises a mode selected from preset historical interface document data or a mode of inquiring and feeding back from a platform database.
Optionally, before the step of receiving request information sent by a development module and verifying request header information in the request information, the method includes:
determining a target analog mock switch of the development module;
and determining a feedback interface connected with the development module in the interface document development platform based on the target analog mock switch.
Optionally, the step of receiving request information sent by the development module and verifying request header information in the request information includes:
starting the target analog mock switch, and receiving request information sent by a development module;
replacing the interface domain name corresponding to the request information with the domain name associated with the target analog mock switch;
and converting the request information into a simulation request based on the domain name associated with the target simulation mock switch.
Optionally, the determining a data obtaining manner corresponding to the data request information, obtaining response information corresponding to the request information in an interface document development platform based on the interface request path, the request manner and the data obtaining manner, and feeding back the response information to the development module, where the data obtaining manner includes a manner selected from preset historical interface document data or a step of querying a feedback manner from a platform database, and includes:
determining a data acquisition mode corresponding to the data request information according to preset configuration information;
if the data acquisition mode is determined to be a feedback mode of inquiring from a platform database, generating corresponding interface document data and an interface document storage address through a preset generation rule based on the request information;
inquiring the interface document data from the interface document storage address based on the interface request path;
and feeding back response information corresponding to the interface document data to the development module based on the request mode.
Optionally, the determining a data obtaining manner corresponding to the data request information, obtaining response information corresponding to the request information in an interface document development platform based on the interface request path, the request manner and the data obtaining manner, and feeding back the response information to the development module, where the data obtaining manner includes a manner selected from preset historical interface document data or a step of querying a feedback manner from a platform database, and includes:
determining a data acquisition mode corresponding to the data request information according to the functional characteristics of the request information;
if the data acquisition mode is a mode selected from preset historical interface document data, screening the historical interface document data in an interface document development platform based on the interface request path and the request mode to obtain initial interface document data;
determining whether similar interface document data corresponding to the target request parameter in the request information exists in the initial interface document data;
and if the similar interface document data exists, feeding the similar interface document data serving as the response information back to the development module.
Optionally, the step of determining whether similar interface document data corresponding to the target request parameter in the request information exists in the initial interface document data includes:
acquiring a target request parameter in the request information;
acquiring historical request parameters in each piece of historical request information, and constructing a request parameter expression matrix based on each historical request parameter and the target request parameter;
determining the similarity between each historical request parameter and the target request parameter based on the request parameter representation matrix to obtain a similarity representation vector;
and determining whether similar interface document data corresponding to the target request parameter in the request information exists in the initial interface document data or not based on the similarity expression vector.
Optionally, the step of determining whether similar interface document data corresponding to the target request parameter in the request information exists in the initial interface document data based on the similarity representation vector includes:
selecting a target expression vector with highest similarity from the similarity expression vectors;
determining whether the similarity value of the target expression vector is greater than or equal to a preset similarity value;
and if the similarity value of the target expression vector is greater than or equal to a preset similarity value, determining that similar interface document data corresponding to the target request parameter in the request information exists in the initial interface document data.
The present application further provides a data processing apparatus applied to an interface document development platform, the data processing apparatus including:
the receiving module is used for receiving the request information sent by the development module and verifying the request header information in the request information;
a first obtaining module, configured to obtain a request mode and an interface request path in the request information if the request header information passes verification;
and the second acquisition module is used for determining a data acquisition mode corresponding to the data request information, acquiring response information corresponding to the request information in an interface document development platform based on the interface request path, the request mode and the data acquisition mode, and feeding back the response information to the development module, wherein the data acquisition mode comprises a mode selected from preset historical interface document data or a mode of inquiring and feeding back from a platform database.
Optionally, the data processing apparatus further includes:
the first determination module is used for determining a target analog mock switch of the development module;
and the second determining module is used for determining a feedback interface connected with the development module in the interface document development platform based on the target analog mock switch.
Optionally, the receiving module includes:
the starting unit is used for starting the target analog mock switch and receiving request information sent by the development module;
a replacing unit, configured to replace the interface domain name corresponding to the request information with a domain name associated with the target analog mock switch;
and the conversion unit is used for converting the request information into the simulation request based on the domain name associated with the target simulation mock switch.
Optionally, the second obtaining module includes:
the first determining unit is used for determining a data acquisition mode corresponding to the data request information according to preset configuration information;
the generating unit is used for generating corresponding interface document data and an interface document storage address through a preset generating rule based on the request information if the data acquisition mode is determined to be a feedback mode of inquiring from a platform database;
the inquiring unit is used for inquiring the interface document data from the interface document storage address based on the interface request path;
and the first feedback unit is used for feeding back response information corresponding to the interface document data to the development module based on the request mode.
Optionally, the second obtaining module includes:
a third determining unit, configured to determine, according to a functional feature of the request information, a data obtaining manner corresponding to the data request information;
the screening unit is used for screening the historical interface document data in the interface document development platform based on the interface request path and the request mode to obtain initial interface document data if the data acquisition mode is a mode selected from preset historical interface document data;
a third determining unit, configured to determine whether similar interface document data corresponding to the target request parameter in the request information exists in the initial interface document data;
and the second feedback unit is used for feeding back the similar interface document data serving as the response information to the development module if the similar interface document data exists.
Optionally, the determining unit includes:
the first acquiring subunit is used for acquiring the target request parameter in the request information;
the second obtaining subunit is used for obtaining the historical request parameters in the historical request information and constructing a request parameter expression matrix based on the historical request parameters and the target request parameters;
the first determining subunit is configured to determine, based on the request parameter representation matrix, similarity between each historical request parameter and the target request parameter, and obtain a similarity representation vector;
and the second determining subunit is used for determining whether similar interface document data corresponding to the target request parameter in the request information exists in the initial interface document data or not based on the similarity expression vector.
Optionally, the second determining subunit is configured to implement:
selecting a target expression vector with highest similarity from the similarity expression vectors;
determining whether the similarity value of the target expression vector is greater than or equal to a preset similarity value;
and if the similarity value of the target expression vector is greater than or equal to a preset similarity value, determining that similar interface document data corresponding to the target request parameter in the request information exists in the initial interface document data.
The present application further provides a data processing apparatus, where the data processing apparatus is an entity apparatus, and the data processing apparatus includes: a memory, a processor and a program of the data processing method stored on the memory and executable on the processor, which program of the data processing method when executed by the processor may implement the steps of the data processing method as described above.
The present application also provides a medium having stored thereon a program for implementing the above-described data processing method, the program for the data processing method implementing the steps of the above-described data processing method when executed by a processor.
The method comprises the steps of receiving request information sent by a development module, and verifying request header information in the request information; if the request header information passes verification, acquiring a request mode and an interface request path in the request information; determining a data acquisition mode corresponding to the data request information, acquiring response information corresponding to the request information in an interface document development platform based on the interface request path, the request mode and the data acquisition mode, and feeding back the response information to the development module, wherein the data acquisition mode comprises a mode selected from preset historical interface document data or a mode of inquiring and feeding back from a platform database. In the application, in the development process of the development module, progress matching or data matching of other development modules is not needed any more, when the request header passes verification, corresponding response information is obtained directly from the interface document development platform based on a request mode and an interface request path in the request information, compared with the prior art that a plurality of development modules need to be subjected to interdependence development or collaborative matching development, the corresponding response information is directly obtained from the interface document development platform, and untimely obtaining of the response information caused by the development progress of other development modules is avoided, so that the development efficiency of the system is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a schematic flow chart diagram illustrating a first embodiment of a data processing method according to the present application;
fig. 2 is a flowchart illustrating a detailed process of steps of receiving request information sent by a development module and verifying request header information in the request information in a first embodiment of a data processing method according to the present application;
fig. 3 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present application.
The objectives, features, and advantages of the present application will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In a first embodiment of the data processing method of the present application, referring to fig. 1, the data processing method is applied to an interface document development platform, and the data processing method includes:
step S10, receiving request information sent by a development module, and verifying request header information in the request information;
step S20, if the request header information passes the verification, the request mode and the interface request path in the request information are obtained;
step S30, determining a data obtaining manner corresponding to the data request information, obtaining response information corresponding to the request information in an interface document development platform based on the interface request path, the request manner and the data obtaining manner, and feeding back the response information to the development module, where the data obtaining manner includes a manner selected from preset historical interface document data or a manner of querying and feeding back from a platform database.
The method comprises the following specific steps:
step S10, receiving request information sent by a development module, and verifying request header information in the request information;
in the present embodiment, the data processing method is applied to a data processing system, which is subordinate to an interface document development platform, the interface document development platform is subordinate to the data processing equipment, receives request information sent by a development module, verifies request header information in the request information, for example, if the type of the development module is the first type, if the corresponding receiving channel is the first channel (such as application channel, public channel, etc.), if the type of the development module is the second type, the receiving channel is the second channel, in this embodiment, the channel has a verification rule, the verification rule can be a regular expression or other contents, and the request information sent by the development module is obtained according to the receiving channel.
The development modules are data requesters, request information of the data requesters comprises request header information, request content, a request method and the like, the request header information carries identity authentication information and retrieval identifiers, the identity authentication information is used for verifying the validity of the identities of the development modules, the identity authentication information comprises identifiers such as codes and character strings, the retrieval identifiers are used for determining interface request paths, the request method or the request mode in the request information comprises get, post, put, delete and the like, and the request content in the request information comprises texts, pictures and other feedback information or response information and the like.
Receiving request information and verifying request header information in the request information, specifically, receiving the request information, comparing identity verification information in the request information with a preset identity verification information standard, if the identity verification information is consistent with the preset identity verification information standard, indicating that verification is passed, and if the identity verification information is not consistent with the preset identity verification information standard, indicating that verification is not passed.
Before the step of receiving request information sent by a development module and verifying request header information in the request information, the method includes:
step S01, determining a target analog mock switch of the development module;
in this embodiment, an analog mock switch is further provided in the interface document development platform, specifically, an analog mock switch is provided in the receiving channel of the interface document development platform, and a target analog mock switch is determined according to a specific development module, in this embodiment, it should be noted that the analog mock switch may be preset, or the analog mock switch may be temporarily generated according to a requirement document (a contract book of data, all logic and display of a front end depend on a data structure specified in the requirement document) of the development module after the development module is determined, specifically, in this embodiment, connection related information of the development module is obtained according to the requirement document, a template is generated according to the function information of the development module and a preset switch, and an analog mock switch is generated because the template is generated according to the connection related information (including the function information) of the development module and the preset switch, and generating an analog mock switch, so that whether the development module can be connected to the corresponding interface document development platform can be controlled by the on or off operation of the analog mock switch.
And step S02, determining a feedback interface connected with the development module in the interface document development platform based on the target analog mock switch.
In this embodiment, it should be noted that the target mock switch is used to control the connection between the interface document development platform and the development module, where the feedback interface for connecting the development module is determined in the interface document development platform based on the control type of the target mock switch, specifically, the feedback interface for connecting the development module is determined in the interface document development platform based on the domain name change control type in the target mock switch, or specifically, the feedback interface for connecting the development module is determined in the interface document development platform based on the function control type in the target mock switch.
Referring to fig. 2, the step of receiving request information sent by a development module and verifying request header information in the request information includes:
step A1, starting the target analog mock switch, and receiving request information sent by a development module;
in this embodiment, whether a target analog mock switch of a development module is turned on needs to be determined, if the target analog mock switch is turned on, request information sent by the development module is received, and if the target analog mock switch is not turned on, the target analog mock switch is first requested to be turned on so as to receive the request information sent by the development module.
Step A2, replacing the interface domain name corresponding to the request information with the domain name associated with the target analog mock switch;
after receiving the request information, obtaining an interface domain name corresponding to the request information, where the interface domain name corresponding to the request information is generally an interface domain name of another module (a back-end module) developed in coordination, so as to call feedback information required by a current development module, for example, an a development module requests an interface domain name of a B module, so as to obtain required feedback information or response information from the B module.
Step A3, converting the request information into a simulation request based on the domain name associated with the target simulation mock switch.
When the mock switch is turned on, the domain name of the interface request corresponding to the request information is replaced by the domain name associated with the target analog mock switch (the domain name of the feedback interface) so as to convert the request information into the analog request, and then the interface document development platform (the feedback interface) and the development module can be subjected to interface butt joint so as to carry out data interaction.
Step S20, if the request header information passes the verification, the request mode and the interface request path in the request information are obtained;
in this embodiment, if the request header information fails to pass the verification, the prompt information that fails to pass the verification is fed back, and if the request header information passes the verification, a request manner and an interface request path in the request information are extracted, where the request manner includes get, post, put, delete, and the like, and the interface request path (interface address) may be from/micro-api to/config-admin/in/to sharecord/list list.
Step S30, determining a data obtaining manner corresponding to the data request information, obtaining response information corresponding to the request information in an interface document development platform based on the interface request path, the request manner and the data obtaining manner, and feeding back the response information to the development module, where the data obtaining manner includes a manner selected from preset historical interface document data or a manner of querying and feeding back from a platform database.
Determining a data acquisition mode corresponding to the data request information, and based on the interface request path, the request mode and the data acquisition mode, acquiring response information corresponding to the request information in an interface document development platform, and feeding back the response information to the development module, wherein the data acquisition mode comprises a mode selected from preset historical interface document data or a mode of inquiring and feeding back from a platform database, specifically, the data acquisition mode corresponding to the data request information is determined through configuration information, or determining a data acquisition mode corresponding to the data request information according to specific function information in the request information, and based on the interface request path, the request mode and the data acquisition mode, and acquiring response information corresponding to the request information in an interface document development platform, and feeding back the response information to the development module.
The determining of the data obtaining mode corresponding to the data request information, obtaining response information corresponding to the request information in an interface document development platform based on the interface request path, the request mode and the data obtaining mode, and feeding back the response information to the development module, wherein the data obtaining mode includes a mode selected from preset historical interface document data or a step of querying a feedback mode from a platform database, and includes:
step S31, determining a data acquisition mode corresponding to the data request information according to preset configuration information;
step S32, if the data acquisition mode is determined to be a feedback mode of inquiring from a platform database, generating corresponding interface document data and an interface document storage address through a preset generation rule based on the request information;
in this embodiment, a data obtaining manner corresponding to the data request information is determined according to preset configuration information (pre-stored), if it is determined that the data obtaining manner is a feedback manner queried from a platform database, and corresponding interface document data and an interface document storage address are generated according to a preset generation rule based on the request information, specifically, for example, if the request information is request user information, a preset generation statement (pre-stored) is invoked according to the preset generation rule, such as a rule generated according to information, to generate corresponding interface document data, i.e., user information (user information parameters), and the user information is stored in the interface document storage address (obtained through the request information).
Step S33, based on the interface request path, inquiring the interface document data from the interface document storage address;
and inquiring the interface document data, namely request information from the interface document storage address such as/micro-api/config-admin/in/sharechard/list based on the interface request path such as a path from/micro-api to/config-admin/in/sharechard/list.
Step S34, based on the request mode, feeding back response information corresponding to the interface document data to the development module.
Wherein, when the request mode is post, put, delete, etc., the response information is a segment of information code, to indicate that the operation corresponding to the request mode is completed, for example, assuming that when the request mode is delete, the interface document data is empty, the response information is fed back as a code 008 to indicate that the deletion operation is successfully performed, and, additionally, when the request mode is get, the response information comprises the return data and request header information, wherein the returned data is used for interface development and is associated with a request parameter in the request information, for example, assuming that the request parameter is user information, the returned data is the information of the mobile phone number, age, sex, etc. of a certain user, and the request header information is used for marking the interface document data to indicate the development module corresponding to the interface document data.
In this embodiment, it should be noted that an interface document data caching address may be generated based on a preset path caching rule, the interface document data is cached and extracted based on the interface document data caching address, and the response information is generated by using a return parameter in the interface document data and a preset response header, so as to feed back the response information corresponding to the interface document data to the development module, where the response header is used to verify identity information and check parameter errors.
The method comprises the steps of receiving request information sent by a development module, and verifying request header information in the request information; if the request header information passes verification, acquiring a request mode and an interface request path in the request information; determining a data acquisition mode corresponding to the data request information, acquiring response information corresponding to the request information in an interface document development platform based on the interface request path, the request mode and the data acquisition mode, and feeding back the response information to the development module, wherein the data acquisition mode comprises a mode selected from preset historical interface document data or a mode of inquiring and feeding back from a platform database. In the application, in the development process of the development module, progress matching or data matching of other development modules is not needed any more, when the request header passes verification, corresponding response information is obtained directly from the interface document development platform based on a request mode and an interface request path in the request information, compared with the prior art that a plurality of development modules need to be subjected to interdependence development or collaborative matching development, the corresponding response information is directly obtained from the interface document development platform, and untimely obtaining of the response information caused by the development progress of other development modules is avoided, so that the development efficiency of the system is improved.
In another embodiment of the data processing method, the determining a data obtaining manner corresponding to the data request information, obtaining response information corresponding to the request information in an interface document development platform based on the interface request path, the request manner and the data obtaining manner, and feeding back the response information to the development module, where the data obtaining manner includes a manner selected from a preset historical interface document data or a step of querying a feedback manner from a platform database, and includes:
step B1, determining a data acquisition mode corresponding to the data request information according to the functional characteristics of the request information;
step B2, if the data acquisition mode is the mode selected from the preset historical interface document data, based on the interface request path and the request mode, screening the historical interface document data in the interface document development platform to obtain initial interface document data;
in this embodiment, a data obtaining manner corresponding to the data request information is determined according to the functional characteristics of the request information, specifically, the data obtaining manner corresponding to the data request information is determined according to whether the functional characteristics of the request information appear in the history request information corresponding to the preset history interface document data, wherein if the functional characteristics of the request information appear outdated in the history request information corresponding to the preset history interface document data, the data obtaining manner is selected from the preset history interface document data, and if the data obtaining manner is selected from the preset history interface document data, the history document data interface in the interface document development platform is further filtered based on the interface request path and the request manner before the response information corresponding to the interface document data is fed back to the development module, obtaining initial interface document data, in this embodiment, the purpose of filtering the history interface document data is to: whether the required interface document data can be directly selected is determined instead of generating the required interface document data, so that the efficiency is improved.
Step B3, determining whether similar interface document data corresponding to the target request parameter in the request information exists in the initial interface document data;
step B4, if the similar interface document data exists, feeding back the similar interface document data as the response information to the development module.
Specifically, in this embodiment, it is determined whether similar interface document data corresponding to the target request parameter in the request information exists in the initial interface document data, and if the similar interface document data exists, the similar interface document data is fed back to the development module as the response information. And if the similar interface document data does not exist, generating the similar interface document data, and feeding back the generated similar interface document data serving as the response information to the development module.
The step of determining whether similar interface document data corresponding to the target request parameter in the request information exists in the initial interface document data includes:
step C1, obtaining the target request parameter in the request information;
in this embodiment, a plurality of or one target request parameters in the request information are obtained.
Step C2, obtaining the historical request parameters in each historical request message, and constructing a request parameter representation matrix based on each historical request parameter and the target request parameter;
step C3, based on the request parameter representation matrix, determining the similarity between each history request parameter and the target request parameter, and obtaining a similarity representation vector;
step C4, determining whether there is similar interface document data corresponding to the target request parameter in the request information in the initial interface document data based on the similarity representation vector.
In this embodiment, specifically, history request parameters corresponding to each history interface document data are obtained, and each history request parameter is compared with the target request parameter, so as to select similar interface document data of the target request parameter from the document data corresponding to each history request parameter, for example, each history request parameter is obtained, and a request parameter representation matrix is constructed based on each history request parameter and the target request parameter, where each column of the request parameter representation matrix corresponds to one target request parameter or history request parameter, the request parameter represents a characteristic of the target request parameter or history request parameter corresponding to each row of the matrix, a method for constructing the request parameter matrix includes one-hot coding and the like, and then the request parameter matrix is input into a preset similarity calculation model, and calculating the similarity between each historical request parameter and the target request parameter to obtain a similarity expression vector, wherein the similarity expression vector comprises one or more similarity values, the similarity values represent the similarity degree between the historical request parameters and the target request parameters, and further target initial interface document data of the historical request parameters exceeding a similarity threshold value are selected.
And after obtaining target initial interface document data, performing post-processing on the target initial interface document data to enable the target initial interface document data to be matched with the target request parameters, and obtaining similar interface document data, wherein the post-processing comprises correcting the target initial interface document data based on a user command.
In the embodiment, historical interface document data in an interface document development platform is screened based on the interface request path and the request mode to obtain initial interface document data; determining whether similar interface document data corresponding to the target request parameter in the request information exists in the initial interface document data; and if the similar interface document data exists, feeding the similar interface document data serving as the response information back to the development module. In the embodiment, the required feedback information is rapidly acquired.
In another embodiment of the data processing method, the step of determining whether similar interface document data corresponding to a target request parameter in the request information exists in the initial interface document data based on the similarity representation vector includes:
step D1, selecting a target expression vector with highest similarity from the similarity expression vectors;
step D2, determining whether the similarity value of the target expression vector is larger than or equal to a preset similarity value;
step D3, if the similarity value of the target representation vector is greater than or equal to the preset similarity value, determining that there is similar interface document data corresponding to the target request parameter in the request information in the initial interface document data.
In this embodiment, a target expression vector with the highest similarity is selected from the similarity expression vectors, and whether the similarity value of the target expression vector is greater than or equal to a preset similarity value is determined; if the similarity value of the target expression vector is larger than or equal to a preset similarity value, determining that similar interface document data corresponding to the target request parameter in the request information exists in the initial interface document data, and if the similarity value of the target expression vector is smaller than the preset similarity value, determining that similar interface document data corresponding to the target request parameter in the request information does not exist in the initial interface document data. In this embodiment, it is also determined whether the similarity value of the target representation vector is greater than or equal to a preset similarity value to accurately determine the similar interface document data.
Referring to fig. 3, fig. 3 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present application.
As shown in fig. 3, the data processing apparatus may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used for realizing connection communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a memory device separate from the processor 1001 described above.
Optionally, the data processing device may further include a rectangular user interface, a network interface, a camera, RF (Radio Frequency) circuitry, a sensor, audio circuitry, a WiFi module, and so forth. The rectangular user interface may comprise a Display screen (Display), an input sub-module such as a Keyboard (Keyboard), and the optional rectangular user interface may also comprise a standard wired interface, a wireless interface. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface).
Those skilled in the art will appreciate that the data processing device architecture shown in fig. 3 does not constitute a limitation of the data processing device and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 3, a memory 1005, which is a kind of computer medium, may include therein an operating system, a network communication module, and a data processing program. An operating system is a program that manages and controls the hardware and software resources of the data processing device, supporting the operation of the data processing program as well as other software and/or programs. The network communication module is used to enable communication between components within the memory 1005, as well as with other hardware and software within the data processing system.
In the data processing apparatus shown in fig. 3, the processor 1001 is configured to execute a data processing program stored in the memory 1005, and implement the steps of the data processing method according to any one of the above.
The specific implementation of the data processing device of the present application is substantially the same as that of each embodiment of the data processing method, and is not described herein again.
The present application further provides a data processing apparatus applied to an interface document development platform, the data processing apparatus including:
the receiving module is used for receiving the request information sent by the development module and verifying the request header information in the request information;
a first obtaining module, configured to obtain a request mode and an interface request path in the request information if the request header information passes verification;
and the second acquisition module is used for determining a data acquisition mode corresponding to the data request information, acquiring response information corresponding to the request information in an interface document development platform based on the interface request path, the request mode and the data acquisition mode, and feeding back the response information to the development module, wherein the data acquisition mode comprises a mode selected from preset historical interface document data or a mode of inquiring and feeding back from a platform database.
Optionally, the data processing apparatus further includes:
the first determination module is used for determining a target analog mock switch of the development module;
and the second determining module is used for determining a feedback interface connected with the development module in the interface document development platform based on the target analog mock switch.
Optionally, the receiving module includes:
the starting unit is used for starting the target analog mock switch and receiving request information sent by the development module;
a replacing unit, configured to replace the interface domain name corresponding to the request information with a domain name associated with the target analog mock switch;
and the conversion unit is used for converting the request information into the simulation request based on the domain name associated with the target simulation mock switch.
Optionally, the second obtaining module includes:
the first determining unit is used for determining a data acquisition mode corresponding to the data request information according to preset configuration information;
the generating unit is used for generating corresponding interface document data and an interface document storage address through a preset generating rule based on the request information if the data acquisition mode is determined to be a feedback mode of inquiring from a platform database;
the inquiring unit is used for inquiring the interface document data from the interface document storage address based on the interface request path;
and the first feedback unit is used for feeding back response information corresponding to the interface document data to the development module based on the request mode.
Optionally, the second obtaining module includes:
a third determining unit, configured to determine, according to a functional feature of the request information, a data obtaining manner corresponding to the data request information;
the screening unit is used for screening the historical interface document data in the interface document development platform based on the interface request path and the request mode to obtain initial interface document data if the data acquisition mode is a mode selected from preset historical interface document data;
a determining unit, configured to determine whether similar interface document data corresponding to the target request parameter in the request information exists in the initial interface document data;
and the second feedback unit is used for feeding back the similar interface document data serving as the response information to the development module if the similar interface document data exists.
Optionally, the determining unit includes:
the first acquiring subunit is used for acquiring the target request parameter in the request information;
the second obtaining subunit is used for obtaining the historical request parameters in the historical request information and constructing a request parameter expression matrix based on the historical request parameters and the target request parameters;
the first determining subunit is configured to determine, based on the request parameter representation matrix, similarity between each historical request parameter and the target request parameter, and obtain a similarity representation vector;
and the second determining subunit is used for determining whether similar interface document data corresponding to the target request parameter in the request information exists in the initial interface document data or not based on the similarity expression vector.
Optionally, the second determining subunit is configured to implement:
selecting a target expression vector with highest similarity from the similarity expression vectors;
determining whether the similarity value of the target expression vector is greater than or equal to a preset similarity value;
and if the similarity value of the target expression vector is greater than or equal to a preset similarity value, determining that similar interface document data corresponding to the target request parameter in the request information exists in the initial interface document data.
The specific implementation of the data processing apparatus of the present application is substantially the same as that of the embodiments of the data processing method, and is not described herein again.
The present embodiment provides a medium, and the medium stores one or more programs, which can be further executed by one or more processors for implementing the steps of the data processing method described in any one of the above.
The specific implementation of the medium of the present application is substantially the same as that of each embodiment of the data processing method, and is not described herein again.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (10)

1. A data processing method is applied to an interface document development platform, and comprises the following steps:
receiving request information sent by a development module, and verifying request header information in the request information;
if the request header information passes verification, acquiring a request mode and an interface request path in the request information;
determining a data acquisition mode corresponding to the data request information, acquiring response information corresponding to the request information in an interface document development platform based on the interface request path, the request mode and the data acquisition mode, and feeding back the response information to the development module, wherein the data acquisition mode comprises a mode selected from preset historical interface document data or a mode of inquiring and feeding back from a platform database.
2. The data processing method of claim 1, wherein before the steps of receiving request information sent by the development module and verifying request header information in the request information, the method comprises:
determining a target analog mock switch of the development module;
and determining a feedback interface connected with the development module in the interface document development platform based on the target analog mock switch.
3. The data processing method of claim 2, wherein the step of receiving the request message sent by the development module and verifying the request header message in the request message comprises:
starting the target analog mock switch, and receiving request information sent by a development module;
replacing the interface domain name corresponding to the request information with the domain name associated with the target analog mock switch;
and converting the request information into a simulation request based on the domain name associated with the target simulation mock switch.
4. The data processing method according to claim 1, wherein the step of determining a data obtaining manner corresponding to the data request information, obtaining response information corresponding to the request information in an interface document development platform based on the interface request path, the request manner, and the data obtaining manner, and feeding back the response information to the development module comprises:
determining a data acquisition mode corresponding to the data request information according to preset configuration information;
if the data acquisition mode is determined to be a feedback mode of inquiring from a platform database, generating corresponding interface document data and an interface document storage address through a preset generation rule based on the request information;
inquiring the interface document data from the interface document storage address based on the interface request path;
and feeding back response information corresponding to the interface document data to the development module based on the request mode.
5. The data processing method according to claim 1, wherein the step of determining a data obtaining manner corresponding to the data request information, obtaining response information corresponding to the request information in an interface document development platform based on the interface request path, the request manner, and the data obtaining manner, and feeding back the response information to the development module comprises:
determining a data acquisition mode corresponding to the data request information according to the functional characteristics of the request information;
if the data acquisition mode is a mode selected from preset historical interface document data, screening the historical interface document data in an interface document development platform based on the interface request path and the request mode to obtain initial interface document data;
determining whether similar interface document data corresponding to the target request parameter in the request information exists in the initial interface document data;
and if the similar interface document data exists, feeding the similar interface document data serving as the response information back to the development module.
6. The data processing method according to claim 5, wherein the step of determining whether similar interface document data corresponding to the target request parameter in the request information exists in the initial interface document data comprises:
acquiring a target request parameter in the request information;
acquiring historical request parameters in each piece of historical request information, and constructing a request parameter expression matrix based on each historical request parameter and the target request parameter;
determining the similarity between each historical request parameter and the target request parameter based on the request parameter representation matrix to obtain a similarity representation vector;
and determining whether similar interface document data corresponding to the target request parameter in the request information exists in the initial interface document data or not based on the similarity expression vector.
7. The data processing method according to claim 6, wherein the step of determining whether similar interface document data corresponding to the target request parameter in the request information exists in the initial interface document data based on the similarity representation vector includes:
selecting a target expression vector with highest similarity from the similarity expression vectors;
determining whether the similarity value of the target expression vector is greater than or equal to a preset similarity value;
and if the similarity value of the target expression vector is greater than or equal to a preset similarity value, determining that similar interface document data corresponding to the target request parameter in the request information exists in the initial interface document data.
8. A data processing apparatus applied to an interface document development platform, the data processing apparatus comprising:
the receiving module is used for receiving the request information sent by the development module and verifying the request header information in the request information;
a first obtaining module, configured to obtain a request mode and an interface request path in the request information if the request header information passes verification;
and the second acquisition module is used for determining a data acquisition mode corresponding to the data request information, acquiring response information corresponding to the request information in an interface document development platform based on the interface request path, the request mode and the data acquisition mode, and feeding back the response information to the development module, wherein the data acquisition mode comprises a mode selected from preset historical interface document data or a mode of inquiring and feeding back from a platform database.
9. A data processing apparatus, characterized in that the data processing apparatus comprises: a memory, a processor and a program stored on the memory for implementing the data processing method,
the memory is used for storing a program for realizing the data processing method;
the processor is configured to execute a program implementing the data processing method to implement the steps of the data processing method according to any one of claims 1 to 7.
10. A medium having stored thereon a program for implementing a data processing method, the program being executed by a processor to implement the steps of the data processing method according to any one of claims 1 to 7.
CN202010919730.7A 2020-09-03 2020-09-03 Data processing method, apparatus and medium Pending CN112068813A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010919730.7A CN112068813A (en) 2020-09-03 2020-09-03 Data processing method, apparatus and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010919730.7A CN112068813A (en) 2020-09-03 2020-09-03 Data processing method, apparatus and medium

Publications (1)

Publication Number Publication Date
CN112068813A true CN112068813A (en) 2020-12-11

Family

ID=73665567

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010919730.7A Pending CN112068813A (en) 2020-09-03 2020-09-03 Data processing method, apparatus and medium

Country Status (1)

Country Link
CN (1) CN112068813A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112804373A (en) * 2020-12-30 2021-05-14 微医云(杭州)控股有限公司 Interface domain name determining method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112804373A (en) * 2020-12-30 2021-05-14 微医云(杭州)控股有限公司 Interface domain name determining method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110889270B (en) Form page document generation method, form page rendering method and device
CN107807841B (en) Server simulation method, device, equipment and readable storage medium
CN110647471B (en) Interface test case generation method, electronic device and storage medium
CN109726108B (en) Front-end code testing method, device, system and medium based on analog data
CN110263001B (en) File management method, device, system, equipment and computer readable storage medium
CN110276074B (en) Distributed training method, device, equipment and storage medium for natural language processing
CN111475788B (en) Account registration method, device, terminal and storage medium for cross-border e-commerce platform
CN111200523B (en) Method, device, equipment and storage medium for configuring middle platform system
CN110852719A (en) Electronic contract signing method and device, electronic equipment and storage medium
CN111290779A (en) Gray scale distribution method, device, storage medium and electronic equipment
CN111428884A (en) Federal modeling method, device and readable storage medium based on forward law
CN112597020A (en) Interface testing method and device, computer equipment and storage medium
CN112559222A (en) Message display method and device, computer equipment and storage medium
CN112579891A (en) Cloud resource recommendation method and device, electronic terminal and storage medium
CN110737548B (en) Data request method and server
CN115391219A (en) Test case generation method and device, electronic equipment and storage medium
CN112068813A (en) Data processing method, apparatus and medium
CN113923144B (en) Service testing system, method, electronic equipment and storage medium
CN108717357B (en) Page display code conversion method, device, equipment and computer storage medium
CN110717158A (en) Information verification method, device, equipment and computer readable storage medium
CN111274249A (en) User image data storage optimization method, device and readable storage medium
CN110717315B (en) System data batch modification method and device, storage medium and electronic equipment
CN111767543A (en) Method, device and equipment for determining replay attack vulnerability and readable storage medium
CN113268232A (en) Page skin generation method and device and computer readable storage medium
CN112785418B (en) Credit risk modeling method, apparatus, device and computer readable storage medium

Legal Events

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