Simulation data generation method and device, equipment, storage medium and program product

By dynamically generating the generation template of simulated data and using the data resource pool, the problem of the simulation data returned by the API simulation platform cannot be flexibly changed, the richness and flexibility of the simulated data are achieved, and different testing needs are met.

CN119646298APending Publication Date: 2025-03-18BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411709113.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The simulation data returned by the current general API simulation platform is set in advance and cannot be changed flexibly according to the real business scenario and cannot meet the flexibility of testing needs.

Method used

By obtaining the request data, determine the business scenario, and dynamically generate the generation template of simulated data based on the business scenario. Use data resource pools and generation templates to generate simulated data to be fed back, and realize dynamic return of simulated data in different test business scenarios.

Benefits of technology

It realizes the richness and flexibility of simulated data, can meet different testing needs according to the dynamic changes of real business scenarios, and improves testing efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119646298A_ABST
    Figure CN119646298A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, in particular to a simulation data generation method and device, equipment, a storage medium and a program product, and the method comprises the steps that request data is acquired, and the request data is used for acquiring resource information; determining a service scene according to the request data; determining a generation template of simulation data according to the business scene; according to a data resource pool and the generation template, simulation data to be fed back is generated, and resource information corresponding to the service type contained in the service scene is stored in the data resource pool. According to the method, the generation template of the simulation data is dynamically generated based on the service scene, the management of the resource information is realized based on the data resource pool, and then the managed resource information is combined with the generation template, so that the simulation data can be dynamically returned from the data resource pool in different test service scenes, different test requirements are met, and the test efficiency is improved. And richness and flexibility of simulation data are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, equipment, storage medium and program product for generating simulation data. Background Art

[0002] The recommendation system is a very important strategic system in feed flow products (i.e., information flow that is continuously updated and presented to users). Its core feature is that data resource information is intelligently recommended by algorithm services combined with user feature information. Its business performance is characterized by randomness, uncertainty, and rich content.

[0003] Functional modules that rely on recommendation systems are often core business modules, so it is particularly important to ensure the testing quality and efficiency of the corresponding modules. In order to meet the demands for simulation of specific business scenarios during the test process, it is necessary to provide corresponding data simulation capabilities. For example, in a functional testing project, it may be necessary to cover business scenarios as comprehensively as possible based on the development of the function. At this time, if the real external system is unavailable or difficult to access, developers need to simulate response data to support development and testing activities.

[0004] The current general API (Application Programming Interface) simulation platform supports users to customize the expected response content of the API. After hitting the specific rules, the simulated data can be returned. However, the returned simulated data are set in advance and cannot be changed. They cannot be flexibly changed according to the actual business scenarios. Therefore, the simulated data returned by the relevant API simulation platform cannot meet the flexibility of the testing requirements. Summary of the invention

[0005] In view of this, the present disclosure provides a method, apparatus, device, storage medium and program product for generating simulation data to solve the problem that the simulation data returned by the relevant API simulation platform cannot meet the flexibility of testing requirements.

[0006] In a first aspect, the present disclosure provides a method for generating simulation data, the method comprising:

[0007] Obtaining request data, wherein the request data is used to obtain resource information;

[0008] Determine the business scenario based on the request data;

[0009] Determine the template for generating simulation data based on the business scenario;

[0010] The simulation data to be fed back is generated according to the data resource pool and the generation template, wherein the data resource pool stores resource information corresponding to the business types included in the business scenario.

[0011] In the disclosed embodiment, by obtaining request data, wherein the request data is used to obtain resource information; determining the business scenario according to the request data; and then determining the generation template of simulation data according to the business scenario; and then generating simulation data to be fed back according to the data resource pool and the generation template, wherein the data resource pool stores resource information corresponding to the business types included in the business scenario. In this way, the generation template of simulation data is dynamically generated based on the business scenario, and the resource information is managed based on the data resource pool. Then, the managed resource information is combined with the generation template, so that the simulation data can be dynamically returned from the data resource pool in different test business scenarios, meeting different test requirements, realizing the richness and flexibility of simulation data, and solving the problem that the simulation data returned by the current general API simulation platform are all set in advance and cannot be changed, and cannot be flexibly changed according to the real business scenario.

[0012] In an optional implementation, determining a generation template for simulation data according to a business scenario includes:

[0013] Determine at least one business type based on the business scenario;

[0014] The generation template is determined according to the business type, wherein there is a one-to-one correspondence between the business type and the generation template.

[0015] In the disclosed embodiment, at least one business type is determined according to the business scenario, and then a generation template is obtained based on each business type, thereby achieving flexible configuration of generated simulation data and ensuring accuracy and authenticity in the test scenario.

[0016] In an optional implementation, generating simulation data to be fed back according to the data resource pool and the generation template includes:

[0017] Assign weights to generated templates based on request data;

[0018] Sort the generated templates according to the weights to obtain the sorting results;

[0019] Extract resource information from the data resource pool according to the sorting result;

[0020] According to the resource information and the generated template, the simulation data is obtained.

[0021] In the disclosed embodiment, the weights of the generated templates are set to achieve orderly feedback of the simulation data. At the same time, since the generated templates are sorted on demand, the fed-back simulation data can better meet the needs of the user and increase the user's interest.

[0022] In an optional implementation, obtaining simulation data according to resource information and a generation template includes:

[0023] Get the identifier of resource information;

[0024] Load the data information to be written into the generated template according to the identifier;

[0025] According to the data information and the generated template, the simulated data is obtained.

[0026] In the disclosed embodiment, different resource information under the same business type is distinguished based on the identifier, so as to facilitate the rapid loading of required data information, and then quickly and accurately obtain simulation data.

[0027] In an optional implementation, determining a business scenario according to request data includes:

[0028] Get key sub-information in the request data;

[0029] Determine the business scenario based on key sub-information.

[0030] In an optional embodiment, the method further includes:

[0031] When receiving a target instruction, obtaining the currently selected target resource, wherein the target instruction is used to indicate that a target control of the front-end page is triggered, and the target control is used to indicate that the front-end page needs to display the target resource;

[0032] The target business scenario corresponding to the target resource is obtained, and a corresponding relationship between the target business scenario and the target resource is established. The corresponding relationship is used to display the target resource in a preset manner on the front-end page when the business scenario is determined to be the target business scenario.

[0033] In the disclosed embodiment, a quick insertion tool is provided on the client to meet the multi-terminal testing requirements, and the effect can be viewed on the front-end page in a preset manner, thereby improving the testing efficiency.

[0034] In an optional embodiment, in some optional embodiments, the method further includes:

[0035] Obtaining the location identifier of the target resource, wherein the location identifier is used to indicate the order in which the target resource is displayed on the front-end page;

[0036] The target resources are displayed on the front-end page in the order indicated by the location identifiers.

[0037] In the embodiment of the present disclosure, the forced insertion content is defined through background management and combined with the client forced insertion plug-in to improve the convenience of client testing and use.

[0038] In a second aspect, the present disclosure provides a device for generating simulation data, the device comprising:

[0039] A first acquisition module, used to acquire request data, wherein the request data is used to acquire resource information;

[0040] A first determination module, used to determine a business scenario according to request data;

[0041] A second determination module is used to determine a generation template for simulation data according to a business scenario;

[0042] The generation module is used to generate simulation data to be fed back according to the data resource pool and the generation template, wherein the data resource pool stores resource information corresponding to the business types included in the business scenario.

[0043] In a third aspect, the present disclosure provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the method for generating simulation data of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0044] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for generating simulation data of the first aspect or any corresponding embodiment thereof.

[0045] In a fifth aspect, the present disclosure provides a computer program product, including computer instructions, and the computer instructions are used to enable a computer to execute the method for generating simulation data of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0047] Figure 1 is a flow chart of a method for generating simulation data according to an embodiment of the present disclosure;

[0048] Figure 2 is an interface diagram of a forced insertion target resource according to an embodiment of the present disclosure;

[0049] Figure 3 This is an interface diagram of background definition of forced insertion content according to an embodiment of the present disclosure;

[0050] Figure 4 is a complete flow chart of a method for generating simulation data according to an embodiment of the present disclosure;

[0051] Figure 5 is a flow chart of configuring a simulation data generation strategy according to an embodiment of the present disclosure;

[0052] Figure 6 is a structural block diagram of a device for generating simulation data according to an embodiment of the present disclosure;

[0053] Figure 7 It is a schematic diagram of the hardware structure of the computer device of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0055] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0056] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.

[0057] Herein, unless explicitly stated, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.

[0058] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition, use, storage or deletion of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0059] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0060] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0061] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0062] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0063] The data resources that the recommendation system connects to are rich in variety and huge in volume. In order to ensure the accuracy and authenticity of the test, it is necessary to simulate the business effects of the recommendation system as realistically as possible. Among them, the functional modules that rely on the recommendation system are often the core business modules. The test quality and efficiency of the corresponding modules are particularly important. In order to meet the demands of simulating specific business scenarios during the test, it is necessary to provide corresponding data simulation capabilities.

[0064] For example, an application may have multiple feed scenario modules, such as recommendation feed (content recommendation based on user characteristics, tags, preferences), city feed (content recommendation based on the user's city and specific location), attention feed (recommendation based on the content the user follows), etc. A single feed scenario may recommend different types of content resources. For example, the content launched by the recommendation feed may include short videos, live broadcast rooms, photo albums, commodities, etc. In the functional testing project, it may be necessary to cover the above business scenarios as comprehensively as possible based on the development of the function. At this time, it is necessary to simulate response data to support development and testing activities.

[0065] The simulation data returned by the current general API simulation platform are all pre-set and unchangeable, and cannot be flexibly changed according to the actual business scenario. In order to solve the above-mentioned defects, according to the embodiment of the present disclosure, a method for generating simulation data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0066] In this embodiment, a method for generating simulation data is provided, such as Figure 1 As shown, Figure 1 : is a flow chart of a method for generating simulation data according to an embodiment of the present disclosure. The method can be applied to a server side. The method flow includes the following steps:

[0067] Step S101: obtaining request data, wherein the request data is used to obtain resource information.

[0068] Optionally, in the disclosed embodiment, the server obtains request data initiated by the user through the terminal, and through the request data, it can be determined that the resource information that the user needs or wants to obtain. For example, user Zhang San uses the terminal to send request data for "cost-effective cat food" to the server. Through the request data, it can be determined that Zhang San wants to obtain resource information related to "cat food".

[0069] It should be noted that the embodiments of the present disclosure may be described using a recommendation scenario as an actual business scenario, so the resource information obtained here may be recommended resource information.

[0070] Step S102, determining the business scenario according to the request data.

[0071] Optionally, in the disclosed embodiment, the business scenario may include same-city business, attention-seeking business, recommended business, etc., and the server may determine which business scenario corresponds to based on the currently acquired request data. It should be noted that when the business scenario is a recommendation scenario, the recommendation scenario may include same-city feed business, attention-seeking feed business, recommended feed business, etc.

[0072] Step S103, determining a template for generating simulation data according to the business scenario.

[0073] Optionally, in the embodiment of the present disclosure, taking the recommendation scenario as an example, each recommendation scenario includes multiple recommendation types, such as the city feed, recommendation feed, and attention feed all include short videos, live broadcast rooms, photo albums, commodities, and other recommendation types. Each recommendation type has a corresponding dependent data structure, and a data template structure can be defined based on these data structures to obtain a generation template for simulated data.

[0074] Step S104, generating simulation data to be fed back according to the data resource pool and the generation template, wherein the data resource pool stores resource information corresponding to the business types included in the business scenario.

[0075] Optionally, in order to manage resource information corresponding to multiple business types in the same business scenario, the embodiment of the present disclosure can manage such resource information by establishing multiple data resource pools. Furthermore, in the embodiment of the present disclosure, a data resource pool stores multiple resource information corresponding to a business type. For example, the server establishes a video data resource pool corresponding to the video recommendation type, and stores multiple video recommendation resource information in the video data resource pool.

[0076] Therefore, when there are multiple business types, it is necessary to establish multiple data resource pools, and then obtain resource information from multiple data resource pools respectively, and combine this resource information with the generated template to obtain the simulation data that needs to be fed back.

[0077] It is understandable that the number of simulation data here is at least one, that is, in an actual business scenario, after obtaining the user's request data, the server can generate at least one simulation data to be fed back.

[0078] In the disclosed embodiment, by obtaining request data, wherein the request data is used to obtain resource information; determining the business scenario according to the request data; and then determining the generation template of simulation data according to the business scenario; and then generating simulation data to be fed back according to the data resource pool and the generation template, wherein the data resource pool stores resource information corresponding to the business types included in the business scenario. In this way, the generation template of simulation data is dynamically generated based on the business scenario, and the resource information is managed based on the data resource pool. Then, the managed resource information is combined with the generation template, so that the simulation data can be dynamically returned from the data resource pool in different test business scenarios, meeting different test requirements, realizing the richness and flexibility of simulation data, and solving the problem that the simulation data returned by the current general API simulation platform are all set in advance and cannot be changed, and cannot be flexibly changed according to the real business scenario.

[0079] In some optional implementations, determining a generation template for simulation data according to a business scenario includes:

[0080] Determine at least one business type based on the business scenario;

[0081] The generation template is determined according to the business type, wherein there is a one-to-one correspondence between the business type and the generation template.

[0082] Optionally, in the disclosed embodiment, since a business scenario may include multiple business types, at least one business type may be obtained after determining the current business scenario. Since the display form, data structure, etc. are similar under the same business type, there is a one-to-one correspondence between the business type and the generation template, that is, one business type may generate one generation template.

[0083] In addition, it should be noted that a business type includes multiple business resources, and there is a one-to-one correspondence between business types and generation templates, so there is a one-to-many correspondence between generation templates and business resources.

[0084] In the disclosed embodiment, at least one business type is determined according to the business scenario, and then a generation template is obtained based on each business type, thereby achieving flexible configuration of generated simulation data and ensuring accuracy and authenticity in the test scenario.

[0085] In some optional implementations, generating simulation data to be fed back according to the data resource pool and the generation template includes:

[0086] Assign weights to generated templates based on request data;

[0087] Sort the generated templates according to the weights to obtain the sorting results;

[0088] Extract resource information from the data resource pool according to the sorting result;

[0089] According to the resource information and the generated template, the simulation data is obtained.

[0090] Optionally, as can be seen from the above embodiments, the server establishes multiple data resource pools for managing business resources under different business types. Since there are multiple business types, the number of corresponding generated generation templates is also at least one. Therefore, in order to return the simulation data to the front end in an orderly manner, the generated templates obtained can be given weights. For example, the user's current needs are obtained according to the request data sent by the user, and the weights of different generated templates are defined as needed. Then, these generated templates are sorted according to the weights to obtain the sorting results. Then, according to the sorting results, the data resource pool corresponding to the generated template is returned to extract resource information to obtain the simulation data, and then the simulation data is obtained.

[0091] In the disclosed embodiment, the weights of the generated templates are set to achieve orderly feedback of the simulation data. At the same time, since the generated templates are sorted on demand, the fed-back simulation data can better meet the needs of the user and increase the user's interest.

[0092] In some optional implementations, obtaining simulation data according to resource information and a generation template includes:

[0093] Get the identifier of resource information;

[0094] Load the data information to be written into the generated template according to the identifier;

[0095] According to the data information and the generated template, the simulated data is obtained.

[0096] Optionally, since each recommendation type may be roughly similar in data features, such as the display format and data structure of different short videos are similar, but the details of the presentation may be slightly different, such as different titles, video content, tag anchors, music, etc., each short video will be identified, such as an ID, to distinguish them. Such a data resource pool can uniformly manage many recommendation resources of the same recommendation type, and each recommendation resource will also have a different tag identifier.

[0097] For example, the generated template is:

[0098]

[0099] The "gid" field in the current generated template needs to be filled, and "gid" is the ID of each recommended resource. For example, the ID of a video recommended resource is: 7063****4412. At this time, 7063****4412 is extracted as the data information to be written into the generated template.

[0100] After that, write 7063****4412 into the corresponding position of the generated template (i.e. the position of "gid"), and you can get the simulation data that needs to be returned. The details are as follows:

[0101]

[0102] In the disclosed embodiment, different resource information under the same business type is distinguished based on the identifier, so as to facilitate the rapid loading of required data information, and then quickly and accurately obtain simulation data.

[0103] In some optional implementations, determining the business scenario according to the request data includes:

[0104] Get key sub-information in the request data;

[0105] Determine the business scenario based on key sub-information.

[0106] Optionally, in the disclosed embodiment, when determining the business scenario, the key sub-information can be obtained by intercepting the key sub-information in the request data sent by the user. It can be understood that the key sub-information here can usually directly characterize the current corresponding business scenario, such as certain request parameters or certain request methods. For example: Since the same-city feed focuses on the user's location, the key sub-information can be the city ID information in the request parameter, so as long as the city ID information is obtained in the request parameter of the request data, the business scenario is considered to be the same-city feed; since the recommended feed focuses on the user's attribute label, the key sub-information can be Userid, tag, etc. in the request parameter, as long as the user identifier (such as Userid) and tag (such as tag) are obtained in the request parameter of the request data, the business scenario is considered to be the recommended feed; since the attention feed focuses on the user's attention information of the requester, the key sub-information can be a specific request method, such as identifying whether the user is a person you are concerned about / may know, as long as the request method obtained in the request data is to identify whether the user is a person you are concerned about / may know, then the business scenario is considered to be the attention feed.

[0107] In some optional embodiments, the method further comprises:

[0108] When receiving a target instruction, obtaining the currently selected target resource, wherein the target instruction is used to indicate that a target control of the front-end page is triggered, and the target control is used to indicate that the front-end page needs to display the target resource;

[0109] The target business scenario corresponding to the target resource is obtained, and a corresponding relationship between the target business scenario and the target resource is established. The corresponding relationship is used to display the target resource in a preset manner on the front-end page when the business scenario is determined to be the target business scenario.

[0110] Optionally, in order to improve the convenience of client testing, the embodiment of the present disclosure sets a client plug-in (ie, target control) to realize that at certain specific times, the target resource that needs to be displayed is forcibly displayed on the front-end page. Figure 2 As shown in the figure, the "+Add to feed" is the target control, and the resource currently displayed on the front-end page is the target resource, that is, the forced insertion resource. This target resource can be a video, picture, product, live broadcast, etc.

[0111] Specifically, if the target control on the front-end page is triggered to be selected, that is, Figure 2When the user clicks the mouse on "+Add to feed", the front end will send a target instruction to the server. After receiving the target instruction, the server will obtain the target resource involved in the current front end page. The target resource is in Figure 2 The middle one is a background image that is being displayed on the page.

[0112] Based on the target resource, the corresponding target business scenario can be automatically matched, and then the corresponding relationship between the target business scenario and the target resource is established. In this way, when the terminal device is turned on again, if it can be determined based on the user request data that the current business scenario is still the target business scenario, the target resource will be directly displayed on the front-end page in a preset manner (which can be the default display manner), thereby realizing the forced insertion operation of forcibly displaying the target resource on the homepage of the target business scenario.

[0113] In the disclosed embodiment, a quick insertion tool is provided on the client to meet the multi-terminal testing requirements, and the effect can be viewed on the front-end page in a preset manner, thereby improving the testing efficiency.

[0114] In some optional embodiments, the method further comprises:

[0115] Obtaining the location identifier of the target resource, wherein the location identifier is used to indicate the order in which the target resource is displayed on the front-end page;

[0116] The target resources are displayed on the front-end page in the order indicated by the location identifiers.

[0117] Optionally, the target resource after forced insertion can be viewed in the management background, or the forced insertion content can be directly defined through the background. Figure 3 As shown, if there is more than one target resource that needs to be forced into operation, the forced insertion content of the target resources can be defined through the background, such as setting their location identifiers according to the resource IDs, determining the insertion position according to the location identifiers, and determining the order in which they are displayed on the front-end page. In this way, when the terminal device is turned on again and the current business scenario is the target business scenario, the target resources can be displayed on the front-end page in the order indicated by the location identifiers.

[0118] In the embodiment of the present disclosure, the forced insertion content is defined through background management and combined with the client forced insertion plug-in to improve the convenience of client testing and use.

[0119] In some optional embodiments, such as Figure 4 As shown, Figure 4 : is a complete flow chart of the method for generating simulation data according to an embodiment of the present disclosure, and the specific process is as follows:

[0120] When the business client sends a request, the request will be intercepted in advance by the API simulation platform. The API simulation platform determines whether the request hits the recommended simulation service. If not, the request will be sent to the business server, and the business server will respond according to the request and feed back the response data to the business server. If it hits the simulation service, it will enter the recommended simulation service module, in which the recommended scenario is first determined, and then a generation template for multiple simulation data is obtained according to the recommended scenario, and then resource information is obtained from the data resource pool, where a data resource pool contains multiple resource information, and a data resource pool corresponds to a generation template. At this time, multiple resource information in a data resource pool and a generation template are combined to obtain a simulation data, and finally multiple simulation data can be dynamically loaded and returned to the business client.

[0121] In some optional embodiments, such as Figure 5 As shown, Figure 5 : is a flow chart of configuring a simulation data generation strategy according to an embodiment of the present disclosure, and the specific flow is:

[0122] Enter the workbench;

[0123] Determine whether it is the first use; if it is the first use, build a data resource pool, define a generation template, and enter the stage of configuring simulation data strategy; if it is not the first use, directly enter the stage of configuring simulation data strategy;

[0124] After entering the stage of configuring simulation data strategy, first configure the business scenario;

[0125] Select the business type to obtain the template for generating simulated data;

[0126] Define the weights for generating templates;

[0127] Dynamic loading, returning simulation data;

[0128] Add forced insertion resources;

[0129] Specify the forced insertion position of the forced insertion resource;

[0130] Start the simulation data generation process;

[0131] Verify the generated effect.

[0132] In the present embodiment, a device for generating simulation data is also provided, and the device is used to implement the above-mentioned embodiment and preferred implementation mode, and the description has been made no further. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.

[0133] This embodiment provides a device for generating simulation data, such as Figure 6 As shown, including:

[0134] A first acquisition module 601 is used to acquire request data, wherein the request data is used to acquire resource information;

[0135] A first determination module 602, configured to determine a business scenario according to request data;

[0136] A second determination module 603 is used to determine a generation template for simulation data according to a business scenario;

[0137] The generation module 604 is used to generate simulation data to be fed back according to the data resource pool and the generation template, wherein the data resource pool stores resource information corresponding to the business types included in the business scenario.

[0138] In the disclosed embodiment, by obtaining request data, wherein the request data is used to obtain resource information; determining the business scenario according to the request data; and then determining the generation template of simulation data according to the business scenario; and then generating simulation data to be fed back according to the data resource pool and the generation template, wherein the data resource pool stores resource information corresponding to the business types included in the business scenario. In this way, the generation template of simulation data is dynamically generated based on the business scenario, and the resource information is managed based on the data resource pool. Then, the managed resource information is combined with the generation template, so that the simulation data can be dynamically returned from the data resource pool in different test business scenarios, meeting different test requirements, realizing the richness and flexibility of simulation data, and solving the problem that the simulation data returned by the current general API simulation platform are all set in advance and cannot be changed, and cannot be flexibly changed according to the real business scenario.

[0139] In some optional implementations, the second determining module 603 includes:

[0140] A first determining unit, configured to determine at least one service type according to a service scenario;

[0141] The second determining unit is used to determine the generation template according to the business type, wherein there is a one-to-one correspondence between the business type and the generation template.

[0142] In some optional implementations, the generating module 604 includes:

[0143] An assignment unit, used for assigning weights to generated templates according to request data;

[0144] A sorting unit, used to sort the generated templates according to the weights to obtain a sorting result;

[0145] An extraction unit, used for extracting resource information from the data resource pool according to the sorting result;

[0146] The obtaining unit is used to obtain simulation data according to resource information and a generation template.

[0147] In some optional implementations, the first determining module 602 includes:

[0148] An acquisition unit, used to acquire key sub-information in the request data;

[0149] The third determining unit is used to determine the business scenario according to the key sub-information.

[0150] In some optional embodiments, the device further comprises:

[0151] A second acquisition module is used to acquire the currently selected target resource when receiving a target instruction, wherein the target instruction is used to indicate that a target control of the front-end page is triggered, and the target control is used to indicate that the front-end page needs to display the target resource;

[0152] The third acquisition module is used to obtain the target business scenario corresponding to the target resource and establish a corresponding relationship between the target business scenario and the target resource. The corresponding relationship is used to display the target resource on the front-end page in a preset manner when the business scenario is determined to be the target business scenario.

[0153] In some optional embodiments, the device further comprises:

[0154] A fourth acquisition module is used to acquire a location identifier of a target resource, wherein the location identifier is used to represent the order in which the target resources are displayed on a front-end page;

[0155] The display module is used to display the target resources on the front-end page in the order indicated by the location identifiers.

[0156] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0157] The simulation data generating device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0158] The present disclosure also provides a computer device having the above Figure 6 The simulation data generation device shown.

[0159] See also Figure 7 , Figure 7 is a schematic diagram of a computer device provided by an optional embodiment of the present disclosure, such as Figure 7 As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.

[0160] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0161] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0162] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0163] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0164] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0165] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0166] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.

[0167] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for generating simulation data, characterized in that: The method comprises: Obtaining request data, wherein the request data is used to obtain resource information; Determine a business scenario according to the request data; Determine a template for generating simulation data according to the business scenario; The simulation data to be fed back is generated according to the data resource pool and the generation template, wherein the data resource pool stores the resource information corresponding to the business type included in the business scenario.

2. The method according to claim 1, characterized in that: The step of determining a generation template for simulation data according to the business scenario includes: Determine at least one of the business types according to the business scenario; The generation template is determined according to the business type, wherein there is a one-to-one correspondence between the business type and the generation template.

3. The method according to claim 1 or 2, characterized in that: The step of generating the simulation data to be fed back according to the data resource pool and the generation template includes: assigning a weight to the generated template according to the request data; Sorting the generated templates according to the weights to obtain a sorting result; Extracting the resource information from the data resource pool according to the sorting result; The simulation data is obtained according to the resource information and the generation template.

4. The method according to claim 3, characterized in that The step of obtaining the simulation data according to the resource information and the generation template includes: Obtaining an identifier of the resource information; Loading data information to be written into the generated template according to the identifier; The simulation data is obtained according to the data information and the generation template.

5. The method according to claim 1, characterized in that: The determining the business scenario according to the request data includes: Obtaining key sub-information in the request data; The business scenario is determined according to the key sub-information.

6. The method according to claim 1, characterized in that The method further comprises: When receiving a target instruction, obtaining the currently selected target resource, wherein the target instruction is used to indicate that a target control of the front-end page is triggered, and the target control is used to indicate that the front-end page needs to display the target resource; The target business scenario corresponding to the target resource is obtained, and a corresponding relationship between the target business scenario and the target resource is established. The corresponding relationship is used to display the target resource in a preset manner on the front-end page when the business scenario is determined to be the target business scenario.

7. The method according to claim 6, characterized in that The method further comprises: Obtaining a location identifier of the target resource, wherein the location identifier is used to represent the order in which the target resources are displayed on the front-end page; The target resources are displayed on the front-end page in the order indicated by the location identifiers.

8. A device for generating simulation data, characterized in that: The device comprises: A first acquisition module, used to acquire request data, wherein the request data is used to acquire resource information; A first determination module, used to determine a business scenario according to the request data; A second determination module, used to determine a generation template for simulation data according to the business scenario; A generation module is used to generate the simulation data to be fed back according to the data resource pool and the generation template, wherein the data resource pool stores the resource information corresponding to the business type included in the business scenario.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for generating simulation data according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for generating simulation data according to any one of claims 1 to 7.

11. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the method for generating simulation data according to any one of claims 1 to 7.