CN112199112A - Method, device, terminal equipment and storage medium for automatically configuring simulation service - Google Patents

Method, device, terminal equipment and storage medium for automatically configuring simulation service Download PDF

Info

Publication number
CN112199112A
CN112199112A CN202011069184.9A CN202011069184A CN112199112A CN 112199112 A CN112199112 A CN 112199112A CN 202011069184 A CN202011069184 A CN 202011069184A CN 112199112 A CN112199112 A CN 112199112A
Authority
CN
China
Prior art keywords
simulation
data
document
data type
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011069184.9A
Other languages
Chinese (zh)
Inventor
廖艳丽
程建波
吕军
王宇光
孟祥涛
李丹枫
刘红申
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
JD Digital Technology Holdings Co Ltd
Original Assignee
JD Digital Technology Holdings 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 JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings Co Ltd
Priority to CN202011069184.9A priority Critical patent/CN112199112A/en
Publication of CN112199112A publication Critical patent/CN112199112A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Abstract

The embodiment of the invention relates to a method, a device, terminal equipment and a storage medium for automatically configuring simulation services, wherein the method comprises the following steps: acquiring document path information and accessing a document according to the path information; converting the parameters of the document into configurable parameters; according to the data type, automatically generating simulation data corresponding to the data type; after configuring the route, response and calling port corresponding to the simulation service, starting the simulation service according to the preset domain name. The simulation data are automatically generated according to the document provided by the background of the server side in the mode, and the simulation service is created, so that heavy background service is replaced. In the process of creating the simulation service, manual data compiling is not needed, time and labor are saved, and errors are not easy to occur.

Description

Method, device, terminal equipment and storage medium for automatically configuring simulation service
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method and a device for automatically configuring simulation services, terminal equipment and a storage medium.
Background
The dynamic data displayed on the webpage at the present stage are inquired from the background service and are analyzed through the front-end Javascript program, and the background service supporting the front-end webpage display needs a large amount of manpower to develop corresponding functions. In a certain system development requiring the coexistence of web pages and services, under the condition that the previous web pages and the service development are parallel, the development of the services cannot be synchronized in real time, generally, the development of the services lags behind the development of the web pages, so that simulated data and services are required to support the display of the web pages and the normal development of the web pages, and therefore, in order to ensure the consistency of the structure of the data, a developer of the services can provide corresponding documents in advance for a developer of the web pages to write the simulated data, and the writing of the steps is manually written by the developer of the web pages. Furthermore, the service personnel may modify the document at different times, and the web page developer may need to manually synchronize the modifications. Under the condition of excessive data interfaces, the manual writing or analog data modification process is time-consuming, labor-consuming and prone to errors, and data can be easily tampered.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a method, an apparatus, a terminal device, and a storage medium for automatically configuring an analog service to solve the above technical problems in the prior art.
In a first aspect, an embodiment of the present invention provides a method for automatically configuring a simulation service, where the method includes:
acquiring document path information and accessing a document according to the path information;
converting parameters of the document into configurable parameters, wherein the parameters comprise interface paths and data types corresponding to each interface path;
according to the data type, automatically generating simulation data corresponding to the data type;
after configuring a route, a response and a calling port corresponding to the simulation service, starting the simulation service according to a preset domain name, wherein the route is an interface path corresponding to the simulation data, the response is the simulation data, and the preset domain name comprises the calling port number and the route.
In one possible implementation, the document path information includes document transmission address information, and/or corresponding IP and port numbers of the document.
In one possible embodiment, converting the parameters of the document into configurable parameters specifically includes:
setting the document path information to a preset object, and writing the preset object into a first file at a preset position, so that the parameters in the document can be read after the document path information can be accessed.
In one possible embodiment, after automatically generating the simulation data corresponding to the data type according to the data type, the method further includes:
and respectively storing the analog data corresponding to each data type into a variable, and caching the interface path corresponding to the data type.
In one possible embodiment, the interface path has unique identification information.
In one possible embodiment, after the analog data corresponding to each data type is respectively stored in the variable, and the interface path corresponding to the data type is cached, the method further includes:
creating a second file named by the unique identification information;
writing the simulation data cached in the variable into a second file;
creating a third file for storing and interfacing the path;
and establishing a mapping relation between the second file and the third file by using the unique identification information.
In a second aspect, an embodiment of the present invention provides an apparatus for automatically configuring a simulation service, where the apparatus includes:
the acquisition unit is used for acquiring the document path information and accessing the document according to the path information;
the conversion unit is used for converting parameters of the document into configurable parameters, wherein the parameters comprise interface paths and data types corresponding to the interface paths;
the data generation unit is used for automatically generating simulation data corresponding to the data type according to the data type;
the simulation service starting unit is used for starting the simulation service according to a preset domain name after configuring a route, a response and a calling port corresponding to the simulation service, wherein the route is an interface path corresponding to the simulation data, the response is the simulation data, and the preset domain name comprises a calling port number and the route.
In a possible implementation manner, the apparatus further includes a processing unit, configured to store the simulation data corresponding to each data type into the variables, respectively, and cache the interface paths corresponding to the data types.
In a third aspect, an embodiment of the present invention provides a terminal device, where the terminal device includes:
at least one processor and memory;
the processor is configured to execute a program of auto-configuration simulation services stored in the memory to implement the method of auto-configuration simulation services as described in any of the embodiments of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer storage medium, where one or more programs are stored, and the one or more programs are executable by the terminal device as described in the third aspect, so as to implement the method for automatically configuring a simulation service as described in any implementation manner of the first aspect.
According to the method for automatically configuring the simulation service, provided by the embodiment of the invention, the simulation data are automatically generated according to the document provided by the background of the server side in the manner, and the simulation service is created, so that heavy background service is replaced. In the process of creating the simulation service, manual data compiling is not needed, time and labor are saved, and errors are not easy to occur. Moreover, even if the data on the back-end server side is modified, the file on the back-end server side is directly called in the scheme, so that the process that a front-end developer modifies the simulation data manually and synchronously is omitted, and the condition that the data is tampered is prevented. In addition, what is adopted in this application is the actual interface path, guarantee that the simulation data request path in the simulation service keeps unanimous with the actual request path, need not to change the process of true request path in the actual application process, save the operation flow for follow-up operation process for follow-up operation is more convenient, swift for follow-up operation.
Drawings
Fig. 1 is a schematic diagram of a system architecture for automatically configuring a simulation service according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a method for automatically configuring simulation services according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an apparatus for automatically configuring simulation services according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For the convenience of understanding of the embodiments of the present invention, the following description will be further explained with reference to specific embodiments, which are not to be construed as limiting the embodiments of the present invention.
Before describing the flow of the method for automatically configuring simulation services provided by the embodiment of the present invention, a schematic diagram of a system architecture of an automatically configuring simulation service provided by the present invention is first described, and specifically, refer to fig. 1.
Under the normal condition, the display of the webpage end, namely the data display of the PC end, comes from the server end, and in the earlier stage, under the condition that the server end is not built, the user needs to do some simulated data and start the simulation service to enable the page to be displayed normally and interacted normally, and the webpage is more real and practical, so that the webpage can be in seamless connection with the real server end in the later stage. The invention aims to provide a quick and efficient establishment of an analog server, so that the early-stage front-end development can be more efficient. Referring specifically to fig. 2, a method flow for automatically configuring a simulation service is shown.
Fig. 2 is a schematic flow chart of a method for automatically configuring a simulation service according to an embodiment of the present invention, as shown in fig. 2, the method includes:
step 210, obtaining document path information, and accessing the document according to the path information.
Specifically, the path information may include document transmission address information, and/or an IP and port number corresponding to the document, or other path information that can be accessed to the document through the browser. In a specific example, the document may be a Swagger document, or may be another form of document. The document transfer address information may include an HTTP/HTTPs address. The specifically acquired document path information may be acquired by a developer at the server.
Step 220, converting the parameters of the document into configurable parameters.
Specifically, the document accessed through the document path information is generally a visual interface, and the content in the visual interface cannot be read or called currently. That is, the current visual interface is not required by the front-end developer, so the parameters displayed by the visual interface need to be converted into a server capable of being accessed through a protocol. Therefore, the parameters in the document need to be converted into configurable parameters.
Optionally, in specific execution, the document path information may be set to a preset object, and the preset object is written into a first file in a preset position through a file chest pain module in the non. The parameters may include at least interface paths and a data type corresponding to each interface path.
And step 230, automatically generating simulation data corresponding to the data type according to the data type.
Specifically, a request method of an HTTP/HTTPS module in node.Js is used for requesting the content displayed by a supporting document (for example, a Swagger document). At this time, the document content is obtained in the callback function of the request method, and is ready to be analyzed and converted into data which needs to be simulated finally.
During specific execution, the data structure of the document content is mainly analyzed, the regularity of the document content is analyzed, and the data is reassembled. Since Swagger documents are both regularized and unified. The data type is a fixed type and a kind of the fixed type, so the program can analyze the regularity in the data and generate corresponding fixed format data, thereby achieving the service required by the program.
The analysis process for the document content in this embodiment can be applied to the analysis of Swagger document of any item. The specific analysis process is as follows:
the document content, i.e. the parameters in the document, is at least the interface path and the data type corresponding to each interface path. Optionally, the interface path has unique identification information.
Then, according to the unique identification information, the data type corresponding to each interface path can be identified. There are many types of data types found (e.g., string, object, array, integer, borolean, etc.).
In a specific example, if the data type is string type, automatically generating analog data corresponding to the string type; if the data type is the coolean type, automatically generating false simulation data corresponding to the coolean type; if the data type is integer type, automatically generating analog data with the value of 0; and if the data types are object and array, traversing all the data types in the object and the array, wherein the data types in the object and the array comprise one or more types of string, integer and bootean, and thus generating the simulation data of the corresponding type in a similar way as the method.
Optionally, after the generation operation of the simulation data is completed, the method may further include:
and respectively storing the simulation data corresponding to each data type into a variable, and caching the interface path corresponding to the data type so as to find corresponding data through the interface path subsequently, thereby completing the subsequent calling process.
Further, after the analog data corresponding to each data type is respectively stored in the variable and the interface path corresponding to the data type is cached, the method further includes:
creating a second file named by the unique identification information;
writing the simulation data cached in the variable into a second file;
creating a third file for storing and interfacing the path;
and establishing a mapping relation between the second file and the third file by using the unique identification information.
In a specific example, the second file may be a josn file, writing the simulation data into the josn file is to facilitate subsequent direct call, and the interface path is stored into the second file, for example, a JS file, and a direct mapping relationship between the second file and the third file is established to facilitate subsequent management.
And step 240, after configuring the routing, response and call port corresponding to the simulation service, starting the simulation service according to the preset domain name.
Specifically, an express module in node. js may be used to configure routing, call ports, and respond. The route is an interface path corresponding to the simulation data, and the response is the simulation data corresponding to the interface path. The domain name includes the calling port number and the route. When the simulation service is started, the name: calling port number + route "access mode when the emulation service is started, the emulation interface is accessed through a browser in a terminal device, such as a PC in fig. 1. The domain names are for example: localhost or 127.0.0.1. The port may be any port not occupied by a PC and the interface path may be any of the interface paths mentioned above. This allows access to the emulation data service and return of a response, i.e., the emulation data, for the interface path pair. Optionally, when the configuration simulation service is executed, a configuration request header may be further included, and the request header is set as a cross-domain permission.
Further optionally, the method may further include: after the simulation service is started, in a callback that the simulation service is started successfully, a corresponding prompt (for example, the starting time, the set port number, etc.) is printed, so that a front-end developer can check whether the simulation service is started successfully or not and know the access port number of the simulation service in a simulation service console.
According to the method for automatically configuring the simulation service, provided by the embodiment of the invention, the simulation data are automatically generated according to the document provided by the background of the server side in the manner, and the simulation service is created, so that heavy background service is replaced. In the process of creating the simulation service, manual data compiling is not needed, time and labor are saved, and errors are not easy to occur. Moreover, even if the data on the back-end server side is modified, the file on the back-end server side is directly called in the scheme, so that the process that a front-end developer modifies the simulation data manually and synchronously is omitted, and the condition that the data is tampered is prevented. In addition, what is adopted in this application is the actual interface path, guarantee that the simulation data request path in the simulation service keeps unanimous with the actual request path, need not to change the process of true request path in the actual application process, save the operation flow for follow-up operation process for follow-up operation is more convenient, swift for follow-up operation.
Fig. 3 is a device for automatically configuring a simulation service according to an embodiment of the present invention, where the device includes: an acquisition unit 301, a conversion unit 302, a data generation unit 303, and a simulation service initiation unit 304.
The acquiring unit 301 is configured to acquire document path information and access a document according to the path information;
a conversion unit 302, configured to convert parameters of a document into configurable parameters, where the parameters include interface paths and a data type corresponding to each interface path;
a data generating unit 303, configured to automatically generate analog data corresponding to a data type according to the data type;
the simulation service starting unit 304 is configured to start the simulation service according to a preset domain name after configuring a route, a response, and a call port corresponding to the simulation service, where the route is an interface path corresponding to the simulation data, the response is the simulation data, and the preset domain name includes a call port number and a route.
Optionally, the document path information includes document transmission address information and/or an IP and a port number corresponding to the document.
Optionally, the converting unit 302 is specifically configured to set the document path information to a preset object, and write the preset object into a first file in a preset location, so that after the document path information can be accessed, parameters in the document are read.
Optionally, the apparatus further includes a processing unit 305, configured to store the analog data corresponding to each data type into a variable respectively, and cache the interface path corresponding to the data type.
Optionally, the interface path has unique identification information.
Optionally, the processing unit 305 is further configured to create a second file named by the unique identification information;
writing the simulation data cached in the variable into a second file;
creating a third file for storing and interfacing the path;
and establishing a mapping relation between the second file and the third file by using the unique identification information.
The functions executed by each functional component in the apparatus for automatically configuring an analog service provided in this embodiment have been described in detail in the embodiment corresponding to fig. 1, and therefore are not described herein again.
According to the device for automatically configuring the simulation service, provided by the embodiment of the invention, the simulation data are automatically generated according to the document provided by the background of the server side in the manner, and the simulation service is created, so that heavy background service is replaced. In the process of creating the simulation service, manual data compiling is not needed, time and labor are saved, and errors are not easy to occur. Moreover, even if the data on the back-end server side is modified, the file on the back-end server side is directly called in the scheme, so that the process that a front-end developer modifies the simulation data manually and synchronously is omitted, and the condition that the data is tampered is prevented. In addition, what is adopted in this application is the actual interface path, guarantee that the simulation data request path in the simulation service keeps unanimous with the actual request path, need not to change the process of true request path in the actual application process, save the operation flow for follow-up operation process for follow-up operation is more convenient, swift for follow-up operation.
Fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present invention, where the terminal device 400 shown in fig. 4 includes: at least one processor 401, memory 402, at least one network interface 403, and other user interfaces 404. The various components in the terminal device 400 for automatically configuring analog services are coupled together by a bus system 405. It is understood that the bus system 405 is used to enable connection communication between these components. The bus system 405 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 405 in fig. 4.
The user interface 404 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It will be appreciated that memory 402 in embodiments of the invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic random access memory (ddr Data Rate SDRAM, ddr SDRAM), Enhanced Synchronous SDRAM (ESDRAM), synchlronous SDRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 402 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 402 stores the following elements, executable units or data structures, or a subset thereof, or an expanded set thereof: an operating system 4021 and application programs 4022.
The operating system 4021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is configured to implement various basic services and process hardware-based tasks. The application programs 4022 include various application programs, such as a Media Player (Media Player), a Browser (Browser), and the like, for implementing various application services. A program for implementing the method according to the embodiment of the present invention may be included in the application 4022.
In this embodiment of the present invention, by calling a program or an instruction stored in the memory 402, specifically, a program or an instruction stored in the application 4022, the processor 401 is configured to execute the method steps provided by the method embodiments, for example, including:
acquiring document path information and accessing a document according to the path information;
converting parameters of the document into configurable parameters, wherein the parameters comprise interface paths and data types corresponding to each interface path;
according to the data type, automatically generating simulation data corresponding to the data type;
after configuring a route, a response and a calling port corresponding to the simulation service, starting the simulation service according to a preset domain name, wherein the route is an interface path corresponding to the simulation data, the response is the simulation data, and the preset domain name comprises the calling port number and the route.
Optionally, the document path information includes document transmission address information and/or an IP and a port number corresponding to the document.
Optionally, the document path information is set to a preset object, and the preset object is written in a first file at a preset position, so that the parameter in the document is read after the document path information can be accessed.
Optionally, the simulation data corresponding to each data type is stored in a variable, and the interface path corresponding to the data type is cached.
Optionally, the interface path has unique identification information.
Optionally, creating a second file named by the unique identification information;
writing the simulation data cached in the variable into a second file;
creating a third file for storing and interfacing the path;
and establishing a mapping relation between the second file and the third file by using the unique identification information.
The method disclosed in the above embodiments of the present invention may be applied to the processor 401, or implemented by the processor 401. The processor 401 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 401. The Processor 401 may be a general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software elements in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in the memory 402, and the processor 401 reads the information in the memory 402 and completes the steps of the method in combination with the hardware.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented in one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions of the present Application, or a combination thereof.
For a software implementation, the techniques herein may be implemented by means of units performing the functions herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The terminal device provided in this embodiment may be the terminal device shown in fig. 4, and may execute all the steps of the method for automatically configuring a simulation service shown in fig. 1, so as to achieve the technical effect of the method for automatically configuring a simulation service shown in fig. 1.
The embodiment of the invention also provides a storage medium (computer readable storage medium). The storage medium herein stores one or more programs. Among others, the storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
When one or more programs in the storage medium are executable by one or more processors, the method for automatically configuring a simulation service performed at the terminal device side as described above is implemented.
The processor is used for executing the program of the automatic configuration simulation service stored in the memory so as to realize the following steps of the method for automatically configuring the simulation service, which is executed on the terminal equipment side:
acquiring document path information and accessing a document according to the path information;
converting parameters of the document into configurable parameters, wherein the parameters comprise interface paths and data types corresponding to each interface path;
according to the data type, automatically generating simulation data corresponding to the data type;
after configuring a route, a response and a calling port corresponding to the simulation service, starting the simulation service according to a preset domain name, wherein the route is an interface path corresponding to the simulation data, the response is the simulation data, and the preset domain name comprises the calling port number and the route.
Optionally, the document path information includes document transmission address information and/or an IP and a port number corresponding to the document.
Optionally, the document path information is set to a preset object, and the preset object is written in a first file at a preset position, so that the parameter in the document is read after the document path information can be accessed.
Optionally, the simulation data corresponding to each data type is stored in a variable, and the interface path corresponding to the data type is cached.
Optionally, the interface path has unique identification information.
Optionally, creating a second file named by the unique identification information;
writing the simulation data cached in the variable into a second file;
creating a third file for storing and interfacing the path;
and establishing a mapping relation between the second file and the third file by using the unique identification information.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above embodiments are provided to further explain the objects, technical solutions and advantages of the present invention in detail, it should be understood that the above embodiments are merely exemplary embodiments of the present invention and are not intended to limit the scope of the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for automatically configuring a simulation service, the method comprising:
acquiring document path information and accessing a document according to the path information;
converting parameters of the document into configurable parameters, wherein the parameters comprise interface paths and a data type corresponding to each interface path;
according to the data type, automatically generating simulation data corresponding to the data type;
after configuring a route, a response and a calling port corresponding to a simulation service, starting the simulation service according to a preset domain name, wherein the route is the interface path corresponding to the simulation data, the response is the simulation data, and the preset domain name comprises the calling port number and the route.
2. The method according to claim 1, wherein the document path information comprises document transmission address information and/or corresponding IP and port number of the document.
3. The method according to claim 1, wherein converting the parameters of the document into configurable parameters specifically comprises:
setting the document path information to a preset object, and writing the preset object into a first file at a preset position, so that the parameters in the document are read after the document path information can be accessed.
4. The method according to any one of claims 1-3, wherein after automatically generating the simulation data corresponding to the data type according to the data type, the method further comprises:
and respectively storing the analog data corresponding to each data type into variables, and caching the interface paths corresponding to the data types.
5. The method of claim 4, wherein the interface path has unique identification information.
6. The method of claim 5, wherein after storing the simulation data corresponding to each data type into the variables and caching the interface paths corresponding to the data types, the method further comprises:
creating a second file named by the unique identification information;
writing the simulation data cached in the variable into the second file;
creating a third file for storing the interface path;
and establishing a mapping relation between the second file and the third file by using the unique identification information.
7. An apparatus for automatically configuring a simulation service, the apparatus comprising:
the acquisition unit is used for acquiring document path information and accessing the document according to the path information;
the conversion unit is used for converting parameters of the document into configurable parameters, wherein the parameters comprise interface paths and data types corresponding to each interface path;
the data generation unit is used for automatically generating simulation data corresponding to the data type according to the data type;
the simulation service starting unit is used for starting the simulation service according to a preset domain name after configuring a route, a response and a calling port corresponding to the simulation service, wherein the route is the interface path corresponding to the simulation data, the response is the simulation data, and the preset domain name comprises the calling port number and the route.
8. The apparatus according to claim 7, further comprising a processing unit, configured to store the simulation data corresponding to each data type into a variable respectively, and buffer the interface path corresponding to the data type.
9. A terminal device, characterized in that the terminal device comprises: at least one processor and memory;
the processor is used for executing the program of the automatic configuration simulation service stored in the memory so as to realize the method of the automatic configuration simulation service of any one of claims 1-6.
10. A computer storage medium, characterized in that the computer storage medium stores one or more programs executable by the terminal device according to claim 9 to implement the method of automatically configuring a simulation service according to any one of claims 1 to 6.
CN202011069184.9A 2020-09-30 2020-09-30 Method, device, terminal equipment and storage medium for automatically configuring simulation service Pending CN112199112A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011069184.9A CN112199112A (en) 2020-09-30 2020-09-30 Method, device, terminal equipment and storage medium for automatically configuring simulation service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011069184.9A CN112199112A (en) 2020-09-30 2020-09-30 Method, device, terminal equipment and storage medium for automatically configuring simulation service

Publications (1)

Publication Number Publication Date
CN112199112A true CN112199112A (en) 2021-01-08

Family

ID=74013645

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011069184.9A Pending CN112199112A (en) 2020-09-30 2020-09-30 Method, device, terminal equipment and storage medium for automatically configuring simulation service

Country Status (1)

Country Link
CN (1) CN112199112A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114513264A (en) * 2022-02-16 2022-05-17 西安市科楠科技开发有限公司 Analog data generation device and method for remote sensing satellite

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120260235A1 (en) * 2011-04-07 2012-10-11 Infosys Technologies, Ltd. Response simulator computing apparatuses and methods thereof
US9871889B1 (en) * 2014-03-18 2018-01-16 EMC IP Holing Company LLC Techniques for automated capture of configuration data for simulation
CN109614102A (en) * 2018-10-09 2019-04-12 平安科技(深圳)有限公司 Code automatic generation method, device, electronic equipment and storage medium
CN109815112A (en) * 2018-12-14 2019-05-28 平安科技(深圳)有限公司 Data debugging method, apparatus and terminal device based on functional test
CN110221858A (en) * 2019-06-17 2019-09-10 深圳前海微众银行股份有限公司 Analogue data generation method, device, equipment and computer readable storage medium
CN110377462A (en) * 2019-06-17 2019-10-25 中国平安人寿保险股份有限公司 Interface test method, device and terminal device
CN110489101A (en) * 2019-07-15 2019-11-22 北京字节跳动网络技术有限公司 Interface analogy method, system, medium and electronic equipment
US20200169619A1 (en) * 2018-11-26 2020-05-28 Amazon Technologies, Inc. Configuration of workflows for coordinated device environments

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120260235A1 (en) * 2011-04-07 2012-10-11 Infosys Technologies, Ltd. Response simulator computing apparatuses and methods thereof
US9871889B1 (en) * 2014-03-18 2018-01-16 EMC IP Holing Company LLC Techniques for automated capture of configuration data for simulation
CN109614102A (en) * 2018-10-09 2019-04-12 平安科技(深圳)有限公司 Code automatic generation method, device, electronic equipment and storage medium
US20200169619A1 (en) * 2018-11-26 2020-05-28 Amazon Technologies, Inc. Configuration of workflows for coordinated device environments
CN109815112A (en) * 2018-12-14 2019-05-28 平安科技(深圳)有限公司 Data debugging method, apparatus and terminal device based on functional test
CN110221858A (en) * 2019-06-17 2019-09-10 深圳前海微众银行股份有限公司 Analogue data generation method, device, equipment and computer readable storage medium
CN110377462A (en) * 2019-06-17 2019-10-25 中国平安人寿保险股份有限公司 Interface test method, device and terminal device
CN110489101A (en) * 2019-07-15 2019-11-22 北京字节跳动网络技术有限公司 Interface analogy method, system, medium and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
赵士操;肖永浩;段博文;李于锋;: "HSWAP:适用于高性能计算环境的数值模拟工作流管理平台", 计算机应用, no. 06 *
邵明浩: "基于NodeJS的接口管理平台设计与实现", 中国优秀硕士学位论文全文数据库 信息科技辑, no. 12 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114513264A (en) * 2022-02-16 2022-05-17 西安市科楠科技开发有限公司 Analog data generation device and method for remote sensing satellite
CN114513264B (en) * 2022-02-16 2024-01-30 西安市科楠科技开发有限公司 Device and method for generating simulation data of remote sensing satellite

Similar Documents

Publication Publication Date Title
EP1923798B1 (en) Clickable placeholder images for simulating web page code unsupported on mobile devices
CN109388766B (en) Page loading method and device
JP2019032883A (en) Method, apparatus, server and system for implementing web application
AU2017210597A1 (en) System and method for the online editing of pdf documents
US8682964B1 (en) Progressively loading network content
US8516041B1 (en) Pre-fetching asynchronously requested content
KR20080053293A (en) Initial server-side content rendering for client-script web pages
CN109831466B (en) Micro-service business processing method and nginx server
CN111010438A (en) Remote procedure calling method, device, server and storage medium
CN111274781A (en) Table display method and device, storage medium and electronic equipment
CN105100294A (en) Webpage acquiring method, system, network server, browser and GSLB
CN109327559B (en) Domain name resolution method and device based on hybrid cloud platform
US8930443B1 (en) Distributed network page generation
CN112905179A (en) Mobile terminal H5 page generation method and device, electronic equipment and storage medium
CN112799663A (en) Page display method and device, computer readable storage medium and electronic equipment
CN110737860A (en) rich text picture insertion method and device
CN111031128B (en) Method for realizing skylight-free website IPv6 transformation based on cloud technology
CN110895481A (en) Rendering method, device and system of desktop application
CN112199112A (en) Method, device, terminal equipment and storage medium for automatically configuring simulation service
CN111737614A (en) Page display method and device, electronic equipment and storage medium
US10530709B2 (en) Container contract for data dependencies
CN109189388A (en) Page configuration method, server and computer-readable medium
CN107239475B (en) File calling method and device
JP2016018233A (en) Script caching method and information processing device utilizing the same
CN111338928A (en) Chrome-based browser testing method and device

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
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co., Ltd

CB02 Change of applicant information