[go: up one dir, main page]

CN113760742B - Analog data service implementation method, device, storage medium, and program product - Google Patents

Analog data service implementation method, device, storage medium, and program product Download PDF

Info

Publication number
CN113760742B
CN113760742B CN202110325055.XA CN202110325055A CN113760742B CN 113760742 B CN113760742 B CN 113760742B CN 202110325055 A CN202110325055 A CN 202110325055A CN 113760742 B CN113760742 B CN 113760742B
Authority
CN
China
Prior art keywords
service
user terminal
data
copy
request
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.)
Active
Application number
CN202110325055.XA
Other languages
Chinese (zh)
Other versions
CN113760742A (en
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology 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 Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202110325055.XA priority Critical patent/CN113760742B/en
Publication of CN113760742A publication Critical patent/CN113760742A/en
Application granted granted Critical
Publication of CN113760742B publication Critical patent/CN113760742B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3698Environments for analysis, debugging or testing of software
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本公开提供的模拟数据服务实现方法、设备、存储介质、程序产品,包括:接收用户终端发送的用于复制模拟数据服务的复制请求,根据复制请求生成与用户终端对应的复制服务;接收用户终端发送的用于指示反馈模拟数据的模拟数据请求,并根据与用户终端对应的复制服务,确定模拟数据;将模拟数据发送给用户终端。本公开提供的模拟数据服务实现方法、设备、存储介质、程序产品中,能够生成与用户终端对应的模拟数据服务的复制服务,并利用与用户终端对应的复制服务处理用户终端的请求,使得多人调用同一Mock接口时,能够避免数据频繁变更问题,还能够实现个性化定制数据返回,提高多人协作开发效率。

The simulation data service implementation method, device, storage medium, and program product provided by the present disclosure include: receiving a copy request sent by a user terminal for copying a simulation data service, and generating a copy service corresponding to the user terminal according to the copy request; receiving a simulation data request sent by the user terminal for indicating feedback of simulation data, and determining the simulation data according to the copy service corresponding to the user terminal; and sending the simulation data to the user terminal. The simulation data service implementation method, device, storage medium, and program product provided by the present disclosure can generate a copy service of the simulation data service corresponding to the user terminal, and use the copy service corresponding to the user terminal to process the user terminal's request, so that when multiple people call the same Mock interface, the problem of frequent data changes can be avoided, and personalized customized data returns can be realized, thereby improving the efficiency of multi-person collaborative development.

Description

Analog data service implementation method, device, storage medium, and program product
Technical Field
The present disclosure relates to testing technology, and in particular, to a method, apparatus, storage medium, and program product for implementing an analog data service.
Background
In order to improve the software development efficiency, a mode of front-end development and rear-end development respectively and joint debugging test is often adopted in the process of developing software.
In this way, there often occurs a case where a case test is required, but an interface on which the case depends is not yet developed, and in this case, the case cannot be tested. In order to avoid the situation that other functions cannot be tested due to the fact that the dependent interfaces are not developed, analog data Mock is used for testing in the prior art.
When multi-service parallel development is performed, a Mock interface can be set, and each developer can call the Mock interface to simulate data. However, since multiple developers call the same Mock interface, the data returned by the interface to different developers are the same, and corresponding data cannot be fed back to different developers.
Disclosure of Invention
The disclosure provides a method, a device, a storage medium and a program product for realizing analog data service, which are used for solving the problem that personalized analog data cannot be fed back for different developers in the prior art.
A first aspect of the present disclosure provides an analog data service implementation method, including:
Receiving a replication request sent by a user terminal and used for replicating analog data service, and generating replication service corresponding to the user terminal according to the replication request, wherein the replication service is used for providing analog data;
Receiving a simulation data request sent by the user terminal and used for indicating feedback simulation data, and determining the simulation data according to a replication service corresponding to the user terminal;
And sending the analog data to the user terminal.
A second aspect of the present disclosure provides an analog data service implementation apparatus, including:
a receiving unit, configured to receive a replication request sent by a user terminal for replicating an analog data service;
The copying unit is used for generating copying service corresponding to the user terminal according to the copying request, wherein the copying service is used for providing analog data;
The receiving unit is further used for receiving an analog data request sent by the user terminal and used for indicating feedback analog data;
A determining unit, configured to determine analog data according to a replication service corresponding to the user terminal;
and the sending unit is used for sending the analog data to the user terminal.
A third aspect of the present disclosure is to provide an analog data service implementation apparatus, including:
a memory;
Processor, and
A computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the analog data service implementation method according to the first aspect.
A fourth aspect of the present disclosure is to provide a computer readable storage medium having stored thereon a computer program to be executed by a processor to implement the analog data service implementation method according to the first aspect.
A fifth aspect of the present disclosure provides a computer program product comprising a computer program which, when executed by a processor, implements the analogue data service implementing method as described in the first aspect.
The method, the device, the storage medium and the program product for realizing the simulation data service comprise the steps of receiving a replication request sent by a user terminal and used for replicating the simulation data service, generating replication service corresponding to the user terminal according to the replication request, wherein the replication service is used for providing simulation data, receiving the simulation data request sent by the user terminal and used for indicating feedback simulation data, determining the simulation data according to the replication service corresponding to the user terminal, and sending the simulation data to the user terminal. According to the simulation data service implementation method, device, storage medium and program product, the copy service of the simulation data service corresponding to the user terminal can be generated, the request of the user terminal is processed by the copy service corresponding to the user terminal, so that the problem of frequent data change can be avoided when multiple persons call the same Mock interface, personalized custom data return can be realized, and the collaborative development efficiency of multiple persons is improved.
Drawings
FIG. 1 is an application scenario diagram illustrating an exemplary embodiment;
FIG. 2 is a flow chart of an analog data service implementation method according to an exemplary embodiment of the present application;
FIG. 3 is a schematic diagram illustrating interaction between a user terminal and an electronic device according to an exemplary embodiment of the present application;
FIG. 4 is a schematic diagram of acquiring analog data according to an exemplary embodiment of the present application;
FIG. 5 is a flow chart of an analog data service implementation method according to another exemplary embodiment of the present application;
FIG. 6 is a schematic diagram of a replication service shown in an exemplary embodiment of the application;
FIG. 7 is a block diagram of an analog data service implementation apparatus according to an exemplary embodiment of the present application;
fig. 8 is a block diagram of an analog data service implementation apparatus according to another exemplary embodiment of the present application;
fig. 9 is a block diagram of an analog data service implementation apparatus according to an exemplary embodiment of the present application.
Detailed Description
In the development and application process, in order to improve the development efficiency, the user terminal can call the Mcok interface to obtain the simulation data by setting the simulation data Mcok interface, so that the simulation data is used for testing the developed content.
FIG. 1 is an application scenario diagram illustrating an exemplary embodiment.
As shown in fig. 1, when multiple services are developed in parallel, multiple user terminals 11 call the same Mock interface 12, so that the data returned by the Mock interface 12 to different user terminals 11 are the same, and customized data cannot be provided to the user.
In addition, a plurality of user terminals can call the Mock interface, and can modify interface parameters and types, so that Mock data confusion is easy to cause.
Fig. 2 is a flow chart of an analog data service implementation method according to an exemplary embodiment of the present application.
As shown in fig. 2, the method for implementing analog data service provided by the present application includes:
Step 201, receiving a copy request sent by a user terminal for copying the analog data service, and generating a copy service corresponding to the user terminal according to the copy request.
The method provided by the application can be executed by an electronic device with computing capability, such as a computer. The electronic device may be one device or a plurality of devices. The electronic devices can be used as a Mock service management platform to provide simulation data for users.
In particular, an analog data service, in particular a Mock interface, may be provided in the electronic device, which analog data service may feed back analog data to the user terminal. For example, the user terminal may send a data acquisition request to the electronic device, and the electronic device may simulate corresponding data based on the simulated data service and feed back to the user terminal.
Furthermore, in the method provided by the application, the user can also operate the user terminal, so that the user terminal sends a copy request for copying the analog data service to the electronic equipment. A key for copying the analog data service may be provided in the user interface of the user terminal, and the user may click on the key, so that the user terminal sends a corresponding request to the electronic device.
In practical application, the electronic device receives a copy request for copying the analog data service, and may generate a copy service corresponding to the user terminal according to the copy request. The replication service is capable of providing analog data.
The electronic equipment can copy the set analog data service to obtain the copy service corresponding to the user terminal. The electronic device may also perform instantiation based on the code content of the analog data service to obtain a copy service corresponding to the user terminal.
Specifically, the electronic device may analyze the replication request to obtain a user terminal identifier for sending the request, and may further associate the generated replication service with the user terminal identifier, so as to be able to distinguish the replication service corresponding to different user terminals.
Fig. 3 is a schematic diagram illustrating interaction between a user terminal and an electronic device according to an exemplary embodiment of the present application.
As shown in fig. 3, any one of the user terminals 31 may transmit a copy request for copying an analog data service to the electronic device 32. Upon receipt of the copy request, the electronic device 32 may generate a copy service 33, the copy service 33 having an identification of the user terminal 31 that sent the copy request. For example, if the identifier of the user terminal 31 is the first identifier, the copy service 33 generated based on the copy request transmitted by the user terminal has the first identifier.
Step 202, receiving a simulation data request sent by a user terminal and used for indicating feedback simulation data, and determining the simulation data according to a replication service corresponding to the user terminal.
In an optional implementation manner, after the electronic device generates the copy service, a message that the copy is successful may also be sent to the user terminal, and the user terminal may display a prompt message that the copy is successful or the operation is successful in the user interface, so that the user knows that the electronic device generates the copy service.
The user can also operate the user terminal to enable the user terminal to send an analog data request for indicating feedback analog data to the electronic device. For example, if the user needs to use the data i for testing, the user terminal may be controlled to send an analog data request for feeding back the data i to the electronic device.
Specifically, after receiving the analog data request, the electronic device may analyze the analog data request to obtain information of the user terminal, so as to determine a copy service corresponding to the information of the user terminal. For example, the identifier of the user terminal may be parsed, and then the copy service corresponding to the identifier of the user terminal may be determined.
Further, the electronic device may process the received analog data request using the determined replication service. For example, if the identifier of the user terminal is the first identifier, the copy service corresponding to the first identifier may be used to process the analog data request. In this embodiment, when the user terminal invokes the Mock interface, the copy service corresponding to each user terminal may be used to process the data request sent by the user terminal, so that personalized custom data may be returned.
For example, if the analog data request is used to indicate feedback data i, the replication service may determine specific data corresponding to i according to the request.
In this embodiment, the copy services are isolated from each other, and the analog data can be determined according to the copy service corresponding to the user terminal, so that the data customized to the user terminal can be fed back to the user terminal, and the data confusion in the analog data service can be avoided.
Step 203, the analog data is sent to the user terminal.
In practical application, the electronic device may send the determined analog data to the user terminal, so that the user terminal can perform a test using the analog data.
Fig. 4 is a schematic diagram of acquiring analog data according to an exemplary embodiment of the present application.
As shown in fig. 4, each user terminal 41 may send an analog data request to the electronic device 42. The electronic device processes the received analog data requests according to the replication service 43 corresponding to these user terminals 41.
For example, an analog data request sent by the first user terminal 41 is processed by the first replication service 43, and an analog data request sent by the second user terminal 41 is processed by the second replication service 44. When the first user terminal 41 sends a request for modifying data to the electronic device, the request is also processed by the first replication service 43 corresponding to the request, so that the data acquired by other user terminals is not affected.
For example, in an analog data service, the variable i is set to 1. The first user terminal 41 sends a data modification request to the electronic device, setting i to 0, and the electronic device processes the request with a first copy service in which the variable i is set to 0. Then the first user terminal again sends an analog data request for feedback data i, where i fed back by the electronic device is 0. And the second user terminal sends an analog data request for feedback data i, the electronic device processes the request with a second replication service, which determines that the variable i has a value of 1.
In the method provided by the application, the customized analog data can be fed back to the user terminal by generating the copy service of the analog data service corresponding to the user terminal.
The method for realizing the simulated data service comprises the steps of receiving a copying request sent by a user terminal and used for copying the simulated data service, generating copying service corresponding to the user terminal according to the copying request, receiving a simulated data request sent by the user terminal and used for indicating feedback simulated data, determining the simulated data according to the copying service corresponding to the user terminal, and sending the simulated data to the user terminal. In the method provided by the application, the copy service of the analog data service corresponding to the user terminal can be generated, and the request of the user terminal is processed by utilizing the copy service corresponding to the user terminal, so that the problem of frequent data change can be avoided when a plurality of persons call the same Mock interface, personalized custom data return can be realized, and the collaborative development efficiency of the plurality of persons is improved.
Fig. 5 is a flow chart of an analog data service implementation method according to another exemplary embodiment of the present application.
As shown in fig. 5, the method for implementing an analog data service provided by the present application includes:
Step 501, a replication request sent by a user terminal for replicating an analog data service is received.
Step 501 is similar to the step 301 of receiving the copy request sent by the user terminal for copying the analog data service, and will not be described again.
Step 502, determining whether the user terminal has authority to operate the analog data service according to the copy request.
Specifically, the electronic device may determine the user terminal identifier or the user identifier according to the replication request, and determine whether the user terminal that sends the replication request has authority to operate the analog data service by using the identifiers.
Further, a user list or a terminal list with authority for operating the analog data service may be preset, and a user identifier or a terminal identifier capable of operating the analog data service is recorded in the list. The electronic device can analyze the user identifier or the terminal identifier included in the received copy request according to the received copy request, and further can determine whether the user terminal sending the copy request has the authority to operate the analog data service according to a preset user list or terminal list.
If the user terminal has the right to operate the analog data service, step 503 may be performed. Otherwise, ending the flow, or sending a message without copy permission to the user terminal by the electronic equipment.
Step 503, determining a terminal identifier according to the copy request, and generating a copy service corresponding to the user terminal according to the terminal identifier.
Specifically, in the method provided by the application, the electronic equipment can analyze the received copy request and identify the terminal identification of the user terminal sending the copy request.
Further, the terminal identifier may be, for example, a user account identifier, or may be a network identifier of the user terminal. If it is determined in step 502 whether the terminal identifier has authority, the step may directly obtain the terminal identifier determined previously, so as to avoid repetitive processing.
In actual application, the electronic device may generate a copy service corresponding to the user terminal according to the terminal identifier. The replication service is generated for an analog data based service.
The generated copy service is associated with a terminal identifier corresponding to the user terminal. In such an embodiment, for different user terminals, the electronic device may generate a copy service for it, which copy service is capable of providing analog data to the user terminal corresponding thereto.
In particular, the replication service generated by the electronic device may include data and instances.
When generating the copy service corresponding to the user terminal according to the terminal identification, service data of the analog data service can be obtained, and the service data with the terminal identification can be stored in a database.
Further, the analog data service may have service data therein, and the service data may be tree-structured data, for example. For example, multiple business levels may be included in a simulated data service, and then the data for each business level may be considered the service data for the simulated data service.
The electronic device may obtain service data of the analog data service, and store a backup of the service data in the database, where the backup of the service data has a user terminal identifier. For example, when the user terminal a and the user terminal B both send a copy request to the electronic device, the electronic device may store two service data in the database, where one service data has the identifier of the user terminal a and the other service data has the identifier of the user terminal B.
In practice, multiple interfaces may be included in the analog data service, such as multiple business levels in the analog data service, and multiple interfaces need to be maintained in each business. The electronic device may instantiate all interfaces in the analog data service, resulting in instances of these interfaces. Wherein, the examples corresponding to the interfaces have terminal identifications.
For example, when the user terminal a and the user terminal B both send a copy request to the electronic device, the electronic device may instantiate the interface in the analog data service for the first time to obtain a plurality of instances, where the instances have the identity of the user terminal a. The electronic device may further perform a second instantiation of the interface in the analog data service to obtain a plurality of instances, where the second instantiation obtains an instance with the identifier of the user terminal B.
By this embodiment, it is possible to generate a copy service corresponding to the user terminal, the copy service having therein service data and an instance corresponding to the user terminal identification.
Fig. 6 is a schematic diagram of a replication service according to an exemplary embodiment of the present application.
As shown in fig. 6, in the solution provided by the present application, the electronic device 61 may generate the copy service 63 corresponding to the user terminal 62 according to the copy request sent by the user terminal 62. The electronic device 61 may also generate a copy service 65 corresponding to the user terminal 64 according to the copy request transmitted by the user terminal 64.
Among other things, the replication service 63 may include service data 631 and instances 632, where the service data 631 may be stored in a database, where the service data 631 and instances 632 have an identification of the user terminal 62. The replication service 65 may include therein service data 651 and instances 652, the service data 651 may be stored in a database, the service data 651 and instances 652 having an identification of the user terminals 64.
Wherein the number of instances in the replication service may be multiple.
Step 504, receiving an analog data request sent by the user terminal and used for indicating feedback analog data.
Step 504 is similar to the implementation manner and principle of receiving the analog data request sent by the user terminal in step 202 and used for indicating feedback analog data, and will not be described again.
Step 505, determining a terminal identifier according to the analog data request, and determining a copy service corresponding to the user terminal according to the terminal identifier.
After receiving the analog data request for indicating the feedback analog data, the electronic device can analyze the analog data request to obtain the terminal identification included in the analog data request, and further can determine the copy service corresponding to the user terminal according to the terminal identification.
For example, if the analog data request is sent by the user terminal a, the electronic device may determine, according to the identifier of the user terminal a, the copy service corresponding to the user terminal a. The determined copy service includes service data corresponding to the user terminal a and also includes an instance corresponding to the user terminal a.
And step 506, processing the simulation data request based on the replication service corresponding to the user terminal to obtain the simulation data.
The electronic device can process the simulation data request based on the determined replication service corresponding to the user terminal, so that simulation data is obtained.
For example, if the analog data request is a request for indicating the feedback variable i, the electronic device may obtain the value of the variable i according to the replication service corresponding to the user terminal, so as to obtain the analog data.
Specifically, the replication service includes service data and an instance, so that the simulation data can be obtained by processing the simulation data request based on the instance of the replication service corresponding to the user terminal and the service data.
Further, the electronic device may invoke service data in the database corresponding to the determined user terminal identifier according to the content in the simulated data request, and execute an instance in the replication service corresponding to the user terminal. For example, if the value of the variable i is the sum of the value of the variable a and the value of the variable b, and the user terminal identifier is a, the electronic device may read the value of the variable a and the value of the variable b with the terminal identifier a from the database, and execute an instance by using the read variable values, thereby obtaining the value of the variable i.
In this embodiment, the copy services between the user terminals are independent, and when the user terminals operate the data, only the service data in the copy service corresponding to the user terminal is modified, but the copy services of other user terminals are not affected, so that personalized data can be provided for each user terminal, and the condition that the same service data is modified by a plurality of user terminals to cause data confusion can be avoided.
Step 507, the analog data is sent to the user terminal.
Step 507 is similar to the implementation and principle of step 203, and will not be described again.
And 508, when the simulated data service is changed, synchronously changing the content to the copy service corresponding to the simulated data service according to the identifier of the simulated data service, wherein the copy service has the identifier of the simulated data service.
In practical application, the electronic device may also obtain the identifier of the analog data service when generating the copy service, and associate the generated copy service with the identifier of the analog data service. For example, there is a first analog data service and a second analog data service, and when generating a replica of the first analog data service, the replica may have an identification of the first analog data service. When generating a replica service of the second analog data service, the replica service may have an identification of the second analog data service.
When the simulated data service changes, the electronic device can determine each copy service generated according to the simulated data service according to the identifier of the simulated data service, and synchronously change the content to the copy services.
For example, there are a first replication service, a second replication service, and a third replication service, where the first replication service and the second replication service have an identifier of a first analog data service, and the third replication service has an identifier of a second analog data service. When the electronic device monitors that the first analog data service changes, the change content can be determined and synchronized to the first copy service and the second copy service.
In particular, the altered content of an analog data service may be synchronized into a replica service of the analog data service by a websocket (a protocol for full duplex communication over a single TCP connection) message synchronization mechanism.
Fig. 7 is a block diagram of an analog data service implementation apparatus according to an exemplary embodiment of the present application.
As shown in fig. 7, an analog data service implementation apparatus 700 provided by the present application includes:
a receiving unit 710, configured to receive a replication request sent by a user terminal for replicating an analog data service;
A copying unit 720, configured to generate a copying service corresponding to the user terminal according to the copying request, where the copying service is used to provide analog data;
the receiving unit 710 is further configured to receive an analog data request sent by the user terminal and used for indicating feedback analog data
A determining unit 730, configured to determine analog data according to a replication service corresponding to the user terminal;
And a sending unit 740, configured to send the analog data to the user terminal.
The analog data service implementation device comprises a receiving unit, a copying unit, an analog data request determining unit and a transmitting unit, wherein the receiving unit is used for receiving a copying request which is sent by a user terminal and used for copying analog data service, the copying unit is used for generating copying service corresponding to the user terminal according to the copying request, the receiving unit is also used for receiving an analog data request determining unit which is sent by the user terminal and used for indicating feedback analog data and used for determining the analog data according to the copying service corresponding to the user terminal, and the transmitting unit is used for sending the analog data to the user terminal. The simulated data service realizing device provided by the application can generate the copy service of the simulated data service corresponding to the user terminal, and process the request of the user terminal by utilizing the copy service corresponding to the user terminal, so that when a plurality of persons call the same Mock interface, the problem of frequent data change can be avoided, personalized customized data return can be realized, and the collaborative development efficiency of the plurality of persons is improved.
The specific principle and implementation manner of the analog data service implementation device provided in this embodiment are similar to those of the embodiment shown in fig. 2, and will not be described herein again.
Fig. 8 is a block diagram of an analog data service implementation apparatus according to another exemplary embodiment of the present application.
As shown in fig. 8, in the analog data service implementation apparatus 800 provided by the present application, optionally, the replication service is associated with a terminal identifier corresponding to the user terminal.
Optionally, the replication unit 720 includes:
An identity determining module 721 for determining the terminal identity according to the replication request;
and the service generating module 722 is configured to generate a copy service corresponding to the user terminal according to the terminal identifier.
Optionally, the replication service includes data and instances;
The service generation module 722 is specifically configured to:
Acquiring service data of the analog data service, and storing the service data with the terminal identifier in a database;
and instantiating all interfaces in the analog data service, wherein the examples corresponding to the interfaces have the terminal identification.
Optionally, the determining unit 730 includes:
A service determining module 731, configured to determine the terminal identifier according to the analog data request, and determine a copy service corresponding to the user terminal according to the terminal identifier;
and a processing module 732, configured to process the analog data request based on a replication service corresponding to the user terminal, and obtain the analog data.
Optionally, the processing module 732 is specifically configured to:
and processing the simulation data request based on the instance of the copy service corresponding to the user terminal and service data to obtain the simulation data.
Optionally, the apparatus further comprises an auditing unit 750 for:
Determining whether the user terminal has authority to operate the analog data service according to the copy request, and if so, the copy unit 720 performs the step of generating a copy service corresponding to the user terminal according to the copy request.
Optionally, the replication service has an identification of the analog data service;
The apparatus further includes a synchronization unit 760 for synchronizing, when the analog data service is changed, changing contents to a copy service corresponding to the analog data service according to an identification of the analog data service.
The specific principle and implementation manner of the analog data service implementation device provided in this embodiment are similar to those of the embodiment shown in fig. 5, and will not be described herein again.
Fig. 9 is a block diagram of an analog data service implementation apparatus according to an exemplary embodiment of the present application.
As shown in fig. 9, the analog data service implementation apparatus provided in this embodiment includes:
a memory 91;
A processor 92, and
A computer program;
wherein the computer program is stored in the memory 91 and is configured to be executed by the processor 92 to implement any of the analog data service implementation methods described above.
The present embodiment also provides a computer-readable storage medium, having stored thereon a computer program,
The computer program is executed by a processor to implement any of the analog data service implementation methods described above.
A computer program product comprising a computer program which, when executed by a processor, implements any of the analogue data services methods as described above.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of implementing the various method embodiments described above may be implemented by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs the steps comprising the method embodiments described above, and the storage medium described above includes various media capable of storing program code, such as ROM, RAM, magnetic or optical disk.
It should be noted that the above embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the above embodiments, it should be understood by those skilled in the art that the technical solution described in the above embodiments may be modified or some or all of the technical features may be equivalently replaced, and these modifications or substitutions do not make the essence of the corresponding technical solution deviate from the scope of the technical solution of the embodiments of the present invention.

Claims (11)

1.一种模拟数据服务实现方法,其特征在于,包括:1. A method for implementing a simulation data service, comprising: 接收用户终端发送的用于复制模拟数据服务的复制请求,根据所述复制请求复制所述模拟数据服务,生成与所述用户终端对应的复制服务;所述复制服务用于提供模拟数据;所述复制服务包括服务数据与实例;Receiving a copy request for copying a simulation data service sent by a user terminal, copying the simulation data service according to the copy request, and generating a copy service corresponding to the user terminal; the copy service is used to provide simulation data; the copy service includes service data and an instance; 接收所述用户终端发送的用于指示反馈模拟数据的模拟数据请求,根据模拟数据请求中的内容,调用数据库中与确定的用户终端标识对应服务数据,并执行与用户终端对应的复制服务中的实例以得到模拟数据;receiving a simulation data request sent by the user terminal for indicating feedback of simulation data, calling service data corresponding to the determined user terminal identifier in a database according to the content in the simulation data request, and executing an instance in a copy service corresponding to the user terminal to obtain simulation data; 将所述模拟数据发送给所述用户终端。The simulation data is sent to the user terminal. 2.根据权利要求1所述的方法,其特征在于,所述复制服务与所述用户终端对应的终端标识关联。2. The method according to claim 1 is characterized in that the copy service is associated with a terminal identifier corresponding to the user terminal. 3.根据权利要求2所述的方法,其特征在于,所述根据所述复制请求复制所述模拟数据服务,生成与所述用户终端对应的复制服务,包括:3. The method according to claim 2, wherein the step of replicating the simulated data service according to the replication request to generate a replica service corresponding to the user terminal comprises: 根据所述复制请求确定所述终端标识;Determine the terminal identifier according to the copy request; 根据所述终端标识复制所述模拟数据服务,生成与所述用户终端对应的复制服务。The simulated data service is copied according to the terminal identifier to generate a copy service corresponding to the user terminal. 4.根据权利要求3所述的方法,其特征在于,所述复制服务包括数据和实例;4. The method according to claim 3, wherein the replication service includes data and instances; 根据所述终端标识生成与所述用户终端对应的复制服务,包括:Generating a copy service corresponding to the user terminal according to the terminal identifier includes: 获取所述模拟数据服务的服务数据,在数据库中存储带有所述终端标识的服务数据;Acquire service data of the simulated data service, and store the service data with the terminal identifier in a database; 实例化所述模拟数据服务中的全部接口,其中,与各个所述接口对应的实例具有所述终端标识。All interfaces in the simulated data service are instantiated, wherein the instances corresponding to the respective interfaces have the terminal identifier. 5.根据权利要求2所述的方法,其特征在于,所述根据根据所述复制请求复制所述模拟数据服务,生成与所述用户终端对应的复制服务,确定模拟数据,包括:5. The method according to claim 2, wherein the step of duplicating the simulated data service according to the duplication request, generating a duplication service corresponding to the user terminal, and determining the simulated data comprises: 根据所述模拟数据请求确定所述终端标识,并根据所述终端标识复制所述模拟数据服务,确定与所述用户终端对应的复制服务;Determine the terminal identifier according to the simulated data request, and copy the simulated data service according to the terminal identifier to determine the copy service corresponding to the user terminal; 基于与所述用户终端对应的复制服务处理所述模拟数据请求,得到所述模拟数据。The simulation data request is processed based on the copy service corresponding to the user terminal to obtain the simulation data. 6.根据权利要求1-5任一项所述的方法,其特征在于,所述接收用户终端发送的用于复制模拟数据服务的复制请求之后,还包括:6. The method according to any one of claims 1 to 5, characterized in that after receiving the copy request for copying the analog data service sent by the user terminal, it also includes: 根据所述复制请求确定所述用户终端是否具有操作所述模拟数据服务的权限,若有,则执行所述根据所述复制请求生成与所述用户终端对应的复制服务的步骤。Determine whether the user terminal has the authority to operate the simulation data service according to the replication request, and if so, execute the step of generating the replication service corresponding to the user terminal according to the replication request. 7.根据权利要求1-5任一项所述的方法,其特征在于,所述复制服务具有所述模拟数据服务的标识;7. The method according to any one of claims 1 to 5, characterized in that the copy service has an identification of the simulation data service; 所述模拟数据服务发生变化时,根据所述模拟数据服务的标识,向与所述模拟数据服务对应的复制服务同步变更内容。When the simulation data service changes, the content of the change is synchronized to the copy service corresponding to the simulation data service according to the identifier of the simulation data service. 8.一种模拟数据服务实现装置,其特征在于,包括:8. A simulation data service implementation device, characterized in that it includes: 接收单元,用于接收用户终端发送的用于复制模拟数据服务的复制请求;A receiving unit, configured to receive a copy request for copying the analog data service sent by a user terminal; 复制单元,用于根据所述复制请求复制所述模拟数据服务,生成与所述用户终端对应的复制服务;所述复制服务用于提供模拟数据;所述复制服务包括服务数据与实例;A replication unit, configured to replicate the simulation data service according to the replication request, and generate a replication service corresponding to the user terminal; the replication service is configured to provide simulation data; the replication service includes service data and an instance; 所述接收单元还用于接收所述用户终端发送的用于指示反馈模拟数据的模拟数据请求;The receiving unit is further used to receive an analog data request sent by the user terminal for indicating feedback of analog data; 确定单元,用于根据模拟数据请求中的内容,调用数据库中与确定的用户终端标识对应服务数据,并执行与用户终端对应的复制服务中的实例以得到模拟数据;A determination unit, configured to call service data corresponding to the determined user terminal identifier in a database according to the content in the simulation data request, and execute an instance in the copy service corresponding to the user terminal to obtain simulation data; 发送单元,用于将所述模拟数据发送给所述用户终端。A sending unit is used to send the simulation data to the user terminal. 9.一种模拟数据服务实现设备,其特征在于,包括:9. A simulation data service implementation device, characterized in that it includes: 存储器;Memory; 处理器;以及Processor; and 计算机程序;Computer programs; 其中,所述计算机程序存储在所述存储器中,并配置为由所述处理器执行以实现如权利要求1-7任一种所述的方法。The computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 7. 10.一种计算机可读存储介质,其特征在于,其上存储有计算机程序,10. A computer-readable storage medium, characterized in that a computer program is stored thereon. 所述计算机程序被处理器执行以实现如权利要求1-7任一种所述的方法。The computer program is executed by a processor to implement the method according to any one of claims 1 to 7. 11.一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现根据权利要求1-7中任一项所述的方法。11. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.
CN202110325055.XA 2021-03-26 2021-03-26 Analog data service implementation method, device, storage medium, and program product Active CN113760742B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110325055.XA CN113760742B (en) 2021-03-26 2021-03-26 Analog data service implementation method, device, storage medium, and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110325055.XA CN113760742B (en) 2021-03-26 2021-03-26 Analog data service implementation method, device, storage medium, and program product

Publications (2)

Publication Number Publication Date
CN113760742A CN113760742A (en) 2021-12-07
CN113760742B true CN113760742B (en) 2025-05-23

Family

ID=78786779

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110325055.XA Active CN113760742B (en) 2021-03-26 2021-03-26 Analog data service implementation method, device, storage medium, and program product

Country Status (1)

Country Link
CN (1) CN113760742B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124908A (en) * 2019-12-19 2020-05-08 广州品唯软件有限公司 Interface testing method and device and computer readable storage medium

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297475B (en) * 2012-03-01 2017-03-01 阿里巴巴集团控股有限公司 Mock service system and the processing method of Mock service
US9075788B1 (en) * 2012-06-15 2015-07-07 Amazon Technologies, Inc. Account state simulation service for cloud computing environments
US9471350B2 (en) * 2013-09-26 2016-10-18 Intel Corporation Live migration of virtualized systems
CN103905252A (en) * 2014-04-03 2014-07-02 北京邮电大学 Disaster backup system evaluation tool based on disaster simulation
CN106375139B (en) * 2015-07-23 2021-04-06 腾讯科技(北京)有限公司 Method, device and system for copying request
CN106547681B (en) * 2015-09-18 2020-03-03 北京京东尚科信息技术有限公司 Method and device for testing data automatic loading and multiplexing simulation service
US10169203B2 (en) * 2015-10-14 2019-01-01 At&T Intellectual Property I, L.P. Test simulation for software defined networking environments
US10592402B2 (en) * 2017-11-20 2020-03-17 International Business Machines Corporation Automated integration testing with mock microservices
CN108600255B (en) * 2018-05-07 2022-02-01 平安普惠企业管理有限公司 Mock service management method, device, computer equipment and storage medium
US20210042210A1 (en) * 2019-08-06 2021-02-11 Paypal, Inc. System and Method Implementing a Mock Server
CN111870937B (en) * 2020-07-13 2021-10-22 腾讯科技(深圳)有限公司 Data processing method, simulation server and timeliness application

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124908A (en) * 2019-12-19 2020-05-08 广州品唯软件有限公司 Interface testing method and device and computer readable storage medium

Also Published As

Publication number Publication date
CN113760742A (en) 2021-12-07

Similar Documents

Publication Publication Date Title
CN110659206B (en) Simulation architecture establishment method and device based on micro-service, medium and electronic equipment
CN105988926B (en) The treating method and apparatus of multi version test data
KR100854137B1 (en) Web Server Hit Multipliers and Redirectors
CN110032454B (en) Remote calling method, system, related equipment and computer readable storage medium
CN111428132A (en) Data verification method and device, computer storage medium and electronic equipment
CN107291608B (en) Test script generation method, interface subscription/registration method and device
WO2021012410A1 (en) Image processing method and apparatus, and computer device and computer storage medium
CN109784738B (en) Approval method and approval device
WO2022151888A1 (en) Data sharing method and apparatus
US20220261527A1 (en) Information processing apparatus and non-transitory computer readable medium
CN111158654A (en) Algorithm calling method, device, server and storage medium
CN113434384A (en) Pressure testing method and device
CN114817024A (en) Use case generation method and device, device, storage medium
CN110209392A (en) Technical ability shares development approach and device
CN114371982A (en) Simulation test method, device, equipment and readable storage medium
CN113760742B (en) Analog data service implementation method, device, storage medium, and program product
US20250086011A1 (en) Automation with composable asynchronous tasks
CN111367867A (en) Log information processing method and device, electronic equipment and storage medium
CN111177627B (en) Method and device for dynamically configuring answering scene
JP3087642B2 (en) Application sharing system
CN114116244A (en) Data processing method, device and system, electronic equipment and storage medium
CN113190463A (en) Code testing method, node and system
CN113986943B (en) Data consistency verification method, device and medium based on scene data stamp
CN109828908A (en) Interface testing parameter encryption method, device, electronic equipment and storage medium
CN111581085B (en) Joint debugging test system and method

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
GR01 Patent grant
GR01 Patent grant