Simulation data service implementation method, device, storage medium, and program product
By generating a copy service corresponding to the user terminal, the problem of not being able to provide personalized simulated data in the prior art is solved, and personalized data customization and stability are realized during multi-person collaborative development, and development efficiency is improved.
Patent Information
- Application Number
- CN202110325055.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-26
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2041-03-26
AI Technical Summary
In the prior art, personalized simulation data cannot be feedback to different developers, resulting in frequent changes in data during collaborative development by multiple people, and personalized customized data return cannot be achieved.
By receiving a copy request from the user terminal, a copy service corresponding to the user terminal is generated, simulation data is provided, and personalized simulation data is determined and sent based on the request of the user terminal.
It realizes that when multiple people develop collaboratively, avoids the problem of frequent data changes, and can provide personalized and customized data return to each user terminal, improving development efficiency.
Smart Images

Figure CN113760742B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to testing technology, and in particular to a method, device, storage medium, and program product for implementing a simulated data service. Background Art
[0002] In order to improve software development efficiency, the front-end and back-end are often developed separately and then jointly debugged and tested.
[0003] In this way, it is often necessary to perform a use case test, but the interface that the use case depends on has not been developed yet, which makes the use case unable to be tested. In order to avoid the situation where other functions cannot be tested due to the undeveloped dependent interface, simulated data Mock is used for testing in the prior art.
[0004] When developing multiple businesses in parallel, you can set up a Mock interface, 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 is the same, and it is impossible to feedback the corresponding data to different developers. Summary of the invention
[0005] The present disclosure provides a simulation data service implementation method, device, storage medium, and program product to solve the problem in the prior art that personalized simulation data cannot be fed back to different developers.
[0006] The first aspect of the present disclosure is to provide a method for implementing a simulation data service, comprising:
[0007] receiving a copy request for copying a simulation data service sent by a user terminal, and generating a copy service corresponding to the user terminal according to the copy request; the copy service is used to provide simulation data;
[0008] receiving a simulation data request sent by the user terminal for indicating feedback of simulation data, and determining the simulation data according to a copy service corresponding to the user terminal;
[0009] The simulation data is sent to the user terminal.
[0010] A second aspect of the present disclosure is to provide a simulation data service implementation device, comprising:
[0011] A receiving unit, configured to receive a copy request for copying the analog data service sent by a user terminal;
[0012] A copy unit, configured to generate a copy service corresponding to the user terminal according to the copy request; the copy service is configured to provide simulation data;
[0013] The receiving unit is further configured to receive an analog data request sent by the user terminal for indicating feedback of analog data;
[0014] A determining unit, configured to determine analog data according to a replication service corresponding to the user terminal;
[0015] A sending unit, configured to send the analog data to the user terminal.
[0016] A third aspect of the present disclosure is to provide an analog data service implementation device, including:
[0017] A memory;
[0018] A processor; and
[0019] A computer program;
[0020] Wherein, the computer program is stored in the memory and is configured to be executed by the processor to implement the analog data service implementation method as described in the first aspect.
[0021] A fourth aspect of the present disclosure is to provide a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the analog data service implementation method as described in the first aspect.
[0022] A fifth aspect of the present disclosure is to provide a computer program product, including a computer program, and the computer program implements the analog data service implementation method as described in the first aspect when being executed by a processor.
[0023] The analog data service implementation method, device, storage medium, and program product provided by the present disclosure include: receiving a replication request sent by a user terminal for replicating an analog data service, and generating a replication service corresponding to the user terminal according to the replication request; the replication service is used to provide analog data; receiving an analog data request sent by the user terminal for indicating feedback of analog data, and determining analog data according to the replication service corresponding to the user terminal; sending the analog data to the user terminal. In the analog data service implementation method, device, storage medium, and program product provided by the present disclosure, a replication service of an analog data service corresponding to a user terminal can be generated, and the requests of the user terminal can be processed by using the replication service corresponding to the user terminal, so that when multiple people call the same Mock interface, the problem of frequent data changes can be avoided, and personalized customized data return can also be realized, improving the efficiency of multi-person collaborative development. Description of the Drawings
[0024] Figure 1 It is a diagram of an application scenario shown for an exemplary embodiment;
[0025] Figure 2A flowchart of a method for implementing a simulation data service is shown as an exemplary embodiment of the present application;
[0026] Figure 3 This is a schematic diagram of interaction between a user terminal and an electronic device shown in an exemplary embodiment of the present application;
[0027] Figure 4 A schematic diagram of obtaining simulation data is shown as an exemplary embodiment of the present application;
[0028] Figure 5 A flowchart of a method for implementing a simulation data service is shown as another exemplary embodiment of the present application;
[0029] Figure 6 A schematic diagram of a replication service shown as an exemplary embodiment of the present application;
[0030] Figure 7 A structural diagram of a simulation data service implementation device shown as an exemplary embodiment of the present application;
[0031] Figure 8 A structural diagram of a simulation data service implementation device shown in another exemplary embodiment of the present application;
[0032] Fig. 9 This is a structural diagram of a simulation data service implementation device shown as an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0033] When developing an application, in order to improve development efficiency, a simulation data Mcok interface is set, and the user terminal can call the Mcok interface to obtain simulation data, and then use the simulation data to test the developed content.
[0034] Figure 1 The following is an application scenario diagram showing an exemplary embodiment.
[0035] like Figure 1 As shown, when multiple services are developed in parallel, multiple user terminals 11 will call the same Mock interface 12, resulting in the Mock interface 12 returning the same data to different user terminals 11, and failing to provide customized data to users.
[0036] In addition, multiple clients can call the Mock interface and modify the interface parameters and types, which can easily cause confusion in the Mock data.
[0037] Figure 2 The flowchart of a method for implementing a simulation data service is shown as an exemplary embodiment of the present application.
[0038] like Figure 2 As shown, the simulation data service implementation method provided by this application includes:
[0039] Step 201: receiving a copy request for copying a simulation data service sent by a user terminal, and generating a copy service corresponding to the user terminal according to the copy request.
[0040] The method provided in the present application can be performed by an electronic device with computing capabilities, such as a computer. The electronic device can be one device or multiple devices. Several electronic devices can be used as a Mock service management platform to provide simulation data for users.
[0041] Specifically, the electronic device may be provided with a simulation data service, which may be a Mock interface, and the simulation data service may feed back simulation 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 simulation data service and feed back the data to the user terminal.
[0042] Furthermore, in the method provided by the present application, the user can also operate the user terminal so that the user terminal sends a copy request for copying the simulation data service to the electronic device. A button for copying the simulation data service can be provided in the user interface of the user terminal, and the user can click the button so that the user terminal sends a corresponding request to the electronic device.
[0043] In actual application, when the electronic device receives a copy request for copying the simulation data service, it can generate a copy service corresponding to the user terminal according to the copy request. The copy service can provide simulation data.
[0044] The electronic device can copy the set simulation data service to obtain the copy service corresponding to the user terminal. The electronic device can also instantiate based on the code content of the simulation data service to obtain the copy service corresponding to the user terminal.
[0045] Specifically, the electronic device may parse the copy request to obtain the user terminal identifier that sends the request, and then associate the generated copy service with the user terminal identifier, thereby being able to distinguish the copy services corresponding to different user terminals.
[0046] Figure 3 The diagram is a schematic diagram of interaction between a user terminal and an electronic device, showing an exemplary embodiment of the present application.
[0047] like Figure 3As shown, any user terminal 31 can send a copy request for copying the simulation data service to the electronic device 32. After receiving the copy request, the electronic device 32 can generate a copy service 33, and the copy service 33 has the identifier of the user terminal 31 that sends 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 sent by the user terminal has the first identifier.
[0048] Step 202: receiving a simulation data request sent by a user terminal for indicating feedback of simulation data, and determining the simulation data according to a replication service corresponding to the user terminal.
[0049] In an optional implementation, after the electronic device generates the copy service, it may also send a message of successful copying to the user terminal. The user terminal may display a prompt message of successful copying or successful operation in the user interface to inform the user that the electronic device has generated the copy service.
[0050] The user can also operate the user terminal to send a simulation data request for instructing to feedback simulation data to the electronic device. For example, if the user needs to use data i for testing, the user terminal can be controlled to send a simulation data request for feedback data i to the electronic device.
[0051] Specifically, after receiving the analog data request, the electronic device can parse the analog data request to obtain the information of the user terminal, and then determine the copy service corresponding to the information of the user terminal. For example, the user terminal identifier can be parsed to determine the copy service corresponding to the user terminal identifier.
[0052] Furthermore, the electronic device can use the determined copy service to process the received simulated data request. For example, if the identifier of the user terminal is the first identifier, the simulated data request can be processed using the copy service corresponding to the first identifier. In this implementation, when the user terminal calls the Mock interface, the copy service corresponding to each user terminal can be used to process the data request sent by the user terminal, so that personalized customized data can be returned.
[0053] For example, the simulated data request is used to indicate feedback data i, and the replication service can determine the specific data corresponding to i according to the request.
[0054] In this implementation, the copy services are isolated from each other, and simulation data can be determined according to the copy service corresponding to the user terminal, so that data customized for the user terminal can be fed back to the user terminal, and data confusion in the simulation data service can be avoided.
[0055] Step 203: Send the simulation data to the user terminal.
[0056] In actual application, the electronic device can send the determined simulation data to the user terminal, so that the user terminal can perform testing using the simulation data.
[0057] Figure 4 This is a schematic diagram of obtaining simulation data according to an exemplary embodiment of the present application.
[0058] like Figure 4 As shown, each user terminal 41 can send a simulation data request to the electronic device 42. The electronic device processes the received simulation data request according to the copy service 43 corresponding to these user terminals 41.
[0059] For example, the simulated data request sent by the first user terminal 41 is processed by the first copy service 43, and the simulated data request sent by the second user terminal 41 is processed by the second copy service 44. When the first user terminal 41 sends a request to modify data to the electronic device, it is also processed by the corresponding first copy service 43, and thus will not affect the data obtained by other user terminals.
[0060] For example, in the simulated data service, the variable i is set to 1. The first user terminal 41 sends a data modification request to the electronic device, and sets i to 0. Then the electronic device processes the request using the first copy service, and sets the variable i to 0 in the first copy service. Then, when the first user terminal sends a simulated data request for feedback data i again, the i fed back by the electronic device is 0. When the second user terminal sends a simulated data request for feedback data i, the electronic device processes the request using the second copy service, and the second copy service determines that the value of the variable i is 1.
[0061] Therefore, in the method provided in the present application, by generating a copy service of the simulation data service corresponding to the user terminal, customized simulation data can be fed back to the user terminal.
[0062] The simulation data service implementation method provided by the present application includes: receiving a copy request sent by a user terminal for copying a simulation data service, 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. In the method provided by the present application, a copy service of the simulation data service corresponding to the user terminal can be generated, and the copy service corresponding to the user terminal can be used to process the request of the user terminal, 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.
[0063] Figure 5 The present invention is a flowchart of a method for implementing a simulation data service, shown as another exemplary embodiment of the present invention.
[0064] like Figure 5 As shown, the simulation data service implementation method provided by this application includes:
[0065] Step 501: receiving a copy request for copying a simulation data service sent by a user terminal.
[0066] Among them, step 501 is similar to step 301 in which a copy request for copying the analog data service sent by the user terminal is received, and will not be repeated herein.
[0067] Step 502: Determine whether the user terminal has the authority to operate the simulated data service according to the copy request.
[0068] Specifically, the electronic device may determine the user terminal identifier or the user identifier according to the copy request, and use these identifiers to determine whether the user terminal sending the copy request has the authority to operate the simulated data service.
[0069] Furthermore, a user list or terminal list with permission to operate the simulated data service may be preset, and the list records user identifiers or terminal identifiers that can operate the simulated data service. The electronic device may parse the user identifier or terminal identifier included in the received copy request according to the received copy request, and then determine whether the user terminal that sends the copy request has permission to operate the simulated data service according to the preset user list or terminal list.
[0070] If the user terminal has the authority to operate the simulated data service, step 503 may be executed. Otherwise, the process ends, or the electronic device sends a message to the user terminal indicating that there is no copy authority.
[0071] Step 503: determine the terminal identifier according to the copy request, and generate a copy service corresponding to the user terminal according to the terminal identifier.
[0072] Specifically, in the method provided in the present application, the electronic device can parse the received copy request and identify the terminal identifier of the user terminal that sends the copy request.
[0073] Furthermore, the terminal identifier may be, for example, a user account identifier or a network identifier of the user terminal. If the authority is determined according to the terminal identifier in step 502, the terminal identifier determined previously may be directly obtained in this step to avoid repeated processing.
[0074] In actual application, the electronic device can generate a duplicate service corresponding to the user terminal according to the terminal identifier. The duplicate service is generated based on the simulation data service.
[0075] The generated copy service is associated with the terminal identifier corresponding to the user terminal. In this implementation, for different user terminals, the electronic device can generate corresponding copy services for them, and the copy service can provide simulation data to the corresponding user terminals.
[0076] Specifically, the replication service generated by the electronic device may include data and instances.
[0077] When the duplicate service corresponding to the user terminal is generated according to the terminal identification, the service data of the simulated data service can be obtained, and the service data with the terminal identification can be stored in the database.
[0078] Furthermore, the simulation data service may have service data, which may be data in a tree structure, for example. For example, the simulation data service may include multiple business levels, and the data of each business level may be considered as service data of the simulation data service.
[0079] The electronic device can obtain the service data of the simulated data service and store a backup of the service data in a database, where the backup service data has a user terminal identifier. For example, if both user terminal A and user terminal B send a copy request to the electronic device, the electronic device can store two copies of the service data in the database, where one copy of the service data has the identifier of user terminal A and the other copy of the service data has the identifier of user terminal B.
[0080] In actual application, the simulation data service may include multiple interfaces, for example, the simulation data service includes multiple business levels, and multiple interfaces need to be maintained in each business. The electronic device can instantiate all interfaces in the simulation data service to obtain instances of these interfaces. Among them, the instances corresponding to each interface have a terminal identifier.
[0081] For example, if both user terminal A and user terminal B send a copy request to the electronic device, the electronic device can instantiate the interface in the simulated data service for the first time to obtain multiple instances, and these instances have the identifier of user terminal A. The electronic device can also instantiate the interface in the simulated data service for the second time to obtain multiple instances, and the instances obtained by the second instantiation have the identifier of user terminal B.
[0082] Through this implementation, a duplicate service corresponding to the user terminal can be generated, and the duplicate service has service data and an instance corresponding to the user terminal identifier.
[0083] Figure 6 This is a schematic diagram of a replication service shown in an exemplary embodiment of the present application.
[0084] like Figure 6As shown, in the solution provided by the present application, the electronic device 61 can generate a copy service 63 corresponding to the user terminal 62 according to the copy request sent by the user terminal 62. The electronic device 61 can also generate a copy service 65 corresponding to the user terminal 64 according to the copy request sent by the user terminal 64.
[0085] The copy service 63 may include service data 631 and an instance 632. The service data 631 may be stored in a database. The service data 631 and the instance 632 have the identifier of the user terminal 62. The copy service 65 may include service data 651 and an instance 652. The service data 651 may be stored in a database. The service data 651 and the instance 652 have the identifier of the user terminal 64.
[0086] There can be multiple instances in the replication service.
[0087] Step 504: receiving an analog data request sent by a user terminal for indicating feedback of analog data.
[0088] The implementation method and principle of step 504 are similar to those of step 202 for receiving the analog data request sent by the user terminal for indicating feedback of analog data, and are not described in detail.
[0089] Step 505: determine the terminal identification according to the simulation data request, and determine the copy service corresponding to the user terminal according to the terminal identification.
[0090] After receiving the analog data request for indicating feedback of analog data, the electronic device may parse the analog data request to obtain the terminal identifier included therein, and further determine the copy service corresponding to the user terminal according to the terminal identifier.
[0091] For example, if the simulated data request is sent by user terminal A, the electronic device can determine the copy service corresponding to user terminal A according to the identifier of user terminal A. The determined copy service includes service data corresponding to user terminal A and an instance corresponding to user terminal A.
[0092] Step 506: Process the simulation data request based on the copy service corresponding to the user terminal to obtain simulation data.
[0093] The electronic device may process the simulation data request based on the determined copy service corresponding to the user terminal, thereby obtaining the simulation data.
[0094] For example, the simulation data request is a request for indicating a feedback variable i, and the electronic device can obtain the value of the variable i according to the copy service corresponding to the user terminal, and then obtain the simulation data.
[0095] Specifically, the copy service includes service data and an instance. Therefore, the simulation data request can be processed based on the instance of the copy service corresponding to the user terminal and the service data to obtain the simulation data.
[0096] Furthermore, the electronic device can call the service data corresponding to the determined user terminal identifier in the database according to the content in the simulation data request, and execute the instance in the copy service corresponding to the user terminal. For example, the value of variable i is the sum of the value of variable a and the value of variable b, and the user terminal identifier is A, then the electronic device can read the value of variable a and the value of variable b with terminal identifier A from the database, and execute the instance using the read variable values, thereby obtaining the value of variable i.
[0097] In this implementation, the copy services between each user terminal are independent of each other. When a user terminal operates data, only the service data in the copy service corresponding to the user terminal will be modified without affecting the copy services of other user terminals. Therefore, personalized data can be provided for each user terminal, and multiple user terminals can be prevented from modifying the same service data and causing data confusion.
[0098] Step 507: Send the simulation data to the user terminal.
[0099] The implementation method and principle of step 507 are similar to those of step 203 and will not be described in detail.
[0100] Step 508: When the simulation data service changes, the content of the copy service corresponding to the simulation data service is synchronized according to the identifier of the simulation data service; the copy service has the identifier of the simulation data service.
[0101] In actual application, when generating a copy service, the electronic device may also obtain the identifier of the simulation data service and associate the generated copy service with the identifier of the simulation data service. For example, there is a first simulation data service and a second simulation data service. When generating a copy service of the first simulation data service, the copy service may have the identifier of the first simulation data service. When generating a copy service of the second simulation data service, the copy service may have the identifier of the second simulation data service.
[0102] When the analog data service changes, the electronic device can determine, based on the identifier of the analog data service, each copy service generated based on the analog data service, and synchronize the changed content to these copy services.
[0103] For example, there are a first copy service, a second copy service, and a third copy service, wherein the first copy service and the second copy service have the identifier of the first simulation data service, and the third copy service has the identifier of the second simulation data service. When the electronic device monitors that the first simulation data service changes, the change content can be determined and synchronized to the first copy service and the second copy service.
[0104] Specifically, the changed content of the simulation data service can be synchronized to the replica service of the simulation data service through a websocket (a protocol for full-duplex communication on a single TCP connection) message synchronization mechanism.
[0105] Figure 7 This is a structural diagram of a simulation data service implementation device shown as an exemplary embodiment of the present application.
[0106] like Figure 7 As shown, the simulation data service implementation device 700 provided in the present application includes:
[0107] The receiving unit 710 is configured to receive a copy request for copying the simulation data service sent by the user terminal;
[0108] A replication unit 720, configured to generate a replication service corresponding to the user terminal according to the replication request; the replication service is used to provide simulation data;
[0109] The receiving unit 710 is further configured to receive a simulation data request sent by the user terminal for indicating feedback of simulation data.
[0110] A determination unit 730, configured to determine simulation data according to a copy service corresponding to the user terminal;
[0111] The sending unit 740 is configured to send the simulation data to the user terminal.
[0112] The simulation data service implementation device provided by the present application includes: a receiving unit for receiving a copy request sent by a user terminal for copying a simulation data service; a copy unit for generating a copy service corresponding to the user terminal according to the copy request; the receiving unit is also used to receive a simulation data request determination unit sent by the user terminal for indicating feedback of simulation data, and is used to determine the simulation data according to the copy service corresponding to the user terminal; a sending unit is used to send the simulation data to the user terminal. The simulation data service implementation device provided by the present application 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 request of the user terminal, 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.
[0113] The specific principles and implementation methods of the simulation data service implementation device provided in this embodiment are similar to Figure 2 The embodiments shown are similar and will not be described again here.
[0114] Figure 8 This is a structural diagram of a simulation data service implementation device shown in another exemplary embodiment of the present application.
[0115] like Figure 8 As shown, in the simulation data service implementation device 800 provided by the present application, optionally, the copy service is associated with a terminal identifier corresponding to the user terminal.
[0116] Optionally, the copying unit 720 includes:
[0117] An identification determination module 721, configured to determine the terminal identification according to the copy request;
[0118] The service generation module 722 is used to generate a copy service corresponding to the user terminal according to the terminal identifier.
[0119] Optionally, the replication service includes data and instances;
[0120] The service generation module 722 is specifically used for:
[0121] Acquire service data of the simulated data service, and store the service data with the terminal identifier in a database;
[0122] All interfaces in the simulated data service are instantiated, wherein the instances corresponding to the respective interfaces have the terminal identifier.
[0123] Optionally, the determining unit 730 includes:
[0124] A service determination module 731, configured to determine the terminal identifier according to the simulation data request, and determine a copy service corresponding to the user terminal according to the terminal identifier;
[0125] The processing module 732 is used to process the simulation data request based on the copy service corresponding to the user terminal to obtain the simulation data.
[0126] Optionally, the processing module 732 is specifically used for:
[0127] The simulation data request is processed based on the instance of the replica service corresponding to the user terminal and the service data to obtain the simulation data.
[0128] Optionally, the device further includes a review unit 750, configured to:
[0129] According to the copy request, it is determined whether the user terminal has the authority to operate the simulated data service. If yes, the copy unit 720 executes the step of generating a copy service corresponding to the user terminal according to the copy request.
[0130] Optionally, the copy service has an identification of the simulation data service;
[0131] The device further comprises a synchronization unit 760, which is used to synchronize the changed content with the copy service corresponding to the simulation data service according to the identifier of the simulation data service when the simulation data service changes.
[0132] The specific principles and implementation methods of the simulation data service implementation device provided in this embodiment are similar to Figure 5 The embodiments shown are similar and will not be described again here.
[0133] Fig. 9 This is a structural diagram of a simulation data service implementation device shown as an exemplary embodiment of the present application.
[0134] like Fig. 9 As shown, the simulation data service implementation device provided in this embodiment includes:
[0135] Memory 91;
[0136] Processor 92; and
[0137] Computer programs;
[0138] The computer program is stored in the memory 91 and is configured to be executed by the processor 92 to implement any one of the simulation data service implementation methods described above.
[0139] This embodiment also provides a computer-readable storage medium having a computer program stored thereon.
[0140] The computer program is executed by a processor to implement any one of the simulation data service implementation methods described above.
[0141] A computer program product comprises a computer program, wherein when the computer program is executed by a processor, the computer program implements any one of the above-mentioned simulation data service implementation methods.
[0142] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0143] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for implementing a simulation data service, It is characterized in that include: 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. The method according to claim 1, It is characterized in that The copy service is associated with a terminal identifier corresponding to the user terminal.
3. The method according to claim 2, It is characterized in that The step of replicating the simulated data service according to the replication request to generate a replica service corresponding to the user terminal includes: 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. The method according to claim 3, It is characterized in that 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. The method according to claim 2, It is characterized in that The step of copying the simulated data service according to the copy request, generating a copy service corresponding to the user terminal, and determining the simulated data includes: 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. The method according to any one of claims 1 to 5, It is characterized in that After receiving the copy request for copying the analog data service sent by the user terminal, the method further 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. The method according to any one of claims 1 to 5, It is 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. A simulation data service implementation device, It is characterized in that include: 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 analog data service according to the replication request, and generate a replication service corresponding to the user terminal; the replication service is used to provide analog data; the replication service includes service data and instances; The receiving unit is further configured 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 the database according to the content in the analog data request, and execute an instance in the replication service corresponding to the user terminal to obtain analog data; A sending unit, configured to send the analog data to the user terminal.
9. An analog data service implementation device, characterized in that, it includes: a memory; a 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 method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, a computer program is stored thereon, and the computer program is executed by a processor to implement the method according to any one of claims 1-7.
11. A computer program product, including a computer program, where the computer program implements the method according to any one of claims 1-7 when executed by a processor.
Citation Information
Patent Citations
Interface testing method and device and computer readable storage medium
CN111124908A