A parameter configuration method, device, electronic device and storage medium
By intercepting and processing parameter configuration requests in the framework layer of the application, the problems of low server response efficiency and high network traffic consumption in the prior art are solved, and more efficient parameter configuration and lower network consumption are achieved.
Patent Information
- Application Number
- CN202411753516.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-12-02
AI Technical Summary
In the prior art, when configuring web pages, when users configure any user parameters, the server layer needs to reissue all protocols, resulting in low response efficiency and high network traffic consumption.
In the framework layer of the application, the request response message is obtained by determining the pre-stored parameters. If it is included, the request will be intercepted and the simulation success message will be returned to avoid reissue of the server. All Agreements.
It improves the efficiency of server response parameter configuration requests, reduces network traffic consumption, improves user experience and saves operating costs.
Smart Images

Figure CN119232541B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of page configuration, and in particular to a parameter configuration method, device, electronic device and storage medium. Background Art
[0002] Currently, when configuring web pages and other pages, as long as the user configures the user parameters, no matter what the settings are, the server layer will modify the user parameters according to the user's configuration. In addition, in the current configuration interface, the implementation of various configuration functions mostly relies on multiple different protocols. Although this design provides flexibility to a certain extent, it also brings a significant problem, that is, every time the user configures any user parameter, the server layer needs to re-send all the protocols of this web page. Obviously, the above configuration method will seriously affect the response efficiency of the server layer, and also increase unnecessary network traffic consumption. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a parameter configuration method, device, electronic device and storage medium to improve the efficiency of the server responding to parameter configuration requests and reduce the consumption of network traffic. The specific technical solution is as follows:
[0004] In a first aspect, an embodiment of the present application provides a parameter configuration method, which is applied to a framework layer of an application, wherein the framework layer is used to build a software framework of the application, and the application further includes a business layer, wherein the business layer is used to process the business logic of the application, and the method includes:
[0005] In the case of obtaining the parameter configuration request message sent by the business layer, determining whether the user parameters included in the response message of the pre-stored parameter acquisition request include the user parameters included in the parameter configuration request message, wherein the parameter acquisition request is used to obtain the current parameter value of the configuration item indicated by the parameter configuration instruction when the user issues a parameter configuration instruction for the page of the application, the parameter configuration request message is sent by the business layer after the user configures the parameter value for the configuration item, the user parameter includes the configuration item and the corresponding parameter value, and the configuration of the configuration item of the page is implemented based on at least one protocol;
[0006] In the case where the user parameters included in the response message include the user parameters included in the parameter configuration request message, the parameter configuration request message is intercepted, and a simulation success message is returned to the business layer to inform the business layer that the user parameters indicated by the parameter configuration instruction have been successfully configured.
[0007] Optionally, before the step of determining whether the user parameters included in the pre-stored response message to the parameter acquisition request include the user parameters included in the parameter configuration request message, the method further includes:
[0008] Determine whether there is a target response message including the configuration item corresponding to the parameter configuration request message in the corresponding configuration item among the response messages of the preset number of parameter acquisition requests stored in advance;
[0009] In the case that the target response message exists, it is determined whether the user parameters included in the target response message include the user parameters included in the parameter configuration request message.
[0010] Optionally, the step of determining whether there is a target response message including a configuration item corresponding to the parameter configuration request message in the corresponding configuration item among the pre-stored preset number of response messages of the parameter acquisition request includes:
[0011] Determine whether there is a first target protocol URL that is the same as the protocol URL included in the parameter configuration request message among the protocol URLs included in the parameter acquisition requests corresponding to the preset number of pre-stored response messages;
[0012] In the case where the first target protocol URL exists, determining that the response message including the first target protocol URL is a target response message;
[0013] In the absence of the first target protocol URL, determining, based on the user profile, whether there is a second target protocol URL matching the protocol URL included in the parameter configuration request message among the protocol URLs included in the parameter acquisition request message corresponding to the preset number of response messages stored in advance;
[0014] In the case where the second target protocol URL exists, the response message including the second target protocol URL is determined to be a target response message.
[0015] Optionally, when the target response message exists, the method further includes:
[0016] Modify the key information of the target type included in the target response message from the first key information to the second key information, wherein the first key information represents that the parameter value of the corresponding configuration item is an acquisition parameter, and the second key information represents that the parameter value of the corresponding configuration item is a configuration parameter;
[0017] The step of determining whether the user parameters included in the target response message include the user parameters included in the parameter configuration request message comprises:
[0018] Determine whether the modified target response message includes the parameter configuration request message.
[0019] Optionally, the step of determining whether the modified target response message includes the parameter configuration request message includes:
[0020] In the case where the modified target response message is consistent with the parameter configuration request message, or when the number of configuration items included in the parameter configuration request message is less than the number of configuration items included in the modified target response message, and the parameter values corresponding to the configuration items included in the parameter configuration request message and the parameter values corresponding to the configuration items included in the modified target response message are respectively consistent, it is determined that the modified target response message includes the parameter configuration request message.
[0021] Optionally, the method further includes:
[0022] When a response message is received to the protocol request sent to the business layer, if the key information of the target type included in the response message of the protocol request is the first key information, the return message of the protocol request is stored in the memory space, wherein the protocol request includes the parameter acquisition request and the parameter configuration request.
[0023] Optionally, the method further includes:
[0024] In a case where the user parameters included in the response message do not include the user parameters included in the parameter configuration request message, forwarding the parameter configuration request message to the server layer so that the server layer returns a parameter configuration response message;
[0025] The parameter configuration response message is forwarded to the business layer, so that the business layer completes the parameter configuration of the page of the application based on the parameter configuration response message.
[0026] Optionally, the parameter configuration request message includes a plurality of user parameters;
[0027] The step of forwarding the parameter configuration request message to the server layer so that the server layer returns a parameter configuration response message when the user parameters included in the response message do not include the user parameters included in the parameter configuration request message includes:
[0028] For each user parameter included in the parameter configuration request message, determining in sequence whether the user parameters included in the response message include the user parameter;
[0029] When it is determined that the response message does not include the configuration item included in the user parameter or the parameter values corresponding to the configuration items are different, the parameter configuration request message is forwarded to the server layer so that the server layer returns a parameter configuration response message.
[0030] Optionally, the configuration items of the page are configured based on multiple protocols;
[0031] The step of forwarding the parameter configuration request message to the server layer so that the server layer returns a parameter configuration response message when the user parameters included in the response message do not include the user parameters included in the parameter configuration request message includes:
[0032] In a case where the user parameters included in the response message do not include the user parameters included in the parameter configuration request message, determining a target protocol corresponding to the user parameters not included in the response message;
[0033] Forward the parameter configuration request message to the server layer so that the server layer returns a parameter configuration response message, wherein the parameter configuration request message is used to request configuration information of user parameters based on the target protocol, and the parameter configuration response message includes configuration information of user parameters based on the target protocol.
[0034] In a second aspect, an embodiment of the present application provides a parameter configuration method, which is applied to a business layer of an application, wherein the business layer is used to process the business logic of the application, and the application further includes a framework layer, wherein the framework layer is used to build a software framework of the application, and the method includes:
[0035] In response to a user parameter configuration instruction, when a user configures a parameter value for a configuration item, a parameter configuration request message is sent to the framework layer, so that the framework layer determines whether the user parameters included in the response message of the pre-stored parameter acquisition request include the user parameters included in the parameter configuration request message when the parameter configuration request message is obtained, wherein the parameter acquisition request is used to obtain the current parameter value of the configuration item indicated by the parameter configuration instruction when the user issues a parameter configuration instruction for a page of the application, the user parameter includes a configuration item and a corresponding parameter value, and the configuration of the configuration item of the page is implemented based on at least one protocol;
[0036] A simulation success message is received, wherein the simulation success message is sent by the framework layer when the user parameters included in the response message include the user parameters included in the parameter configuration request message, and is used to indicate that the user parameters indicated by the parameter configuration instruction have been configured successfully.
[0037] Optionally, the method further includes:
[0038] Upon receipt of a parameter configuration response message, the parameter configuration of the application's page is completed based on the parameter configuration response message, wherein the parameter configuration response message is returned by the server layer when the framework layer forwards the parameter configuration request message to the server layer when the user parameters included in the response message do not include the user parameters included in the parameter configuration request message.
[0039] In a third aspect, an embodiment of the present application provides a parameter configuration device, which is applied to a framework layer of an application, wherein the framework layer is used to build a software framework of the application, and the application further includes a business layer, wherein the business layer is used to process the business logic of the application, and the device includes:
[0040] a first user parameter determination module, configured to determine whether the user parameters included in the response message of the pre-stored parameter acquisition request include the user parameters included in the parameter configuration request message, when the parameter configuration request message sent by the business layer is acquired, wherein the parameter acquisition request is used to acquire the current parameter value of the configuration item indicated by the parameter configuration instruction when the user issues the parameter configuration instruction for the page of the application, the parameter configuration request message is sent by the business layer after the user configures the parameter value for the configuration item, the user parameter includes the configuration item and the corresponding parameter value, and the configuration of the configuration item of the page is implemented based on at least one protocol;
[0041] A simulation success message sending module is used to intercept the parameter configuration request message when the user parameters included in the response message include the user parameters included in the parameter configuration request message, and return a simulation success message to the business layer to inform the business layer that the user parameters indicated by the parameter configuration instruction have been successfully configured.
[0042] Optionally, the device further comprises:
[0043] A target response message determination module is used to determine whether there is a target response message including a configuration item corresponding to the parameter configuration request message in the corresponding configuration item among the response messages of a preset number of parameter acquisition requests stored in advance;
[0044] The second user parameter determination module is used to determine whether the user parameters included in the target response message include the user parameters included in the parameter configuration request message when the target response message exists.
[0045] Optionally, the target response message determination module includes:
[0046] A first target protocol URL determination submodule, used to determine whether there is a first target protocol URL identical to the protocol URL included in the parameter configuration request message among the protocol URLs included in the parameter acquisition request message corresponding to the pre-stored preset number of response messages;
[0047] A target response message first determination submodule, used to determine that a response message including the first target protocol URL is a target response message when the first target protocol URL exists;
[0048] A second target protocol URL determination submodule is used to determine, in the absence of the first target protocol URL, whether there is a second target protocol URL matching the protocol URL included in the parameter configuration request message among the protocol URLs included in the parameter acquisition request message corresponding to the preset number of response messages stored in advance based on the user profile;
[0049] The target response message second determination submodule is used to determine that the response message including the second target protocol URL is the target response message when the second target protocol URL exists.
[0050] Optionally, when the target response message exists, the device further includes:
[0051] A key information modification module, used to modify the key information of the target type included in the target response message from the first key information to the second key information, wherein the first key information represents the parameter value of the corresponding configuration item as the acquisition parameter, and the second key information represents the parameter value of the corresponding configuration item as the configuration parameter;
[0052] The second user parameter determination module comprises:
[0053] The message determination submodule is used to determine whether the modified target response message includes the parameter configuration request message.
[0054] Optionally, the message determination submodule includes:
[0055] a target response message determining unit, configured to determine that the modified target response message includes the parameter configuration request message when the modified target response message is consistent with the parameter configuration request message, or when the number of configuration items included in the parameter configuration request message is less than the number of configuration items included in the modified target response message, and the parameter values corresponding to the configuration items included in the parameter configuration request message and the parameter values corresponding to the configuration items included in the modified target response message are respectively consistent;
[0056] Optionally, the device further comprises:
[0057] A response message storage module is used to store the return message of the protocol request in a memory space when a response message to the protocol request sent by the business layer is received and if the key information of the target type included in the response message of the protocol request is the first key information, wherein the protocol request includes the parameter acquisition request and the parameter configuration request.
[0058] Optionally, the device further comprises:
[0059] A parameter configuration request message forwarding module, configured to forward the parameter configuration request message to the server layer when the user parameters included in the response message do not include the user parameters included in the parameter configuration request message, so that the server layer returns a parameter configuration response message;
[0060] The parameter configuration response message forwarding module is used to forward the parameter configuration response message to the business layer, so that the business layer completes the parameter configuration of the application page based on the parameter configuration response message.
[0061] Optionally, the parameter configuration request message includes a plurality of user parameters;
[0062] The parameter configuration request message forwarding module includes:
[0063] A user parameter third determination submodule, configured to determine, for each user parameter included in the parameter configuration request message, in turn whether the user parameters included in the response message include the user parameter;
[0064] The first message forwarding submodule is used to forward the parameter configuration request message to the server layer when it is determined that the response message does not include the configuration item included in the user parameter or the parameter value corresponding to the configuration item is different, so that the server layer returns a parameter configuration response message.
[0065] Optionally, the configuration items of the page are configured based on multiple protocols;
[0066] The parameter configuration request message forwarding module includes:
[0067] a target protocol determination submodule, configured to determine a target protocol corresponding to the user parameter not included in the response message, when the user parameter included in the response message does not include the user parameter included in the parameter configuration request message;
[0068] The second submodule of message forwarding is used to forward the parameter configuration request message to the server layer so that the server layer returns a parameter configuration response message, wherein the parameter configuration request message is used to request configuration information of user parameters based on the target protocol, and the parameter configuration response message includes configuration information of user parameters based on the target protocol.
[0069] In a fourth aspect, an embodiment of the present application provides a parameter configuration device, which is applied to a business layer of an application, wherein the business layer is used to process the business logic of the application, and the application further includes a framework layer, wherein the framework layer is used to build a software framework of the application, and the device includes:
[0070] a parameter configuration request message sending module, configured to respond to a user parameter configuration instruction, and in the case where the user configures a parameter value for a configuration item, send a parameter configuration request message to the framework layer, so that the framework layer, in the case where the parameter configuration request message is obtained, determines whether the user parameters included in the response message of the pre-stored parameter acquisition request include the user parameters included in the parameter configuration request message, wherein the parameter acquisition request is used to obtain the current parameter value of the configuration item indicated by the parameter configuration instruction when the user issues a parameter configuration instruction for a page of the application, the user parameter includes a configuration item and a corresponding parameter value, and the configuration of the configuration item of the page is implemented based on at least one protocol;
[0071] A simulation success message receiving module is used to receive a simulation success message, wherein the simulation success message is sent by the framework layer when the user parameters included in the response message include the user parameters included in the parameter configuration request message, and is used to indicate that the user parameters indicated by the parameter configuration instruction have been successfully configured.
[0072] Optionally, the device further comprises:
[0073] A parameter configuration completion module is used to complete the parameter configuration of the application's page based on the parameter configuration response message when a parameter configuration response message is received, wherein the parameter configuration response message is returned by the server layer when the framework layer forwards the parameter configuration request message to the server layer when the user parameters included in the response message do not include the user parameters included in the parameter configuration request message.
[0074] In a fifth aspect, an embodiment of the present application provides an electronic device, including:
[0075] Memory, used to store computer programs;
[0076] The processor is used to implement any method described in the first aspect when executing a program stored in the memory.
[0077] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any method described in the first aspect is implemented.
[0078] Beneficial effects of the embodiments of the present application:
[0079] In the scheme provided by the embodiment of the present application, the framework layer of the application can determine whether the user parameters included in the response message of the pre-stored parameter acquisition request include the user parameters included in the parameter configuration request message when the parameter configuration request message sent by the business layer is obtained, wherein the parameter acquisition request is used to obtain the current parameter value of the configuration item indicated by the parameter configuration instruction when the user issues a parameter configuration instruction for the page of the application, the parameter configuration request message is sent by the business layer after the user configures the parameter value for the configuration item, the user parameter includes the configuration item and the corresponding parameter value, and the configuration of the configuration item of the page is implemented based on at least one protocol; when the user parameter included in the response message includes the user parameter included in the parameter configuration request message, the parameter configuration request message is intercepted, and a simulated success message is returned to the business layer to inform the business layer that the user parameter indicated by the parameter configuration instruction has been successfully configured. In this way, when the current user parameters include the user parameters configured by the user, that is, when the user does not modify the user parameters in this parameter configuration, the framework layer of the application intercepts the parameter configuration request message and returns a simulated success message, so that the server does not receive the parameter configuration request message, and because the configuration of the configuration items requires the use of at least one protocol, the server does not need to re-send all the protocols of this web page when the configuration of the user parameters has not changed, thereby improving the response efficiency of the server layer and reducing network traffic consumption. Of course, implementing any product or method of the present application does not necessarily require all the advantages described above to be achieved at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0081] Figure 1 A flowchart of a first parameter configuration method provided in an embodiment of the present application;
[0082] Figure 2 Based on Figure 1A specific flow chart of determining user parameters in the illustrated embodiment;
[0083] Figure 3 for Figure 2 A specific flow chart of step S201 in the illustrated embodiment;
[0084] Figure 4 Based on Figure 1 A specific flow chart of configuring user parameters in the illustrated embodiment;
[0085] Figure 5 Based on Figure 1 A specific flow chart of the parameter configuration method of the illustrated embodiment;
[0086] Figure 6 A flowchart of a second parameter configuration method provided in an embodiment of the present application;
[0087] Figure 7 A schematic diagram of the structure of the first parameter configuration device provided in an embodiment of the present application;
[0088] Figure 8 A schematic diagram of the structure of a second parameter configuration device provided in an embodiment of the present application;
[0089] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0090] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.
[0091] In order to improve the efficiency of the server responding to parameter configuration requests and reduce network traffic consumption, the embodiments of the present application provide a parameter configuration method, device, electronic device, computer-readable storage medium and computer program product. The first parameter configuration method provided by the embodiments of the present application is first introduced below.
[0092] The first parameter configuration method provided in the embodiment of the present application can be applied to the framework layer of an application. The application can be a web (world wide web, global wide area network) web application, a device management application, a permission configuration application, etc., which is not specifically limited here.
[0093] like Figure 1As shown, a parameter configuration method is applied to the framework layer of an application, the framework layer is used to build a software framework of the application, the application also includes a business layer, the business layer is used to process the business logic of the application, the method includes:
[0094] S101, when a parameter configuration request message sent by the service layer is obtained, determining whether the user parameters included in the response message of the pre-stored parameter acquisition request include the user parameters included in the parameter configuration request message;
[0095] Among them, the parameter acquisition request is used to obtain the current parameter value of the configuration item indicated by the parameter configuration instruction when the user issues a parameter configuration instruction for the page of the application. The parameter configuration request message is sent by the business layer after the user configures the parameter value for the configuration item. The user parameters include configuration items and corresponding parameter values. The configuration of the configuration items of the page is implemented based on at least one protocol.
[0096] S102, when the user parameters included in the response message include the user parameters included in the parameter configuration request message, intercept the parameter configuration request message and return a simulation success message to the business layer to inform the business layer that the user parameters indicated by the parameter configuration instruction have been configured successfully.
[0097] It can be seen that in the embodiment of the present application, the framework layer of the application can determine whether the user parameters included in the response message of the pre-stored parameter acquisition request include the user parameters included in the parameter configuration request message when the parameter configuration request message sent by the business layer is obtained, wherein the parameter acquisition request is used to obtain the current parameter value of the configuration item indicated by the parameter configuration instruction when the user issues a parameter configuration instruction for the page of the application, the parameter configuration request message is sent by the business layer after the user configures the parameter value for the configuration item, the user parameter includes the configuration item and the corresponding parameter value, and the configuration of the configuration item of the page is implemented based on at least one protocol; when the user parameter included in the response message includes the user parameter included in the parameter configuration request message, the parameter configuration request message is intercepted, and a simulated success message is returned to the business layer to inform the business layer that the user parameter indicated by the parameter configuration instruction has been successfully configured. In this way, when the current user parameters include the user parameters after the user has configured, that is, when the user has not modified the user parameters in this parameter configuration, the parameter configuration request message is intercepted by the framework layer of the application and a simulated success message is returned, so that the server will not receive the parameter configuration request message. Moreover, since the configuration of the configuration items requires the use of at least one protocol, the server does not need to re-send all the protocols of this web page when the user parameter configuration has not changed, thereby improving the response efficiency of the server layer and reducing network traffic consumption.
[0098] The framework layer of the above-mentioned application is a software framework for building web applications (an internal framework inserted between the server and the business layer in the embodiment of the present application, not a public framework such as vue.js), which implements common functions such as HTTP (Hyper Text Transfer Protocol) protocol, web applications, template rendering, etc., but does not contain business logic; the business layer of the application is the part of the web application responsible for processing business logic.
[0099] When the business layer interacts with the server, the network transport layer below the business layer is responsible for providing communication services for the business layer and the server to send and receive data; the network transport layer and the business layer are interconnected in terms of hierarchy and interdependent in terms of functions. The network transport layer provides data transmission services for the business layer, and the business layer uses these services to implement specific application logic. The two work together to ensure that data can be transmitted efficiently and reliably in the network and meet user needs.
[0100] The application provides corresponding services according to different user parameters, and the user can configure the user parameters according to the needs. For example, the user parameter can be that the time interval for the application to automatically store data is 1 minute, and the application can save the data every 1 minute based on the user parameter; or the user parameter can be that the address for the application to save data is address A, and when the user needs to save data, the application can store the data to be saved at address A based on the user parameter.
[0101] When the user needs to configure the user parameters, the parameter configuration instruction can be issued through the application page. For example, the user can click the edit button or the set button in the parameter configuration interface displayed on the web page, or double-click the configuration item to be configured to modify the parameter value of the configuration item, etc. This is reasonable and is not specifically limited here. In step S101, the framework layer of the application determines whether the user parameters included in the response message of the pre-stored parameter acquisition request include the user parameters included in the parameter configuration request message when the framework layer of the application obtains the parameter configuration request message sent by the business layer.
[0102] The parameter acquisition request may include key information such as URL (Uniform Resource Locator) information, method information, and parameter transmission information, which are not specifically limited here.
[0103] When a user issues a parameter configuration instruction for a page of an application that needs parameter configuration, the business layer of the application can process the parameter configuration instruction, and then obtain the current parameter value of the configuration item indicated by the parameter configuration instruction through a get (query) / post (add) request. After obtaining the current parameter value, the application can display the current parameter on the application page, and the user can configure the current parameter value of the user parameter displayed on the page according to actual needs. For example, the web page displays the current parameter value of the user parameter in the configuration interface, and the user can click the edit button in the configuration interface to configure the current parameter value of the user parameter in the configuration interface.
[0104] After the user configures the parameter values of the above configuration items through the application page, the business layer of the application can obtain the parameter configuration request message corresponding to the parameter configuration instruction, and send the parameter configuration request message to the framework layer. The parameter configuration request message may include user parameters configured by the user, such as configuration items, parameter values corresponding to the configuration items, configuration time of the configuration items, user information requesting parameter configuration, etc., which are not specifically limited here.
[0105] The configuration function of the application page needs to be implemented using at least one protocol. For example, the application page includes configuration items a, b...n, where the configuration of configuration items a-c is implemented based on protocol 1, the configuration of configuration items d and e is implemented based on protocol 2, the configuration of configuration items f-m is implemented based on protocol 3, and the configuration of configuration item n is implemented based on protocol 4.
[0106] As an implementation method, when a user issues a parameter configuration instruction, the framework layer may, by default, save the response message of the parameter request obtained based on the parameter configuration instruction in the memory space of the framework layer. For example, the response message of the parameter request may be stored in a mapping queue of the request interface, wherein a fixed number of response messages may be saved in the memory space, and when the most recently obtained response message exceeds the fixed number, the previously saved response message in the memory space may be cyclically overwritten.
[0107] For example, the default fixed number of response messages saved in the memory space is 100, and 100 response messages are already stored in the memory space; if 1 response message is currently obtained, this 1 response message can be used to overwrite the earliest stored 1 of the 100 response messages arranged in chronological order; if the number of response messages obtained most recently is 5, these 5 response messages can be used to overwrite the earliest stored 5 of the 100 response messages arranged in chronological order; if the number of response messages obtained most recently is 20, these 20 response messages can be used to overwrite the earliest stored 20 of the 100 response messages arranged in chronological order.
[0108] For another example, the fixed number of response messages saved in the memory space by default is 100, and 90 response messages are already stored in the memory space; if the number of response messages most recently obtained is 1, then this 1 response message can be directly saved in the memory space by default; if the number of response messages most recently obtained is 10, then these 10 response messages can be directly saved in the memory space by default; if the number of response messages most recently obtained is 20, then 10 of the 20 response messages can be directly saved in the memory space by default, and the remaining 10 can be stored in the memory space by overwriting the 10 earliest stored response messages in chronological order among the response messages stored in the memory space.
[0109] The response message of the parameter acquisition request and the parameter configuration request message both include user parameters, such as configuration items and corresponding parameter values, etc. In step S102, when the user parameters included in the response message include the user parameters included in the parameter configuration request message, the parameter configuration request message is intercepted, and a simulation success message is returned to the business layer to inform the business layer that the user parameters indicated by the parameter configuration instruction have been successfully configured.
[0110] Since the business logic of the business layer does not participate in the process of configuring user parameters, and the framework layer imitates the simulated success message sent by the server, the business layer is unaware of the specific process of configuring the parameters, and is also unable to perceive that the above-mentioned simulated success message is not sent by the server but by the framework layer.
[0111] The user parameters included in the above response message include the user parameters included in the parameter configuration request message and can be divided into two cases:
[0112] In the first case, the user parameters included in the response message and the user parameters included in the parameter configuration request message are the same. Specifically, the configuration items included in the response message and the configuration items included in the parameter configuration request message are exactly the same, and the parameter values corresponding to the configuration items included in the response message and the parameter values corresponding to the configuration items included in the parameter configuration request message are respectively the same.
[0113] In the second case, although the user may only want to configure one user parameter of the application, the page where the user parameter is located includes multiple user parameters. Therefore, the user parameters included in the response message obtained by the framework layer may be all the user parameters of the page, while the parameter configuration request message may only include the user parameters modified by the user. Therefore, the number of configuration items included in the parameter configuration request message may be less than the number of configuration items included in the response message, and the configuration items included in the parameter configuration request message are included in the configuration items included in the response message, and the parameter values corresponding to the configuration items included in both are the same.
[0114] When the user parameters included in the response message and the user parameters included in the parameter configuration request message meet any of the above two situations, the framework layer can determine that the user parameters included in the response message include the user parameters included in the parameter configuration request message. Based on these two situations, it is explained that the current parameter value in the response message of the parameter acquisition request is the same as the parameter value after the user configuration in the parameter configuration request message, so the server does not need to modify the parameter value of the user parameter based on the parameter configuration request message. Based on this, the framework layer can intercept the parameter configuration request message so that it will not be sent to the server, and return to the business layer a simulated success message to inform the business layer that the user parameters indicated by the above parameter configuration instruction have been successfully configured, so that the parameter configuration request message will not be reported to the server through the network transmission layer, thereby avoiding the server from sending all protocols for the page for the application.
[0115] As an implementation method, the user can set the switch of the global incremental update function for all user parameters in the application, wherein the incremental update function is used by the framework layer to determine whether the user parameters included in the response message of the parameter acquisition request include the user parameters included in the parameter configuration request message. In the case of obtaining the parameter configuration request message sent by the business layer, it is determined that the switch of the global incremental update function is in the on state. If the user needs to configure all user parameters in the page of the application, for each user parameter, the framework layer can determine whether the user parameters included in the response message include the user parameters included in the parameter configuration request message.
[0116] As another implementation, the user may also set the switch of the local incremental update function separately for each user parameter in the application, wherein the incremental update function is used by the framework layer to determine whether the user parameters included in the response message of the parameter acquisition request include the user parameters included in the parameter configuration request message. In the case where the framework layer obtains the parameter configuration request message sent by the business layer, for the user parameters in the response message and the parameter configuration request message where the switch of the local incremental update function is turned on, the framework layer may determine whether the user parameters included in the response message include the user parameters included in the parameter configuration request message.
[0117] If the user does not set the switch of the local incremental update function separately for each user parameter in the application, it can be determined whether the user parameters included in the response message include the user parameters included in the parameter configuration request message based on whether the switch of the global incremental update function set for all user parameters is in the on state. This is reasonable and no specific limitation is made here.
[0118] It can be seen that in this embodiment, when the current user parameters include the user parameters after the user configures them, that is, when the user does not modify the user parameters during this parameter configuration, the framework layer of the application intercepts the parameter configuration request message and returns a simulated success message, so that the server will not receive the parameter configuration request message, and because the configuration of the configuration items requires the use of at least one protocol, the server does not need to re-send all the protocols of this web page when the user parameter configuration has not changed, thereby improving the response efficiency of the server layer and reducing network traffic consumption.
[0119] As an implementation method of the present application, Figure 2 As shown, before the step of determining whether the user parameters included in the response message of the pre-stored parameter acquisition request include the user parameters included in the parameter configuration request message, the method may further include:
[0120] S201, determining whether there is a target response message including a configuration item corresponding to a parameter configuration request message in a corresponding configuration item among a preset number of pre-stored response messages of parameter acquisition requests.
[0121] In the case where the framework layer obtains the parameter configuration request message sent by the business layer, the framework layer can compare the response messages of the parameter acquisition request pre-stored in the memory space with the parameter configuration request messages one by one to determine whether the corresponding configuration items in the response message in the memory space include the configuration items corresponding to the parameter configuration request message; in the case where the corresponding configuration items in the response message include the configuration items corresponding to the parameter configuration request message, it indicates that the configuration items in the response message and the parameter configuration request are the acquisition and configuration of the parameter values of the same configuration item, and therefore the response message of the parameter acquisition request corresponding to the configuration item can be determined as the target response message.
[0122] The configuration items refer to the elements in the application that need to be managed and controlled, such as the time interval for automatically saving data in the web application, the address of data storage, network connection settings, etc., which are not specifically limited here.
[0123] For example, if a user wants to configure the time interval for automatically storing data in a web application, the configuration items included in the response message obtained by the framework layer are the time interval for automatically storing data and the address for storing data; the configuration items included in the parameter configuration request message obtained by the framework layer are the time interval for automatically storing data, and the framework layer determines that the configuration items in the response message exist in the configuration items in the parameter configuration request message. Based on this, the response message of the parameter acquisition request can be determined as the target response message.
[0124] Among them, the preset number of response messages for pre-stored parameter acquisition requests can be based on the memory size of the memory space of the framework layer, the ability of the framework layer to process data, the number of various messages obtained by the framework layer, and the frequency of user configuration of user parameters, etc. This is all reasonable and is not specifically limited here.
[0125] S202: When there is a target response message, determine whether the user parameters included in the target response message include the user parameters included in the parameter configuration request message.
[0126] When a target response message is determined in a pre-stored response message of a parameter acquisition request, the framework layer may determine whether the user parameters included in the target response message include the user parameters included in the parameter configuration request message according to the following two implementations:
[0127] In a first implementation mode, it is determined that the user parameters included in the target response message and the user parameters included in the parameter configuration request message are the same. Specifically, the configuration items included in the target response message and the configuration items included in the parameter configuration request message are exactly the same, and the parameter values corresponding to the configuration items included in the target response message and the parameter values corresponding to the configuration items included in the parameter configuration request message are respectively the same.
[0128] For example, if a user wants to configure the time interval for automatically storing data in a web application, the configuration item included in the target response message determined by the framework layer is the time interval for automatically storing data, and the parameter value of the corresponding configuration parameter is 1 minute; the configuration item included in the parameter configuration request message obtained by the framework layer is the time interval for automatically storing data, and the parameter value of the corresponding configuration parameter is 1 minute. Based on this, the framework layer determines that the target response message and the configuration parameter request message are completely consistent, that is, the configuration items and the parameter values corresponding to the configuration items in the target response message and the configuration parameter request message are completely consistent, thereby determining that the user parameters of the target response message include the user parameters of the parameter configuration request message.
[0129] In a second implementation manner, the number of configuration items included in the parameter configuration request message is less than the number of configuration items included in the target response message, and the configuration items included in the parameter configuration request message are included in the configuration items included in the target response message, and the parameter values corresponding to the configuration items included in both are the same.
[0130] For example, the user wants to configure the time interval for automatic data storage and the data storage address of the application. The configuration items included in the target response message determined by the framework layer are the time interval for automatic data storage, the data storage address, and whether to enable data outbound permission. The corresponding parameter values of the acquisition parameters are 1 minute, address A, and enable data outbound permission. The configuration items included in the parameter configuration request message obtained by the framework layer are the time interval for automatic data storage and the data storage address. The corresponding parameter values of the configuration parameters are 1 minute and address A.
[0131] Based on this, although the number of configuration items included in the parameter configuration request message is less than the number of configuration items included in the target response message, the corresponding configuration items in the target response message include the configuration items corresponding to the parameter configuration request message, and the parameter values corresponding to the configuration items included in these two types of messages are respectively consistent. Therefore, the framework layer can determine that the user parameters of the target response message include the user parameters of the parameter configuration request message.
[0132] It can be seen that in the embodiment of the present application, before determining whether the user parameters included in the response message of the pre-stored parameter acquisition request include the user parameters included in the parameter configuration request message, the framework layer first determines whether there is a configuration item corresponding to the parameter configuration request message in the configuration item corresponding to the response message. If so, it means that the response message and the parameter configuration request message are configured for the same configuration item, and the response message of the parameter acquisition request can be determined as the target response message, and then it is determined whether the user parameters included in the target response message include the user parameters included in the parameter configuration request message. This can avoid the framework layer still determining whether the user parameters included in the target response message include the user parameters included in the parameter configuration request message when the parameter configuration request message and the response message are not configuring the same configuration item, thereby improving the speed and accuracy of the framework layer in determining whether the user parameters of the target response message include the user parameters included in the parameter configuration request message.
[0133] As an implementation method of the present application, Figure 3 As shown, the step of determining whether there is a target response message including a configuration item corresponding to the parameter configuration request message in the corresponding configuration item among the response messages of the preset number of parameter acquisition requests stored in advance may include:
[0134] S301, determining whether there is a first target protocol URL that is the same as the protocol URL included in the parameter configuration request message among the protocol URLs included in the parameter acquisition requests corresponding to the pre-stored preset number of response messages.
[0135] Since the protocol URL can represent the configuration items of user parameters, the same protocol URL can represent that the messages to which the protocol URLs belong include the same configuration items. Therefore, the framework layer can determine, based on the preset number of response messages pre-stored in the memory space, whether the protocol URLs included in the parameter acquisition requests corresponding to the preset number of response messages are the same as the protocol URL included in the parameter configuration request message; if so, it indicates that the protocol URL in the response message is the same as the protocol URL in the parameter configuration request message, that is, the parameter configuration request message and the response message are configuring the same configuration item, and the protocol URL in the response message can be determined as the first target protocol URL.
[0136] For example, three response messages are pre-stored in the framework layer, and the protocol URLs included in the parameter acquisition requests corresponding to these three response messages are abc, def, and lmn respectively. The protocol URL of the parameter configuration request message obtained by the framework layer is abc, then the protocol URL with the protocol URL abc is determined to be the first target protocol URL; one response message is pre-stored in the framework layer, and the protocol URLs included in the parameter acquisition requests corresponding to these three response messages are abc respectively. The protocol URL of the parameter configuration request message obtained by the framework layer is abc, then the protocol URL with the protocol URL abc is determined to be the first target protocol URL.
[0137] S302: When there is a first target protocol URL, determine that a response message including the first target protocol URL is a target response message.
[0138] When the framework layer determines in the protocol URL included in the parameter acquisition request that the first target protocol URL is the same as the protocol URL included in the parameter configuration request message, the response message including the first target protocol URL may be determined as the target response message.
[0139] For example, five response messages are pre-stored in the framework layer, and these five response messages are respectively a first response message, a second response message, a third response message, a fourth response message, and a fifth response message. The parameter acquisition requests corresponding to these five response messages include protocol URLs abc, def, lmn, dhi, and uvw, respectively. The protocol URLs of the parameter configuration request message obtained by the framework layer are abc and lmn. Therefore, the protocol URLs with protocol URLs abc and lmn are respectively determined as the first target protocol URLs, thereby determining the first response message corresponding to the first target protocol URL with protocol URL abc and the third response message corresponding to the first target protocol URL with protocol URL lmn as target response messages.
[0140] S303, in the absence of the first target protocol URL, determine, based on the user profile, whether there is a second target protocol URL that matches the protocol URL included in the parameter configuration request message among the protocol URLs included in the parameter acquisition request corresponding to the preset number of response messages stored in advance.
[0141] Since the protocol URL corresponding to the configuration item may be modified, when the protocol URL corresponding to the configuration item is modified, the user configuration file will record that the protocol URL corresponding to the configuration item is modified, and the modification is from the original protocol URL to the current protocol URL. For example, the user configuration file will record that the protocol URL corresponding to the time interval for storing data of the web application is changed from abc to lmn. Although the protocol URL corresponding to the configuration item has changed, based on the user configuration file, it can be determined that the protocol URL lmn and the protocol URL abc are both configuration items corresponding to the time interval for storing data of the same web application.
[0142] Therefore, when it is determined that the first target protocol URL does not exist in the protocol URLs included in the preset number of parameter acquisition requests, the framework layer can further determine whether the protocol URL included in the parameter acquisition request has a protocol URL that matches the protocol URL included in the parameter configuration request message based on the user profile, that is, determine whether the protocol URL included in the parameter acquisition request and the protocol URL included in the parameter configuration request message substantially correspond to the same configuration item. When there is a protocol URL in the protocol URL included in the parameter acquisition request that matches the protocol URL included in the parameter configuration request message, the protocol URL in the parameter acquisition request can be determined as the second target protocol URL.
[0143] For example, three response messages are pre-stored in the framework layer, and these three response messages are the first response message, the second response message, and the third response message. The protocol URLs included in the parameter acquisition request corresponding to these three response messages are abc, def, and lmn, respectively. The protocol URL of the parameter configuration request message obtained by the framework layer is uvw, and the protocol URL included in the parameter acquisition request does not contain the same URL as the protocol URL of the parameter configuration request message. In this case, the framework layer can further read the user configuration file. If the user configuration file records that the protocol URL corresponding to the configuration item is changed from def to uvw, the protocol URL included in the parameter configuration request message can be determined as the second target protocol URL.
[0144] S304: When the second target protocol URL exists, determine that the response message including the second target protocol URL is the target response message.
[0145] When the framework layer determines a second target protocol URL that matches the protocol URL included in the parameter configuration request message in the protocol URL included in the parameter acquisition request, the response message including the second target protocol URL can be determined as the target response message.
[0146] For example, when the framework layer determines the protocol URL with the protocol URL def included in the parameter configuration request message as the second target protocol URL, the second response message corresponding to the second target protocol URL with the protocol URL def is determined as the target response message.
[0147] It can be seen that in the embodiment of the present application, the configuration items corresponding to the target response message corresponding to the first target protocol URL or the second target protocol URL determined by the framework layer include the configuration items of the parameter configuration request message, which can accurately determine that the target response message and the parameter configuration request message are configured for the same user parameters.
[0148] As an implementation manner of an embodiment of the present application, in the case where the above-mentioned target response message exists, the above-mentioned method may further include:
[0149] The key information of the target type included in the target response message is modified from the first key information to the second key information.
[0150] The parameter value of the configuration item corresponding to the first key information representation is an acquisition parameter, and the parameter value of the configuration item corresponding to the second key information representation is a configuration parameter.
[0151] When the framework layer determines the corresponding target response message based on the first target protocol URL or the second target protocol URL, the key information of the target type included in the target response message is modified from the first key information to the second key information, wherein the key information of the target type may be method information. Since the method field in the response message is get or post, and the method field in the parameter configuration request message is put (modify) or post, that is, the method field is get or post, which indicates that the message is a response message, and the method field is put or post, which indicates that the message is a parameter configuration request message, therefore, the framework layer needs to modify the method field of the target type in the target response message from get or post to put or post.
[0152] In this way, the framework layer modifies the key information of the target type included in the target response message, so that the parameter value of the configuration item corresponding to the target response message is changed from the acquisition parameter to the configuration parameter, that is, the configuration parameter is used to replace the acquisition parameter in the target response message, so that the format of the modified target response message and the field format of the parameter configuration request message are completely consistent.
[0153] The above step of determining whether the user parameters included in the target response message include the user parameters included in the parameter configuration request message may include:
[0154] Determine whether the modified target response message includes a parameter configuration request message.
[0155] After the key information of the target type included in the target response message is modified from the first key information to the second key information, the field format of the modified target response message and the field format of the parameter configuration request message are completely consistent. Therefore, it is possible to directly determine whether the modified target response message includes the parameter configuration request message, and there is no need to compare whether the parameter values corresponding to the configuration items in the modified response message include the parameter values corresponding to the configuration items in the parameter configuration request message.
[0156] It can be seen that in the embodiment of the present application, the key information of the target type included in the target response message is modified from the first key information to the second key information, so that the field format of the modified target response message and the parameter configuration request message are completely consistent. In this way, when the framework layer determines whether the modified target response message includes the parameter configuration request message, it only needs to directly determine whether the modified target response message includes the parameter configuration request message, thereby more efficiently and accurately determining whether the modified target response message includes the parameter configuration request message.
[0157] As an implementation manner of an embodiment of the present application, the above step of determining whether the modified target response message includes a parameter configuration request message may include:
[0158] When the modified target response message is consistent with the parameter configuration request message, or when the number of configuration items included in the parameter configuration request message is less than the number of configuration items included in the modified target response message, and the parameter values corresponding to the configuration items included in the parameter configuration request message and the parameter values corresponding to the configuration items included in the modified target response message are respectively consistent, it is determined that the modified target response message includes the parameter configuration request message.
[0159] When the target response message is modified at the framework layer to obtain a modified target response message, it can be determined whether the modified target response message includes a parameter configuration request message according to the following two implementation methods:
[0160] In the first implementation mode, when the framework layer determines that the configuration items of the modified target response message and the parameter configuration request message are the same, and the parameter values corresponding to the configuration items are also the same, that is, it is determined that the modified target response message and the configuration parameter request message are completely consistent, then it can be determined that the modified target response message includes the parameter configuration request message.
[0161] For example, if a user wants to configure the time interval for automatically storing data in an application, the configuration item included in the modified target response message determined by the framework layer is the time interval for automatically storing data, and the parameter value of the corresponding configuration parameter is 1 minute; the configuration item included in the parameter configuration request message obtained by the framework layer is the time interval for automatically storing data, and the parameter value of the corresponding configuration parameter is 1 minute. Based on this, the framework layer determines that the modified target response message and the configuration parameter request message are completely consistent, that is, the configuration items of the modified target response message and the configuration parameter request message and the parameter values corresponding to the configuration items are completely consistent, thereby determining that the modified target response message includes the parameter configuration request message.
[0162] The second implementation method is to determine at the framework layer that the number of configuration items included in the parameter configuration request message is less than the number of configuration items included in the modified target response message, and the configuration items included in the parameter configuration request message are included in the configuration items included in the modified target response message, and the parameter values corresponding to the configuration items included in both are the same.
[0163] For example, a user wants to configure the time interval for automatic data storage and the data storage address for a web application. The modified target response message determined by the framework layer includes the configuration items such as the time interval for automatic data storage, the data storage address, and whether to enable data outbound permission. The corresponding parameter values of the acquisition parameters are 1 minute, address A, and enable data outbound permission. The parameter configuration request message obtained by the framework layer includes the configuration items such as the time interval for automatic data storage and the data storage address. The corresponding parameter values of the configuration parameters are 1 minute and address A.
[0164] Based on this, although the number of configuration items included in the parameter configuration request message is less than the number of configuration items included in the modified target response message, the corresponding configuration items in the modified target response message include the configuration items corresponding to the parameter configuration request message, and the parameter values corresponding to the configuration items included in these two types of messages are respectively consistent. Therefore, the framework layer can determine that the modified target response message includes the parameter configuration request message.
[0165] It can be seen that in the embodiments of the present application, the framework layer can determine that the modified target response message includes the parameter configuration request message when the two types of messages are completely consistent, or when the configuration items in the parameter configuration request message are fewer than the configuration items in the response message, but the parameter values corresponding to the configuration items included in the two types of messages are respectively consistent, so that the determined result is more comprehensive and accurate.
[0166] As an implementation of the embodiment of the present application, the above method may also include:
[0167] When a response message is received to a protocol request sent to the business layer, if the key information of the target type included in the response message of the protocol request is the first key information, the return message of the protocol request is stored in the memory space, wherein the protocol request may include a parameter acquisition request and a parameter configuration request.
[0168] During operation, the framework layer can obtain not only the response message of the parameter acquisition request and the configuration request message sent by the business layer, but also various messages sent by other layers including the business layer, such as application status confirmation message, control information request message, etc.
[0169] Since the messages stored in the memory space by the framework layer during the process of configuring user parameters are response messages to parameter acquisition requests, the memory space does not need to store other types of messages except response messages to parameter acquisition requests. Otherwise, when the framework layer needs to use the response messages to parameter acquisition requests, all messages in the memory space need to be filtered to obtain the response messages to the parameter acquisition requests. Therefore, the key information in the messages can be used to filter the various types of messages obtained by the framework layer, so that only response messages to parameter acquisition requests are stored in the memory space.
[0170] For example, in the case of a parameter acquisition request and a parameter configuration request, it can be determined first whether the key information of the target type included in the response message of the protocol request is the first key information, wherein the first key information can be the parameter value representing the corresponding configuration item as the acquisition parameter. In the case where the key information of the target type included in the response message of the protocol request is the first key information, it can be determined that the response message of the protocol request is a response message of the parameter acquisition request, and the return message of the protocol request is stored in the memory space, so that the user parameters of the response message in the memory space can be used later to determine whether the user parameters of the configuration request message have been modified.
[0171] It can be seen that in the embodiment of the present application, when the framework layer receives the response message for the parameter acquisition request sent by the business layer, the key information of the target type included in the response message of the protocol request can be saved and stored in the memory space. In this way, it can be ensured that more response messages for determining the parameter configuration can be stored in the memory space, so that when determining whether the user parameters included in the response message include the user parameters included in the parameter configuration request message, the result obtained is more accurate.
[0172] As an implementation method of the present application, Figure 4 As shown, the above method may also include:
[0173] S401: When the user parameters included in the response message do not include the user parameters included in the parameter configuration request message, forward the parameter configuration request message to the server layer, so that the server layer returns a parameter configuration response message.
[0174] In the case that the parameter values corresponding to the configuration items included in the response message are different from the parameter values corresponding to the configuration items included in the parameter configuration request message, the framework layer can forward the parameter configuration request message to the server, so that the server receives the user's configuration parameter values for the configuration items and returns a framework layer parameter configuration response message, wherein the parameter configuration response message may include the protocols of all configuration items in the page of the application program to which the parameter configuration instruction issued by the user is directed.
[0175] For example, a user wants to configure the time interval for automatic data storage and the data storage address for a web application. The modified target response message determined by the framework layer includes the configuration items such as the time interval for automatic data storage, the data storage address, and whether to enable data outbound permission. The corresponding configuration parameter values are 1 minute, address A, and enable data outbound permission. The parameter configuration request message obtained by the framework layer includes the time interval for automatic data storage and the data storage address. The corresponding configuration parameter values are 5 minutes and address A.
[0176] The acquisition parameters of the configuration item for the time interval for automatic data storage included in the response message are different from the configuration parameters of the configuration item for the time interval for automatic data storage included in the configuration parameter request message, that is, the user has modified the parameter value of the configuration item for the time interval for automatic data storage. Therefore, the framework layer can determine that the user parameters included in the response message do not include the user parameters included in the parameter configuration request message, and forward the parameter configuration request message to the server, so that the server can respond to modify the parameter value of the configuration item for the time interval for automatic data storage from 1 minute to 5 minutes.
[0177] S402, forwarding the parameter configuration response message to the business layer, so that the business layer completes the parameter configuration of the application page based on the parameter configuration response message.
[0178] The framework layer may forward the received parameter configuration response message to the business layer, so that the business layer completes the configuration of the parameter value of the configuration item based on the parameter configuration response message.
[0179] It can be seen that in the embodiment of the present application, when the user parameters included in the response message do not include the user parameters included in the parameter configuration request message, the framework layer can forward the parameter configuration request message to the server layer, so that the server layer returns a parameter configuration response message, and forwards the parameter configuration response message to the business layer, so that the business layer can complete the parameter configuration of the application page based on the parameter configuration response message. In this way, the framework layer will forward the obtained parameter configuration response message to the business layer only when the parameter value of the configuration item after the user configuration changes, so that the server sends the protocol of all configuration items included in the application page, which effectively saves network transmission resources and reduces traffic costs, thereby improving user experience and saving a lot of operating costs for operations.
[0180] As an implementation method of the present application, Figure 5 As shown in the figure, the parameter configuration method is described in detail:
[0181] A framework layer for building a software framework of a web application is inserted between the business layer and the server of the web application. When a user needs to configure user parameters, a parameter configuration instruction can be issued for a page in the web application, and the framework layer of the web application begins to respond to the parameter acquisition request according to the parameter configuration instruction, and obtains information such as the current parameter value of the configuration item indicated by the parameter configuration instruction as a response message to the parameter acquisition request. For the response message to the parameter acquisition request, it is determined whether to enable the incremental update function; if yes, the query / add request response body is saved, that is, the response message is stored in the memory space of the framework layer, and the user parameters included in the response message are displayed in the parameter configuration page of the web application; if no, the user parameters included in the response message are directly displayed in the parameter configuration page of the web application.
[0182] After the user configures the user parameters through the parameter configuration page of the web application, specifically, the parameter values corresponding to the configuration items included in the user parameters can be adjusted, and the business layer of the web application can send a parameter configuration request message to the framework layer. For the parameter configuration request message, it is determined whether the incremental update function is enabled; if not, the server directly configures the user parameters and sends the protocol of all configuration items on the web application page to the business layer, and the business layer saves the protocol and ends the configuration of the user parameters.
[0183] If so, the framework layer can further determine whether the user parameters included in the response message include the user parameters included in the parameter configuration request message, that is, determine whether the configuration items in the parameter configuration request message are included in the configuration items in the response message, and for the configuration items included in both types of messages, determine whether the parameter values have changed.
[0184] If yes, the server directly configures the user parameters and sends the protocol of all configuration items of the web application page to the business layer. The business layer saves the protocol and ends the configuration of the user parameters.
[0185] If not, the framework layer can confirm that the parameter configuration request message is invalid, and can intercept the parameter configuration request message so that it does not continue to pass through the network transport layer and the server; and imitate the server to directly return a simulation success message to the business layer to inform the business layer that the user parameters indicated by the parameter configuration instruction have been successfully configured, that is, to end the configuration of the user parameters. Since the business logic of the business layer does not participate in the process of configuring user parameters, and the framework layer imitates the simulation success message sent by the server, the business layer is unaware of the specific process of configuring parameters, and is also unable to perceive that the above simulation success message is not sent by the server, but by the framework layer.
[0186] It can be seen that in the embodiment of the present application, the framework layer can accurately compare whether the user parameters included in the response message and the parameter configuration request message have changed, thereby accurately identifying whether the user has modified the parameter value corresponding to the configuration item, and deciding whether the server should re-issue the protocol accordingly. In the case where the parameter values corresponding to the two types of configuration items have not changed, the framework layer intercepts the parameter configuration request message and simulates the return of a simulated success message of successful configuration, so that the parameter configuration request message does not continue to pass through the network transmission layer and the server, thus completing the parameter configuration process and reducing the network bandwidth and server processing pressure. At the same time, the business layer does not perceive whether the simulated success message is intercepted and returned by the framework layer or returned by the server, and has no effect on the business layer logic.
[0187] Therefore, the embodiments of the present application achieve dual optimization of network transmission efficiency and traffic costs, which not only greatly improves processing efficiency, but also significantly reduces network traffic consumption, thereby reducing traffic costs, improving user experience, and saving a lot of operating costs for operations.
[0188] As an implementation method of the embodiment of the present application, the number of user parameters included in the parameter configuration request message is multiple;
[0189] The above-mentioned step of forwarding the parameter configuration request message to the server layer so that the server layer returns the parameter configuration response message when the user parameters included in the response message do not include the user parameters included in the parameter configuration request message may include:
[0190] For each user parameter included in the parameter configuration request message, determine in turn whether the user parameters included in the response message include the user parameter; when it is determined that the response message does not include the configuration item included in the user parameter or the parameter value corresponding to the configuration item is different, forward the parameter configuration request message to the server layer so that the server layer returns a parameter configuration response message.
[0191] Since a web page may include multiple user parameters, and a user may configure multiple user parameters each time, the parameter configuration request message may include multiple user parameters. In this case, the framework layer may determine one by one whether the user parameters in the response message include the user parameters in the parameter configuration request message.
[0192] For each user parameter included in the parameter configuration request message, the framework layer determines in turn whether the user parameters in the response message include the user parameter. If the user parameter is included, it means that the user has not modified the user parameters in the web page in this configuration. As long as the framework layer determines that the response message does not include the configuration item included in the user parameter or the parameter value corresponding to the configuration item is different, it means that the user has modified the user parameter in this configuration, and the framework layer needs to forward the parameter configuration request message to the server. Therefore, in this case, the framework layer can no longer continue to determine whether other user parameters in the response message include the user parameters in the parameter configuration request, and can directly forward the parameter configuration request message to the server layer so that the server returns a parameter configuration response message.
[0193] For example, the parameter configuration request message includes configuration item a, configuration item b and configuration item c, and the user parameters included in the response message include configuration item b and configuration item c. For configuration item a in the parameter configuration request message, the framework layer determines in turn whether the user parameters in the response message include the configuration item a. When the framework layer determines that the user parameters in the response message do not include the configuration item a, the framework layer may no longer continue to determine whether other user parameters in the parameter configuration request message that have not been determined are included in the user parameters in the response message. Furthermore, the framework layer may forward the parameter configuration request message to the server layer so that the server layer returns a parameter configuration response message.
[0194] For another example, the parameter configuration request message includes configuration item a and configuration item b, and the parameter values corresponding to each configuration item are A and C respectively; the user parameters included in the response message include configuration item a and configuration item b, and the parameter values corresponding to each configuration item are D and F respectively. For configuration item a in the parameter configuration request message, the framework layer can determine that the parameter value D corresponding to configuration item a in the response message is inconsistent with the parameter value A corresponding to configuration item a in the parameter configuration request message. In this case, for other user parameters in the parameter configuration request message that have not been determined, the framework layer may no longer continue to determine whether they are included in the user parameters in the response message. Furthermore, the framework layer can forward the parameter configuration request message to the server layer so that the server layer returns a parameter configuration response message.
[0195] It can be seen that in this embodiment, the number of user parameters included in the parameter configuration request message is multiple. For each user parameter included in the parameter configuration request message, when the framework layer determines that the response message does not include the configuration item included in the user parameter or the parameter value corresponding to the configuration item is different, it means that the user has modified the current user parameter, and the framework layer needs to forward the parameter configuration request message to the server. Therefore, for other user parameters in the parameter configuration request message that have not been determined, the framework layer may no longer continue to determine whether they are included in the user parameters in the response message, thereby reducing the amount of data that the framework layer needs to process, while improving the speed of configuring user parameters.
[0196] As an implementation method of the embodiment of the present application, the configuration of the configuration items of the page is implemented based on multiple protocols;
[0197] The above-mentioned step of forwarding the parameter configuration request message to the server layer so that the server layer returns the parameter configuration response message when the user parameters included in the response message do not include the user parameters included in the parameter configuration request message includes:
[0198] In the case that the user parameters included in the response message do not include the user parameters included in the parameter configuration request message, determine the target protocol corresponding to the user parameters not included in the response message; forward the parameter configuration request message to the server layer so that the server layer returns a parameter configuration response message.
[0199] The parameter configuration request message is used to request configuration information of user parameters based on the target protocol, and the parameter configuration response message includes configuration information of user parameters based on the target protocol.
[0200] Since a web page may include multiple configuration items, the protocols corresponding to different configuration items may be different. When the framework layer determines that the user parameters included in the response message do not include the user parameters included in the parameter configuration request message, it means that the user has modified the user parameters. The framework layer can determine the target protocol corresponding to the changed user parameters, and forward the parameter configuration request message to the server layer. The parameter configuration request message is used to request the configuration information of the user parameters corresponding to the target protocol, so that the server layer returns the configuration information including the user parameters based on the target protocol.
[0201] For example, the parameter configuration request message includes configuration item a-configuration item e, wherein the configuration of configuration item a-configuration item c is implemented based on protocol 1, and the configuration of configuration item d and configuration item e is implemented based on protocol 2. Then, if the framework layer determines that the user parameters included in the response message include configuration item a-configuration item c, and the corresponding parameter values are the same, and the user parameters included in the response message do not include configuration item d, or the parameter values corresponding to configuration item d are different, protocol 2 can be determined as the target protocol.
[0202] Furthermore, the framework layer may forward a parameter configuration request message to the server layer, the parameter configuration request message being used to request configuration information of user parameters based on the target protocol, i.e., protocol 2, without requesting configuration information of user parameters based on protocol 1. In this way, the server layer may return a parameter configuration response message, the parameter configuration response message including configuration information of user parameters based on protocol 2, but not including configuration information of user parameters based on protocol 1.
[0203] After receiving the parameter configuration response message, the business layer can configure configuration item d and configuration item e based on protocol 2 without configuring configuration item a-configuration item c.
[0204] It can be seen that in this embodiment, for configuration items whose parameter values have not changed, the framework layer does not need to determine the corresponding protocols, nor does it need to request the corresponding user parameter configuration information based on these protocols, thereby reducing the amount of data that the framework layer needs to process. The server does not need to send down a parameter configuration response message including the configuration information of the user parameters that have not changed, and the business layer does not need to configure all configuration items, thereby further improving the efficiency of parameter configuration.
[0205] Corresponding to the first parameter configuration method described above, the embodiment of the present application further provides a second parameter configuration method. The second parameter configuration method provided by the embodiment of the present application is introduced below.
[0206] The second parameter configuration method provided in the embodiment of the present application can be applied to the business layer of any application that needs to configure user parameters, for example, it can be a business layer for configuring a program for web pages, a business layer for configuring a firewall application, a business layer for configuring a user authority application, etc., which is not specifically limited here. For the sake of clarity of description, it is subsequently referred to as the business layer of the application.
[0207] like Figure 6 As shown, a parameter configuration method is applied to the business layer of an application, the business layer is used to process the business logic of the application, the application also includes a framework layer, the framework layer is used to build a software framework of the application, the method includes:
[0208] S601, in response to a user parameter configuration instruction, when the user configures a parameter value for a configuration item, a parameter configuration request message is sent to the framework layer, so that the framework layer, when obtaining the parameter configuration request message, determines whether the user parameters included in the response message of the pre-stored parameter acquisition request include the user parameters included in the parameter configuration request message.
[0209] Among them, the parameter acquisition request is used to obtain the current parameter value of the configuration item indicated by the parameter configuration instruction when the user issues a parameter configuration instruction for the page of the application, the user parameters include configuration items and corresponding parameter values, and the configuration of the configuration items of the page is implemented based on at least one protocol.
[0210] S602, receiving a simulation success message.
[0211] The simulation success message is sent by the framework layer when the user parameters included in the response message include the user parameters included in the parameter configuration request message, and is used to indicate that the user parameters indicated by the parameter configuration instruction have been configured successfully.
[0212] Since the specific implementation methods of the above steps have been described in detail in the above embodiments, you can refer to the description of the corresponding parts of the above embodiments, so they will not be repeated here.
[0213] It can be seen that in the embodiment of the present application, the business layer responds to the parameter configuration instruction and sends a parameter configuration request message to the framework layer, so that the framework layer of the application program intercepts the parameter configuration request message when the current user parameters include the user parameters after the user has configured, that is, the user has not modified the user parameters during this parameter configuration. The message returns a simulated success message, so that the server will not receive the parameter configuration request message. Moreover, since the configuration of the configuration items requires the use of at least one protocol, the server does not need to re-send all the protocols of this web page when the user parameter configuration has not changed, thereby improving the response efficiency of the server layer and reducing network traffic consumption.
[0214] As an implementation of the embodiment of the present application, the above method may also include:
[0215] When a parameter configuration response message is received, the parameter configuration of the application's page is completed based on the parameter configuration response message, wherein the parameter configuration response message is returned by the server layer when the framework layer forwards the parameter configuration request message to the server layer when the user parameters included in the response message do not include the user parameters included in the parameter configuration request message.
[0216] Since the specific implementation methods of the above steps have been described in detail in the above embodiments, you can refer to the description of the corresponding parts of the above embodiments, so they will not be repeated here.
[0217] It can be seen that in the embodiment of the present application, when the user parameters included in the response message do not include the user parameters included in the parameter configuration request message, the framework layer can forward the parameter configuration request message to the server layer, so that the server layer returns a parameter configuration response message, and forwards the parameter configuration response message to the business layer, so that the business layer can complete the parameter configuration of the application page based on the parameter configuration response message. In this way, the framework layer will forward the obtained parameter configuration response message to the business layer only when the parameter value of the configuration item after the user configuration changes, so that the server sends the protocol of all configuration items included in the application page, which effectively saves network transmission resources and reduces traffic costs, thereby improving user experience and saving a lot of operating costs for operations.
[0218] Corresponding to the above parameter configuration method, the embodiment of the present application further provides a parameter configuration device. The following is an introduction to a parameter configuration device provided by the embodiment of the present application.
[0219] like Figure 7As shown, a parameter configuration device is applied to the framework layer of an application, the framework layer is used to build a software framework of the application, the application also includes a business layer, the business layer is used to process the business logic of the application, and the device includes:
[0220] The user parameter first determination module 701 is used to determine whether the user parameters included in the response message of the pre-stored parameter acquisition request include the user parameters included in the parameter configuration request message when the parameter configuration request message sent by the business layer is obtained, wherein the parameter acquisition request is used to obtain the current parameter value of the configuration item indicated by the parameter configuration instruction when the user issues a parameter configuration instruction for the page of the application, the parameter configuration request message is sent by the business layer after the user configures the parameter value for the configuration item, the user parameter includes the configuration item and the corresponding parameter value, and the configuration of the configuration item of the page is implemented based on at least one protocol;
[0221] The simulation success message sending module 702 is used to intercept the parameter configuration request message and return a simulation success message to the business layer to inform the business layer that the user parameters indicated by the parameter configuration instruction have been successfully configured when the user parameters included in the response message include the user parameters included in the parameter configuration request message.
[0222] It can be seen that in the embodiment of the present application, the framework layer of the application can determine whether the user parameters included in the response message of the pre-stored parameter acquisition request include the user parameters included in the parameter configuration request message when the parameter configuration request message sent by the business layer is obtained, wherein the parameter acquisition request is used to obtain the current parameter value of the configuration item indicated by the parameter configuration instruction when the user issues a parameter configuration instruction for the page of the application, the parameter configuration request message is sent by the business layer after the user configures the parameter value for the configuration item, the user parameter includes the configuration item and the corresponding parameter value, and the configuration of the configuration item of the page is implemented based on at least one protocol; when the user parameter included in the response message includes the user parameter included in the parameter configuration request message, the parameter configuration request message is intercepted, and a simulated success message is returned to the business layer to inform the business layer that the user parameter indicated by the parameter configuration instruction has been successfully configured. In this way, when the current user parameters include the user parameters after the user has configured, that is, when the user has not modified the user parameters in this parameter configuration, the parameter configuration request message is intercepted by the framework layer of the application and a simulated success message is returned, so that the server will not receive the parameter configuration request message. Moreover, since the configuration of the configuration items requires the use of at least one protocol, the server does not need to re-send all the protocols of this web page when the user parameter configuration has not changed, thereby improving the response efficiency of the server layer and reducing network traffic consumption.
[0223] As an implementation of the embodiment of the present application, the above device may further include:
[0224] A target response message determination module is used to determine whether there is a target response message including a configuration item corresponding to the parameter configuration request message in the corresponding configuration item among the response messages of a preset number of parameter acquisition requests stored in advance;
[0225] The second user parameter determination module is used to determine whether the user parameters included in the target response message include the user parameters included in the parameter configuration request message when there is a target response message.
[0226] As an implementation manner of an embodiment of the present application, the above-mentioned target response message determination module may include:
[0227] A first target protocol URL determination submodule is used to determine whether there is a first target protocol URL that is the same as the protocol URL included in the parameter configuration request message among the protocol URLs included in the parameter acquisition request message corresponding to the pre-stored preset number of response messages;
[0228] A target response message first determination submodule, used to determine that a response message including the first target protocol URL is a target response message when there is a first target protocol URL;
[0229] A second target protocol URL determination submodule is used to determine, in the absence of the first target protocol URL, whether there is a second target protocol URL matching the protocol URL included in the parameter configuration request message among the protocol URLs included in the parameter acquisition request message corresponding to the preset number of response messages stored in advance based on the user profile;
[0230] The target response message second determination submodule is used to determine that the response message including the second target protocol URL is the target response message when there is a second target protocol URL.
[0231] As an implementation manner of an embodiment of the present application, in the case where the above-mentioned target response message exists, the above-mentioned device may further include:
[0232] The key information modification module is used to modify the key information of the target type included in the target response message from the first key information to the second key information, wherein the parameter value of the corresponding configuration item represented by the first key information is an acquisition parameter, and the parameter value of the corresponding configuration item represented by the second key information is a configuration parameter.
[0233] The second user parameter determination module includes:
[0234] A message determination submodule, used to determine whether the modified target response message includes a parameter configuration request message;
[0235] As an implementation manner of an embodiment of the present application, the above-mentioned message determination submodule may include:
[0236] A target response message determining unit is used to determine that the modified target response message includes the parameter configuration request message when the modified target response message is consistent with the parameter configuration request message, or when the number of configuration items included in the parameter configuration request message is less than the number of configuration items included in the modified target response message, and the parameter values corresponding to the configuration items included in the parameter configuration request message and the parameter values corresponding to the configuration items included in the modified target response message are respectively consistent.
[0237] As an implementation of the embodiment of the present application, the above device may further include:
[0238] A response message storage module is used to store the return message of the protocol request in the memory space when a response message to a protocol request sent by the business layer is received, if the key information of the target type included in the response message of the protocol request is the first key information, wherein the protocol request includes a parameter acquisition request and a parameter configuration request.
[0239] As an implementation of the embodiment of the present application, the above device may further include:
[0240] The parameter configuration request message forwarding module is used to forward the parameter configuration request message to the server layer when the user parameters included in the response message do not include the user parameters included in the parameter configuration request message, so that the server layer returns a parameter configuration response message.
[0241] The parameter configuration response message forwarding module is used to forward the parameter configuration response message to the business layer, so that the business layer completes the parameter configuration of the application page based on the parameter configuration response message.
[0242] As an implementation method of the embodiment of the present application, the number of user parameters included in the parameter configuration request message is multiple;
[0243] The above parameter configuration request message forwarding module may include:
[0244] A user parameter third determination submodule, for determining, for each user parameter included in the parameter configuration request message, whether the user parameters included in the response message include the user parameter;
[0245] The first message forwarding submodule is used to forward the parameter configuration request message to the server layer when it is determined that the response message does not include the configuration item included in the user parameter or the parameter value corresponding to the configuration item is different, so that the server layer returns a parameter configuration response message.
[0246] As an implementation method of the embodiment of the present application, the configuration of the configuration items of the page is implemented based on multiple protocols;
[0247] The above parameter configuration request message forwarding module may include:
[0248] A target protocol determination submodule, used to determine the target protocol corresponding to the user parameters not included in the response message when the user parameters included in the response message do not include the user parameters included in the parameter configuration request message;
[0249] The second submodule of message forwarding is used to forward the parameter configuration request message to the server layer so that the server layer returns a parameter configuration response message, wherein the parameter configuration request message is used to request the configuration information of the user parameters based on the target protocol, and the parameter configuration response message includes the configuration information of the user parameters based on the target protocol.
[0250] like Figure 8 As shown, a parameter configuration device is applied to the business layer of an application, the business layer is used to process the business logic of the application, the application also includes a framework layer, the framework layer is used to build a software framework of the application, and the device includes:
[0251] The parameter configuration request message sending module 801 is used to respond to the user parameter configuration instruction, and when the user configures the parameter value for the configuration item, send the parameter configuration request message to the framework layer, so that the framework layer determines whether the user parameters included in the response message of the pre-stored parameter acquisition request include the user parameters included in the parameter configuration request message when the parameter configuration request message is obtained, wherein the parameter acquisition request is used to obtain the current parameter value of the configuration item indicated by the parameter configuration instruction when the user issues the parameter configuration instruction for the page of the application, the user parameter includes the configuration item and the corresponding parameter value, and the configuration of the configuration item of the page is implemented based on at least one protocol;
[0252] The simulation success message receiving module 802 is used to receive a simulation success message, wherein the simulation success message is sent by the framework layer when the user parameters included in the response message include the user parameters included in the parameter configuration request message, and is used to indicate that the user parameters indicated by the parameter configuration instruction have been configured successfully.
[0253] It can be seen that in the embodiment of the present application, the business layer responds to the parameter configuration instruction and sends a parameter configuration request message to the framework layer, so that the framework layer of the application program intercepts the parameter configuration request message when the current user parameters include the user parameters after the user has configured, that is, the user has not modified the user parameters during this parameter configuration. The message returns a simulated success message, so that the server will not receive the parameter configuration request message. Moreover, since the configuration of the configuration items requires the use of at least one protocol, the server does not need to re-send all the protocols of this web page when the user parameter configuration has not changed, thereby improving the response efficiency of the server layer and reducing network traffic consumption.
[0254] As an implementation of the embodiment of the present application, the above device may further include:
[0255] A parameter configuration completion module is used to complete the parameter configuration of the application's page based on the parameter configuration response message when a parameter configuration response message is received, wherein the parameter configuration response message is returned by the server layer when the framework layer forwards the parameter configuration request message to the server layer when the user parameters included in the response message do not include the user parameters included in the parameter configuration request message.
[0256] The present application also provides an electronic device, such as Fig. 9 As shown, including:
[0257] Memory 901, used for storing computer programs;
[0258] The processor 902 is used to implement the parameter configuration method described in any of the above embodiments when executing the program stored in the memory 901.
[0259] It can be seen that in the embodiment of the present application, the framework layer of the application can determine whether the user parameters included in the response message of the pre-stored parameter acquisition request include the user parameters included in the parameter configuration request message when the parameter configuration request message sent by the business layer is obtained, wherein the parameter acquisition request is used to obtain the current parameter value of the configuration item indicated by the parameter configuration instruction when the user issues a parameter configuration instruction for the page of the application, the parameter configuration request message is sent by the business layer after the user configures the parameter value for the configuration item, the user parameter includes the configuration item and the corresponding parameter value, and the configuration of the configuration item of the page is implemented based on at least one protocol; when the user parameter included in the response message includes the user parameter included in the parameter configuration request message, the parameter configuration request message is intercepted, and a simulated success message is returned to the business layer to inform the business layer that the user parameter indicated by the parameter configuration instruction has been successfully configured. In this way, when the current user parameters include the user parameters after the user has configured, that is, when the user has not modified the user parameters in this parameter configuration, the parameter configuration request message is intercepted by the framework layer of the application and a simulated success message is returned, so that the server will not receive the parameter configuration request message. Moreover, since the configuration of the configuration items requires the use of at least one protocol, the server does not need to re-send all the protocols of this web page when the user parameter configuration has not changed, thereby improving the response efficiency of the server layer and reducing network traffic consumption.
[0260] Furthermore, the electronic device may further include a communication bus and / or a communication interface, and the processor 902, the communication interface, and the memory 901 communicate with each other via the communication bus.
[0261] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0262] The communication interface is used for communication between the above electronic device and other devices.
[0263] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0264] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0265] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above parameter configuration methods are implemented.
[0266] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any parameter configuration method in the above embodiments.
[0267] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can 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 the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state hard disk (SSD), etc.
[0268] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0269] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the second parameter configuration method, device, electronic device, computer-readable storage medium, and computer program product embodiment, since it is basically similar to the first parameter configuration method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0270] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A parameter configuration method, characterized in that: A framework layer applied to an application, the framework layer is used to build a software framework of the application, the application further includes a business layer, the business layer is used to process the business logic of the application, and the method includes: In the case of obtaining the parameter configuration request message sent by the business layer, determining whether the user parameters included in the response message of the pre-stored parameter acquisition request include the user parameters included in the parameter configuration request message, wherein the parameter acquisition request is used to obtain the current parameter value of the configuration item indicated by the parameter configuration instruction when the user issues a parameter configuration instruction for the page of the application, the parameter configuration request message is sent by the business layer after the user configures the parameter value for the configuration item, the user parameter includes the configuration item and the corresponding parameter value, and the configuration of the configuration item of the page is implemented based on at least one protocol; In the case where the user parameters included in the response message include the user parameters included in the parameter configuration request message, the parameter configuration request message is intercepted, and a simulation success message is returned to the business layer to inform the business layer that the user parameters indicated by the parameter configuration instruction have been configured successfully.
2. The method according to claim 1, characterized in that: Before the step of determining whether the user parameters included in the response message of the pre-stored parameter acquisition request include the user parameters included in the parameter configuration request message, the method further includes: Determine whether there is a target response message including the configuration item corresponding to the parameter configuration request message in the corresponding configuration item among the response messages of the preset number of parameter acquisition requests stored in advance; In the case that the target response message exists, it is determined whether the user parameters included in the target response message include the user parameters included in the parameter configuration request message.
3. The method according to claim 2, characterized in that The step of determining whether there is a target response message including a configuration item corresponding to the parameter configuration request message in the corresponding configuration item among the response messages of the preset number of parameter acquisition requests stored in advance comprises: Determine whether there is a first target protocol URL that is the same as the protocol URL included in the parameter configuration request message among the protocol URLs included in the parameter acquisition requests corresponding to the preset number of pre-stored response messages; In the case where the first target protocol URL exists, determining that the response message including the first target protocol URL is a target response message; In the absence of the first target protocol URL, determining, based on the user profile, whether there is a second target protocol URL matching the protocol URL included in the parameter configuration request message among the protocol URLs included in the parameter acquisition request message corresponding to the preset number of response messages stored in advance; In the case where the second target protocol URL exists, the response message including the second target protocol URL is determined to be a target response message.
4. The method according to claim 2, characterized in that: In the case where the target response message exists, the method further includes: Modify the key information of the target type included in the target response message from the first key information to the second key information, wherein the first key information represents that the parameter value of the corresponding configuration item is an acquisition parameter, and the second key information represents that the parameter value of the corresponding configuration item is a configuration parameter; The step of determining whether the user parameters included in the target response message include the user parameters included in the parameter configuration request message comprises: Determine whether the modified target response message includes the parameter configuration request message.
5. The method according to claim 4, characterized in that The step of determining whether the modified target response message includes the parameter configuration request message comprises: In the case where the modified target response message is consistent with the parameter configuration request message, or when the number of configuration items included in the parameter configuration request message is less than the number of configuration items included in the modified target response message, and the parameter values corresponding to the configuration items included in the parameter configuration request message and the parameter values corresponding to the configuration items included in the modified target response message are respectively consistent, it is determined that the modified target response message includes the parameter configuration request message.
6. The method according to claim 4, characterized in that The method further comprises: When a response message is received to the protocol request sent to the business layer, if the key information of the target type included in the response message of the protocol request is the first key information, the return message of the protocol request is stored in the memory space, wherein the protocol request includes the parameter acquisition request and the parameter configuration request.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: In a case where the user parameters included in the response message do not include the user parameters included in the parameter configuration request message, forwarding the parameter configuration request message to the server layer so that the server layer returns a parameter configuration response message; The parameter configuration response message is forwarded to the business layer, so that the business layer completes the parameter configuration of the page of the application based on the parameter configuration response message.
8. The method according to claim 7, characterized in that The parameter configuration request message includes a plurality of user parameters; The step of forwarding the parameter configuration request message to the server layer so that the server layer returns a parameter configuration response message when the user parameters included in the response message do not include the user parameters included in the parameter configuration request message includes: For each user parameter included in the parameter configuration request message, determining in sequence whether the user parameters included in the response message include the user parameter; When it is determined that the response message does not include the configuration item included in the user parameter or the parameter values corresponding to the configuration items are different, the parameter configuration request message is forwarded to the server layer so that the server layer returns a parameter configuration response message.
9. The method according to claim 7, characterized in that: The configuration items of the page are configured based on multiple protocols; The step of forwarding the parameter configuration request message to the server layer so that the server layer returns a parameter configuration response message when the user parameters included in the response message do not include the user parameters included in the parameter configuration request message includes: In a case where the user parameters included in the response message do not include the user parameters included in the parameter configuration request message, determining a target protocol corresponding to the user parameters not included in the response message; Forward the parameter configuration request message to the server layer so that the server layer returns a parameter configuration response message, wherein the parameter configuration request message is used to request configuration information of user parameters based on the target protocol, and the parameter configuration response message includes configuration information of user parameters based on the target protocol.
10. A parameter configuration method, characterized in that: A business layer applied to an application, the business layer is used to process the business logic of the application, the application further includes a framework layer, the framework layer is used to build a software framework of the application, the method includes: In response to a user parameter configuration instruction, when a user configures a parameter value for a configuration item, a parameter configuration request message is sent to the framework layer, so that the framework layer determines whether the user parameters included in the response message of the pre-stored parameter acquisition request include the user parameters included in the parameter configuration request message when the parameter configuration request message is obtained, wherein the parameter acquisition request is used to obtain the current parameter value of the configuration item indicated by the parameter configuration instruction when the user issues a parameter configuration instruction for a page of the application, the user parameter includes a configuration item and a corresponding parameter value, and the configuration of the configuration item of the page is implemented based on at least one protocol; A simulation success message is received, wherein the simulation success message is sent by the framework layer when the user parameters included in the response message include the user parameters included in the parameter configuration request message, and is used to indicate that the user parameters indicated by the parameter configuration instruction have been configured successfully.
11. The method according to claim 10, characterized in that The method further comprises: Upon receipt of a parameter configuration response message, the parameter configuration of the application's page is completed based on the parameter configuration response message, wherein the parameter configuration response message is returned by the server layer when the framework layer forwards the parameter configuration request message to the server layer when the user parameters included in the response message do not include the user parameters included in the parameter configuration request message.
12. A parameter configuration device, characterized in that: A framework layer applied to an application, the framework layer is used to build a software framework of the application, the application also includes a business layer, the business layer is used to process the business logic of the application, and the device includes: a first user parameter determination module, configured to determine whether the user parameters included in the response message of the pre-stored parameter acquisition request include the user parameters included in the parameter configuration request message, when the parameter configuration request message sent by the business layer is acquired, wherein the parameter acquisition request is used to acquire the current parameter value of the configuration item indicated by the parameter configuration instruction when the user issues the parameter configuration instruction for the page of the application, the parameter configuration request message is sent by the business layer after the user configures the parameter value for the configuration item, the user parameter includes the configuration item and the corresponding parameter value, and the configuration of the configuration item of the page is implemented based on at least one protocol; A simulation success message sending module is used to intercept the parameter configuration request message when the user parameters included in the response message include the user parameters included in the parameter configuration request message, and return a simulation success message to the business layer to inform the business layer that the user parameters indicated by the parameter configuration instruction have been successfully configured.
13. A parameter configuration device, characterized in that: A business layer applied to an application, the business layer is used to process the business logic of the application, the application also includes a framework layer, the framework layer is used to build a software framework of the application, the device includes: a parameter configuration request message sending module, configured to respond to a user parameter configuration instruction, and in the case where the user configures a parameter value for a configuration item, send a parameter configuration request message to the framework layer, so that the framework layer, in the case where the parameter configuration request message is obtained, determines whether the user parameters included in the response message of the pre-stored parameter acquisition request include the user parameters included in the parameter configuration request message, wherein the parameter acquisition request is used to obtain the current parameter value of the configuration item indicated by the parameter configuration instruction when the user issues a parameter configuration instruction for a page of the application, the user parameter includes a configuration item and a corresponding parameter value, and the configuration of the configuration item of the page is implemented based on at least one protocol; A simulation success message receiving module is used to receive a simulation success message, wherein the simulation success message is sent by the framework layer when the user parameters included in the response message include the user parameters included in the parameter configuration request message, and is used to indicate that the user parameters indicated by the parameter configuration instruction have been successfully configured.
14. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-11 when executing a program stored in a memory.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Network parameter configuration method and device and storage medium
CN113489600A
Business function configuration method and device, storage medium and business system thereof
CN114356333A