Request data processing method and device and storage medium
By obtaining and maintaining the request configuration information in the client request list and canceling redundant requests, the problem of inconsistency in page display caused by asynchronous operations in front-end network requests is solved, and the pressure on the server is reduced.
Patent Information
- Application Number
- CN202410232618.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-29
- Publication Date
- 2025-08-29
AI Technical Summary
In front-end network requests, asynchronous operations cannot be completed in the order of starting, resulting in the problem that the page display is inconsistent with the user's needs.
By obtaining the configuration information of the newly generated request, query whether the same request exists in the client's request list, and maintain or cancel redundant requests in the list, ensuring that the number of the same requests is one and avoiding redundant requests being sent to the server.
It reduces the pressure on the server and solves the problem that the page display content is inconsistent with user needs.
Smart Images

Figure CN120561390A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a method, device, and storage medium for processing request data. Background Art
[0002] In front-end network requests, asynchronous operations may not complete in the order they were started. This can cause the requested data to be returned later when users switch between search, paging, or tabs, resulting in the page displaying content that is inconsistent with the user's needs. Summary of the Invention
[0003] To overcome the problems existing in the related art, the present disclosure provides a method, device and storage medium for processing request data.
[0004] According to a first aspect of an embodiment of the present disclosure, a method for processing request data is provided, including:
[0005] Obtain configuration information of the newly generated first request;
[0006] querying, according to the configuration information, whether a second request identical to the first request exists in a request list of the client, the request list maintaining requests to be processed;
[0007] In a case where a second request identical to the first request exists in the request list, either the first request or the second request is maintained in the request list.
[0008] Optionally, querying, according to the configuration information, whether a second request identical to the first request exists in a request list of the client includes:
[0009] Obtaining the uniform resource locator of the first request, the request parameters of the first request, and the type parameter of the first request in the configuration information;
[0010] In a case where the type parameter indicates that the type of the first request is a cancellation type, determining whether the request parameters include a filtering parameter;
[0011] In the case that the request parameters include the filtering parameter, the request in the request list whose configuration information has the filtering parameter and the uniform resource locator and whose type is a cancellation type is taken as a second request that is the same as the first request.
[0012] Optionally, querying, according to the configuration information, whether a second request identical to the first request exists in a request list of the client includes:
[0013] In a case where the request parameters do not include the filtering parameter, the request in the request list that has the uniform resource locator and is of a cancel type is treated as a second request that is the same as the first request.
[0014] Optionally, querying, according to the configuration information, whether a second request identical to the first request exists in a request list of the client includes:
[0015] In a case where the type parameter indicates that the type of the first request is different from the cancellation type, the request in the request list whose configuration information has the request parameter and the uniform resource locator is treated as a second request that is the same as the first request.
[0016] Optionally, maintaining any one of the first request and the second request in the request list includes:
[0017] canceling the first request; or,
[0018] The second request is canceled, and the first request is maintained in the request list.
[0019] Optionally, the method comprises:
[0020] In response to the first request being completed, deleting the first request from the request list: or,
[0021] In response to the second request being completed, deleting the second request from the request list.
[0022] According to a second aspect of an embodiment of the present disclosure, there is provided a device for processing request data, including:
[0023] A first module is configured to obtain configuration information of a newly generated first request;
[0024] A second module is configured to query, based on the configuration information, whether a second request identical to the first request exists in a request list of the client, wherein the request list maintains requests to be processed;
[0025] A third module is configured to maintain either the first request or the second request in the request list if a second request identical to the first request exists in the request list.
[0026] Optionally, the second module includes:
[0027] A first submodule is configured to obtain a uniform resource locator of the first request, request parameters of the first request, and a type parameter of the first request from the configuration information;
[0028] A second submodule is configured to determine whether the request parameters include a filtering parameter when the type parameter indicates that the type of the first request is a cancellation type;
[0029] The third submodule is configured to treat the request in the request list, whose configuration information has the filtering parameter and the uniform resource locator and whose type is a cancellation type, as a second request that is the same as the first request when the request parameter includes the filtering parameter.
[0030] Optionally, the second module includes:
[0031] The fourth submodule is configured to treat the request in the request list that has the uniform resource locator and is of a cancel type as a second request that is the same as the first request if the request parameter does not include the filter parameter.
[0032] Optionally, the second module includes:
[0033] The fifth submodule is configured to treat the request in the request list whose configuration information has the request parameters and the uniform resource locator as a second request that is the same as the first request when the type parameter indicates that the type of the first request is different from the cancellation type.
[0034] Optionally, the third module includes:
[0035] a sixth submodule, configured to cancel the first request; or,
[0036] A seventh submodule is configured to cancel the second request and maintain the first request in the request list.
[0037] Optionally, the device comprises:
[0038] A fourth module is configured to delete the first request from the request list in response to the first request being completed: or,
[0039] A fifth module is configured to delete the second request from the request list in response to the second request being completed.
[0040] According to a third aspect of an embodiment of the present disclosure, there is provided a device for processing request data, including:
[0041] processor;
[0042] a memory for storing processor-executable instructions;
[0043] The processor is configured to execute the method described in any one of the first aspects.
[0044] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the method according to any one of the first aspects is implemented.
[0045] In the above scheme, for the newly generated first request, the configuration information of the first request can be obtained. According to the configuration information, the client's request list is queried to see whether there is a second request that is identical to the first request, and the request list maintains requests to be processed. In this way, when there is a second request that is identical to the first request in the request list, any one of the first request and the second request is maintained in the request list. In this way, it can be ensured that the number of the same request in the request list is one, that is, redundant requests can be canceled. In this way, it is possible to avoid sending redundant requests to the server, thereby reducing the pressure on the server. In addition, by canceling redundant requests, the problem of inconsistency between the page display content and the user's required content in related scenarios can also be solved.
[0046] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0048] Figure 1 The figure is a flowchart of a method for processing request data according to an exemplary embodiment.
[0049] Figure 2 is a flowchart showing an implementation of step S12 according to an exemplary embodiment.
[0050] Figure 3 The figure is a flowchart of a method for processing request data according to an exemplary embodiment.
[0051] Figure 4 The figure is a schematic diagram showing a processing result of request data according to an exemplary embodiment.
[0052] Figure 5 The figure is a schematic diagram showing a processing result of request data according to an exemplary embodiment.
[0053] Figure 6 The figure is a schematic diagram showing a processing result of request data according to an exemplary embodiment.
[0054] Figure 7The figure is a schematic diagram showing a processing result of request data according to an exemplary embodiment.
[0055] Figure 8 The figure is a block diagram of a device for processing request data according to an exemplary embodiment.
[0056] Figure 9 It is a block diagram showing a device 900 for processing request data according to an exemplary embodiment. DETAILED DESCRIPTION
[0057] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0058] Before introducing the request data processing method, device, and storage medium of the present disclosure, relevant scenarios of the embodiments of the present disclosure are first introduced.
[0059] In some scenarios, when users switch between scenarios such as searching, paging, and tabs, the data requested may be returned later, resulting in the page display not matching the user's needs. To address this issue, in some scenarios, each request can be assigned an identifier and sent to the server. This allows for the focus on the response to the last request when multiple requests are made. For example, the identifier can be used to determine the server's response to the last request, and the content displayed to the user can be provided based on that response. This can resolve the issue of page display not matching the user's needs.
[0060] However, setting a corresponding flag for each request may increase resource consumption. In addition, redundant requests still need to be sent to the server for processing, which may lead to a high load pressure on the server.
[0061] To this end, an embodiment of the present disclosure provides a method for processing request data, which can be applied to various terminals, such as laptops, tablet devices, mobile phones, etc. Figure 1 FIG. 1 is a flow chart of a method for processing request data shown in an exemplary embodiment of the present disclosure. Figure 1 The method for processing the request data includes:
[0062] In step S11 , the configuration information of the newly generated first request is obtained.
[0063] Taking the method applied to a terminal as an example, in some embodiments, the terminal may trigger the generation of the first request in response to a user operation. In some embodiments, the terminal may also spontaneously generate the first request based on a set rule.
[0064] The function and purpose of the first request may vary based on the requirements of the application scenario, such as obtaining data. The embodiment of the present disclosure does not limit the function and purpose of the first request.
[0065] For the newly generated first request, configuration information of the first request may be obtained.
[0066] In step S12, based on the configuration information, it is queried whether there is a second request identical to the first request in the request list of the client, where the request list maintains requests to be processed.
[0067] Figure 2 This is a flowchart of an implementation of step S12 shown in an exemplary embodiment of the present disclosure, referring to Figure 2 In a possible implementation, querying, based on the configuration information, whether a second request identical to the first request exists in the request list of the client includes:
[0068] In step S121, the uniform resource locator of the first request, the request parameters of the first request and the type parameters of the first request in the configuration information are obtained.
[0069] The uniform resource locator is also called URL (Uniform Resource Locator), and the request parameters can be set based on demand. As an example, the request parameters may include, for example, "url?id=0&name=qjm". The type parameter may characterize the type of the first request, and the type of the first request may include, for example, a cancellation type and a regular type, etc. The cancellation type includes a cancellation type with a filtering parameter and a cancellation type without a filtering parameter. For different types, different methods may be used to determine whether two requests are the same request. This disclosure will provide an illustrative illustration of this in subsequent embodiments.
[0070] In addition to the uniform resource locator, the request parameters of the first request, and the type parameter of the first request, the configuration information may also include other information. As an example, the configuration information may also include the method of the first request (get). Thus, the exemplary configuration information of the first request may be expressed as get(url?id=0&name=qjm).
[0071] In step S122 , when the type parameter indicates that the type of the first request is a cancellation type, it is determined whether the request parameters include a filtering parameter.
[0072] For example, in one embodiment, it can be determined whether the type parameter includes a cancel flag. If the type parameter includes the cancel flag, the first request is determined to be of a cancel type. If the first request is of a cancel type, it can also be determined whether the first request is of a cancel type with a filter parameter. For example, if the request parameters include a filter parameter, the first request can be considered to be of a cancel type with a filter parameter. If the request parameters do not include a filter parameter, the first request can be considered to be of a cancel type without a filter parameter.
[0073] For cancellation types with filter parameters and cancellation types without filter parameters, different judgment methods can be used when determining whether two requests are the same request.
[0074] For example, in step S123, when the request parameters include filtering parameters, the request in the request list whose configuration information has filtering parameters and uniform resource locator and whose type is cancellation type is treated as the second request that is the same as the first request.
[0075] That is, for a cancel type request with filter parameters, two requests with the same filter parameters and the same URL can be considered the same request. Thus, in step S123, the request list can be checked to see if there is a cancel type request with the same filter parameters and the same Uniform Resource Locator as the first request. If such a request exists in the request list, it can be considered the second request that is the same as the first request.
[0076] For example, the first request is expressed as get(url?id=1&name=tjy), and the filter parameter is id. In this way, it is possible to query the request list to see whether there is a request with id=1 and the uniform resource locator being the url, and all of which are cancel type requests.
[0077] For example, the request list may contain the requests get(url?id=1&name=zxy) and get(url?id=2&name=zxy), both of which are cancel-type requests with the filter parameter id. Thus, the request get(url?id=1&name=zxy) with id=1, the URL as the uniform resource locator, and a cancel-type request can be treated as the second request identical to the first request.
[0078] That is, for a cancel-type request with a filter parameter, two requests with the same filter parameter and the same uniform resource locator can be regarded as the same request.
[0079] In a possible implementation, the type of the first request may also be a cancel type without a filter parameter. In this case, querying the request list of the client based on the configuration information whether there is a second request that is the same as the first request includes:
[0080] In a case where the request parameters do not include the filtering parameter, the request in the request list that has the uniform resource locator and is of a cancel type is treated as a second request that is the same as the first request.
[0081] That is, for a cancel-type request without a filter parameter, two requests with the same uniform resource locator can be considered the same request.
[0082] For example, for the cancel-type requests get(url?id=3&name=xxx) and get(url?id=4&name=ccc) without filter parameters, since the URLs are the same, they can be considered to be the same request. Therefore, if the request parameters of the first request do not include filter parameters, the request list can be checked to see if there is a cancel-type request with a uniform resource locator that is the same as the uniform resource locator of the first request, i.e., the second request.
[0083] In a possible implementation, the first request may not be a cancel request. Thus, the querying of the request list of the client based on the configuration information to determine whether there is a second request identical to the first request includes:
[0084] In a case where the type parameter indicates that the type of the first request is different from the cancellation type, the request in the request list whose configuration information has the request parameter and the uniform resource locator is treated as a second request that is the same as the first request.
[0085] For example, in one embodiment, the type parameter of the first request may not include a cancel flag, so it can be determined that the type of the first request is different from the cancel type. In some embodiments, such a first request can be classified as a regular type request. For regular type requests, two requests with the same request parameters and the same uniform resource locator can be considered the same request.
[0086] For example, for the requests get(url?id=0&name=qjm), get(url?id=0&name=qjm), and get(url?id=1&name=tjy), if all three are regular requests, then since the URLs and request parameters of the requests get(url?id=0&name=qjm) and get(url?id=0&name=qjm) are the same, the requests get(url?id=0&name=qjm) and get(url?id=0&name=qjm) can be determined to be the same request.
[0087] Therefore, when the type of the first request is different from the cancellation type, it is possible to query in the request list whether there is a request whose uniform resource locator is consistent with the uniform resource locator of the first request and whose request parameters are consistent with the request parameters of the first request, that is, the second request.
[0088] In step S13 , if a second request identical to the first request exists in the request list, either the first request or the second request is maintained in the request list.
[0089] For example, in a possible implementation, maintaining any one of the first request and the second request in the request list includes:
[0090] Cancel the first request.
[0091] Exemplarily, when adding each request to the request list, an AbortController may be added for the request. In this way, the first request may be canceled by the AbortController.
[0092] In some implementations, considering that the server may be updated between the first and second requests, to ensure the real-time nature of the requests in the request list, the second request can be canceled and the first request maintained in the request list. For example, the second request can be canceled using the AbortController of the second request. Alternatively, an AbortController can be added to the first request and maintained in the request list.
[0093] In the above scheme, for the newly generated first request, the configuration information of the first request can be obtained. According to the configuration information, the client's request list is queried to see whether there is a second request that is identical to the first request, and the request list maintains requests to be processed. In this way, when there is a second request that is identical to the first request in the request list, any one of the first request and the second request is maintained in the request list. In this way, it can be ensured that the number of the same request in the request list is one, that is, redundant requests can be canceled. In this way, it is possible to avoid sending redundant requests to the server, thereby reducing the pressure on the server. In addition, by canceling redundant requests, it is also possible to avoid the problem of inconsistency between the page display content and the user's required content in related scenarios.
[0094] Furthermore, in some embodiments, the method Figure 1 The foundation includes:
[0095] In response to the first request being completed, deleting the first request from the request list: or,
[0096] In response to the second request being completed, deleting the second request from the request list.
[0097] In this way, completed requests can be deleted from the request list, thereby ensuring the correctness of the requests in the request list.
[0098] Figure 3 FIG. 1 is a flow chart of a method for processing request data shown in an exemplary embodiment of the present disclosure. Figure 3 The method for processing the request data includes:
[0099] In response to the start request, the requested configuration information is obtained.
[0100] Determine whether the request is of a cancel type according to the configuration information. If the request is of a cancel type, determine whether the request parameters of the request include a filtering parameter according to the configuration information.
[0101] If filtering parameters are included, the request list is checked to see if there is a target request with a URL that matches the request URL and filtering parameters that match the request filtering parameters. If a target request exists, the target request is removed from the request list and deleted from the request list. Alternatively, a request list can be set to add the request to the request list.
[0102] Reference Figure 3Without including filtering parameters, you can query the request list to see if there is a target request with a URL that is consistent with the URL of the request. If a target request exists, cancel the target request in the request list and delete it from the request list. In addition, you can also set a request list and add the request to the request list.
[0103] Reference Figure 3 If the request is not of the cancel type, the request list can be checked to see if there is a target request with a URL that matches the request URL and request parameters that match the request parameters. If a target request exists, the target request in the request list is canceled and deleted from the request list. In addition, a request list can be set to add the request to the request list.
[0104] After the request is completed, configuration information of the request may also be obtained. For example, the configuration information may be used to determine whether the request is of a cancel type. If the request is of a cancel type, the configuration information may be used to determine whether the request parameters of the request include a filter parameter.
[0105] If a filtering parameter is included, the request with the URL and the filtering parameter is deleted from the request list. If a filtering parameter is not included, the request with the URL is deleted from the request list. If the request is not of the cancel type, the request with the URL and the request parameter is deleted from the request list. In some embodiments, an identifier can be generated for each request in the request list based on the request parameters and the request type parameter. In this way, after a request in the request list ends, the request with the identifier can be deleted from the request list based on the identifier of the ended request.
[0106] It should be noted that the above steps can also be implemented by request interceptors and response interceptors. For example, the above steps can be implemented by request interceptors and response interceptors of Axios.
[0107] By adopting the above solution, we can ensure that the number of requests of the same type in the request list is only one, that is, redundant requests can be cancelled. Figure 3 , where the service request list includes:
[0108] Regular request 1 = get(url?id=0&name=qjm);
[0109] Regular request 2 = get(url?id=0&name=qjm);
[0110] Regular request 3 = get(url?id=1&name=tjy);
[0111] Cancel request 4 with filter parameter id = get(url?id=1&name=tjy);
[0112] Cancel request with filter parameter id 5=get(url?id=1&name=zxy);
[0113] Cancel request 6 with filter parameter id = get(url?id=2&name=zxy);
[0114] Cancel request 7 with filter parameter id = get(url?id=2&name=zxy);
[0115] Cancel request without filtering parameters 8=get(url?id=3&name=xxx);
[0116] Cancel request 9=get(url?id=4&name=ccc) without filtering parameters.
[0117] Reference Figure 3 , the above solution can be used to cancel regular request 1, cancellation request 4 with filter parameter id, and cancellation request 8.
[0118] akin, Figure 4 It is a schematic diagram of a processing result of request data shown in an exemplary embodiment of the present disclosure.
[0119] Reference Figure 4 For multiple regular requests generated, since the URL (not shown) and request parameters are consistent, they can be determined to be the same request. In this way, the regular request generated last time can be retained and the historical regular requests can be cancelled.
[0120] Figure 5 FIG. 1 is a schematic diagram of a processing result of request data shown in an exemplary embodiment of the present disclosure. Figure 5 For the multiple regular requests generated, since the URLs (not shown) are the same but the request parameters are different, they can be determined to be different requests. In this way, each of the requests can be retained.
[0121] Figure 6 FIG. 1 is a schematic diagram of a processing result of request data shown in an exemplary embodiment of the present disclosure. Figure 6 For multiple cancellation requests without filtering parameters, since the URLs (not shown in the figure) are consistent, they can be determined to be the same request. In this way, the last request generated can be retained.
[0122] Figure 7 FIG. 1 is a schematic diagram of a processing result of request data shown in an exemplary embodiment of the present disclosure. Figure 7 For multiple cancellation requests with filtering parameters page generated, since the page parameters of each request are inconsistent, each of the requests can be retained.
[0123] This solution avoids sending redundant requests to the server, reducing server pressure. Furthermore, by canceling redundant requests, it also avoids issues in related scenarios where the page display content is inconsistent with the user's needs.
[0124] Based on the same inventive concept, an embodiment of the present disclosure provides a device for processing request data. Figure 8 is a block diagram of a data request processing device shown in an exemplary embodiment of the present disclosure, with reference to Figure 8 , the device comprises:
[0125] The first module 801 is configured to obtain configuration information of a newly generated first request;
[0126] The second module 802 is configured to query, based on the configuration information, whether there is a second request identical to the first request in a request list of the client, wherein the request list maintains requests to be processed;
[0127] The third module 803 is configured to maintain either the first request or the second request in the request list if a second request identical to the first request exists in the request list.
[0128] In the above scheme, for the newly generated first request, the configuration information of the first request can be obtained. According to the configuration information, the client's request list is queried to see whether there is a second request that is identical to the first request, and the request list maintains requests to be processed. In this way, when there is a second request that is identical to the first request in the request list, any one of the first request and the second request is maintained in the request list. In this way, it can be ensured that the number of the same request in the request list is one, that is, redundant requests can be canceled. In this way, it is possible to avoid sending redundant requests to the server, thereby reducing the pressure on the server. In addition, by canceling redundant requests, it is also possible to avoid the problem of inconsistency between the page display content and the user's required content in related scenarios.
[0129] Optionally, the second module 802 includes:
[0130] A first submodule is configured to obtain a uniform resource locator of the first request, request parameters of the first request, and a type parameter of the first request from the configuration information;
[0131] A second submodule is configured to determine whether the request parameters include a filtering parameter when the type parameter indicates that the type of the first request is a cancellation type;
[0132] The third submodule is configured to treat the request in the request list, whose configuration information has the filtering parameter and the uniform resource locator and whose type is a cancellation type, as a second request that is the same as the first request when the request parameter includes the filtering parameter.
[0133] Optionally, the second module 802 includes:
[0134] The fourth submodule is configured to treat the request in the request list that has the uniform resource locator and is of a cancel type as a second request that is the same as the first request if the request parameter does not include the filter parameter.
[0135] Optionally, the second module 802 includes:
[0136] The fifth submodule is configured to treat the request in the request list whose configuration information has the request parameters and the uniform resource locator as a second request that is the same as the first request when the type parameter indicates that the type of the first request is different from the cancellation type.
[0137] Optionally, the third module 803 includes:
[0138] a sixth submodule, configured to cancel the first request; or,
[0139] A seventh submodule is configured to cancel the second request and maintain the first request in the request list.
[0140] Optionally, the device comprises:
[0141] A fourth module is configured to delete the first request from the request list in response to the first request being completed: or,
[0142] A fifth module is configured to delete the second request from the request list in response to the second request being completed.
[0143] The present disclosure provides a device for processing request data, including:
[0144] processor;
[0145] a memory for storing processor-executable instructions;
[0146] The processor is configured to execute the method for processing request data described in any embodiment provided in the present disclosure.
[0147] An embodiment of the present disclosure provides a computer-readable storage medium having computer program instructions stored thereon. When the program instructions are executed by a processor, the method for processing request data described in any embodiment provided by the present disclosure is implemented.
[0148] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0149] Figure 9 1 is a block diagram illustrating an apparatus 900 for processing request data according to an exemplary embodiment. For example, apparatus 900 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0150] Reference Figure 9 , the apparatus 900 may include one or more of the following components: a processing component 902 , a memory 904 , a power component 906 , a multimedia component 908 , an audio component 910 , an input / output interface 912 , a sensor component 914 , and a communication component 916 .
[0151] The processing component 902 generally controls the overall operation of the device 900, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the above-described method for processing request data. In addition, the processing component 902 may include one or more modules to facilitate interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate interaction between the multimedia component 908 and the processing component 902.
[0152] The memory 904 is configured to store various types of data to support the operations of the device 900. Examples of such data include instructions for any application or method operating on the device 900, contact data, phone book data, messages, pictures, videos, etc. The memory 904 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0153] The power supply component 906 provides power to the various components of the device 900. The power supply component 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 900.
[0154] The multimedia component 908 includes a screen that provides an output interface between the device 900 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. When the device 900 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
[0155] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC), which is configured to receive external audio signals when the device 900 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 904 or transmitted via the communication component 916. In some embodiments, the audio component 910 also includes a speaker for outputting audio signals.
[0156] The input / output interface 912 provides an interface between the processing component 902 and peripheral interface modules, such as a keyboard, a click wheel, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0157] The sensor assembly 914 includes one or more sensors for providing various aspects of the status assessment of the device 900. For example, the sensor assembly 914 can detect the open / closed state of the device 900, the relative positioning of components, such as the display and keypad of the device 900. The sensor assembly 914 can also detect changes in the position of the device 900 or a component of the device 900, the presence or absence of user contact with the device 900, the orientation or acceleration / deceleration of the device 900, and temperature changes of the device 900. The sensor assembly 914 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0158] The communication component 916 is configured to facilitate wired or wireless communication between the device 900 and other devices. The device 900 can access a wireless network based on a communication standard, such as WiFi, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0159] In an exemplary embodiment, the apparatus 900 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the above-mentioned request data processing method.
[0160] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is further provided, such as a memory 904 including instructions. The instructions can be executed by the processor 920 of the apparatus 900 to implement the above-mentioned method for processing request data. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0161] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program executable by a programmable device, and has a code portion for executing the above-mentioned request data processing method when executed by the programmable device.
[0162] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the present disclosure. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0163] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for processing request data, characterized in that: include: Obtain configuration information of the newly generated first request; querying, according to the configuration information, whether a second request identical to the first request exists in a request list of the client, the request list maintaining requests to be processed; In a case where a second request identical to the first request exists in the request list, either the first request or the second request is maintained in the request list.
2. The method according to claim 1, characterized in that The querying, according to the configuration information, whether there is a second request in the request list of the client that is identical to the first request includes: Obtaining the uniform resource locator of the first request, the request parameters of the first request, and the type parameter of the first request in the configuration information; In a case where the type parameter indicates that the type of the first request is a cancellation type, determining whether the request parameters include a filtering parameter; In the case that the request parameters include the filtering parameter, the request in the request list whose configuration information has the filtering parameter and the uniform resource locator and whose type is a cancellation type is taken as a second request that is the same as the first request.
3. The method according to claim 2, characterized in that The querying, according to the configuration information, whether there is a second request in the request list of the client that is identical to the first request includes: In a case where the request parameters do not include the filtering parameter, the request in the request list that has the uniform resource locator and is of a cancel type is treated as a second request that is the same as the first request.
4. The method according to claim 2, characterized in that The querying, according to the configuration information, whether there is a second request in the request list of the client that is identical to the first request includes: In a case where the type parameter indicates that the type of the first request is different from the cancellation type, the request in the request list whose configuration information has the request parameter and the uniform resource locator is treated as a second request that is the same as the first request.
5. The method according to any one of claims 1 to 4, characterized in that Maintaining any one of the first request and the second request in the request list includes: canceling the first request; or, The second request is canceled, and the first request is maintained in the request list.
6. The method according to any one of claims 1 to 4, characterized in that include: In response to the first request being completed, deleting the first request from the request list: or, In response to the second request being completed, deleting the second request from the request list.
7. A device for processing request data, characterized in that: include: A first module is configured to obtain configuration information of a newly generated first request; A second module is configured to query, based on the configuration information, whether a second request identical to the first request exists in a request list of the client, wherein the request list maintains requests to be processed; A third module is configured to maintain either the first request or the second request in the request list if a second request identical to the first request exists in the request list.
8. The device according to claim 7, characterized in that The second module includes: A first submodule is configured to obtain a uniform resource locator of the first request, request parameters of the first request, and a type parameter of the first request from the configuration information; A second submodule is configured to determine whether the request parameters include a filtering parameter when the type parameter indicates that the type of the first request is a cancellation type; The third submodule is configured to treat the request in the request list, whose configuration information has the filtering parameter and the uniform resource locator and whose type is a cancellation type, as a second request that is the same as the first request when the request parameter includes the filtering parameter.
9. A device for processing request data, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the method according to any one of claims 1 to 6.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.