CN109814942B - Parameter processing method and device - Google Patents

Parameter processing method and device Download PDF

Info

Publication number
CN109814942B
CN109814942B CN201811559004.8A CN201811559004A CN109814942B CN 109814942 B CN109814942 B CN 109814942B CN 201811559004 A CN201811559004 A CN 201811559004A CN 109814942 B CN109814942 B CN 109814942B
Authority
CN
China
Prior art keywords
target
parameter value
request message
application
applet
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
CN201811559004.8A
Other languages
Chinese (zh)
Other versions
CN109814942A (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 Urban Network Neighbor Information Technology Co Ltd
Original Assignee
Beijing Urban Network Neighbor Information 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 Urban Network Neighbor Information Technology Co Ltd filed Critical Beijing Urban Network Neighbor Information Technology Co Ltd
Priority to CN201811559004.8A priority Critical patent/CN109814942B/en
Publication of CN109814942A publication Critical patent/CN109814942A/en
Application granted granted Critical
Publication of CN109814942B publication Critical patent/CN109814942B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application provides a parameter processing method and device. In the present application, an application loaded with a target applet is started; controlling the target applet in the application to obtain the latest parameter value of the target interface parameter of the target applet; controlling the target applet to send a request message containing the latest parameter value; intercepting the request message; extracting the latest parameter value from the request message; the current parameter value of the target interface parameter of the target applet is replaced with the latest parameter value. So that the latest parameter values can be used to send request messages when the target applet sends other request messages to the outside afterwards, e.g. when sending other request messages to a background server of the target applet. The whole process of the application is completely processed automatically, for example, the flow is realized through UIcase, the proxy server and the JS script, and therefore labor cost can be reduced.

Description

Parameter processing method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a parameter processing method and apparatus.
Background
With the rapid development of the technology, various APPs (applications) have come into daily life of people, and applets have gained wide attention from various industries as an Application that can be used without downloading and installing, so that more and more APPs are loaded with applets to realize more convenient and faster service for users.
The small program is provided with an interface, the small program can perform data interaction with the outside through the interface, and then service is provided for a user, however, interface parameters are bound to the interface, the small program often needs to request data to the outside based on parameter values of the interface parameters, but if the parameter values of the interface parameters are overdue, the data are requested to the outside based on the parameter values of the interface parameters, and then service cannot be provided for the user, so that the user experience is low.
Disclosure of Invention
In order to solve the above technical problems, the present application shows a parameter processing method and apparatus.
In a first aspect, the present application shows a parameter processing method, including:
starting the application loaded with the target applet;
controlling the target applet in the application to obtain the latest parameter value of the target interface parameter of the target applet;
controlling the target applet to send a request message containing the latest parameter value;
intercepting the request message;
extracting the latest parameter value from the request message;
replacing a current parameter value of a target interface parameter of the target applet with the latest parameter value.
In an optional implementation manner, the starting the application loaded with the target applet includes:
acquiring a program identifier of the target applet;
determining a corresponding relation between a program identifier of the applet and an application identifier of the application loaded with the applet;
searching an application identifier corresponding to the program identifier in the corresponding relation;
and starting the application corresponding to the application identification.
In an optional implementation manner, the controlling, in the application, the target applet to obtain a latest parameter value of a target interface parameter of the target applet includes:
controlling the target small program to send an acquisition request to a background server of the application in the application, wherein the acquisition request is used for the latest parameter value of the target interface parameter of the target small program;
and controlling the target small program to receive the latest parameter value returned by the background server according to the acquisition request.
In an optional implementation manner, the controlling the target applet to send a request message including the latest parameter value includes:
determining the message type of the message which needs to contain the parameter value of the target interface parameter;
controlling the target applet to generate a request message of the message type containing the latest parameter value;
and controlling the target small program to send the generated request message to a background server corresponding to the target small program.
In an optional implementation manner, the intercepting the request message includes:
starting a proxy server arranged between the target applet and a receiving end of the request message;
receiving, using the proxy server, the request message.
In an optional implementation, the method further includes:
forwarding the request message to the receiver using the proxy server.
In an optional implementation manner, the extracting the latest parameter value from the request message includes:
searching the parameter identification of the target interface parameter in the request message;
and searching the latest parameter value in the request message according to the parameter identifier.
In an optional implementation manner, the replacing the current parameter value of the target interface parameter of the target applet with the latest parameter value includes:
determining a storage path of parameter values of the target interface parameters of the target applet;
deleting the stored current parameter value in the storage path;
storing the latest parameter value in the storage path.
In a second aspect, the present application shows a parameter processing apparatus, the apparatus comprising:
the starting module is used for starting the application loaded with the target applet;
the first control module is used for controlling the target small program to obtain the latest parameter value of the target interface parameter of the target small program in the application;
a second control module, configured to control the target applet to send a request message including the latest parameter value;
the intercepting module is used for intercepting the request message;
an extraction module, configured to extract the latest parameter value from the request message;
a replacement module to replace a current parameter value of a target interface parameter of the target applet with the latest parameter value.
In an optional implementation manner, the starting module includes:
an acquisition unit configured to acquire a program identifier of the target applet;
a first determination unit configured to determine a correspondence between a program identifier of an applet and an application identifier of an application to which the applet is loaded;
a first searching unit, configured to search for an application identifier corresponding to the program identifier in the correspondence;
and the first starting unit is used for starting the application corresponding to the application identifier.
In an optional implementation, the first control module includes:
the first control unit is used for controlling the target small program to send an acquisition request to a background server of the application in the application, wherein the acquisition request is used for the latest parameter value of the target interface parameter of the target small program;
and the second control unit is used for controlling the target small program to receive the latest parameter value returned by the background server according to the acquisition request.
In an optional implementation, the second control module includes:
a second determining unit, configured to determine a message type of a message that needs to include a parameter value of the target interface parameter;
a third control unit, configured to control the target applet to generate a request message of the message type that includes the latest parameter value;
and the fourth control unit is used for controlling the target small program to send the generated request message to the background server corresponding to the target small program.
In an optional implementation manner, the intercepting module includes:
a second starting unit, configured to start a proxy server arranged between the target applet and a receiving end of the request message;
a receiving unit, configured to receive the request message using the proxy server.
In an optional implementation manner, the intercepting module further includes:
a forwarding unit, configured to forward the request message to the receiving end by using the proxy server.
In an optional implementation manner, the extraction module includes:
a second searching unit, configured to search the request message for the parameter identifier of the target interface parameter;
and the third searching unit is used for searching the latest parameter value in the request message according to the parameter identifier.
In an alternative implementation, the replacement module includes:
a third determining unit, configured to determine a storage path of a parameter value of the target interface parameter of the target applet;
a deleting unit, configured to delete the current parameter value stored in the storage path;
a storage unit for storing the latest parameter value in the storage path.
According to a third aspect of the present application, there is provided an electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the parameter processing method according to the first aspect.
According to a fourth aspect of the present application, there is provided a non-transitory computer readable storage medium having instructions therein, which when executed by a processor of an electronic device, enable the electronic device to perform the parameter processing method according to the first aspect.
According to a fifth aspect of the present application, there is provided a computer program product, wherein instructions which, when executed by a processor of an electronic device, enable the electronic device to perform the parameter processing method according to the first aspect.
The technical scheme provided by the application can comprise the following beneficial effects:
when the target applet sends a request message containing the parameter value of the target interface parameter to the outside, if the parameter value of the target interface parameter is not the latest parameter value, that is, if the parameter value of the target interface parameter is expired, the validity of the user identity is verified through the expired parameter value by the outside, the user identity is often determined to be illegal, and the request message cannot be responded normally, so that the target applet cannot provide service for the user normally, and the user experience is low.
In order to avoid such a situation, it is usually necessary to manually start the application and the target applet in the application at regular time, and then acquire the latest parameter value of the target interface parameter of the target applet by means of manual packet capturing, but this method has high labor cost.
In the present application, however, an application loaded with a target applet is started; controlling the target applet in the application to obtain the latest parameter value of the target interface parameter of the target applet; controlling the target applet to send a request message containing the latest parameter value; intercepting the request message; extracting the latest parameter value from the request message; the current parameter value of the target interface parameter of the target applet is replaced with the latest parameter value. So that the latest parameter values can be used to send request messages when the target applet sends other request messages to the outside afterwards, e.g. when sending other request messages to a background server of the target applet.
The whole process of the application is completely processed automatically, for example, the UIcase is executed to start the application loaded with the target applet, the target applet is controlled to acquire the latest parameter value of the interface parameter of the target applet in the application, and the target applet is controlled to send a request message containing the latest parameter value; the proxy server intercepts the request message, and the JS script is executed to extract the latest parameter value from the request message and replace the current parameter value of the target interface parameter of the target applet with the latest parameter value, so that the whole process does not need manual participation, and the labor cost can be reduced.
Drawings
FIG. 1 is a flow chart of the steps of a parameter processing method of the present application;
FIG. 2 is a block diagram of a parameter processing apparatus according to the present application;
FIG. 3 is a block diagram of an electronic device shown in the present application;
fig. 4 is a block diagram of an electronic device shown in the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
Referring to fig. 1, a flowchart of steps of a parameter processing method according to the present application is shown, which may specifically include the following steps:
in step S101, an application loaded with a target applet is started;
in the application, a plurality of applications are often installed in the device, the application to be started in the application is one of the installed applications, and the process in the application needs to be automatically executed in the whole process, so that the application loaded with the target applet can be automatically determined from the installed applications, and then the application loaded with the target applet is started.
In this application, for any application installed on the device, the applet loaded in the application may be determined in advance, then the program identifier of the applet and the application identifier of the application form a corresponding table entry, and the corresponding table entry is stored in the corresponding relationship between the program identifier of the applet and the application identifier of the application loaded with the applet, and the above operation is also performed for each of the other applications installed on the device. The application identities of different applications are different and the program identities of different applets are different.
Thus, in this step, the program identifier of the target applet may be obtained, then the corresponding relationship between the program identifier of the applet and the application identifier of the application loaded with the applet is determined, the application identifier corresponding to the program identifier is searched in the corresponding relationship, and then the application corresponding to the application identifier is started.
In step S102, the target applet is controlled in the application to obtain the latest parameter value of the target interface parameter of the target applet;
in this application, after the application loaded with the target applet is started, in order to enable the target applet to obtain a latest parameter value of a target interface parameter, the target applet often needs to be started in the application, where starting the target applet in the application is to obtain a main page of the target applet and display the main page, where before obtaining the main page of the target applet, the latest parameter value of the target interface parameter needs to be obtained from a background server of the application, and the target interface parameter includes a parameter for indicating user identity validity.
However, in order to ensure the information security of the user, if the user needs to access the background server of the application after the period of time elapses, the user needs to log in the background server of the application again using the user account.
That is, each time the user account logs in the background server of the application, the background server of the application generates an access token according to the user account, the access token has valid time, the valid time is the period of time, so that the user can access the background server of the application within the period of time by using the access token, and after the period of time is exceeded, the access token is invalid, that is, the user cannot access the background server of the application after the period of time is exceeded by using the access token.
In the present application, for example, in the target applet, the user may log in to the backend server of the target applet using a user account registered in advance in the application. If the access token is not invalid, the user can use the user account to access the background server of the target applet, and if the access token is invalid, the user cannot use the user account to access the background server of the target applet.
In the application, the parameter value of the target interface parameter can be generated according to the access token, and if the parameter value of the target interface parameter is expired, the expired parameter value of the target interface parameter cannot prove that the identity of the user is legal, that is, the expired parameter value of the target interface parameter cannot access the background server of the target applet.
To enable access to the backend server of the target applet, the latest parameter values of the target interface parameters need to be obtained.
Specifically, when the control target applet obtains the latest parameter value of the interface parameter of the target applet in the application, the control target applet may send an obtaining request to a background server of the application, where the obtaining request is used for the latest parameter value of the interface parameter of the target applet, and the control target applet receives the latest parameter value returned by the background server according to the obtaining request.
In step S103, the control target applet transmits a request message containing the latest parameter value;
in the present application, there are many types of request messages that the target applet can send to the outside, some types of request messages need not carry parameter values of target interface parameters of the target applet, some types of request messages need to carry parameter values of target interface parameters of the target applet, in order to enable replacement of the current parameter value of the target interface parameter of the target applet with the latest parameter value in accordance with the flow of steps S104 to S106, so that, when the target applet subsequently sends other request messages to the outside, the request message can be sent using the latest parameter values, in this step, the message type of the message that needs to contain the parameter values of the target interface parameters may be determined, and then controlling the target small program to generate a request message which contains the latest parameter value and is of the message type, and then controlling the target small program to send the generated request message to a background server corresponding to the target small program.
In step S104, the request message is intercepted;
in the application, a proxy server arranged between a target applet and a receiving end of the request message may be started, and the proxy server may be a virtual server or the like, wherein data mutually transmitted between the target applet and the receiving end needs to be transferred via the proxy server; that is, when the target applet needs to send data to the receiving end, the target applet first needs to send the data to the proxy server, and then forwards the data to the receiving end through the proxy server; when the receiving end needs to send data to the target applet, the data needs to be sent to the proxy server first, and then the data is forwarded to the target applet through the proxy server.
Thus, in the present application, the request message sent by the target applet can be received by using the proxy server, so as to intercept the request message.
Further, it is also necessary to forward the request message to the receiver using a proxy server so that the receiver can process the request message normally.
In step S105, the latest parameter value is extracted from the request message;
in the present application, the request message often includes a plurality of interface parameters of the target applet, and parameter identifiers of different interface parameters are different, and in the request message, the parameter identifier and the parameter value of the interface parameter are stored in a key-value form.
Therefore, in this step, in order to extract the latest parameter value of the target interface parameter from the request message, the parameter identifier of the target interface parameter may be searched in the request message; and then searching the latest parameter value of the target interface parameter in the request message according to the parameter identification.
In step S106, the current parameter value of the target interface parameter of the target applet is replaced with the latest parameter value.
In the application, the storage paths for storing the parameter values of different interface parameters of the target applet are different, the storage path for the parameter value of the target interface parameter of the target applet can be determined, then the current parameter value stored in the storage path is deleted, and then the latest parameter value is stored in the storage path.
Generally, when the target applet needs to send another request message to the outside, where the request message needs to include a parameter value of the target interface parameter, the latest parameter value of the target interface parameter may be obtained from the storage path, and then another request message needs to include the latest parameter value of the target interface parameter is sent to the outside.
In this application, a UIcase may be written in advance using PyCharm, and the UIcase is stored in the device where the application is located, and then a timer is also set in advance to obtain the UIcase from the device at regular time and execute the UIcase, and executing the UIcase may implement the flow from step S101 to step S103.
While performing the UIcase, the proxy server needs to be started, so that the proxy server can intercept a request message which is sent by the target applet to the outside and contains the latest parameter value, after the request message containing the latest parameter value is intercepted, a pre-stored JS (javascript) script can be executed, and the execution of the JS script can realize the flow from the step S105 to the step S106, where the JS script can be executed through a cmd (command prompt) command. The proxy server includes an anyproxy and the like.
When the target applet sends a request message containing the parameter value of the target interface parameter to the outside, if the parameter value of the target interface parameter is not the latest parameter value, that is, if the parameter value of the target interface parameter is expired, the validity of the user identity is verified through the expired parameter value by the outside, the user identity is often determined to be illegal, and the request message cannot be responded normally, so that the target applet cannot provide service for the user normally, and the user experience is low.
In order to avoid such a situation, it is usually necessary to manually start the application and the target applet in the application at regular time, and then acquire the latest parameter value of the target interface parameter of the target applet by means of manual packet capturing, but this method has high labor cost.
In the present application, however, an application loaded with a target applet is started; controlling the target applet in the application to obtain the latest parameter value of the target interface parameter of the target applet; controlling the target applet to send a request message containing the latest parameter value; intercepting the request message; extracting the latest parameter value from the request message; the current parameter value of the target interface parameter of the target applet is replaced with the latest parameter value. So that the latest parameter values can be used to send request messages when the target applet sends other request messages to the outside afterwards, e.g. when sending other request messages to a background server of the target applet.
The whole process of the application is completely processed automatically, for example, the UIcase is executed to start the application loaded with the target applet, the target applet is controlled to acquire the latest parameter value of the interface parameter of the target applet in the application, and the target applet is controlled to send a request message containing the latest parameter value; the proxy server intercepts the request message, and the JS script is executed to extract the latest parameter value from the request message and replace the current parameter value of the target interface parameter of the target applet with the latest parameter value, so that the whole process does not need manual participation, and the labor cost can be reduced.
It is noted that, for simplicity of explanation, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will appreciate that the present application is not limited by the order of acts, as some steps may, in accordance with the present application, occur in other orders and concurrently. Further, those skilled in the art will also appreciate that the embodiments described in the specification are exemplary and that no action is necessarily required in this application.
Referring to fig. 2, a block diagram of a parameter processing apparatus according to the present application is shown, and the apparatus may specifically include the following modules:
a starting module 11, configured to start an application loaded with a target applet;
a first control module 12, configured to control the target applet to obtain a latest parameter value of a target interface parameter of the target applet in the application;
a second control module 13, configured to control the target applet to send a request message including the latest parameter value;
an interception module 14, configured to intercept the request message;
an extracting module 15, configured to extract the latest parameter value from the request message;
a replacing module 16 for replacing a current parameter value of a target interface parameter of the target applet with the latest parameter value.
In an optional implementation manner, the starting module 11 includes:
an acquisition unit configured to acquire a program identifier of the target applet;
a first determination unit configured to determine a correspondence between a program identifier of an applet and an application identifier of an application to which the applet is loaded;
a first searching unit, configured to search for an application identifier corresponding to the program identifier in the correspondence;
and the first starting unit is used for starting the application corresponding to the application identifier.
In an alternative implementation, the first control module 12 includes:
the first control unit is used for controlling the target small program to send an acquisition request to a background server of the application in the application, wherein the acquisition request is used for the latest parameter value of the target interface parameter of the target small program;
and the second control unit is used for controlling the target small program to receive the latest parameter value returned by the background server according to the acquisition request.
In an optional implementation, the second control module 13 includes:
a second determining unit, configured to determine a message type of a message that needs to include a parameter value of the target interface parameter;
a third control unit, configured to control the target applet to generate a request message of the message type that includes the latest parameter value;
and the fourth control unit is used for controlling the target small program to send the generated request message to the background server corresponding to the target small program.
In an optional implementation manner, the intercepting module 14 includes:
a second starting unit, configured to start a proxy server arranged between the target applet and a receiving end of the request message;
a receiving unit, configured to receive the request message using the proxy server.
In an optional implementation manner, the intercepting module 14 further includes:
a forwarding unit, configured to forward the request message to the receiving end by using the proxy server.
In an optional implementation, the extraction module 15 includes:
a second searching unit, configured to search the request message for the parameter identifier of the target interface parameter;
and the third searching unit is used for searching the latest parameter value in the request message according to the parameter identifier.
In an alternative implementation, the replacement module 16 includes:
a third determining unit, configured to determine a storage path of a parameter value of the target interface parameter of the target applet;
a deleting unit, configured to delete the current parameter value stored in the storage path;
a storage unit for storing the latest parameter value in the storage path.
When the target applet sends a request message containing the parameter value of the target interface parameter to the outside, if the parameter value of the target interface parameter is not the latest parameter value, that is, if the parameter value of the target interface parameter is expired, the validity of the user identity is verified through the expired parameter value by the outside, the user identity is often determined to be illegal, and the request message cannot be responded normally, so that the target applet cannot provide service for the user normally, and the user experience is low.
In order to avoid such a situation, it is usually necessary to manually start the application and the target applet in the application at regular time, and then acquire the latest parameter value of the target interface parameter of the target applet by means of manual packet capturing, but this method has high labor cost.
In the present application, however, an application loaded with a target applet is started; controlling the target applet in the application to obtain the latest parameter value of the target interface parameter of the target applet; controlling the target applet to send a request message containing the latest parameter value; intercepting the request message; extracting the latest parameter value from the request message; the current parameter value of the target interface parameter of the target applet is replaced with the latest parameter value. So that the latest parameter values can be used to send request messages when the target applet sends other request messages to the outside afterwards, e.g. when sending other request messages to a background server of the target applet.
The whole process of the application is completely processed automatically, for example, the UIcase is executed to start the application loaded with the target applet, the target applet is controlled to acquire the latest parameter value of the interface parameter of the target applet in the application, and the target applet is controlled to send a request message containing the latest parameter value; the proxy server intercepts the request message, and the JS script is executed to extract the latest parameter value from the request message and replace the current parameter value of the target interface parameter of the target applet with the latest parameter value, so that the whole process does not need manual participation, and the labor cost can be reduced.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
Fig. 3 is a block diagram of an electronic device 800 shown in the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 3, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, images, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the electronic device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Fig. 4 is a block diagram of an electronic device 1900 shown in the present application. For example, the electronic device 1900 may be provided as a server.
Referring to fig. 4, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. The electronic device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be 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. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal 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 terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The above method and apparatus for processing parameters provided by the present application are introduced in detail, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (18)

1. A method of parameter processing, the method comprising:
starting the application loaded with the target applet by executing Uicase;
controlling the target applet in the application to obtain the latest parameter value of the target interface parameter of the target applet;
controlling the target applet to send a request message containing the latest parameter value;
intercepting the request message through a proxy server;
extracting the latest parameter value from the request message;
and replacing the current parameter value of the target interface parameter of the target applet by using the latest parameter value by executing a JavaScript script.
2. The method of claim 1, wherein the launching the application loaded with the target applet comprises:
acquiring a program identifier of the target applet;
determining a corresponding relation between a program identifier of the applet and an application identifier of the application loaded with the applet;
searching an application identifier corresponding to the program identifier in the corresponding relation;
and starting the application corresponding to the application identification.
3. The method of claim 1, wherein the controlling the target applet in the application to obtain the latest parameter value of the target interface parameter of the target applet comprises:
controlling the target small program to send an acquisition request to a background server of the application in the application, wherein the acquisition request is used for the latest parameter value of the target interface parameter of the target small program;
and controlling the target small program to receive the latest parameter value returned by the background server according to the acquisition request.
4. The method of claim 1, wherein controlling the target applet to send a request message containing the latest parameter value comprises:
determining the message type of the message which needs to contain the parameter value of the target interface parameter;
controlling the target applet to generate a request message of the message type containing the latest parameter value;
and controlling the target small program to send the generated request message to a background server corresponding to the target small program.
5. The method of claim 1, wherein intercepting the request message comprises:
starting a proxy server arranged between the target applet and a receiving end of the request message;
receiving, using the proxy server, the request message.
6. The method of claim 5, further comprising:
forwarding the request message to the receiver using the proxy server.
7. The method of claim 1, wherein the extracting the latest parameter value from the request message comprises:
searching the parameter identification of the target interface parameter in the request message;
and searching the latest parameter value in the request message according to the parameter identifier.
8. The method of claim 1, wherein replacing the current parameter value of the target interface parameter of the target applet with the latest parameter value comprises:
determining a storage path of parameter values of the target interface parameters of the target applet;
deleting the stored current parameter value in the storage path;
storing the latest parameter value in the storage path.
9. An apparatus for processing parameters, the apparatus comprising:
the starting module is used for starting the application loaded with the target applet by executing Uicase;
the first control module is used for controlling the target small program to obtain the latest parameter value of the target interface parameter of the target small program in the application;
a second control module, configured to control the target applet to send a request message including the latest parameter value;
the intercepting module is used for intercepting the request message through the proxy server;
an extraction module, configured to extract the latest parameter value from the request message;
and the replacing module is used for replacing the current parameter value of the target interface parameter of the target applet by using the latest parameter value through executing a JavaScript script.
10. The apparatus of claim 9, wherein the activation module comprises:
an acquisition unit configured to acquire a program identifier of the target applet;
a first determination unit configured to determine a correspondence between a program identifier of an applet and an application identifier of an application to which the applet is loaded;
a first searching unit, configured to search for an application identifier corresponding to the program identifier in the correspondence;
and the first starting unit is used for starting the application corresponding to the application identifier.
11. The apparatus of claim 9, wherein the first control module comprises:
the first control unit is used for controlling the target small program to send an acquisition request to a background server of the application in the application, wherein the acquisition request is used for the latest parameter value of the target interface parameter of the target small program;
and the second control unit is used for controlling the target small program to receive the latest parameter value returned by the background server according to the acquisition request.
12. The apparatus of claim 9, wherein the second control module comprises:
a second determining unit, configured to determine a message type of a message that needs to include a parameter value of the target interface parameter;
a third control unit, configured to control the target applet to generate a request message of the message type that includes the latest parameter value;
and the fourth control unit is used for controlling the target small program to send the generated request message to the background server corresponding to the target small program.
13. The apparatus of claim 9, wherein the intercepting module comprises:
a second starting unit, configured to start a proxy server arranged between the target applet and a receiving end of the request message;
a receiving unit, configured to receive the request message using the proxy server.
14. The apparatus of claim 13, wherein the intercepting module further comprises:
a forwarding unit, configured to forward the request message to the receiving end by using the proxy server.
15. The apparatus of claim 9, wherein the extraction module comprises:
a second searching unit, configured to search the request message for the parameter identifier of the target interface parameter;
and the third searching unit is used for searching the latest parameter value in the request message according to the parameter identifier.
16. The apparatus of claim 9, wherein the replacement module comprises:
a third determining unit, configured to determine a storage path of a parameter value of the target interface parameter of the target applet;
a deleting unit, configured to delete the current parameter value stored in the storage path;
a storage unit for storing the latest parameter value in the storage path.
17. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the parameter processing method of any of claims 1-8.
18. A non-transitory computer readable storage medium, instructions in which, when executed by a processor of an electronic device, enable the electronic device to perform the parameter processing method of any one of claims 1-8.
CN201811559004.8A 2018-12-19 2018-12-19 Parameter processing method and device Active CN109814942B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811559004.8A CN109814942B (en) 2018-12-19 2018-12-19 Parameter processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811559004.8A CN109814942B (en) 2018-12-19 2018-12-19 Parameter processing method and device

Publications (2)

Publication Number Publication Date
CN109814942A CN109814942A (en) 2019-05-28
CN109814942B true CN109814942B (en) 2020-09-08

Family

ID=66602215

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811559004.8A Active CN109814942B (en) 2018-12-19 2018-12-19 Parameter processing method and device

Country Status (1)

Country Link
CN (1) CN109814942B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110597647B (en) * 2019-09-16 2021-05-28 五八有限公司 Message interception method and device, electronic equipment and storage medium
CN113296969A (en) * 2020-04-17 2021-08-24 阿里巴巴集团控股有限公司 Information processing method and device and electronic equipment
CN111787088B (en) * 2020-06-28 2023-04-28 百度在线网络技术(北京)有限公司 Method and device for processing small program data
CN114185551B (en) * 2022-02-17 2022-06-21 浙江口碑网络技术有限公司 Applet compiling method, applet running method and device and storage medium
CN115525362B (en) * 2022-09-29 2023-09-15 建信金融科技有限责任公司 Parameter changing method and device based on kernel parameter adjusting platform of operating system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9372688B1 (en) * 2015-06-30 2016-06-21 International Business Machines Corporation Automatic discovery of a JavaScript API
CN108319483A (en) * 2018-01-30 2018-07-24 腾讯科技(深圳)有限公司 Web page processing method, device, terminal and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8977844B2 (en) * 2006-08-31 2015-03-10 Red Hat, Inc. Smartcard formation with authentication keys
US9813515B2 (en) * 2013-10-04 2017-11-07 Akamai Technologies, Inc. Systems and methods for caching content with notification-based invalidation with extension to clients
CN106411825A (en) * 2015-08-03 2017-02-15 天脉聚源(北京)科技有限公司 WeChat access token acquisition method and system thereof
CN108471395B (en) * 2017-02-23 2019-12-17 华为技术有限公司 Method and device for realizing authentication/authorization, cloud computing system and computer system
CN107528843A (en) * 2017-08-24 2017-12-29 山东浪潮通软信息科技有限公司 The processing method and processing unit of a kind of network request
CN107483509B (en) * 2017-10-09 2019-12-03 武汉斗鱼网络科技有限公司 A kind of auth method, server and readable storage medium storing program for executing
CN108810029B (en) * 2018-07-23 2021-08-31 宏桥高科技集团有限公司 Authentication system and optimization method between micro-service architecture services

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9372688B1 (en) * 2015-06-30 2016-06-21 International Business Machines Corporation Automatic discovery of a JavaScript API
CN108319483A (en) * 2018-01-30 2018-07-24 腾讯科技(深圳)有限公司 Web page processing method, device, terminal and storage medium

Also Published As

Publication number Publication date
CN109814942A (en) 2019-05-28

Similar Documents

Publication Publication Date Title
CN109814942B (en) Parameter processing method and device
CN106170004B (en) Method and device for processing verification code
CN107357613B (en) Application updating method and device and computer readable storage medium
CN107094094B (en) Application networking method and device and terminal
CN103995834A (en) Sensitive information detection method and related device
CN107220059B (en) Application interface display method and device
CN105094904A (en) Application program installation method and device
CN108206998A (en) Obtain the method and device of end message
CN104618987B (en) Access the method and device of network
CN106878654B (en) Video communication method and device
CN106658412B (en) Positioning method and device
CN106506808B (en) Method and device for prompting communication message
CN110690979B (en) Group message processing method, device, server, client and storage medium
CN105991626A (en) Network access method and network access device
CN110213062B (en) Method and device for processing message
CN109245992B (en) Request processing method and device, electronic equipment and storage medium
CN111241134A (en) Data processing method and device
CN110764847A (en) User information processing method and device, electronic equipment and storage medium
CN107070816B (en) Application identification method and device and mobile terminal
CN106354532B (en) Application account information processing method and device
CN112733092B (en) Information processing method and device
CN106027735B (en) Method and device for integrating communication numbers
CN108011882B (en) Method, device and system for data synchronization
CN106502719A (en) The method and device of the component of management application program
CN107463414B (en) Application installation method and device

Legal Events

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