CN112527637A - Data management method, device, server and storage medium - Google Patents

Data management method, device, server and storage medium Download PDF

Info

Publication number
CN112527637A
CN112527637A CN202011398941.7A CN202011398941A CN112527637A CN 112527637 A CN112527637 A CN 112527637A CN 202011398941 A CN202011398941 A CN 202011398941A CN 112527637 A CN112527637 A CN 112527637A
Authority
CN
China
Prior art keywords
data
target
service
mock
identification code
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
CN202011398941.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.)
Chengdu New Hope Finance Information Co Ltd
Original Assignee
Chengdu New Hope Finance Information Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu New Hope Finance Information Co Ltd filed Critical Chengdu New Hope Finance Information Co Ltd
Priority to CN202011398941.7A priority Critical patent/CN112527637A/en
Publication of CN112527637A publication Critical patent/CN112527637A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the invention provides a data management method, a data management device, a server and a storage medium, and relates to the technical field of Mock data. The method comprises the steps of obtaining a target parameter and a target data label by analyzing a service request sent by a service initiating terminal, generating a target data identification code according to the target parameter, searching whether target Mock data is included in a pre-established database or not according to the target data label or the target data identification code, and feeding back the target Mock data to the service initiating terminal if the pre-established database includes the target Mock data. In the testing process, the server can be directly utilized to provide Mock data for the service initiator according to the service request of the service initiator without calling an actual port or depending on actual service, so that the problems of development progress blocking and frequent failure of link automation cases caused by unstable offline testing environment are solved.

Description

Data management method, device, server and storage medium
Technical Field
The invention relates to the technical field of Mock data, in particular to a data management method, a data management device, a server and a storage medium.
Background
As internet application scenarios are gradually diversified, the business scenarios of the internet become more complex, often a service request may involve up to a dozen or so system calls, and call types (strong dependence, weak dependence, and middleware call) may need to be distinguished in the call process.
However, for a development environment or an offline test environment, link calls are often blocked due to environmental stability problems, and a human meat troubleshooting environment or service is required. Especially for some link automation frameworks, any non-service problem occurring in the process of automatically calling the link can cause the failure of the link automation use case, and the regression progress and efficiency are influenced. In addition, in the development process of a distributed system, if strong dependence occurs upstream and downstream, an interface and Mock data need to be defined together, most scenes are that a programmer familiar with codes manually maintains documents by a code modifying method or Mock management is completed through an API management tool, versioning and multi-dimensional support capability are not needed, and maintenance is difficult.
Disclosure of Invention
In view of the above, the present invention provides a data management method, apparatus, server and storage medium to solve the above problems.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment of the present application provides a data management method, which is applied to a server, and the data management method includes:
analyzing a service request sent by a service initiating terminal to obtain a target parameter and a target data label;
generating a target data identification code according to the target parameter;
searching whether a pre-established database comprises target Mock data or not according to the target data label or the target data identification code, wherein the data label of the target Mock data is matched with the target data label, or the universal unique identification code of the target Mock data is matched with the target data identification code;
and if the pre-established database comprises the target Mock data, feeding the target Mock data back to the service initiating end.
In an optional embodiment, the method further comprises:
if the pre-established database does not comprise target Mock data, determining a service receiving end according to the target parameters, and forwarding the service request to the service receiving end so that the service receiving end responds to the service request and feeds back response data;
and forwarding the response data to the service initiating terminal.
In an optional implementation manner, the step of searching whether the pre-established database includes the target Mock data according to the target data tag or the target data identification code includes:
and if the pre-established database comprises Mock data of which the data labels are matched with the target data labels, determining that the pre-established database comprises the target Mock data, and determining the Mock data of which the data labels are matched with the target data labels as the target Mock data.
In an optional implementation manner, the step of retrieving whether the pre-established database includes the target Mock data according to the target data tag or the target data identification code further includes:
and if the pre-established database comprises Mock data with a data label not matched with the target data label and a universal unique identification code matched with the target data identification code, determining that the pre-established database comprises the target Mock data, and determining that the data label is not matched with the target data label and the Mock data with the universal unique identification code matched with the target data identification code is the target Mock data.
In an optional implementation manner, before the method for receiving and parsing a service request sent by a service initiator to obtain a target parameter and a service tag, the method further includes:
and when it is monitored that the service discovery function is started by the service initiating terminal, replacing the service address of the service receiving terminal associated with the service initiating terminal with the IP address of the server.
In a second aspect, an embodiment of the present application further provides a data management apparatus, which is applied to a server, where the data management apparatus includes:
the analysis module is used for analyzing the service request sent by the service initiating terminal to obtain a target parameter and a target data label;
the identification code generating module is used for generating a target data identification code according to the target parameter;
the retrieval module is used for retrieving whether target Mock data are included in a pre-established database or not according to the target data tags or the target data identification codes, wherein the data tags of the target Mock data are matched with the target data tags, or the universal unique identification codes of the target Mock data are matched with the target data identification codes;
and the transceiver module is used for feeding back the target Mock data to the service initiating terminal if the pre-established database comprises the target Mock data.
In an optional implementation manner, the transceiver module is further configured to determine a service receiving end according to the target parameter if the pre-established database does not include the target Mock data, and forward the service request to the service receiving end, so that the service receiving end feeds back response data in response to the service request;
the transceiver module is further configured to forward the response data to the service initiating terminal.
In an optional implementation manner, the retrieval module is configured to determine that the pre-established database includes the target Mock data if the pre-established database includes the Mock data whose data tag matches the target data tag, and determine that the Mock data whose data tag matches the target data tag is the target Mock data.
In a third aspect, an embodiment of the present application further provides a server, which includes a processor and a memory, where the memory stores a computer program that can be executed by the processor, and the processor can execute the computer program to implement the steps of the data management method according to any one of the foregoing embodiments.
In a fourth aspect, the present application further provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the data management method according to any one of the foregoing embodiments.
According to the data management method, the data management device, the server and the storage medium, the target parameters and the target data labels are obtained by analyzing the service requests sent by the service initiating terminal, the target data identification codes are generated according to the target parameters, whether the target Mock data are included in the pre-established database or not is searched according to the target data labels or the target data identification codes, and if the target Mock data are included in the pre-established database, the target Mock data are fed back to the service initiating terminal. In the testing process, the server can be directly utilized to provide Mock data for the service initiator according to the service request of the service initiator without calling an actual port or depending on actual service, so that the problems of development progress blocking and frequent failure of link automation cases caused by unstable offline testing environment are solved. In addition, the server is used for simulating various service receiving ends to feed back Mock data, so that development and testing personnel do not need to perform other operations, code invasion is not involved, access workload is avoided, and the method is convenient, rapid, stable and safe.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 shows a diagram of an application environment provided by an embodiment of the present invention.
Fig. 2 shows a schematic structural diagram of a server provided in an embodiment of the present invention.
Fig. 3 is a flowchart illustrating a data management method according to an embodiment of the present invention.
Fig. 4 is a functional block diagram of a data management apparatus according to an embodiment of the present invention.
Icon: 100-a server; 110-a memory; 120-a processor; 130-a communication unit; 200-service initiating end; 300-a service receiving end; 400-a data management device; 410-a monitoring module; 420-a resolution module; 430-an identification code generation module; 440-a retrieval module; 450-transceiver module.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It is noted that relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
In a development or test environment, a service initiator often needs to initiate a service request to a service receiver in order to implement a certain function, and performs a corresponding action according to Mock data fed back by the service receiver to test a related function. However, in the actual application process, once the test environment is unstable (for example, the service receiving end fails), the test cannot be completed. Wherein, the Mock data is used for simulating real parameters in the test process.
Therefore, the embodiment of the application provides a data management method, and the availability and stability of a call link of each service are ensured by deploying the data management method in a server cluster and simulating various service receiving ends so as to provide Mock data for each service initiating end.
Please refer to fig. 1, which is a diagram illustrating an application environment according to an embodiment of the present application. The service initiator 200 and the service receiver 300 are both in communication connection with the server 100. It should be noted that the service initiator 200 and the service receiver 300 are merely relative terms, and actually, the service initiator 200 may also serve as the service receiver 300 of another service, and the service receiver 300 may also serve as the service receiver 300 of one service. Further, the server 100 is a server in a server cluster.
Fig. 2 is a block diagram of the server 100. The server 100 includes a memory 110, a processor 120, and a communication unit 130. The elements of the memory 110, the processor 120 and the communication unit 130 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines.
The memory 110 is used to store programs or data. The Memory 110 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processor 120 is used to read/write data or programs stored in the memory 110 and perform corresponding functions.
The communication unit 130 is used for establishing a communication connection between the server 100 and other communication terminals through the network, and for transceiving data through the network.
It should be understood that the configuration shown in fig. 2 is merely a schematic diagram of the configuration of the server 100, and that the server 100 may include more or less components than those shown in fig. 2, or have a different configuration than that shown in fig. 2. The components shown in fig. 2 may be implemented in hardware, software, or a combination thereof.
The embodiment of the present application provides a data management method, which is used for feeding back Mock data for a service request sent by each service initiator 200. Please refer to fig. 3, which is a flowchart illustrating a data management method according to an embodiment of the present disclosure. The data management method comprises the following steps:
s301, when it is monitored that the service discovery function is activated by the service initiator 200, replacing the service address of the service receiver 300 associated with the service initiator 200 with the IP address of the server 100.
The service receiver 300 associated with the service initiator 200 is a service on which the service initiator 200 depends. For example, if service a is dependent on service B, that is, service a can normally operate only when service B normally operates, service a may serve as the service initiator 200, and service B serves as the service receiver 300 associated with service a.
Under normal conditions, the service initiator 200 may access the service address of the service receiver 300 and call the corresponding interface, so as to obtain data. However, in the present invention, in order to simulate the feedback data of the service receiver 300 by the server 100, the service address of the service receiver 300 is replaced with the IP address of the server 100 itself. Thus, when the service receiver 300, to which the service originator 200 normally depends, initiates a service request, the service request is actually directly received by the server 100 and the subsequent operation is performed.
It should be noted that, if the address is stored in the third-party server, the server 100 may directly replace the IP address on the third-party server 100; if the address is stored locally at the service originator 200, the server 100 may directly replace the IP address locally at the service originator 200.
S302, parsing the service request sent by the service initiator 200 to obtain the target parameter and the target data tag.
It should be noted that the service request may be sent in various agreed protocols. For example, the service request may be sent in a protocol such as HTTP, TCP, etc. The target parameter may characterize the request content, request address, request port, tenant, protocol, etc. information of the service initiator 200.
In an alternative embodiment, the service initiator 200 may send a service request in an HTTP format, so that after receiving the service request, the server 100 extracts information of a request Header (Header), a parameter (Param), a request Body (Body), a Uniform Resource Identifier (URI), a protocol, an address, a port, a tenant, and the like in the service request to obtain a target parameter and a target data tag.
The target parameter includes information such as a requested parameter type, a service address of the service receiving terminal 300, and a port number; and the target data tag is the data tag of the requested Mock data.
S303, generating a target data identification code according to the target parameter.
That is, a Universal Unique Identifier (UUID) is generated according to the parameter type, the service address of the service receiving end 300, the port number, and other information, so as to identify the Mock data required by the service request.
In an alternative embodiment, the target data identification code may be generated by using a hash algorithm in combination with the Mock data itself.
S304, searching whether the pre-established database comprises the target Mock data or not according to the target data label or the target data identification code, and if so, executing S305; if not, S306 is performed.
And the data label of the target Mock data is matched with the target data label, or the universal unique identification code of the target Mock data is matched with the target data identification code.
Note that the server 100 is pre-established with a database. The database comprises a plurality of Mock data, and each Mock data is provided with a universal unique identification code and a data label, wherein the universal unique identification code is generated according to the content contained in the Mock data, and the generation logic is the same as the logic of the step S302.
It should be noted that, due to the parameter difference between the parameters requested in the service request and the Mock data existing in the database, the universal unique identification codes of the two are not completely the same, and thus the acquisition of the target Mock data fails. According to the method and the device, the target Mock data are preferentially retrieved according to the target data labels, and if the target Mock data are not retrieved according to the target data labels, the target Mock data are retrieved according to the target data identification codes.
Therefore, if the pre-established database comprises the Mock data of which the data labels are matched with the target data labels, the pre-established database is determined to comprise the target Mock data, and the Mock data of which the data labels are matched with the target data labels is determined as the target Mock data.
And if the pre-established database comprises Mock data with the data labels not matched with the target data labels and the universal unique identification codes matched with the target data identification codes, determining that the pre-established database comprises the target Mock data, and determining that the data labels are not matched with the target data labels and the Mock data with the universal unique identification codes matched with the target data identification codes are the target Mock data.
S305, feeding back the target Mock data to the service initiator 200.
That is, if the pre-established database includes the target Mock data, the target Mock data is fed back to the service initiator 200, so as to simulate the action of the service receiver 300.
S306, determining the service receiving end 300 according to the target parameter, and forwarding the service request to the service receiving end 300, so that the service receiving end 300 feeds back the response data in response to the service request.
If the pre-established database does not include the target Mock data, the service receiving end 300 is determined according to the target parameters, and the service request is forwarded to the service receiving end 300, so that the service receiving end 300 responds to the service request and feeds back the response data.
S307, the response data is forwarded to the service initiator 200.
It can be understood that, no matter whether the pre-established database includes the target Mock data, the server 100 can obtain the Mock data corresponding to the service request and feed the Mock data back to the service receiving end 300, thereby ensuring the stability of the testing process.
In addition, by establishing the database and storing the Mock data, the upgrading or the rollback of the Mock data is facilitated. It is understood that, for example, at the initial stage of the project, the service initiator 200 may only need to service the data a of the receiver 300, and at the same time, the programmer may write the Mock data for simulating the data a in the server 100 in advance and generate the corresponding universally unique identifier and configuration data tag, so as to provide the corresponding Mock data for the service initiator 200; at a later stage, after the related program is upgraded, the service initiator 200 may need to further serve the data B of the receiving end 300, and the server 100 may write the Mock data for simulating the data a and the data B again and generate the corresponding universal unique identification code and the configuration data tag. That is, the server 100 can simultaneously retain the Mock data of multiple versions of the same service, does not need a programmer to change the needed Mock data by using an intrusion code method, and has traceability.
Meanwhile, the server 100 is utilized to simulate various service receiving ends 300 to feed back Mock data, so that development and testing personnel do not need to perform other operations, code invasion is not involved, the workload of access is avoided, the method is convenient, rapid, stable and safe, and the testing and developing efficiency is effectively improved.
In order to execute the corresponding steps in the above embodiments and various possible manners, an implementation manner of the data management apparatus 400 is given below, and optionally, the data management apparatus 400 may adopt the device structure of the server 100 shown in fig. 2. Further, referring to fig. 4, fig. 4 is a functional block diagram of a data management apparatus 400 according to an embodiment of the present invention. It should be noted that the basic principle and the generated technical effect of the data management apparatus 400 provided in the present embodiment are the same as those of the above embodiments, and for the sake of brief description, no part of the present embodiment is mentioned, and corresponding contents in the above embodiments may be referred to. The data management apparatus 400 includes: the monitoring module 410, the parsing module 420, the identification code generating module 430, the retrieving module 440, and the transceiving module 450.
The monitoring module 410 is configured to replace the service address of the service receiving end 300 associated with the service initiator 200 with the IP address of the server 100 when it is monitored that the service initiator 200 starts the service discovery function.
It is to be appreciated that in an alternative embodiment, the monitoring module 410 may be configured to execute S301 to implement the corresponding function.
The parsing module 420 is configured to parse the service request sent by the service initiator 200 to obtain the target parameter and the target data tag.
It is understood that in an alternative embodiment, the parsing module 420 may be used to execute S302 to implement the corresponding functions.
The identification code generation module 430 is configured to generate the target data identification code according to the target parameter.
It is understood that in an alternative embodiment, the identification code generation module 430 may be configured to execute S303 to implement the corresponding function.
The retrieving module 440 is configured to retrieve whether the pre-established database includes the target Mock data according to the target data tag or the target data identification code.
It is to be appreciated that in an alternative embodiment, the retrieval module 440 may be configured to execute S304 to implement the corresponding functionality.
The transceiver module 450 is configured to feed back the target Mock data to the service initiating terminal 200 if the pre-established database includes the target Mock data.
It is understood that in an alternative embodiment, the transceiver module 450 may be configured to execute S305 to implement the corresponding functions.
The transceiver module 450 is further configured to determine the service receiver 300 according to the target parameter, and forward the service request to the service receiver 300, so that the service receiver 300 feeds back response data in response to the service request.
It is understood that in an alternative embodiment, the transceiver module 450 may be used to execute S306 to implement the corresponding functions.
The transceiver module 450 is further configured to forward the response data to the service initiator 200.
It is understood that in an alternative embodiment, the transceiver module 450 may be configured to execute S307 to implement the corresponding function.
Alternatively, the modules may be stored in the memory 110 shown in fig. 2 in the form of software or Firmware (Firmware) or be fixed in an Operating System (OS) of the server 100, and may be executed by the processor 120 in fig. 2. Meanwhile, data, codes of programs, and the like required to execute the above-described modules may be stored in the memory 110.
In summary, the present application further provides a storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of the data management method according to any one of the above embodiments.
According to the data management method, the data management device, the server and the storage medium, the target parameters and the target data labels are obtained by analyzing the service requests sent by the service initiating terminal, the target data identification codes are generated according to the target parameters, whether the target Mock data are included in the pre-established database or not is searched according to the target data labels or the target data identification codes, and if the target Mock data are included in the pre-established database, the target Mock data are fed back to the service initiating terminal. In the testing process, the server can be directly utilized to provide Mock data for the service initiator according to the service request of the service initiator without calling an actual port or depending on actual service, so that the problems of development progress blocking and frequent failure of link automation use cases caused by unstable environment are solved. Meanwhile, the server is used for simulating various service receiving ends to feed back Mock data, so that development and testing personnel do not need to perform other operations, code invasion is not involved, access workload is avoided, and the method is convenient, rapid, stable and safe.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A data management method is applied to a server, and the data management method comprises the following steps:
analyzing a service request sent by a service initiating terminal to obtain a target parameter and a target data label;
generating a target data identification code according to the target parameter;
searching whether a pre-established database comprises target Mock data or not according to the target data label or the target data identification code, wherein the data label of the target Mock data is matched with the target data label, or the universal unique identification code of the target Mock data is matched with the target data identification code;
and if the pre-established database comprises the target Mock data, feeding the target Mock data back to the service initiating end.
2. The data management method of claim 1, wherein the method further comprises:
if the pre-established database does not comprise target Mock data, determining a service receiving end according to the target parameters, and forwarding the service request to the service receiving end so that the service receiving end responds to the service request and feeds back response data;
and forwarding the response data to the service initiating terminal.
3. The data management method of claim 1, wherein the step of retrieving whether target Mock data is included in the pre-established database according to the target data tag or the target data identification code comprises:
and if the pre-established database comprises Mock data of which the data labels are matched with the target data labels, determining that the pre-established database comprises the target Mock data, and determining the Mock data of which the data labels are matched with the target data labels as the target Mock data.
4. The data management method of claim 3, wherein the step of retrieving whether target Mock data is included in the pre-established database according to the target data tag or the target data identification code further comprises:
and if the pre-established database comprises Mock data with a data label not matched with the target data label and a universal unique identification code matched with the target data identification code, determining that the pre-established database comprises the target Mock data, and determining that the data label is not matched with the target data label and the Mock data with the universal unique identification code matched with the target data identification code is the target Mock data.
5. The data management method according to any one of claims 1 to 4, wherein before the method of receiving and parsing the service request sent by the service initiator to obtain the target parameter and the service tag, the method further comprises:
and when it is monitored that the service discovery function is started by the service initiating terminal, replacing the service address of the service receiving terminal associated with the service initiating terminal with the IP address of the server.
6. A data management apparatus applied to a server, the data management apparatus comprising:
the analysis module is used for analyzing the service request sent by the service initiating terminal to obtain a target parameter and a target data label;
the identification code generating module is used for generating a target data identification code according to the target parameter;
the retrieval module is used for retrieving whether target Mock data are included in a pre-established database or not according to the target data tags or the target data identification codes, wherein the data tags of the target Mock data are matched with the target data tags, or the universal unique identification codes of the target Mock data are matched with the target data identification codes;
and the transceiver module is used for feeding back the target Mock data to the service initiating terminal if the pre-established database comprises the target Mock data.
7. The data management device according to claim 6, wherein the transceiver module is further configured to determine a service receiving end according to the target parameter if the pre-established database does not include target Mock data, and forward the service request to the service receiving end, so that the service receiving end feeds back response data in response to the service request;
the transceiver module is further configured to forward the response data to the service initiating terminal.
8. The data management device according to claim 6, wherein the retrieval module is configured to determine that the pre-established database includes the target Mock data if the pre-established database includes Mock data whose data tag matches the target data tag, and determine that the Mock data whose data tag matches the target data tag is the target Mock data.
9. A server, comprising a processor and a memory, the memory storing a computer program executable by the processor, the processor being operable to execute the computer program to perform the steps of the data management method of any of claims 1 to 5.
10. A storage medium on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the steps of the data management method according to one of claims 1 to 5.
CN202011398941.7A 2020-12-02 2020-12-02 Data management method, device, server and storage medium Pending CN112527637A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011398941.7A CN112527637A (en) 2020-12-02 2020-12-02 Data management method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011398941.7A CN112527637A (en) 2020-12-02 2020-12-02 Data management method, device, server and storage medium

Publications (1)

Publication Number Publication Date
CN112527637A true CN112527637A (en) 2021-03-19

Family

ID=74998100

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011398941.7A Pending CN112527637A (en) 2020-12-02 2020-12-02 Data management method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN112527637A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105893227A (en) * 2015-12-29 2016-08-24 乐视网信息技术(北京)股份有限公司 Data processing method and device
CN106776313A (en) * 2016-12-13 2017-05-31 广州唯品会信息科技有限公司 A kind of method of analog service, device and centralized management platform
CN107329890A (en) * 2017-06-06 2017-11-07 北京金山安全软件有限公司 Test method and device based on Mock and server
CN108268570A (en) * 2017-01-04 2018-07-10 武汉斗鱼网络科技有限公司 A kind of method and device of development interface
CN109783377A (en) * 2019-01-02 2019-05-21 深圳壹账通智能科技有限公司 Test data acquisition methods, tool, computer equipment and storage medium
CN110083533A (en) * 2019-04-16 2019-08-02 贝壳技术有限公司 Data processing method and device based on Mock service
CN110716919A (en) * 2019-09-23 2020-01-21 贝壳技术有限公司 Mock testing method, Mock testing device and storage medium
CN111858083A (en) * 2019-12-30 2020-10-30 北京嘀嘀无限科技发展有限公司 Remote service calling method and device, electronic equipment and storage medium
CN111953775A (en) * 2020-08-12 2020-11-17 吉林亿联银行股份有限公司 Data transmission method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105893227A (en) * 2015-12-29 2016-08-24 乐视网信息技术(北京)股份有限公司 Data processing method and device
CN106776313A (en) * 2016-12-13 2017-05-31 广州唯品会信息科技有限公司 A kind of method of analog service, device and centralized management platform
CN108268570A (en) * 2017-01-04 2018-07-10 武汉斗鱼网络科技有限公司 A kind of method and device of development interface
CN107329890A (en) * 2017-06-06 2017-11-07 北京金山安全软件有限公司 Test method and device based on Mock and server
CN109783377A (en) * 2019-01-02 2019-05-21 深圳壹账通智能科技有限公司 Test data acquisition methods, tool, computer equipment and storage medium
CN110083533A (en) * 2019-04-16 2019-08-02 贝壳技术有限公司 Data processing method and device based on Mock service
CN110716919A (en) * 2019-09-23 2020-01-21 贝壳技术有限公司 Mock testing method, Mock testing device and storage medium
CN111858083A (en) * 2019-12-30 2020-10-30 北京嘀嘀无限科技发展有限公司 Remote service calling method and device, electronic equipment and storage medium
CN111953775A (en) * 2020-08-12 2020-11-17 吉林亿联银行股份有限公司 Data transmission method and device

Similar Documents

Publication Publication Date Title
CN108108297B (en) Method and device for automatic testing
US20060117091A1 (en) Data logging to a database
CN112486629B (en) Micro-service state detection method, micro-service state detection device, electronic equipment and storage medium
CN107241229B (en) Service monitoring method and device based on interface testing tool
CN111416821A (en) Internet of things equipment information acquisition method, system and device
CN108959385B (en) Database deployment method, device, computer equipment and storage medium
US20230376408A1 (en) Application programming interface test method and apparatus
CN110704872B (en) Data query method and device, electronic equipment and computer readable storage medium
CN111651405A (en) Configuration file management method, device, equipment and storage medium
CN112988485A (en) Simulation test method and device for power Internet of things equipment
CN112261114A (en) Data backup system and method
CN110851303B (en) Data backup method, system and equipment
CN114185734A (en) Cluster monitoring method and device and electronic equipment
CN112905197A (en) Information processing method, device and system, electronic equipment and storage medium
CN112650674A (en) Method for remotely acquiring and debugging webpage log, computer equipment and storage medium
CN112882763A (en) Access control method, device, equipment and readable storage medium
US20210382764A1 (en) Comparisons of application programming interface interactions to determine compatibilities
CN112527637A (en) Data management method, device, server and storage medium
US12020039B2 (en) Compute instance warmup operations
CN115220992A (en) Interface change monitoring method and device, computer equipment and storage medium
CN114816914A (en) Data processing method, equipment and medium based on Kubernetes
CN112036828B (en) Bare metal management method, device, equipment and medium
CN114328152A (en) Log recording method, device, equipment and medium
CN113656378A (en) Server management method, device and medium
CN110362464B (en) Software analysis method and equipment

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