CN112445391B - Service data generation method, device and computer readable storage medium - Google Patents

Service data generation method, device and computer readable storage medium Download PDF

Info

Publication number
CN112445391B
CN112445391B CN201910837954.0A CN201910837954A CN112445391B CN 112445391 B CN112445391 B CN 112445391B CN 201910837954 A CN201910837954 A CN 201910837954A CN 112445391 B CN112445391 B CN 112445391B
Authority
CN
China
Prior art keywords
service data
user
page
information
function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910837954.0A
Other languages
Chinese (zh)
Other versions
CN112445391A (en
Inventor
易灿
赖峥嵘
吴菁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910837954.0A priority Critical patent/CN112445391B/en
Publication of CN112445391A publication Critical patent/CN112445391A/en
Application granted granted Critical
Publication of CN112445391B publication Critical patent/CN112445391B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention discloses a service data generation method, a device and a computer readable storage medium; after the service data search page is displayed, the service data search page comprises a search control, a service data type list is displayed based on the operation of a user on the search control, the service data type list at least comprises one type of service data structure, when the selection operation of the user on the service data structure is detected, the service data generation page comprises a plurality of parameter input interfaces, the parameter information input by the user on the parameter input interfaces is received, and the service data is generated on the service data generation page according to the parameter information and the selected service data structure.

Description

Service data generation method, device and computer readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a service data generating method, apparatus, and computer readable storage medium.
Background
With the development of internet technology, the internet technology has been deeply integrated into daily life, various application programs have also become more and more important along with the continuous development of the application programs, and in the process of testing and perfecting, application program interfaces (Application Programming Interface, APIs), also called functions or service data, of a business layer are required to be used. In the prior art, different tools are sometimes adopted to generate the APIs for different services, and a user is required to re-write codes each time the APIs are generated.
In the research and practice process of the prior art, the inventor discovers that different tools generate different service APIs, so that unified maintenance on a plurality of service APIs is inconvenient, and in addition, a user is required to rewrite codes each time, so that the generation efficiency is lower, and the test efficiency is greatly influenced.
Disclosure of Invention
The embodiment of the invention provides a service data generation method, a service data generation device and a computer readable storage medium, which can improve the test efficiency.
A service data generation method, comprising:
Displaying a service data search page, wherein the service data search page comprises a search control;
based on the operation of the user on the search control, displaying a service data type list, wherein the service data type list at least comprises one type of service data structure;
When detecting the selection operation of a user on the service data structure, displaying a service data generation page, wherein the service data generation page comprises a plurality of parameter input interfaces;
Receiving parameter information input by a user at the parameter input interface;
and generating service data on the service data generation page according to the selected service data structure according to the parameter information.
Correspondingly, an embodiment of the present invention provides a service data generating device, including:
the search display unit is used for displaying a service data search page, and the service data search page comprises a search control;
A list display unit, configured to display a service data type list based on an operation of the user on the search control, where the service data type list includes at least one type of service data structure;
The data display page is used for displaying a service data generation page when detecting the selection operation of a user on a service data structure in the service data type list, wherein the service data generation page comprises a plurality of parameter input interfaces;
the receiving unit is used for receiving parameter information input by a user at a parameter input interface of the service data generation page;
and the generation unit is used for generating service data according to the selected service data structure on the service data generation page according to the parameter information.
Optionally, in some embodiments, the generating unit is specifically configured to obtain application data based on a selection operation of a user on the application data list, add the obtained application data to the selected service data structure to obtain initial service data, and edit the initial service data according to the parameter information to obtain service data.
Optionally, in some embodiments, the generating unit is specifically configured to classify the parameter information, add each type of parameter information to a corresponding area of the initial service data according to a classification result, obtain edited initial service data, test the edited initial service data to generate response information corresponding to the edited initial service data, and generate service data according to the response information and the edited initial service data.
Optionally, in some embodiments, the generating unit is specifically configured to use the edited initial service data as the service data when the response information meets a preset condition, generate a prompt message when the response information does not meet the preset condition, receive modified parameter information input by a user for the prompt message, and update the initial service data according to the modified parameter information to obtain the service data.
Optionally, in some embodiments, the generating unit is specifically configured to store the service data, display the stored data, and generate a log when detecting a storage control operation of a user for generating a page for the service data.
Optionally, in some embodiments, the receiving unit is specifically configured to display description information corresponding to the selected service data structure when detecting an operation of the user on the prompt control, and receive the parameter information entered by the user at a parameter entry interface of the service data generation page with reference to the description information.
Optionally, in some embodiments, the list display unit is specifically configured to display a service data management page when detecting an operation of a search control of the user for the service data search page, where the service data management page includes a classification control, and display a list of service data types to be selected when detecting an operation of a classification control of the user for the service data management page.
Optionally, in some embodiments, the method further includes an acquisition unit, specifically configured to acquire at least one service data sample, parse the service data sample to obtain a service data model set, and generate a service data type list according to the service data model set.
Optionally, in some embodiments, the collecting unit is specifically configured to extract a plurality of service data structures from the service data model set, classify the plurality of service data structures, and generate the list of service data types to be selected according to a classification result.
In addition, the embodiment of the invention also provides electronic equipment, which comprises a processor and a memory, wherein the memory stores an application program, and the processor is used for running the application program in the memory to realize the service data generation method provided by the embodiment of the invention.
In addition, the embodiment of the invention also provides a computer readable storage medium, which stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor to execute the steps in the service data generating method provided by the embodiment of the invention.
After the service data search page is displayed, the service data type list is displayed based on the operation of a search control of a user for the service data search page, the service data generation page is displayed according to the operation of selecting a service data structure on the user service data type list, the parameter information input by a user at a parameter input interface of the service data generation page is received, and the service data is generated at the service data generation page according to the input parameter and the selected service data structure.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of a scenario of a service data generating method according to an embodiment of the present invention;
Fig. 2 is a flow chart of a service data generating method according to an embodiment of the present invention;
FIG. 3 is a schematic display diagram of a service data search page provided by an embodiment of the present invention;
FIG. 4 is a schematic view showing a service data management page according to an embodiment of the present invention;
FIG. 5 is a schematic diagram showing a list of service data types according to an embodiment of the present invention;
FIG. 6 is a schematic display diagram of a service data generation page provided by an embodiment of the present invention;
FIG. 7 is another flowchart of a service data generation method provided by an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a service data generating device according to an embodiment of the present invention;
Fig. 9 is a schematic diagram of a structure of a list display unit of a service data generating apparatus provided by an embodiment of the present invention;
Fig. 10 is a schematic structural diagram of a generating unit of the service data generating apparatus provided by the embodiment of the present invention;
Fig. 11 is another schematic structural diagram of a service data generating device according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
The embodiment of the invention provides a service data generation method, a device and a computer readable storage medium. The service data generating device may be integrated in an electronic device, which may be a server or a terminal.
For example, as shown in fig. 1, taking the example that the service data generating device is integrated in an electronic device, after the electronic device displays a service data search page, the service data search page includes a search control, based on the operation of a user on the search control, a service data type list is displayed, the service data type list includes at least one type of service data structure, when the selection operation of the user on the service data structure is detected, the service data generating page is displayed, the service data generating page includes a plurality of parameter input interfaces, parameter information input by the user at the parameter input interfaces is received, and service data is generated at the service data generating page according to the selected service data structure according to the parameter information.
The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
The present embodiment will be described from the viewpoint of a service data generating apparatus, which may be integrated in an electronic device, which may be a server or a terminal, or other devices; the terminal may include a tablet computer, a notebook computer, a personal computer (PC, personal Computer), and the like.
A service data generation method comprises the steps of displaying a service data search page, wherein the service data search page comprises a search control, displaying a service data type list based on the operation of a user on the search control, the service data type list at least comprises one type of service data structure, displaying a service data generation page when the selection operation of the user on the service data structure is detected, the service data generation page comprises a plurality of parameter input interfaces, receiving parameter information input by the user on the parameter input interfaces, and generating service data on the service data according to the selected service data structure according to the parameter information.
As shown in fig. 2, the specific flow of the service data generation method is as follows:
101. a service data search page is displayed, the service data search page including a search control.
The service data search page may provide search service data, such as various types of service data, such as payment type service data, interaction type service data, and/or search type service data, to the user. The user can search the required service data according to the large category on the service data search page, and can also input identification information such as the name, code and/or number of the service data in the search area so as to search out the required target service data, as shown in fig. 3.
For example, a user may operate a user interface of the electronic device to trigger the display of a service data search page. For example, a user operating on a test tool selection page of an electronic device triggers the display of a service data search page. The test tool selection page may provide various tools for testing, such as a service data generation tool and other test tools for the user.
For example, a selection control may be provided on a test tool selection page, where the control may take a variety of forms, such as input boxes, icons, buttons, and the like. The user can operate the control, such as clicking, sliding and the like, and when detecting the selection operation of the user for selecting the control, the user triggers the display of the service data search page.
102. Based on the user's operation with respect to the search control, a list of service data types is displayed, the list of service data types including at least one type of service data structure.
Wherein the list of service data types may include a list in which a plurality of service data structures are arranged or combined in the form of a list.
The service data structure may be a framework structure of service data, taking the service data as a payment class function as an example, and the service data structure may be a main structure remaining after application data and parameters are removed for the payment class function, where such main structure exists in a code form.
For example, when an operation of a search control of the user for the service data search page is detected, the service data management page is displayed as shown in fig. 4. The service data management page may provide service data classified according to a major class for the user, for example, may be classified according to a function, and then classified into service data such as payment service data, interaction service data, and/or search service data. These large classes can also be subdivided into service data for each subdivision region. The classification control can be arranged on the service data management page, and a user can operate aiming at the classification control to obtain service data after the subdivision field.
For example, when a user operation of the classification control for the service data management page is detected, a service data type list may be displayed, as shown in fig. 5. For example, when the user operates the classification control of the payment type service data of the service data management page, and the electronic device detects the operation of the classification control by the user, a subdivided service data type list of the payment type service data can be displayed.
If the payment type service data can be subdivided into two or more stages, a first-stage service data list of a first-stage subdivision field can be displayed, a user can continue to select an operation classification control on the first-stage service data list, a second-stage service data list of a second-stage subdivision field is displayed, if the second-stage service data list exceeds the second-stage service data list, an operation classification control can be continued, a third-stage service data list of a third-stage subdivision field is displayed, and the user can subdivide the service data into service data lists of non-subdivision fields through the operation classification control. For example, payment service data may be subdivided into user payment service data and merchant payment service data, the user payment service data may be subdivided into user order service data and coupon payment service data, etc., and the user order service data may be subdivided into user order main service data and auxiliary service data, etc. The user selects the payment service data operation classification control in the primary service data list, the secondary classification list of the payment service data is displayed, the user can select one type of service data operation classification control on the secondary classification list of the payment service data, and the three-level classification list of the payment service data is displayed, so that the user can push the two types of service data operation classification control until the two types of service data cannot be classified. However, it should be emphasized that when the user operates the classification control, the user does not need to operate the classification control until the area that cannot be subdivided is needed, and the selection needs to be performed according to the actual application of the user, for example, it is possible that the service data that the user needs to generate can be completed only by performing one-level classification, but other types of service data may also be subdivided, and only the service data structure that the user needs to generate needs to be found at this time.
Alternatively, the service data type list may be obtained by self-calculation by the service data generating device, in addition to being preset by an operation and maintenance person. That is, before the step of displaying a list of service data types including at least one type of service data structure based on the user's operation on the search control, the service data generating method may further include:
(1) Acquiring at least one service data sample;
For example, the user may upload the edited service data to a storage area of the service data generating apparatus, such as to a local database or to a server. One or more service data in the system may also be automatically obtained from an automated application system. For example, the automation application system has a background data code composed of a plurality of service data, and the service data can be screened from the background data code, classified and stored in a local database or a server. The uploaded or filtered service data may include parameters of the business and application data.
(2) Analyzing the service data sample to obtain a service data model set;
For example, each service data in the service data sample is read, the read information is identified, and the service parameters and application data in the service data sample are identified, for example, inspect modules (a computer programming language such as a detection module in Python) can be used for performing type detection on modules, frames and/or functions in the service data, source codes can be obtained in the obtained service data, information of parameters of classes or functions in the service data can be obtained, and stacks in the service data are analyzed to obtain a service data model set.
Optionally, specific tools may be used to analyze and obtain the type of data or information in specific service data, for example, os.walk (an analysis/obtaining function) is used to obtain package and module information; obtaining class information and global method information using a pyclbr.readmodule_ex (an parsing/obtaining function) + inspect module; the analysis_ argspec (a parsing/acquisition function) + inspect module is used to acquire parameter information, such as class initialization parameters in _init_ (a constructor), self (name of object itself) parameter information in the process instance method, cls (parameters of class method) parameter information in the class method, process args x kwargs (a function of incoming) parameter information, and so on. The specific operation is as follows:
May further include:
And extracting, removing or deleting the service parameters and the application data in the service data sample according to the identification result to obtain a service data model set. And the information of the non-service data structure class in the service data sample can be directly extracted, removed or deleted to obtain a service data model set.
Alternatively, the identified business parameters and application data may be stored in a local database and server. According to the identified business parameters, a description document or reference information corresponding to the service data structure can be generated for prompting the user to input the parameters. The application data stored in the local database and the server may be invoked by the application data list of the service data generation page.
(3) Generating a service data type list according to the service data model set;
For example, a plurality of service data structures are extracted from the service data model set, and the extracted service data structures are classified in various manners according to functions of the service data, such as classifying into payment service data, interaction service data and/or search service data. The classification can be multi-level, such as primary classification, secondary classification and/or tertiary classification. And generating a service data type list according to the classification result, for example, arranging and displaying the classified data in a list form according to the first level, the second level and/or the third level.
103. When a user selection operation for a service data structure is detected, a service data generation page is displayed, the service data generation page including a plurality of parameter entry interfaces.
The service data generation page can provide a structure of service data to be generated for a user, and the user can enter parameters according to actual application in the service data structure of the service data generation page. For example, in the payment service data, various parameters such as a payment path, a payment amount, a merchant identification (Identity document, ID) and the like are entered, as shown in fig. 6.
For example, when a user selection operation for the service data structure is detected, the service data generation page is displayed. For example, when the user selects the structure of the service data to be generated in the service data type list by sliding, clicking, or the like, the user selects the function-order payment service data in the payment type service data, and the service data generation page is displayed. The service data generation page comprises a parameter input interface of a service data structure selected by a user, and the user can input parameters required for generating service data through the parameter input interface, for example, taking the service data of single order payment as an example, and can input parameters such as the maximum number of single order orders or the upper limit and the lower limit of payment amount.
Optionally, the service data generation page may further include an environment parameter area and a response area for running the service data. The environment parameters in the environment parameter area can provide operation support for operating service data selected by a user through uploading or directly calling the environment parameters stored in a local database or a server by the user, and the environment parameters can comprise one or more types of environment parameters which can simulate the operation of the service data selected by the user in various environments. The response area can be an area for testing the service data structure selected by the user, and when the user inputs the parameters of the selected service data structure, response information can be provided to feed back whether the parameters input by the user have problems.
104. And receiving parameter information input by a user at a parameter input interface.
For example, the user inputs corresponding parameters in the parameter input interface of the service data generation page, and the parameters input by the user can be uploaded to a local database or a server to call or receive the parameters input by the user uploaded to the local database or the server. The parameters entered by the user can also be directly cached, and the entered parameters can be directly called or received from the cache.
Optionally, the user may generate description information corresponding to the service data when entering the parameters, where the description information may include prompt information of parameters corresponding to the selected service data structure, for example, prompt information such as rules for prompting the user to fill in and whether to have to fill in and how to fill in.
For example, when the user detects that the user operates the prompt control, the description information corresponding to the selected service data structure is displayed, for example, the user selects the service data to be generated, such as the order payment service data, if the user is not familiar with the order payment service data, the user can click or slide and other operations to trigger the prompt control, when the user operates the prompt control, the user is identified according to the instruction to identify the service data structure selected by the user, and the corresponding description information is called from a local database or a server to be displayed in the form of a description document, and the description information can be displayed on the service data generation page or a separate prompt page can be generated. And the user inputs corresponding parameters in the parameter input interface of the service data generation page according to the prompt information in the description document, and after inputting is completed, the service data generation device receives the parameter information input by the user in the parameter input interface of the service data generation page by referring to the description information.
105. And generating service data on the service data generation page according to the selected service data structure according to the parameter information.
S1, acquiring application data based on selection operation of a user on the application data list.
Wherein the application data list may be arranged in a list form for a plurality of application data. The application data may include data of the service data specifically applied to the item, for example, the following bill payment service data may include specific ID information of the merchant, and may include application class data such as specific information of the commodity in the bill payment operation. The application data supports specific applications of the service data, and is also basic data for testing the service data.
For example, after entering parameters of the service data structure, the user needs to select application data supporting the service data. The application data may be displayed in a list form on a service data generation page from a local database or a server, and when an application data selection control of a user for the service data generation page is detected, the application data list is displayed, and based on a selection operation of the user for the application data list, the application data is acquired. For example, after the user selects the order payment service data and enters the parameters of the order payment service data structure, when the selection operation of the application data selection control is triggered, an application data list is displayed, and the application data list can be displayed on a service data generation page or can be independently displayed. The user selects application data corresponding to the order payment service data in the application data list, and the application data corresponding to the order payment service data may include application data of at least one data packet. And selecting one or more application data from the application data list according to actual application requirements, and acquiring the selected one or more application data based on the selection operation of the user on the application data list.
S2, adding the obtained application data into the selected service data structure to obtain initial service data.
For example, the acquired application data or application data may be added to the selected service data structure in various manners, the data packet of the acquired application data may be parsed, the parsed data may be classified according to the service data structure, the classified application data is filled into the interface or the insertion position of the corresponding service data structure, for example, the acquired application data packet is parsed to obtain a plurality of application data existing in the data packet, the plurality of application data is classified according to the service data structure, for example, the digital application data, the ID application data, the position application data, etc. need to be inserted into the service data structure, the plurality of application data existing in the obtained data packet is classified according to the digital application data, the ID application data, the position application data, etc. to obtain the digital application data, the ID application data, the position application data, etc. in the application data packet, the classified application data is inserted into the insertion position or the interface corresponding to the service data structure.
Optionally, the data packet of the application data may be directly uploaded to an application data pool of the service data structure, and each application data interface of the service data structure automatically acquires the corresponding application data from the application data pool. After the application data is added in the service data structure, initial service data is obtained. For example, the application data packet is uploaded to an application data pool of the service data structure, each application data interface of the service data is obtained in the application data pool, for example, the digital application data interface, the ID application data interface and/or the position application data interface obtain corresponding application data in the application data pool, and after the application data is added in the service data structure, initial service data is obtained.
And S3, editing the initial service data according to the parameter information to obtain service data.
(1) Classifying the parameter information;
For example, the received parameter information input by the user at the parameter input interface of the service data generation page may be classified in various manners, for example, the received parameter information may be classified according to a service data structure, for example, a digital class parameter, an ID class parameter, and/or a location class parameter need to be inserted into the service data structure, and the received parameter information may be classified according to the digital class parameter, the ID class parameter, and/or the location class parameter, to obtain one or more digital class parameters, the ID class parameter, and/or the location class parameter. Classification may also be based on the location of the service data structure, such as a header region parameter, a middle region parameter, and/or a tail region parameter.
(2) Adding the parameter information of each type to the corresponding area of the initial service data according to the classification result to obtain edited initial service data;
for example, according to the classification result, various types of parameter information are added to the corresponding area of the initial service data, for example, the classified types of parameters can be directly uploaded or inserted into the corresponding area of the initial service data, for example, the classified one or more digital parameters, ID parameters and/or position parameters can be directly uploaded or inserted into the digital parameter area, ID parameter area and/or position parameter area of the initial service data, and the addition of the parameter information is completed, so as to obtain the edited initial service data. And the classified parameters of each type can be directly uploaded to a parameter pool, corresponding parameters are called or extracted from the parameter pool by the initial service data, the addition of the parameter information is completed, and the edited initial service data is obtained.
(3) Testing the edited initial service data to generate response information corresponding to the edited initial service data;
The response information may be feedback information when the parameter information is added to the initial service data, and may be generated when each addition is performed, or may be generated after the addition is completed. For example, ID class information 127.0.0.2 is added to the initial service data, and the preset ID class information addition range is 127.0.0.1-127.0.0.255, by reading and identifying the added ID class information, and then generating response information for feeding back the addition result, the response information may be set according to the actual project, for example, may be set to pass through and be different from each other, or may be set to indicate that the added information has generated information of different colors, for example, green, not red, and the like.
For example, the edited initial service data may be tested once for each addition of one or more parameter information, or may be tested after the addition of complete parameter information. For example, assuming that there are parameter information 1, parameter information 2 and parameter information 3, when the parameter information 1 is added to the initial service data, the user may trigger the operation of the test control of the service data generation page, test the initial service data to which the parameter information 1 is added, and generate response information after the test is completed. And after the parameter information 1, the parameter information 2 and the parameter information 3 are added to the initial service data, testing is performed, and response information is generated after testing. The response information may be in the response area of the service data generation page, or the response information page may be generated separately. The response information may be set to pass or fail, but when the response information is displayed to fail, a warning information of an error position or type may be displayed.
Alternatively, the testing process may compare or match the added parameter information with the preset parameter information, and use the comparison or matching result as the response information. For example, ID class information 127.0.0.2 is added to the initial service data, the preset ID class information adding range is 127.0.0.1-127.0.0.255, the added ID class information is determined to match the preset adding range by reading and identifying the added ID class information, passing response information is generated, if the added ID class information is 127.0.0.266, the added ID class information is determined to not match the preset adding range by reading and identifying the added ID class information, failing response information is generated, and prompt information such as "the added ID class information is illegal, and the ID class range is 127.0.0.1-127.0.0.255" can be generated.
Optionally, the testing process may be further understood that the parameter information is added to the initial service data to perform matching or comparison of the preset operation result of the operation result, and the comparison or matching result is used as the response information. For example, ID class information is added to the initial service data, if the ID class information is added correctly, the initial service data may output target object information corresponding to the ID class information, and after the ID class information 127.0.0.2 is added to the initial service data, the initial service data is operated, and the target information corresponding to the ID class information is output, where the added parameter information is specified to be in compliance with the condition, and when the output information is not the corresponding target information, for example, when the output is a messy code or a code number, the added parameter information is specified to be out of compliance with the condition. At this time, the outputted messy code or code number is the response information, wherein the code number can be preset according to the fault type, for example, the code type error is 404, the code sequence error is 101, and the like, and the prompt information can be generated to prompt the fault position or the prompt information how to modify while outputting the messy code or code number.
(4) Generating service data according to the response information and the edited initial service data
A1, the response information accords with preset conditions
For example, when the response information meets the preset condition, the edited initial service data is used as service data. For example, when the response information is displayed as passing or displaying prompt information meeting the condition, it is indicated that the added parameter information has no problem and meets the adding rule. And taking the initial service data added with the parameter information as the service data to be generated.
A2, the response information does not accord with the preset condition
For example, when the response information does not meet the preset condition, the prompt information is generated, for example, when the response information is displayed as failed, messy code or preset trouble code, indicating that the parameter information added to the initial service data has a problem, and the prompt information is generated. The generated prompt information can be displayed in the response information or can be displayed independently, for example, the name, the position or the type of the specific error parameter information is generated. And the user re-inputs the parameter information of the error report to the parameter input interface of the service data generation page according to the prompt information, and the service data generation device receives the modified parameter information input by the user aiming at the prompt information. After the modified parameter information is received, the modified parameter information is added to the initial service data, the modified parameter information is tested, the modified parameter information can be tested independently, the modified parameter information can be tested integrally, corresponding response information is generated, the response information is judged, and when the response information meets preset conditions, the service data is obtained by updating according to the modified parameter information. When the response information does not meet the preset condition, the user continues to input the modified parameter information according to the generated prompt information, and tests the modified parameter information until the response information meets the preset condition.
Optionally, according to different types of service data, the service data can be generated and uniformly output on the same generation page for display, and in the process, the generation page aiming at different types of service data needs to be uniform, for example, an object numbered musical notation (JavaScript Object Notation, json) can be adopted for uniformly formatting the data, and jsoneditor (a tool for previewing, editing, formatting and verifying json on a browser) can be adopted for uniformly processing the json formatted data, so that service data with good compatibility and excellent interaction can be obtained. In the process of generating service data, for example, a json character string can be uniformly generated first according to the requirement of uniform landing for a plurality of types of data in the service data, and then the json character string is uniformly coded by adopting an encoding function and then landed. In the process of generating service data, for different types of service data, various interfaces in the service data return to a thousand, and data returned by each interface needs to be displayed in a friendly way, for example, toJson (a conversion function) can be adopted for a proto protocol (a protocol interface of the service data) to convert the service data to obtain friendly display service data, and other objects preferably adopt_direct (a dictionary function for storing object attributes) to perform structural output to obtain service data of the friendly display, wherein the specific operation can be as follows:
(5) And storing the service data and generating a log.
For example, after the service data is generated, when a save control operation of a user for a service data generation page is detected, the generated service data is saved, and may be saved in a local database of the service data generation device or in a server. When the generated service data is stored, the log may be generated at the same time, or the log may be generated after the service data is successfully stored. Wherein the log mainly includes events recording each operation of the service data generating device to generate the service data. When the service data is generated, special conditions such as attack or data leakage are suffered, and early warning information can be generated according to the log.
As can be seen from the foregoing, after displaying the service data search page, the service data search page includes a search control, and based on the operation of the user on the search control, a service data type list is displayed, where the service data type list includes at least one type of service data structure, when detecting the selection operation of the user on the service data structure, the service data generation page includes a plurality of parameter input interfaces, receives parameter information input by the user on the parameter input interfaces, and generates service data on the service data generation page according to the selected service data structure according to the parameter information.
The method described in the previous embodiment is described in further detail below by way of example.
In this embodiment, the service data generating apparatus is specifically integrated in an electronic device, the service data is a function, and the service data to be generated is a create order function (api-maketrade) in a payment function.
As shown in fig. 7, a specific flow of a function generating method may be as follows:
201. The electronic device displays a function search page, and the service data page includes a search control.
For example, a user may operate a user interface of the electronic device to trigger a display function search page. For example, a user selecting a page at a test tool of an electronic device operates to trigger a display function search page. The test tool selection page can provide various tools for testing, such as a function generation tool and other test tools for a user.
For example, a selection control may be provided on a test tool selection page, where the control may take a variety of forms, such as input boxes, icons, buttons, and the like. The user can operate the control, such as clicking, sliding and the like, and when the electronic equipment detects the selection operation of the user for selecting the control, the display function search page is triggered.
202. Based on the user's operation on the search control, the electronic device displays a list of function types, the list of function types including at least one type of function structure.
For example, when an operation of a search control of a user for a function search page is detected, the electronic device displays the function management page. The function management page may provide the user with functions classified according to a large class, for example, the functions may be classified according to function functions and then divided into functions such as payment class functions, interaction class functions and/or search class functions. These broad classes can also be subdivided into functions of various subdivision domains. The function management page can be provided with a classification control, and a user can operate aiming at the classification control to obtain the function after the subdivision field.
For example, the electronic device may display a list of function types when detecting a user's operation of the classification control for the function management page. For example, when the electronic device detects the operation of the classification control by the user on the classification control when the classification control of the payment class function of the function management page is operated, a function type list of subdivision of the payment class function can be displayed.
If the payment class function can be subdivided into two or more stages, the electronic device can display a first-stage function list of the first-stage subdivision domain, the user can continue to select the operation classification control on the first-stage function list, display a second-stage function list of the second-stage subdivision domain, and if the two stages are exceeded, continue to operate the classification control, display a third-stage function list of the third-stage subdivision domain, and the user can subdivide the function into function lists of the non-subdivision domain through the operation classification control. For example, taking a function to be generated as an order creating function (api-maketrade) as an example, the function belongs to a new function/auxiliary tool/function-order & payment/payment class function on a classification rule, when a user needs to find the order creating function, firstly searching a payment class function on a function management page, triggering a classification control in the payment class function, selecting the function-order & payment class function in a primary classification list, selecting the auxiliary tool class function in a secondary classification list of the function-order & payment class function, selecting the new function class function in a tertiary classification list of the auxiliary tool class function, and selecting the order creating function (api-maketrade) in a quaternary list of the new function class function.
It should be emphasized here that, when the user operates the classification control, the user does not need to operate until the field that cannot be subdivided is needed, and the selection needs to be performed according to the actual application of the user, for example, it is possible that the function that the user needs to generate can be completed only by performing one-level classification, but other types of functions may also be subdivided, and only the function structure that the user needs to generate needs to be found at this time.
Alternatively, the function type list may be obtained by self-calculation of the electronic device, in addition to being preset by the operation and maintenance personnel. That is, before the step of "based on the user's operation on the search control, the electronic device displays a list of function types including at least one type of function structure", the function generating method may further include:
(1) The electronic equipment acquires at least one function sample;
For example, the user may upload the edited function to a storage area of the electronic device, such as to a local database or to a server. One or more functions in the system may also be automatically obtained from an automated application system. For example, the automation application system has a background data code composed of a plurality of functions, and the functions can be screened from the background data code, classified and stored in a local database or a server. The uploading or screening function may include parameters of the service and application data.
(2) The electronic equipment analyzes the function sample to obtain a function model set;
for example, the electronic device reads each function in the function sample, identifies the read information, and identifies the service parameters and application data in the function sample, for example, inspect modules (a computer programming language such as a detection module in Python) may be used to perform type detection on modules, frames and/or functions in the acquired functions, source codes may be acquired in the acquired function data, and information about classes or parameters of the functions may be acquired, and stacks in the function data may be parsed to obtain a function model set.
Optionally, specific tools may be used to analyze and obtain the type of data or information in specific service data, for example, os.walk (an analysis/obtaining function) is used to obtain package and module information; obtaining class information and global method information using a pyclbr.readmodule_ex (an parsing/obtaining function) + inspect module; the analysis_ argspec (a parsing/acquisition function) + inspect module is used to acquire parameter information, such as class initialization parameters in _init_ (a constructor), self (name of object itself) parameter information in the process instance method, cls (parameters of class method) parameter information in the class method, process args x kwargs (a function of incoming) parameter information, and so on. The specific operation is as follows:
May further include:
And extracting, removing or deleting the service parameters and the application data in the function sample according to the identification result to obtain a function model set. And the information of the non-functional structure class in the functional sample can be directly extracted, removed or deleted to obtain a functional model set. For example, the collected function sample may include a payment class function a and a payment class function B. The codes or information in the payment class function A and the payment class function B are identified, the service parameters in the payment class function A and the payment class function B, such as a payment path, a payment amount, a merchant ID and the like, and the application data in the payment class function A and the payment class function B, such as a commodity catalog, a merchant list and the like, are identified. And extracting, removing or deleting the identified service parameters until the service parameters reach the function model set of the payment class function A and the payment class function B.
Alternatively, the business parameters and application data identified by the electronic device may be stored in a local database and server. According to the identified service parameters, a description document or reference information corresponding to the function structure can be generated for prompting the user to input the parameters. The application data stored in the local database and the server may be invoked by a list of application data of the function generation page.
(3) The electronic equipment generates a function type list according to the function model set;
For example, the electronic device extracts a plurality of function structures from the function model set, classifies the extracted function structures in a plurality of manners, and may be classified into payment class functions, interaction class functions, and/or search class functions according to functions of the functions. The classification level can be multiple levels, such as one-level classification, two-level classification, three-level classification and/or the like. And generating a function type list according to the classification result, for example, arranging and displaying the classified data in a list form according to the first level, the second level and/or the third level.
203. When a user selection operation on the function structure is detected, the electronic device displays a function generation page, wherein the function generation page comprises a plurality of parameter entry interfaces.
For example, when a user selection operation for a function structure is detected, the electronic device displays a function generation page. For example, when the user selects the structure of the function to be generated in the function type list through sliding, clicking or other operation modes, for example, the user selects the payment type function to create an order function, and the function generation page is displayed. The function generation page comprises a parameter input interface which is selected by a user and used for creating an order function structure, and the user can input parameters required by the function generation through the parameter input interface, for example, taking the order creation function as an example, the maximum times of single order creation or the upper limit and the lower limit of payment amount and the like can be input.
Optionally, the function generation page may further include an environment parameter area and a response area for running the function. The environment parameters in the environment parameter area can provide operation support for operating the function selected by the user by uploading or directly calling the environment parameters stored in the local database or the server by the user, and the environment parameters can comprise one or more types of environment parameters which can simulate the operation of the function selected by the user in various environments. The response area can be an area for testing the function structure selected by the user, and when the user records the parameters of the selected function structure, response information can be provided to feed back whether the parameters recorded by the user have problems.
204. The electronic equipment receives the parameter information input by the parameter input interface.
For example, the user inputs corresponding parameters in the parameter input interface of the function generation page, the parameters input by the user can be uploaded to a local database or a server, and the electronic device calls or receives the parameters input by the user uploaded to the local database or the server. The parameters entered by the user can also be directly cached, and the entered parameters can be directly called or received from the cache.
Optionally, the user may generate description information of the corresponding function when entering the parameter, where the description information may include prompt information of the parameter corresponding to the selected function structure, for example, prompt information such as rules for prompting the user to fill in and whether to have to fill in and how to fill in.
For example, when the user detects the operation of the user on the prompt control, the user displays the description information corresponding to the selected function structure, for example, the user selects the function to be generated, such as creating the order function, if the user is not familiar with creating the order function, the user can click or slide and other operations to trigger the prompt control, when the user detects the operation of the user on the prompt control, the user identifies the selected function structure according to the instruction, invokes the corresponding description information from the local database or the server, displays the description information in the form of a description document, and can be displayed on the function generation page or can generate an independent prompt page. And the user inputs corresponding parameters in the parameter input interface of the function generation page according to the prompt information in the description document, and after inputting is completed, the function generation device receives the parameter information input by the user in the parameter input interface of the function generation page by referring to the description information.
205. Based on the selection operation of the user on the application data list, the electronic device acquires the application data.
For example, after entering parameters of the function structure, the user needs to select application data of the support function. The application data can come from a local database or a server, are displayed on the function generation page in the form of a list, and when the application data selection control of the user for the function generation page is detected, the electronic equipment displays the application data list, and based on the selection operation of the user for the application data list, the electronic equipment acquires the application data. For example, after the user selects to create the order function and inputs the parameters of the order function structure, when the selection operation of the application data selection control is triggered, an application data list is displayed, and the application data list can be displayed on a function generation page or can be independently displayed. The user selects application data corresponding to the order creating function from the application data list, and the application data corresponding to the order creating function can comprise application data of at least one data packet. And selecting one or more application data from the application data list according to actual application requirements, and acquiring the selected one or more application data by the electronic equipment based on the selection operation of the user on the application data list.
206. And the electronic equipment adds the acquired application data into the selected function structure to obtain an initial function.
For example, the electronic device may add the acquired one or more application data to the selected function structure in various ways, parse the data packet of the acquired application data, classify the parsed data according to the function structure, fill the classified application data into the interfaces or insertion positions of the corresponding function structure, for example, parse the acquired application data packet to obtain a plurality of application data existing in the data packet, classify the plurality of application data according to the function structure, for example, the function structure needs to insert digital application data, ID application data, position application data, and the like, classify the plurality of application data existing in the obtained data packet according to the digital application data, ID application data, and/or position application data, and the like, and insert the classified application data into the insertion positions or interfaces corresponding to the function structure.
Optionally, the electronic device may further directly upload the data packet of the application data to an application data pool of the function structure, and each application data interface of the function structure automatically acquires corresponding application data from the application data pool. After the application data is added in the function structure, an initial service function is obtained. For example, the application data packet is uploaded to an application data pool of the function structure, each application data interface of the function is obtained in the application data pool, for example, the digital application data interface, the ID application data interface and/or the position application data interface obtain corresponding application data in the application data pool, and after the application data is added in the function structure, the initial function is obtained.
207. And according to the parameter information, the electronic equipment edits the initial service data to obtain a function.
(1) The electronic equipment classifies the parameter information;
For example, the electronic device classifies the received parameter information input by the user at the parameter input interface of the function generation page, and the classification mode may be various, for example, the classification may be performed according to a function structure, for example, a digital class parameter, an ID class parameter, and/or a location class parameter need to be inserted into the function structure, and the received parameter information may be classified according to the digital class parameter, the ID class parameter, and/or the location class parameter, so as to obtain one or more digital class parameters, the ID class parameter, and/or the location class parameter. The classification may also be based on the location of the functional structure, e.g. may be divided into a head region parameter, a middle region parameter and/or a tail region parameter etc.
(2) The electronic equipment adds the parameter information of each type to the corresponding area of the initial function according to the classification result to obtain an edited initial function;
For example, the electronic device may add the parameter information of each type to the corresponding area of the initial function according to the classification result, and the adding manner may be various, for example, the classified parameters of each type may be directly uploaded or inserted into the corresponding area of the initial function, for example, the classified one or more digital parameters, ID parameters and/or position parameters may be directly uploaded or inserted into the digital parameter area, ID parameter area and/or position parameter area of the initial function, so as to complete the adding of the parameter information and obtain the edited initial function. And the classified parameters of each type can be directly uploaded to a parameter pool, the initial function calls or extracts the corresponding parameters from the parameter pool, the addition of the parameter information is completed, and the edited initial function is obtained. For example, one or more head region parameters, middle region parameters and/or tail region parameters are uploaded to a parameter pool, the initial function extracts the head region parameters belonging to the head region, the middle region parameters belonging to the middle region and/or tail region parameters belonging to the tail region from the parameter pool, and the like, and the addition of parameter information is completed, so that an initial function after editing is obtained.
(3) The electronic equipment tests the edited initial function to generate response information corresponding to the edited initial function;
For example, the electronic device may test the edited initial function, and the test process may be performed once for each addition of one or more parameter information, or may be performed after adding complete parameter information. For example, assuming that there are parameter information 1, parameter information 2 and parameter information 3, when the parameter information 1 is added to the initial function, the user may trigger the operation of the test control of the function generation page, test the initial function to which the parameter information 1 is added, and generate response information after the test is completed. Or after the parameter information 1, the parameter information 2 and the parameter information 3 are added to the initial function, testing is performed, and response information is generated after testing. The response information can be in the response area of the function generation page, or can be independently generated. The response information may be set to pass or fail, but when the response information is displayed to fail, a warning information of an error position or type may be displayed.
Alternatively, the testing process may compare or match the added parameter information with the preset parameter information, and use the comparison or matching result as the response information. For example, ID class information 127.0.0.2 is added to the initial function, the preset ID class information adding range is 127.0.0.1-127.0.0.255, the added ID class information is determined to match the preset adding range by reading and identifying the added ID class information, passing response information is generated, if the added ID class information is 127.0.0.266, the added ID class information is determined to not match the preset adding range by reading and identifying the added ID class information, failing response information is generated, and prompt information such as "the added ID class information is illegal, and the ID class range is 127.0.0.1-127.0.0.255" can be generated.
Optionally, the testing process may be further understood that the parameter information is added to the preset running result of the initial function to match or compare, and the compared or matched result is used as the response information. For example, if the ID class information is added correctly, the initial function may output the target object information corresponding to the ID class information, and after the ID class information 127.0.0.2 is added to the initial function, the initial function is operated to output the target information corresponding to the ID class information, where the added parameter information is specified to be in compliance with the condition, and when the output information is not the corresponding target information, for example, when the output information is a messy code or a code number, the added parameter information is specified to be out of compliance with the condition. At this time, the outputted messy code or code number is the response information, wherein the code number can be preset according to the fault type, for example, the code type error is 404, the code sequence error is 101, and the like, and the prompt information can be generated to prompt the fault position or the prompt information how to modify while outputting the messy code or code number.
(4) The electronic equipment generates a function according to the response information and the edited initial function
A1, the response information accords with preset conditions
For example, when the response information meets the preset condition, the electronic device takes the edited initial function as a function. For example, when the response information is displayed as passing or displaying prompt information meeting the condition, it is indicated that the added parameter information has no problem and meets the adding rule. And taking the initial function added with the parameter information as a function needing to be generated.
A2, the response information does not accord with the preset condition
For example, when the response information does not meet the preset condition, the electronic device generates the prompt information, for example, when the response information is displayed as failed, messy code or preset failure code, the parameter information added to the initial function is indicated to have a problem, and the prompt information is generated. The generated prompt information can be displayed in the response information or can be displayed independently, for example, the name, the position or the type of the specific error parameter information is generated. And the user re-inputs the parameter information of the error report to the parameter input interface of the function generation page according to the prompt information, and the function generation device receives the modified parameter information input by the user aiming at the prompt information. After the modified parameter information is received, the modified parameter information is added to the initial function, the modified parameter information is tested, the modified parameter information can be tested independently, the modified parameter information can be tested integrally, corresponding response information is generated, the response information is judged, and when the response information meets the preset condition, the function is obtained by updating according to the modified parameter information. When the response information does not meet the preset condition, the user continues to input the modified parameter information according to the generated prompt information, and tests the modified parameter information until the response information meets the preset condition.
Optionally, according to different types of functions, the functions can be generated and output uniformly for display on the same generation page, and in the process, the generation pages of the functions of different types are required to be uniform, for example, an object numbered musical notation (JavaScript Object Notation, json) can be adopted for uniformly formatting the data, and jsoneditor (a tool for previewing, editing, formatting and verifying json on a browser) can be adopted for uniformly processing the json formatted data, so that the functions with good compatibility and excellent interaction are obtained. In the process of generating service data, the data of multiple types in the function needs to be uniformly landed, for example, a json character string can be uniformly generated first, and the json character string is uniformly encoded by adopting an encoding function and then landed. In the process of generating the function, aiming at different types of functions, various interfaces in the function return to be wonderful, and data returned by each interface needs to be displayed in a friendly way, for example, toJson (a conversion function) can be adopted for proto protocol (a protocol interface of the function) to convert the data to obtain a friendly display function, and other objects preferably adopt_act_ (a dictionary function used for storing object attributes) to carry out structural output to obtain the function of the friendly display, wherein the specific operation can be as follows:
/>
(5) The electronic device stores the functions and generates a log.
For example, after the electronic device generates the function, when detecting the operation of the save control on the function generation page by the user, the generated function may be saved in a local database of the function generation device or in a server. When the generated functions are stored, the logs can be generated at the same time, or the logs can be generated after the functions are successfully stored. Wherein the log mainly includes events recording each operation of the function generating means generating the function. When the function is generated, special conditions such as attack or data leakage are suffered, and early warning information can be generated according to the log.
As can be seen from the foregoing, after the electronic device displays the function search page, the function search page includes a search control, based on the operation of the user on the search control, a function type list is displayed, where the function type list includes at least one type of function structure, when the selection operation of the user on the function structure is detected, the function generation page is displayed, and includes a plurality of parameter input interfaces, parameter information input by the user on the parameter input interfaces is received, and according to the parameter information, a function is generated on the function according to the selected function structure.
In order to better implement the method, the embodiment of the invention also provides a service data generating device, which can be integrated in electronic equipment, wherein the electronic equipment can comprise a server, a terminal and other equipment.
For example, referring to fig. 8, the service data generating apparatus may include a search display unit 301, a list display unit 302, a data display unit 303, a receiving unit 304, and a generating unit 305, as follows:
(1) A search display unit 301;
and the search display unit is used for displaying a service data search page, and the service data search page comprises a search control.
For example, a user may operate a test tool selection page of the electronic device, where the user detection tool selection page includes a selection control, and when the user selects the selection control, the user triggers the display of a service data search page.
(2) List display unit 302,
A list display unit 302 for displaying a list of service data types, which includes at least one type of service data structure, based on a user operation for the search control.
The list display unit 302 may include a management page display subunit 3021 and a list display subunit 3022, as shown in fig. 9, specifically as follows:
A management page display subunit 3021 configured to display a service data management page including a classification control when an operation of a search control by a user for the service data search page is detected;
A list display subunit 3022 configured to display a service data type list when an operation of the classification control by the user for the service data management page is detected.
For example, the list display subunit 3022 is specifically configured to, when an operation of the search control for the service data search page by the user is detected, the management page display subunit 3021 displays the service data management page, the service data management page includes the classification control, and when an operation of the classification control for the service data management page by the user is detected, the list display subunit 3022 displays the service data type list.
(3) A data display unit 303;
a data display unit 303, configured to display a service data generation page, where the service data generation page includes a plurality of parameter entry interfaces, when a selection operation of a service data structure in the service data type list by a user is detected.
For example, the data display unit 303 is specifically configured to display the service data generation page when the user selects the structure of the service data to be generated in the service data type list through an operation manner such as sliding, clicking, or the like.
(4) A receiving unit 304;
The receiving unit 304 is configured to receive parameter information entered by a user at a parameter entry interface of the service data generation page;
for example, the receiving unit 304 is specifically configured to trigger a prompt control on a service data generation page by a user, identify, according to an instruction, that a service data structure selected by the user invokes corresponding description information from a local database or a server when detecting an operation of the user on the prompt control, and input corresponding parameters in a parameter input interface of the service data generation page according to the prompt information in the description document by the user, where after the input is completed, the service data generating device receives parameter information input in the parameter input interface of the service data generation page by the user with reference to the description information.
(5) A generating unit 305;
And the generating unit 305 is configured to generate service data according to the selected service data structure on the service data generating page according to the parameter information.
The generating unit 305 may include an acquiring subunit 3051, an adding subunit 3052, and an editing subunit 3053, as shown in fig. 10, specifically as follows:
A first acquiring subunit 3051, configured to acquire application data based on a selection operation of a user for the application data list;
An adding subunit 3052, configured to add the obtained application data to the selected service data structure, to obtain initial service data;
And the editing subunit 3053 is configured to edit the initial service data according to the parameter information, so as to obtain service data.
For example, the acquiring subunit 3051 acquires the application data based on the selection operation of the user on the application data list, the adding subunit 3052 adds the acquired application data to the selected service data structure to obtain the initial service data, and the editing subunit 3053 edits the initial service data according to the parameter information to obtain the service data.
Optionally, in an embodiment, referring to fig. 11, the service data generating apparatus may further include an acquisition unit 306, as follows:
The collection unit 306 is configured to collect the service data structures, and generate a service data structure list.
Wherein the acquisition unit 306 may include a second acquisition subunit 3061, a parsing subunit 3062, and a generation subunit 3063;
a second obtaining subunit 3061, configured to obtain at least one service data sample;
The parsing subunit 3062 is configured to parse the service data sample to obtain a service data model set;
a generation subunit 3063 is configured to generate a list of service data types according to the set of data models.
For example, the second obtaining unit 3061 obtains at least one service data sample, the analyzing subunit 3062 analyzes the service data sample to obtain a service data model set, and the generating subunit 3063 generates a service data type list according to the data model set.
As can be seen from the foregoing, in this embodiment, after the search display unit 301 displays the service data search page, the service data search page includes a search control, based on the operation of the user for the search control, the list display unit 302 displays a service data type list, where the service data type list includes at least one type of service data structure, when detecting the selection operation of the user for the service data structure, the data display unit 303 displays a service data generation page, where the service data generation page includes a plurality of parameter input interfaces, the receiving unit 304 receives the parameter information input by the user at the parameter input interfaces, and the generating unit 305 generates service data in the service data generation page according to the parameter information and according to the selected service data structure.
The embodiment of the invention also provides an electronic device, as shown in fig. 12, which shows a schematic structural diagram of the electronic device according to the embodiment of the invention, specifically:
the electronic device may include one or more processing cores 'processors 401, one or more computer-readable storage media's memory 402, power supply 403, and input unit 404, among other components. Those skilled in the art will appreciate that the electronic device structure shown in fig. 12 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or may be arranged in different components. Wherein:
The processor 401 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 402, and calling data stored in the memory 402, thereby performing overall detection of the electronic device. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by executing the software programs and modules stored in the memory 402. The memory 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the electronic device, etc. In addition, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
The electronic device further comprises a power supply 403 for supplying power to the various components, preferably the power supply 403 may be logically connected to the processor 401 by a power management system, so that functions of managing charging, discharging, and power consumption are performed by the power management system. The power supply 403 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The electronic device may further comprise an input unit 404, which input unit 404 may be used for receiving input digital or character information and generating keyboard, mouse, joystick, optical or trackball signal inputs in connection with user settings and function control.
Although not shown, the electronic device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 401 in the electronic device loads executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 executes the application programs stored in the memory 402, so as to implement various functions as follows:
Displaying a service data search page, wherein the service data search page comprises a search control, displaying a service data type list based on the operation of a user on the search control, wherein the service data type list at least comprises one type of service data structure, displaying a service data generation page when the selection operation of the user on the service data structure is detected, the service data generation page comprises a plurality of parameter input interfaces, receiving parameter information input by the user on the parameter input interfaces, and generating service data on the service data generation page according to the selected service data structure according to the parameter information.
For example, the service data search page may be triggered to be displayed by a user selecting a page on a test tool of the electronic device, where the service data search page includes a selection control, and the user may operate the control, and when detecting a selection operation of the user for the selection control, the service data search page is triggered to be displayed. The service data management page may be displayed when an operation of a search control of the user for the service data search page is detected, and the service data type list may be displayed when an operation of a sort control of the user for the service data management page is detected. And when the user selects the structure of the service data to be generated in the service data type list through sliding, clicking and other operation modes, displaying the service data generation page. When the user detects the operation of the user on the prompt control, the prompt control is displayed, the description information corresponding to the selected service data structure is displayed, the user inputs corresponding parameters in a parameter input interface of the service data generation page according to the prompt information in the description document, and after inputting is completed, the service data generation device receives the parameter information input by the user on the parameter input interface of the service data generation page by referring to the description information.
After the user has entered the parameters of the service data structure, the user needs to select the application data supporting the service data. When detecting that the user generates an application data selection control of the page aiming at the service data, displaying an application data list, and acquiring the application data based on the selection operation of the user aiming at the application data list. Analyzing the data packet of the acquired one or more application data, classifying the analyzed data according to the service data structure, filling the classified application data into the interface or the insertion position of the corresponding service data structure, and directly uploading the data packet of the application data to an application data pool of the service data structure, wherein each application data interface of the service data structure automatically acquires the corresponding application data from the application data pool. After the application data is added in the service data structure, initial service data is obtained.
The received parameter information input by the user at the parameter input interface of the service data generation page is classified, the classified parameters of each type can be directly uploaded or inserted into the corresponding area of the initial service data, the classified parameters of each type can also be directly uploaded into a parameter pool, the initial service data invokes or extracts the corresponding parameters from the parameter pool, the addition of the parameter information is completed, and the edited initial service data is obtained. Testing the edited initial service data, and generating response information after testing. And when the response information accords with the preset condition, the edited initial service data is used as service data. When the response information does not accord with the preset condition, generating prompt information, re-inputting the parameter information of the error report to the parameter input interface of the service data generation page by the user according to the prompt information, and receiving the modified parameter information input by the user aiming at the prompt information by the service data generation device. After the modified parameter information is received, the modified parameter information is added into the initial service data, the modified parameter information is tested, response information is generated, and when the response information accords with preset conditions, the service data is obtained by updating the modified parameter information. After the service data is generated, when the operation of a storage control of a user for the service data generation page is detected, the generated service data is stored, and a log is generated.
The specific implementation of each operation may be referred to the previous embodiments, and will not be described herein.
As can be seen from the foregoing, after displaying the service data search page, the service data search page includes a search control, and based on the operation of the user on the search control, a service data type list is displayed, where the service data type list includes at least one type of service data structure, and when detecting the selection operation of the user on the service data structure, the service data generation page includes a plurality of parameter input interfaces, receives parameter information input by the user on the parameter input interfaces, and generates service data on the service data generation page according to the selected service data structure according to the parameter information.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present application provides a storage medium having stored therein a plurality of instructions capable of being loaded by a processor to perform the steps of any of the service data generating methods provided by the embodiment of the present application. For example, the instructions may perform the steps of:
Displaying a service data search page, wherein the service data search page comprises a search control, displaying a service data type list based on the operation of a user on the search control, wherein the service data type list at least comprises one type of service data structure, displaying a service data generation page when the selection operation of the user on the service data structure is detected, the service data generation page comprises a plurality of parameter input interfaces, receiving parameter information input by the user on the parameter input interfaces, and generating service data on the service data generation page according to the selected service data structure according to the parameter information.
For example, the service data search page may be triggered to be displayed by a user selecting a page on a test tool of the electronic device, where the service data search page includes a selection control, and the user may operate the control, and when detecting a selection operation of the user for the selection control, the service data search page is triggered to be displayed. The service data management page may be displayed when an operation of a search control of the user for the service data search page is detected, and the service data type list may be displayed when an operation of a sort control of the user for the service data management page is detected. And when the user selects the structure of the service data to be generated in the service data type list through sliding, clicking and other operation modes, displaying the service data generation page. When the user detects the operation of the user on the prompt control, the prompt control is displayed, the description information corresponding to the selected service data structure is displayed, the user inputs corresponding parameters in a parameter input interface of the service data generation page according to the prompt information in the description document, and after inputting is completed, the service data generation device receives the parameter information input by the user on the parameter input interface of the service data generation page by referring to the description information.
After the user has entered the parameters of the service data structure, the user needs to select the application data supporting the service data. When detecting that the user generates an application data selection control of the page aiming at the service data, displaying an application data list, and acquiring the application data based on the selection operation of the user aiming at the application data list. Analyzing the data packet of the acquired one or more application data, classifying the analyzed data according to the service data structure, filling the classified application data into the interface or the insertion position of the corresponding service data structure, and directly uploading the data packet of the application data to an application data pool of the service data structure, wherein each application data interface of the service data structure automatically acquires the corresponding application data from the application data pool. After the application data is added in the service data structure, initial service data is obtained.
The received parameter information input by the user at the parameter input interface of the service data generation page is classified, the classified parameters of each type can be directly uploaded or inserted into the corresponding area of the initial service data, the classified parameters of each type can also be directly uploaded into a parameter pool, the initial service data invokes or extracts the corresponding parameters from the parameter pool, the addition of the parameter information is completed, and the edited initial service data is obtained. Testing the edited initial service data, and generating response information after testing. And when the response information accords with the preset condition, the edited initial service data is used as service data. When the response information does not accord with the preset condition, generating prompt information, re-inputting the parameter information of the error report to the parameter input interface of the service data generation page by the user according to the prompt information, and receiving the modified parameter information input by the user aiming at the prompt information by the service data generation device. After the modified parameter information is received, the modified parameter information is added into the initial service data, the modified parameter information is tested, response information is generated, and when the response information accords with preset conditions, the service data is obtained by updating the modified parameter information. After the service data is generated, when the operation of a storage control of a user for the service data generation page is detected, the generated service data is stored, and a log is generated.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The instructions stored in the storage medium may perform steps in any service data generating method provided by the embodiments of the present invention, so that the beneficial effects that any service data generating method provided by the embodiments of the present invention can be achieved, which are detailed in the previous embodiments and are not repeated herein.
The foregoing has described in detail the methods, apparatuses and computer readable storage medium for generating service data according to the embodiments of the present invention, and specific examples have been applied to illustrate the principles and embodiments of the present invention, and the above description of the embodiments is only for aiding in understanding the methods and core ideas of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present invention, the present description should not be construed as limiting the present invention.

Claims (11)

1. A service data generation method, comprising:
Displaying a service data search page, wherein the service data search page comprises a search control;
based on the operation of the user on the search control, displaying a service data type list, wherein the service data type list at least comprises one type of service data structure;
When detecting the selection operation of a user on the service data structure, displaying a service data generation page, wherein the service data generation page comprises an application data list and a plurality of parameter input interfaces;
Receiving parameter information input by a user at the parameter input interface;
Acquiring application data based on the selection operation of a user on the application data list;
adding the obtained application data to the selected service data structure to obtain initial service data;
And editing the initial service data according to the parameter information to obtain service data.
2. The service data generating method according to claim 1, wherein editing the initial service data according to the parameter information to obtain service data comprises:
classifying the parameter information;
adding the parameter information of each type to the corresponding area of the initial service data according to the classification result to obtain edited initial service data;
testing the edited initial service data to generate response information corresponding to the edited initial service data;
and generating service data according to the response information and the edited initial service data.
3. The service data generating method according to claim 2, wherein generating service data based on the response information and the edited initial service data comprises:
when the response information accords with a preset condition, the edited initial service data is used as the service data;
when the response information does not accord with the preset condition, generating prompt information, receiving modified parameter information input by a user aiming at the prompt information, and updating the initial service data according to the modified parameter information to obtain service data.
4. The service data generation method according to claim 1, wherein the service data generation page includes a save control; the editing of the initial service data according to the parameter information, after obtaining the service data, further includes:
When the operation of a storage control of a user for generating a page aiming at the service data is detected, storing the service data;
And displaying the stored data and generating a log.
5. The service data generation method according to any one of claims 1 to 4, wherein the service data generation page includes a prompt control; the receiving the parameter information input by the user at the parameter input interface comprises the following steps:
When the operation of the user on the prompt control is detected, displaying the description information corresponding to the selected service data structure;
and receiving the parameter information input by the user at a parameter input interface of the service data generation page by referring to the description information.
6. The service data generation method according to any one of claims 1 to 4, wherein the displaying a list of service data types based on the user's operation on the search control includes:
When detecting the operation of a search control of a user for the service data search page, displaying a service data management page, wherein the service data management page comprises a classification control;
And when detecting the operation of the classification control of the service data management page by the user, displaying a service data type list.
7. The service data generation method according to any one of claims 1 to 4, characterized by further comprising:
acquiring at least one service data sample;
analyzing the service data sample to obtain a service data model set;
and generating a service data type list according to the service data model set.
8. The service data generation method according to claim 7, wherein generating a service data type list from the service data model set comprises:
Extracting a plurality of service data structures in the service data model set;
classifying the plurality of service data structures;
And generating the service data type list according to the classification result.
9. A service data generating apparatus, comprising:
the search display unit is used for displaying a service data search page, and the service data search page comprises a search control;
A list display unit, configured to display a service data type list based on an operation of the user on the search control, where the service data type list includes at least one type of service data structure;
The data display page is used for displaying a service data generation page when detecting the selection operation of a user on a service data structure in the service data type list, wherein the service data generation page comprises an application data list and a plurality of parameter input interfaces;
the receiving unit is used for receiving parameter information input by a user at a parameter input interface of the service data generation page;
The generating unit is used for acquiring application data based on the selection operation of the user on the application data list; adding the obtained application data to the selected service data structure to obtain initial service data; and editing the initial service data according to the parameter information to obtain service data.
10. A computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps in the service data generation method of any of claims 1 to 8.
11. An electronic device comprising a processor and a memory, the memory storing an application, the processor being configured to run the application in the memory to perform the steps in the service data generation method of any one of claims 1 to 8.
CN201910837954.0A 2019-09-05 2019-09-05 Service data generation method, device and computer readable storage medium Active CN112445391B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910837954.0A CN112445391B (en) 2019-09-05 2019-09-05 Service data generation method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910837954.0A CN112445391B (en) 2019-09-05 2019-09-05 Service data generation method, device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112445391A CN112445391A (en) 2021-03-05
CN112445391B true CN112445391B (en) 2024-05-14

Family

ID=74733272

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910837954.0A Active CN112445391B (en) 2019-09-05 2019-09-05 Service data generation method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112445391B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104794246A (en) * 2015-05-15 2015-07-22 百度在线网络技术(北京)有限公司 Information search method and information search device
CN108038213A (en) * 2017-12-21 2018-05-15 中国农业银行股份有限公司 A kind of method of data processing, client, server and system
CN108614859A (en) * 2018-03-26 2018-10-02 平安科技(深圳)有限公司 Intelligent search method, server and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107918616A (en) * 2016-10-09 2018-04-17 阿里巴巴集团控股有限公司 Search system, page display method and client

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104794246A (en) * 2015-05-15 2015-07-22 百度在线网络技术(北京)有限公司 Information search method and information search device
CN108038213A (en) * 2017-12-21 2018-05-15 中国农业银行股份有限公司 A kind of method of data processing, client, server and system
CN108614859A (en) * 2018-03-26 2018-10-02 平安科技(深圳)有限公司 Intelligent search method, server and storage medium

Also Published As

Publication number Publication date
CN112445391A (en) 2021-03-05

Similar Documents

Publication Publication Date Title
CN110764753B (en) Business logic code generation method, device, equipment and storage medium
CN106294134B (en) The collapse localization method and device of code
US20190243848A1 (en) Generating a structured document guiding view
US9690788B2 (en) File type recognition analysis method and system
CN108763091B (en) Method, device and system for regression testing
US11373423B2 (en) Automated classification and interpretation of life science documents
CN101996131A (en) Automatic test method and automatic test platform for graphic user interface (GUI) based on x extensive makeup language (XML) packaging key word
CN103678109A (en) Dump document analysis method, device and system
CN110990053A (en) Method for creating and using machine learning scheme template and device
CN106227654A (en) A kind of test platform
CN111667231B (en) Automatic tax return method, device, system, computer equipment and storage medium
Wang et al. Smart contract vulnerability detection using code representation fusion
CN111190880A (en) Database detection method and device and computer readable storage medium
CN109816038A (en) A kind of Internet of Things firmware program classification method and its device
US20210089764A1 (en) Automated classification and interpretation of life science documents
CN112650673A (en) Method and device for creating test case in transaction tracking system and electronic equipment
CN112445391B (en) Service data generation method, device and computer readable storage medium
CN111506305A (en) Tool kit generation method and device, computer equipment and readable storage medium
CN113805861B (en) Code generation method based on machine learning, code editing system and storage medium
JPWO2013054581A1 (en) Method, program and system for generating a workflow from business specifications
CN107741905B (en) Test case, analytic model thereof, execution method, storage medium and processor
CN114385155A (en) vue project visualization tool generation method, device, equipment and storage medium
CN112328246A (en) Page component generation method and device, computer equipment and storage medium
CN113064811B (en) Automatic testing method and device based on workflow and electronic equipment
EP4170481A1 (en) Development assistance device, program, and development assistance method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant