CN115065627B - Parameter modification method and device, electronic equipment and storage medium - Google Patents

Parameter modification method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115065627B
CN115065627B CN202210555650.7A CN202210555650A CN115065627B CN 115065627 B CN115065627 B CN 115065627B CN 202210555650 A CN202210555650 A CN 202210555650A CN 115065627 B CN115065627 B CN 115065627B
Authority
CN
China
Prior art keywords
target
parameters
parameter
modified
default
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
CN202210555650.7A
Other languages
Chinese (zh)
Other versions
CN115065627A (en
Inventor
袁磊红
蔡宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202210555650.7A priority Critical patent/CN115065627B/en
Publication of CN115065627A publication Critical patent/CN115065627A/en
Application granted granted Critical
Publication of CN115065627B publication Critical patent/CN115065627B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings

Abstract

The embodiment of the invention provides a parameter modification method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring parameters to be modified and target parameters corresponding to the parameters to be modified in a parameter editing page of a target application; replacing a default method for initiating the network request in the target application with a target method, wherein the default method and the target method are both used for initiating the network request; if the default parameters in the target method comprise the parameters to be modified, searching the positions of the default parameters corresponding to the parameters to be modified in the target method; and replacing the default parameters at the positions with the target parameters, and calling the target methods subjected to parameter replacement to initiate network requests so as to connect to environments corresponding to the target parameters. Dynamic modification of relevant parameters in the network request can thus be achieved, so that a connection to the corresponding environment is possible.

Description

Parameter modification method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a parameter modification method, a parameter modification device, an electronic device, and a storage medium.
Background
When the service function is developed and checked, the service function is usually performed in a test environment, but not in an on-line environment, so that the test environment needs to be connected when the service function is developed and checked, but the test environment is time-consuming for non-developers, so that time loss caused by the connection of the test environment needs to be reduced by means of some methods or tools.
In the related art, a Charles packet-grabbing tool is generally used to modify related parameters in a network request, so as to connect with a test environment. But the Charles bag-grabbing tool is used for connecting the test environment, so that on one hand, the Charles bag-grabbing tool charges, financial expenditure is increased, and on the other hand, the Charles bag-grabbing tool has a certain learning cost, and a non-developer needs to take a certain time to learn the Charles bag-grabbing tool.
Disclosure of Invention
In order to solve the above-mentioned technical problem that the Charles packet capturing tool is used for connecting the test environment, on one hand, the Charles packet capturing tool charges, which increases financial expenditure, and on the other hand, the Charles packet capturing tool has a certain learning cost, and a non-developer needs to spend a certain time for learning the Charles packet capturing tool, the embodiment of the invention provides a parameter modification method, a device, an electronic device and a storage medium. The specific technical scheme is as follows:
in a first aspect of the embodiment of the present invention, there is provided a parameter modification method, including:
acquiring parameters to be modified and target parameters corresponding to the parameters to be modified in a parameter editing page of a target application;
replacing a default method for initiating the network request in the target application with a target method, wherein the default method and the target method are both used for initiating the network request;
if the default parameters in the target method comprise the parameters to be modified, searching the positions of the default parameters corresponding to the parameters to be modified in the target method;
and replacing the default parameters at the positions with the target parameters, and calling the target methods subjected to parameter replacement to initiate network requests so as to connect to environments corresponding to the target parameters.
In an alternative embodiment, the current page of the target application includes an edit button;
the obtaining the parameter to be modified and the target parameter corresponding to the parameter to be modified in the parameter editing page of the target application includes:
under the condition that the trigger of the preset operation of the user on the editing button is monitored, jumping from the current page to a parameter editing page;
and acquiring parameters to be modified and target parameters corresponding to the parameters to be modified in the parameter editing page.
In an alternative embodiment, the parameter editing page includes a save button therein, and the method further includes:
under the condition that the preset operation trigger of the user for the save button is monitored, saving the parameters to be modified and the target parameters;
and jumping to the current page by the parameter editing page, and displaying the parameters to be modified and the target parameters in the current page.
In an alternative embodiment, before performing the replacing the default method of initiating the network request in the target application with the target method, the method further includes:
in the current page, monitoring whether the preset operation of the user on the parameters to be modified and the target parameters is triggered or not;
and executing the step of replacing the default method for initiating the network request in the target application with the target method under the condition that the preset operation trigger of the user on the parameters to be modified and the target parameters is monitored.
In an optional embodiment, the step of replacing the default method for initiating the network request in the target application with the target method is performed when the preset operation trigger of the user on the parameter to be modified and the target parameter is monitored, and includes:
monitoring whether the initiation time of a network request arrives or not under the condition that the preset operation trigger of the user for the parameters to be modified and the target parameters is monitored;
and if the initiation time of the network request arrives, executing the step of replacing the default method for initiating the network request in the target application with the target method.
In an alternative embodiment, the method further comprises:
under the condition that the triggering of the preset operation of the user on the parameters to be modified and the target parameters is not monitored, calling the default method to initiate a default network request;
and requesting to connect to a corresponding default environment through the default network.
In an alternative embodiment, the method further comprises:
and if the default parameters in the target method do not contain the parameters to be modified, triggering an alarm of failure in modifying the related parameters in the network request.
In a second aspect of the embodiments of the present invention, there is also provided a parameter modification apparatus, the apparatus including:
the parameter acquisition module is used for acquiring parameters to be modified and target parameters corresponding to the parameters to be modified in a parameter editing page of the target application;
the method switching module is used for replacing a default method for initiating the network request in the target application with a target method, wherein the default method and the target method are both used for initiating the network request;
the position searching module is used for searching the position of the default parameter corresponding to the parameter to be modified in the target method if the default parameter in the target method comprises the parameter to be modified;
and the parameter replacement module is used for replacing the default parameter at the position with the target parameter, calling the target method subjected to parameter replacement to initiate a network request, and connecting to an environment corresponding to the target parameter.
In a third aspect of the embodiment of the present invention, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and a processor, configured to implement the parameter modification method according to any one of the first aspect when executing the program stored in the memory.
In a fourth aspect of embodiments of the present invention, there is also provided a storage medium having stored therein instructions which, when run on a computer, cause the computer to perform the parameter modification method of any of the first aspects described above.
In a fifth aspect of embodiments of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the above-described parameter modification methods.
According to the technical scheme provided by the embodiment of the invention, the parameters to be modified and the target parameters corresponding to the parameters to be modified are acquired in the parameter editing page of the target application, the default method for initiating the network request in the target application is replaced by the target method, wherein the default method and the target method are both used for initiating the network request, if the default parameters in the target method contain the parameters to be modified, the position of the default parameters corresponding to the parameters to be modified in the target method is searched, the default parameters in the position are replaced by the target parameters, and the target method subjected to parameter replacement is called to initiate the network request so as to be connected to the environment corresponding to the target parameters. By providing the target application, acquiring the parameters to be modified and the target parameters corresponding to the parameters to be modified in a parameter editing page of the target application, replacing a default method for initiating the network request in the target application with the target method, replacing the default parameters corresponding to the parameters to be modified in the target method with the target parameters, and calling the target method subjected to parameter replacement to initiate the network request so as to be connected to the environment corresponding to the target parameters, the dynamic modification of the related parameters in the network request can be achieved, and the network request can be connected to the corresponding environment.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic flow chart of a parameter modification method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of acquiring a domain name host of an original online environment and a domain name host of a test environment according to an embodiment of the present invention;
FIG. 3 is a schematic diagram showing a domain name host of an original online environment and a domain name host of a test environment according to an embodiment of the present invention;
FIG. 4 is a schematic diagram showing selecting a domain name host of an original online environment and testing the domain name host of the environment according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a parameter modification apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. 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 be within the scope of the invention.
As shown in fig. 1, a schematic implementation flow chart of a parameter modification method provided by an embodiment of the present invention is applied to an electronic device, and the method specifically may include the following steps:
s101, acquiring parameters to be modified and target parameters corresponding to the parameters to be modified in a parameter editing page of a target application.
In the embodiment of the invention, an iOS application written by the Objective-C language is provided, and the purpose of dynamically modifying relevant parameters in a network request can be realized through the iOS application written by the Objective-C language. Specifically, in a parameter editing page of a target application, that is, in a parameter editing page of an iOS application written in an Objective-C language, a user may input a parameter to be modified and a target parameter corresponding to the parameter to be modified.
For example, in a parameter editing page of an iOS application written by the Objective-C language, a user may input a domain name host of an original online environment and a domain name host of a test environment, so that the embodiment of the present invention may obtain the domain name host of the original online environment and the domain name host of the test environment input by the user. The domain name host of the original online environment and the domain name host of the test environment can be shown in the following table 1.
Domain name host of original online environment Domain name host of test environment
Iface.iqiyi.com 10.130.138.152
Iface2.iqiyi.com 111.206.13.99
…… ……
TABLE 1
Wherein Apple provides related API to dynamically realize method replacement in Objective-C language, the bottom layer of the API is to replace the realization of original function by using the dynamic property of Objective-C language in operation. Therefore, by means of the dynamics of the Objective-C language, calling the API replaces the method A which is executed in the iOS application written by the Objective-C language and used for initiating the network request with the method B, and both the method A and the method B are used for initiating the network request. With this feature, an editing portal can be provided in the iOS application written in the Objective-C language, in which the user can edit the relevant parameters of the network request, for example, modify information such as domain name, and thereby connect to the test environment.
The current page of the iOS application written in the Objective-C language therefore includes an edit button, i.e., the edit entry described above. In the embodiment of the invention, whether the preset operation of the user for the editing button is triggered or not can be monitored, and when the preset operation of the user for the editing button is monitored, the current page is jumped to a parameter editing page, and in the parameter editing page, the user can input parameters to be modified and target parameters corresponding to the parameters to be modified, so that the embodiment of the invention can acquire the parameters to be modified and the target parameters corresponding to the parameters to be modified, which are input by the user.
For example, as shown in fig. 2, the current page of the iOS application written by the Objective-C language includes an edit button, which is the above-mentioned edit entry, and the embodiment of the present invention can monitor whether the clicking operation of the user on the edit button is triggered, and in the case that the clicking operation of the user on the edit button is triggered, the current page jumps to a parameter editing page, and in the parameter editing page of the iOS application written by the Objective-C language, the user can input the domain name host of the original online environment and the domain name host of the test environment, so that the embodiment of the present invention can obtain the domain name host of the original online environment and the domain name host of the test environment input by the user.
In addition, in the embodiment of the invention, the parameter editing page of the iOS application written by the Objective-C language comprises a save button, so that after the parameters to be modified and the target parameters corresponding to the parameters to be modified are input, the parameters can be saved by a user, whether the preset operation of the save button by the user is triggered can be monitored, the parameters to be modified and the target parameters are saved under the condition that the preset operation of the save button by the user is monitored, the parameter editing page jumps to the current page, and the parameters to be modified and the target parameters are displayed in the current page.
For example, the parameter editing page of the iOS application written by the Objective-C language includes a save button, so that the user can save after inputting the domain name host of the original online environment and the domain name host of the test environment, so that the embodiment of the present invention monitors whether the clicking operation of the user on the save button is triggered, and in the case that the clicking operation of the user on the save button is triggered, saves the domain name host of the original online environment and the domain name host of the test environment, the parameter editing page jumps to the current page, and displays the domain name host of the original online environment and the domain name host of the test environment in the current page, as shown in fig. 3.
Note that, for the preset operation, for example, a click operation may be a tap operation, for example, a press-in operation may be a press-in operation, which is not limited in the embodiment of the present invention. In addition, for a network request, a plurality of fields are generally included, each field corresponds to a parameter, and the parameter to be modified and the target parameter may correspond to a certain field in the network request.
S102, replacing a default method for initiating the network request in the target application with a target method, wherein the default method and the target method are both used for initiating the network request.
In the embodiment of the invention, since the Objective-C language has the dynamics, the dynamics can be utilized to dynamically replace the method A for initiating the network request, which is executed in the iOS application written by the Objective-C language, with the method B, so that the default method for initiating the network request, which is the target application, in the iOS application written by the Objective-C language, can be replaced with the target method, wherein the default method and the target method are both used for initiating the network request.
For example, in the iOS application written in the Objective-C language, the method a and the method B for initiating a network request may both initiate a network request in terms of function implementation, but the difference is that the method a is used for initiating a network request connection on-line environment, and the method B is used for initiating a network request connection test environment, so that in the iOS application written in the Objective-C language, the method a for initiating a network request is replaced by the method B.
Before replacing the default method for initiating the network request in the target application (i.e., the iOS application written by the Objective-C language) with the target method, monitoring whether a preset operation of the user for the parameter to be modified and the target parameter is triggered in the current page of the iOS application written by the Objective-C language, and executing the step of replacing the default method for initiating the network request in the target application with the target method if the preset operation of the user for the parameter to be modified and the target parameter is triggered.
For example, in the current page of the iOS application written by the Objective-C language, whether the clicking operation of the user on the domain name host of the original online environment and the domain name host of the test environment is triggered is monitored, and in the case that the clicking operation of the user on the domain name host of the original online environment and the domain name host of the test environment is monitored, the domain name host of the original online environment and the domain name host of the test environment are selected at this time, and the row where the domain name host of the original online environment and the domain name host of the test environment appear is selected, as shown in fig. 4, it is described that the related domain name in the network request is modified according to the domain name host of the original online environment and the domain name host of the test environment, and at this time, the method a for initiating the network request in the iOS application written by the Objective-C language may be replaced by the method B.
It should be noted that, in the embodiment of the present invention, only relevant parameters in the network request are modified, but the initiation timing of the network request is not changed, so that if it is monitored that the preset operation trigger of the user for the parameters to be modified and the target parameters is triggered, whether the initiation timing of the network request arrives is monitored, and if the initiation timing of the network request arrives, a step of replacing the default method of initiating the network request in the target application with the target method is executed.
For example, if the trigger of the clicking operation of the user on the domain name host of the original online environment and the domain name host of the test environment is detected, whether the initiation timing of the network request arrives is detected, if the initiation timing of the network request arrives, the method a for initiating the network request may be replaced by the method B in the iOS application written by the Objective-C language, and the method B is called to initiate the network request.
It should be noted that, for the iOS application written by the Objective-C language, some resources, for example, video resources, are exposed on the iOS application, when a user clicks on a certain video resource, a network request needs to be initiated at this time, that is, the initiation timing of the network request is considered to arrive, which may be, of course, other cases, cause the initiation timing of the network request to arrive, which is not limited by the embodiment of the present invention.
In addition, in a period of time, under the condition that the trigger of the preset operation of the user for the parameter to be modified and the target parameter is not monitored, the user is not expected to modify the related parameter in the network request, at this time, a default method for initiating the network request in the iOS application written by the Objective-C language can be called, and the default network request is initiated, so that the corresponding default environment can be connected through the default network request.
For example, in the case that the triggering of the clicking operation of the user on the domain name host of the original online environment and the domain name host of the test environment is not monitored, the user is not expected to modify the related domain name in the network request, and at this time, the default network request can be initiated by calling the method A for initiating the network request in the iOS application written by the Objective-C language, so that the corresponding online environment can be connected through the default network request.
S103, if the default parameters in the target method comprise the parameters to be modified, searching the positions of the default parameters corresponding to the parameters to be modified in the target method.
In the embodiment of the invention, for the target method, whether the default parameters in the target method contain parameters to be modified or not is checked, if the default parameters in the target method contain the parameters to be modified, the default parameters consistent with the parameters to be modified exist in the default parameters, and at the moment, the position of the default parameters corresponding to the parameters to be modified in the target method is searched.
For example, in the embodiment of the present invention, for a target method, whether a default parameter in the target method includes a domain name host of an original online environment is checked, and if the default parameter in the target method includes the domain name host of the original online environment, a position of the default parameter corresponding to the domain name host of the original online environment in the target method is searched, where the default parameter is consistent with the domain name host of the original online environment.
In addition, if the default parameters in the target method do not contain the parameters to be modified, the parameters to be modified are possibly input in error, and at the moment, an alarm of failure in modifying the relevant parameters in the network request can be triggered, and then the user can be reminded to edit the parameters to be modified again.
S104, replacing the default parameters at the positions with the target parameters, and calling the target methods subjected to parameter replacement to initiate network requests so as to be connected to environments corresponding to the target parameters.
In the embodiment of the invention, the position of the default parameter corresponding to the parameter to be modified in the target method is searched, so that the default parameter at the position can be replaced by the target parameter, and the target method subjected to parameter replacement is called to initiate a network request so as to be connected to the environment corresponding to the target parameter.
The method comprises the steps of calling a target method subjected to parameter replacement to initiate a network request, wherein relevant parameters in the network request are modified, and the purpose of dynamically modifying the relevant parameters in the network request is achieved, so that the network request can be connected to an environment corresponding to the target parameters.
For example, the location of the default parameter corresponding to the domain name host of the original online environment in method B is searched, so that the default parameter at the location is replaced by the domain name host of the test environment, and the method B subjected to parameter replacement is called to initiate a network request to connect to the test environment.
The method B after parameter replacement is called to initiate a network request, wherein the related parameters in the network request are modified, and the purpose of dynamically modifying the related parameters in the network request is achieved, so that the network request can be connected to a corresponding test environment.
Through the description of the technical scheme provided by the embodiment of the invention, the parameter to be modified and the target parameter corresponding to the parameter to be modified are obtained in the parameter editing page of the target application, the default method for initiating the network request in the target application is replaced by the target method, wherein the default method and the target method are both used for initiating the network request, if the default parameter in the target method contains the parameter to be modified, the position of the default parameter corresponding to the parameter to be modified in the target method is searched, the default parameter at the position is replaced by the target parameter, and the target method subjected to parameter replacement is called to initiate the network request so as to be connected to the environment corresponding to the target parameter.
By providing the target application, acquiring the parameters to be modified and the target parameters corresponding to the parameters to be modified in a parameter editing page of the target application, replacing a default method for initiating the network request in the target application with the target method, replacing the default parameters corresponding to the parameters to be modified in the target method with the target parameters, and calling the target method subjected to parameter replacement to initiate the network request so as to be connected to the environment corresponding to the target parameters, the dynamic modification of the related parameters in the network request can be achieved, and the network request can be connected to the corresponding environment.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a parameter modification apparatus, as shown in fig. 5, where the apparatus may include: a parameter acquisition module 510, a method switching module 520, a location finding module 530, and a parameter replacement module 540.
The parameter obtaining module 510 is configured to obtain, in a parameter editing page of a target application, a parameter to be modified and a target parameter corresponding to the parameter to be modified;
a method switching module 520, configured to replace a default method for initiating a network request in the target application with a target method, where the default method and the target method are both used for initiating a network request;
a location searching module 530, configured to search, if a default parameter in the target method includes the parameter to be modified, a location of the default parameter corresponding to the parameter to be modified in the target method;
and a parameter replacement module 540, configured to replace the default parameter at the location with the target parameter, and call the target method subjected to parameter replacement to initiate a network request, so as to connect to an environment corresponding to the target parameter.
The embodiment of the invention also provides an electronic device, as shown in fig. 6, which comprises a processor 61, a communication interface 62, a memory 63 and a communication bus 64, wherein the processor 61, the communication interface 62 and the memory 63 complete communication with each other through the communication bus 64,
a memory 63 for storing a computer program;
the processor 61 is configured to execute the program stored in the memory 63, and implement the following steps:
acquiring parameters to be modified and target parameters corresponding to the parameters to be modified in a parameter editing page of a target application; replacing a default method for initiating the network request in the target application with a target method, wherein the default method and the target method are both used for initiating the network request; if the default parameters in the target method comprise the parameters to be modified, searching the positions of the default parameters corresponding to the parameters to be modified in the target method; and replacing the default parameters at the positions with the target parameters, and calling the target methods subjected to parameter replacement to initiate network requests so as to connect to environments corresponding to the target parameters.
The communication bus mentioned by the above electronic device may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a storage medium is provided, in which instructions are stored, which when run on a computer, cause the computer to perform the parameter modification method according to any of the above embodiments.
In a further embodiment of the present invention, a computer program product comprising instructions which, when run on a computer, causes the computer to perform the parameter modification method of any of the above embodiments is also provided.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a storage medium or transmitted from one storage medium to another, for example, from one website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The storage media may be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (10)

1. A method of modifying a parameter, the method comprising:
acquiring parameters to be modified and target parameters corresponding to the parameters to be modified in a parameter editing page of a target application;
replacing a default method for initiating the network request in the target application with a target method, wherein the default method and the target method are both used for initiating the network request, the default method is used for initiating the network request to connect with an online environment, and the target method is used for initiating the network request to connect with a test environment;
if the default parameters in the target method comprise the parameters to be modified, searching the positions of the default parameters corresponding to the parameters to be modified in the target method;
and replacing the default parameters at the positions with the target parameters, and calling the target methods subjected to parameter replacement to initiate network requests so as to connect to environments corresponding to the target parameters.
2. The method of claim 1, wherein the current page of the target application includes an edit button therein;
the obtaining the parameter to be modified and the target parameter corresponding to the parameter to be modified in the parameter editing page of the target application includes:
under the condition that the trigger of the preset operation of the user on the editing button is monitored, jumping from the current page to a parameter editing page;
and acquiring parameters to be modified and target parameters corresponding to the parameters to be modified in the parameter editing page.
3. The method of claim 2, wherein the parameter editing page includes a save button therein, the method further comprising:
under the condition that the preset operation trigger of the user for the save button is monitored, saving the parameters to be modified and the target parameters;
and jumping to the current page by the parameter editing page, and displaying the parameters to be modified and the target parameters in the current page.
4. A method according to claim 3, wherein prior to performing said replacing the default method of initiating a network request in the target application with a target method, the method further comprises:
in the current page, monitoring whether the preset operation of the user on the parameters to be modified and the target parameters is triggered or not;
and executing the step of replacing the default method for initiating the network request in the target application with the target method under the condition that the preset operation trigger of the user on the parameters to be modified and the target parameters is monitored.
5. The method according to claim 4, wherein the step of replacing the default method for initiating the network request in the target application with the target method is performed if the preset operation trigger of the user for the parameter to be modified and the target parameter is monitored, and includes:
monitoring whether the initiation time of a network request arrives or not under the condition that the preset operation trigger of the user for the parameters to be modified and the target parameters is monitored;
and if the initiation time of the network request arrives, executing the step of replacing the default method for initiating the network request in the target application with the target method.
6. The method according to claim 4, wherein the method further comprises:
under the condition that the triggering of the preset operation of the user on the parameters to be modified and the target parameters is not monitored, calling the default method to initiate a default network request;
and requesting to connect to a corresponding default environment through the default network.
7. The method according to claim 1, wherein the method further comprises:
and if the default parameters in the target method do not contain the parameters to be modified, triggering an alarm of failure in modifying the related parameters in the network request.
8. A parameter modification apparatus, the apparatus comprising:
the parameter acquisition module is used for acquiring parameters to be modified and target parameters corresponding to the parameters to be modified in a parameter editing page of the target application;
the method switching module is used for replacing a default method for initiating the network request in the target application with a target method, wherein the default method and the target method are both used for initiating the network request, the default method is used for initiating the network request to connect with an online environment, and the target method is used for initiating the network request to connect with a test environment;
the position searching module is used for searching the position of the default parameter corresponding to the parameter to be modified in the target method if the default parameter in the target method comprises the parameter to be modified;
and the parameter replacement module is used for replacing the default parameter at the position with the target parameter, calling the target method subjected to parameter replacement to initiate a network request, and connecting to an environment corresponding to the target parameter.
9. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1-7 when executing a program stored on a memory.
10. A storage medium having stored thereon a computer program, which when executed by a processor performs the method of any of claims 1-7.
CN202210555650.7A 2022-05-20 2022-05-20 Parameter modification method and device, electronic equipment and storage medium Active CN115065627B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210555650.7A CN115065627B (en) 2022-05-20 2022-05-20 Parameter modification method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210555650.7A CN115065627B (en) 2022-05-20 2022-05-20 Parameter modification method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115065627A CN115065627A (en) 2022-09-16
CN115065627B true CN115065627B (en) 2024-04-12

Family

ID=83198118

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210555650.7A Active CN115065627B (en) 2022-05-20 2022-05-20 Parameter modification method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115065627B (en)

Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105099816A (en) * 2015-07-02 2015-11-25 北京航空航天大学 Universal comprehensive detection device and method for aviation mission electronic systems
CN106664223A (en) * 2015-06-18 2017-05-10 华为技术有限公司 Detection method and detection device for the number of shared access hosts
CN109460279A (en) * 2018-12-14 2019-03-12 平安城市建设科技(深圳)有限公司 Forms pages development approach, device, equipment and storage medium based on small routine
CN109683915A (en) * 2018-12-03 2019-04-26 深圳市广和通无线股份有限公司 Parameter amending method, device, computer equipment and storage medium
CN110399135A (en) * 2018-06-05 2019-11-01 腾讯科技(深圳)有限公司 A kind of method and device for installing application program
CN110688600A (en) * 2019-09-09 2020-01-14 平安普惠企业管理有限公司 Online editing method, device and equipment based on HTML (Hypertext markup language) page and storage medium
CN110830305A (en) * 2019-11-14 2020-02-21 深圳绿米联创科技有限公司 Method and device for accessing wireless device to WIFI network, electronic device and storage medium
CN110858173A (en) * 2018-08-23 2020-03-03 北京搜狗科技发展有限公司 Data processing method and device and data processing device
CN110875858A (en) * 2018-08-31 2020-03-10 北京京东尚科信息技术有限公司 Application test data capturing method, system, equipment and storage medium
WO2020119434A1 (en) * 2018-12-15 2020-06-18 深圳壹账通智能科技有限公司 Method and apparatus for interface data processing, method and apparatus for automated testing, device, and medium
WO2020236699A1 (en) * 2019-05-20 2020-11-26 Citrix Systems, Inc. Network traffic steering with programmatically generated proxy auto-configuration files
WO2020253389A1 (en) * 2019-06-19 2020-12-24 深圳壹账通智能科技有限公司 Page translation method and apparatus, medium, and electronic device
CN112187570A (en) * 2020-09-15 2021-01-05 中信银行股份有限公司 Risk detection method and device, electronic equipment and readable storage medium
CN112612546A (en) * 2020-12-24 2021-04-06 广州虎牙科技有限公司 Page loading method and device, electronic equipment and storage medium
CN112910722A (en) * 2019-12-04 2021-06-04 北京达佳互联信息技术有限公司 Network request testing method, device, terminal and storage medium
CN113312036A (en) * 2021-06-15 2021-08-27 曙光信息产业(北京)有限公司 Large-screen display method, device and equipment of Web page and storage medium
CN113704590A (en) * 2021-09-06 2021-11-26 挂号网(杭州)科技有限公司 Webpage data acquisition method and device, electronic equipment and storage medium
CN113992507A (en) * 2021-10-11 2022-01-28 新华三信息安全技术有限公司 Method, device, server and storage medium for determining default parameter value
CN114268542A (en) * 2021-12-21 2022-04-01 奇安信科技集团股份有限公司 Network card information modification method and device, storage medium and computer equipment
CN114357574A (en) * 2021-12-20 2022-04-15 万翼科技有限公司 Component editing method, device, equipment and storage medium based on parameterized drive

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020065911A1 (en) * 2000-10-03 2002-05-30 Von Klopp Ana H. HTTP transaction monitor with edit and replay capacity
US10917325B2 (en) * 2018-02-17 2021-02-09 Fortinet, Inc. Deriving test profiles based on security and network telemetry information extracted from the target network environment
US10838769B2 (en) * 2018-11-16 2020-11-17 International Business Machines Corporation Application program interface based service lookup in a service architecture
US20200319855A1 (en) * 2019-04-02 2020-10-08 Mz Ip Holdings, Llc Parameter modification of virtual entities for client applications

Patent Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106664223A (en) * 2015-06-18 2017-05-10 华为技术有限公司 Detection method and detection device for the number of shared access hosts
CN105099816A (en) * 2015-07-02 2015-11-25 北京航空航天大学 Universal comprehensive detection device and method for aviation mission electronic systems
CN110399135A (en) * 2018-06-05 2019-11-01 腾讯科技(深圳)有限公司 A kind of method and device for installing application program
CN110858173A (en) * 2018-08-23 2020-03-03 北京搜狗科技发展有限公司 Data processing method and device and data processing device
CN110875858A (en) * 2018-08-31 2020-03-10 北京京东尚科信息技术有限公司 Application test data capturing method, system, equipment and storage medium
CN109683915A (en) * 2018-12-03 2019-04-26 深圳市广和通无线股份有限公司 Parameter amending method, device, computer equipment and storage medium
CN109460279A (en) * 2018-12-14 2019-03-12 平安城市建设科技(深圳)有限公司 Forms pages development approach, device, equipment and storage medium based on small routine
WO2020119434A1 (en) * 2018-12-15 2020-06-18 深圳壹账通智能科技有限公司 Method and apparatus for interface data processing, method and apparatus for automated testing, device, and medium
WO2020236699A1 (en) * 2019-05-20 2020-11-26 Citrix Systems, Inc. Network traffic steering with programmatically generated proxy auto-configuration files
WO2020253389A1 (en) * 2019-06-19 2020-12-24 深圳壹账通智能科技有限公司 Page translation method and apparatus, medium, and electronic device
CN110688600A (en) * 2019-09-09 2020-01-14 平安普惠企业管理有限公司 Online editing method, device and equipment based on HTML (Hypertext markup language) page and storage medium
CN110830305A (en) * 2019-11-14 2020-02-21 深圳绿米联创科技有限公司 Method and device for accessing wireless device to WIFI network, electronic device and storage medium
CN112910722A (en) * 2019-12-04 2021-06-04 北京达佳互联信息技术有限公司 Network request testing method, device, terminal and storage medium
CN112187570A (en) * 2020-09-15 2021-01-05 中信银行股份有限公司 Risk detection method and device, electronic equipment and readable storage medium
CN112612546A (en) * 2020-12-24 2021-04-06 广州虎牙科技有限公司 Page loading method and device, electronic equipment and storage medium
CN113312036A (en) * 2021-06-15 2021-08-27 曙光信息产业(北京)有限公司 Large-screen display method, device and equipment of Web page and storage medium
CN113704590A (en) * 2021-09-06 2021-11-26 挂号网(杭州)科技有限公司 Webpage data acquisition method and device, electronic equipment and storage medium
CN113992507A (en) * 2021-10-11 2022-01-28 新华三信息安全技术有限公司 Method, device, server and storage medium for determining default parameter value
CN114357574A (en) * 2021-12-20 2022-04-15 万翼科技有限公司 Component editing method, device, equipment and storage medium based on parameterized drive
CN114268542A (en) * 2021-12-21 2022-04-01 奇安信科技集团股份有限公司 Network card information modification method and device, storage medium and computer equipment

Also Published As

Publication number Publication date
CN115065627A (en) 2022-09-16

Similar Documents

Publication Publication Date Title
CN108322351B (en) Method and device for generating topological graph and method and device for determining faults
CN110798380B (en) Data acquisition method, system, device, test equipment and test server
CN110879781B (en) Program debugging method, device, electronic equipment and computer readable storage medium
CN112199300B (en) Interface testing method and device, electronic equipment and storage medium
CN109491763B (en) System deployment method and device and electronic equipment
CN108156252B (en) Data access method and device, server and client
US20170277622A1 (en) Web Page Automated Testing Method and Apparatus
CN107102937B (en) User interface testing method and device
CN113918438A (en) Method and device for detecting server abnormality, server and storage medium
CN115065627B (en) Parameter modification method and device, electronic equipment and storage medium
CN111079061B (en) Data processing method and electronic equipment
CN112866062A (en) Distributed pressure test system, method, device, equipment and storage medium
CN112115103A (en) File address display method and device, electronic equipment and readable storage medium
CN110708270B (en) Abnormal link detection method and device
CN112506781B (en) Test monitoring method, device, electronic equipment, storage medium and program product
CN109165127B (en) Problem interface positioning method and device and electronic equipment
CN108399223B (en) Data acquisition method and device and electronic equipment
CN108459940B (en) Configuration information modification method and device of application performance management system and electronic equipment
CN111124712A (en) Event notification method, device, server and storage medium
CN112540820A (en) User interface updating method and device and electronic equipment
CN111367703A (en) Troubleshooting method and device
CN110888643A (en) Page processing method and device
CN111538510B (en) Method and device for determining application program installation package and electronic equipment
CN111324846B (en) Information processing method, information processing device, electronic equipment and computer readable storage medium
CN114741325B (en) Recording method and device of test script for application system test

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