CN113676547B - Data processing method, data processing device, storage medium and electronic equipment - Google Patents

Data processing method, data processing device, storage medium and electronic equipment Download PDF

Info

Publication number
CN113676547B
CN113676547B CN202111021610.6A CN202111021610A CN113676547B CN 113676547 B CN113676547 B CN 113676547B CN 202111021610 A CN202111021610 A CN 202111021610A CN 113676547 B CN113676547 B CN 113676547B
Authority
CN
China
Prior art keywords
data
client
target
response data
field
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111021610.6A
Other languages
Chinese (zh)
Other versions
CN113676547A (en
Inventor
王敏
罗尧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202111021610.6A priority Critical patent/CN113676547B/en
Publication of CN113676547A publication Critical patent/CN113676547A/en
Application granted granted Critical
Publication of CN113676547B publication Critical patent/CN113676547B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Abstract

The present disclosure relates to a data processing method, apparatus, storage medium, and electronic device, wherein the method comprises: receiving an HTTP request sent by a client; responding the HTTP request to obtain corresponding response data; filtering part of data in the response data based on a preset information white list to obtain target response data; and sending the target response data to the client so that the client displays the target response data. According to the embodiment of the disclosure, the speed of the server for issuing the response data can be increased, so that the speed of the client for displaying the response data is increased, the data display efficiency of the client is increased, and the user experience is improved.

Description

Data processing method and device, storage medium and electronic equipment
Technical Field
The disclosed embodiments relate to the field of computer technologies, and in particular, to a data processing method, a data processing apparatus, a computer-readable storage medium and an electronic device for implementing the data processing method.
Background
Currently, a client access server is usually implemented based on hypertext Transfer Protocol (HTTP).
In the related technology, a user generates an HTTP request at an input operation of a client, for example, the client sends the HTTP request to a server, the server responds to the HTTP request to obtain corresponding data to form response data, and then issues the response data to the client, so that the client can display the response data for the user in time.
However, under the condition that the network bandwidth between the client and the server is limited, the speed of issuing the response data by the server is reduced, so that the speed of displaying the response data by the client is reduced, the data display efficiency of the client is reduced, and a user may wait for a long time to see the display data, thereby affecting the user experience.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, embodiments of the present disclosure provide a data processing method, a data processing apparatus, and a computer-readable storage medium and an electronic device implementing the data processing method.
In a first aspect, an embodiment of the present disclosure provides a data processing method, including:
receiving an HTTP request sent by a client;
responding the HTTP request to obtain corresponding response data;
filtering part of data in the response data based on a preset information white list to obtain target response data;
and sending the target response data to the client so that the client displays the target response data.
Optionally, in an embodiment of the present disclosure, the method further includes:
acquiring target data processed by the client, wherein the target data is part of historical response data received by the client;
determining a target data field identifier corresponding to the target data;
determining the preset information white list based on the target data field identification, wherein the preset information white list comprises the target data field identification.
Optionally, in an embodiment of the present disclosure, the obtaining target data processed by the client includes:
receiving target data sent by a preset buried point code, wherein the preset buried point code is configured in a source code of the client in advance.
Optionally, in an embodiment of the present disclosure, the obtaining target data processed by the client includes:
checking a source code running result of the client to obtain a checking result;
and determining target data processed by the client based on the viewing result.
Optionally, in an embodiment of the present disclosure, the viewing a source code running result of the client to obtain a viewing result includes:
acquiring a viewing script;
and executing the viewing script to view the source code running result of the client to obtain the viewing result.
Optionally, in an embodiment of the present disclosure, the obtaining target data processed by the client includes:
removing data corresponding to one or more data fields in the historical response data to obtain response data to be processed;
running a source code of the client based on a debugging mode, inputting the response data to be processed into the client running in the debugging mode, and detecting whether the client runs abnormally;
and if the abnormal operation information does not appear, taking the response data to be processed as the target data.
Optionally, in an embodiment of the present disclosure, the method further includes:
running a source code of the client based on a debugging mode, inputting the target data into the client running in the debugging mode, and detecting whether the client runs abnormally;
and if the abnormal operation information does not appear, taking the target data as the final target data.
Optionally, in an embodiment of the present disclosure, the response data includes a plurality of data field identifications, and each data field identification corresponds to data;
the filtering part of the data in the response data based on the preset information white list to obtain target response data includes:
acquiring a plurality of data field identifications in the response data;
based on a target data field identifier in the preset information white list, filtering data corresponding to a specified field identifier in a plurality of data field identifiers in the response data to obtain data corresponding to the target data field identifier, wherein the specified field identifier is the rest of the data field identifiers except the target data field identifier;
and determining the target response data based on the data corresponding to the target field identification.
Optionally, in an embodiment of the present disclosure, before sending the target response data to the client, the method includes:
compressing the target response data;
and sending the compressed target response data to the client.
Optionally, in an embodiment of the present disclosure, the compressing the target response data includes:
converting the target response data into target response data in a specified data format;
the specified data format comprises any one of a Protobuf data exchange format, a JSON data exchange format and an XML data exchange format.
In a second aspect, an embodiment of the present disclosure provides a data processing apparatus, including:
the receiving module is used for receiving the HTTP request sent by the client;
the acquisition module is used for responding the HTTP request to acquire corresponding response data;
the filtering module is used for filtering partial data in the response data based on a preset information white list to obtain target response data;
and the sending module is used for sending the target response data to the client so as to enable the client to display the target response data.
In a third aspect, the disclosed embodiments provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the data processing method described in any of the above embodiments.
In a fourth aspect, an embodiment of the present disclosure provides an electronic device, including:
a processor; and
a memory for storing a computer program;
wherein the processor is configured to perform the steps of the data processing method of any of the above embodiments via execution of the computer program.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages:
the data processing method, the data processing device, the data processing medium and the electronic equipment receive an HTTP request sent by a client, respond to the HTTP request to obtain corresponding response data, and filter part of data in the response data based on a preset information white list to obtain target response data; and sending the target response data to the client so that the client displays the target response data. Therefore, after the server responds to the HTTP request of the client to obtain the corresponding response data, part of the response data in the response data is filtered based on the preset information white list, and then the filtered response data is issued to the client.
Drawings
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 disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a flow chart of a data processing method shown in an example embodiment of the present disclosure;
FIG. 2 is a flow chart of a data processing method according to another embodiment of the present disclosure;
FIG. 3 is a data structure diagram of historical response data and target data in an embodiment of the disclosure;
FIG. 4 is a flow chart of a data processing method according to yet another embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a data processing apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of an electronic device implementing a data processing method according to an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
It is to be understood that, hereinafter, "at least one" means one or more, "a plurality" means two or more. "and/or" is used to describe the association relationship of the associated objects, meaning that there may be three relationships, for example, "a and/or B" may mean: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
Fig. 1 is a flowchart illustrating a data processing method according to an example embodiment of the present disclosure. The method can be applied to a server, and specifically comprises the following steps:
step S101: and receiving the HTTP request sent by the client.
Illustratively, the client may be an application such as an application running in a smartphone or computer, including, but not limited to, an instant messaging application or a shopping application, for example. Specifically, as an example, a client, such as an application program, may send an HTTP request to a server, that is, the server receives the HTTP request sent by the client. The HTTP request may be generated by a User operating on a client, such as a User Interface (UI) of an application program, which may be understood with reference to the prior art, and is not described herein again.
Step S102: and responding the HTTP request to acquire corresponding response data.
Specifically, after receiving an HTTP request sent by a client, a server responds to the HTTP request to obtain response data, which is data requested by the HTTP request.
Step S103: and filtering part of data in the response data based on a preset information white list to obtain target response data.
For example, the response data obtained by the server usually includes a plurality of data field identifications such as field names and data corresponding to each data field identification. At present, when the server returns response data to the client based on the HTTP protocol, all data corresponding to the plurality of data field identifiers are sent to the client. The inventor finds that some clients do not process data corresponding to part of the data field identifications in the data corresponding to the data field identifications sent by the server, that is, for some clients, redundant data exists in response data.
In one example, the predefined information whitelist is associated with the client, and the predefined information whitelist can be different for clients of different functions and/or types. Specifically, as an example, the preset information white list may include remaining data field identifiers other than the part of the data field identifiers in the multiple data field identifiers, and based on the remaining data field identifiers in the preset information white list, data corresponding to the part of the data field identifiers in the response data may be filtered, so that only data corresponding to the remaining data field identifiers, that is, the target response data, is reserved.
Step S104: and sending the target response data to the client so that the client displays the target response data.
In an example, after the server filters part of the data in the response data to obtain the target response data, the target response data is sent to the client, and the client performs presentation after receiving the target response data, such as presentation based on text, a graph, or a graph.
The data processing method provided by the embodiment of the disclosure includes receiving an HTTP request sent by a client, responding to the HTTP request to obtain corresponding response data, and filtering part of data in the response data based on a preset information white list to obtain target response data; and sending the target response data to the client so that the client displays the target response data. Therefore, after the server responds to the HTTP request of the client to obtain the corresponding response data, part of the data in the response data is filtered based on the preset information white list, and then the filtered response data is sent to the client.
Optionally, in an embodiment of the present disclosure, as shown in fig. 2, the method may further include the following steps:
step S201: and acquiring target data processed by the client, wherein the target data is part of the historical response data received by the client.
It can be understood that, because some of the clients do not process data corresponding to part of the data field identifiers in the data corresponding to the multiple data field identifiers in the response data sent by the server, that is, for some of the clients, redundant data exists in the response data.
Illustratively, referring to fig. 3, for example, the history response data 301 sent by the server B to the client a includes 7 field identifications such as "field 1", "field 2", "field 3", "field 4", "field 5", "field 6", "field 7", and 7 field identifications "data 1", "data 2", "data 3", "data 4", "data 5", "data 6", "data 7", which correspond to the respective field identifications. For the client a, "data 3" and "data 4" corresponding to two field identifications, such as "field 3" and "field 4", are data that the client a does not process, that is, the client does not use the "data 3" and "data 4", and belong to redundant data of the client a. And the remaining field identifications such as "data 1", "data 2", "data 5", "data 6", "data 7" respectively corresponding to "field 1", "field 2", "field 5", "field 6", "field 7" are target data 302 processed by the client, and the target data 302 is partial data in the history response data 301 received by the client.
Step S202: and determining the target data field identification corresponding to the target data.
Specifically, after the target data 302 is obtained, the target data field identifiers corresponding to the target data 302, such as "field 1", "field 2", "field 5", "field 6", and "field 7", are determined.
Step S203: determining the preset information white list based on the target data field identification, wherein the preset information white list comprises the target data field identification.
Specifically, the preset information white list is determined based on the target data field identifiers, such as "field 1", "field 2", "field 5", "field 6", and "field 7", and the preset information white list includes the target data field identifiers, such as "field 1", "field 2", "field 5", "field 6", and "field 7".
It can be understood that step S201 may be executed before step S103, that is, historical response data processed by the client is analyzed in advance to obtain target data 302 processed by the client, so as to generate a preset information white list, and after step S203, step S103 may be executed by skipping.
In this embodiment, a preset information white list is pre-constructed, part of the data in the response data is filtered based on the constructed preset information white list, and then the filtered response data is sent to the client, where the construction of the preset information white list is determined based on the obtained target data processed by the client, so that the accuracy of the constructed preset information white list corresponding to the client is improved, and further some redundant data are prevented from being missed in subsequent filtering.
Optionally, in an embodiment of the present disclosure, the acquiring, in step S201, the target data processed by the client may specifically include: receiving target data sent by a preset buried point code, wherein the preset buried point code is configured in a source code of the client in advance.
For example, the preset burial point code may be configured by implementing a non-invasive burial point based on a Hook technology, and the preset burial point code may be configured at one or more positions in the source code of the client, which may be specifically determined according to each functional module of the source code of the client, which is not limited thereto. The specific configuration of the preset buried point code can be understood by referring to the prior art, and is not described in detail herein. The preset buried point code is used for counting which data in the historical response data are processed by the client after the source code of the client is executed, namely, the target data are determined. For example, whether data corresponding to each field in the historical response data is processed by the client side or not can be counted, and target data can be determined based on a statistical result, wherein the statistical result comprises the data corresponding to the processed field. The preset buried point code transmits the statistically determined target data to the server, and then may jump to perform step S202.
In this embodiment, the target data processed by the client is accurately collected and determined through the point burying technology, and then the preset information white list is constructed, so that the accuracy of the constructed preset information white list corresponding to the client is further improved, and further, some redundant data are prevented from being missed in the subsequent filtering process.
Optionally, in another embodiment of the present disclosure, the acquiring target data processed by the client in step S201 may specifically include: checking a source code running result of the client to obtain a checking result; and determining target data processed by the client based on the viewing result.
For example, the source code operation result of the client may be automatically checked manually or by a machine, in this embodiment, the source code operation result of the client is automatically checked based on a source code operation log of the client, so as to obtain a check result, where the check result includes whether data corresponding to each field in the historical response data is processed by the client, target data is determined based on the check result, and the target data includes data corresponding to the field processed by the client, and then step S202 may be skipped to perform.
In the embodiment, a point burying code does not need to be configured at the client, so that the invasion to the client is reduced, the potential influence on the client is avoided, and the stability and the reliability of the operation of the client are improved.
Optionally, in an embodiment of the present disclosure, the viewing a source code running result of the client to obtain a viewing result specifically includes: acquiring a viewing script; and executing the viewing script to view the source code running result of the client to obtain the viewing result.
Illustratively, the viewing script may be written in advance, for example, based on a scripting language such as Lua, javaScript, or the like. And automatically calling the checking script when the preset information white list is established, and executing the checking script to automatically check the source code running result of the client to obtain the checking result. Therefore, the preset information white list can be automatically and quickly constructed based on the checking script, and then filtering and response data issuing are carried out based on the preset information white list, so that the overall processing efficiency of the server is improved to a certain extent.
Optionally, on the basis of the foregoing embodiments, in another embodiment of the present disclosure, the method may further include the following steps:
step a): and running the source code of the client based on the debugging mode, inputting the target data into the client running in the debugging mode, and detecting whether the client runs abnormal information.
For example, the target data may be the target data determined by the preset buried point code, or may be the target data obtained by viewing the running result of the source code of the client. In order to further improve the accuracy of the constructed preset information white list corresponding to the client, after the target data is obtained in any of the two embodiments, the target data is further verified.
Specifically, the target data is input to a client running in a Debug mode, for example, the target data is input to a client running in a Debug mode, then a source code of the client is executed, and whether running exception information occurs in the client is detected, for example, if the client should display the target data, for example, in a graph or graphic manner, but the target data is not displayed successfully, the running exception information occurs, and if the target data is displayed successfully, the running exception information does not occur.
Step b): and if the abnormal operation information does not appear, taking the target data as the final target data.
Specifically, if the operation exception information does not occur, it is determined that the target data is data that enables the client to operate normally, and therefore the target data is determined as final target data. If the abnormal operation information appears, which indicates that the determination of the target data is not accurate enough, the target data can be determined again based on the scheme of the above embodiment, and then the re-determined target data is input to the client operating in the debugging mode for verification until the abnormal operation information does not appear.
In this embodiment, target data obtained by a point burying technique or by checking a source code operation result of a client is verified, so that the determined target data processed by the client is more accurate, and further, the accuracy of a constructed preset information white list corresponding to the client is further improved, and further, some redundant data are prevented from being missed in subsequent filtering.
Optionally, in another embodiment of the present disclosure, the acquiring the target data processed by the client in step S201 may specifically include the following steps: removing data corresponding to one or more data fields in the historical response data to obtain response data to be processed; running a source code of the client based on a debugging mode, inputting the response data to be processed into the client running in the debugging mode, and detecting whether the client runs abnormally; and if the abnormal operation information does not appear, taking the response data to be processed as the target data.
Illustratively, for example, data 1 corresponding to field 1 in the historical response data 301 is removed to obtain to-be-processed response data 1, the to-be-processed response data 1 is input to the client operating in the debugging mode, and whether the client has abnormal operation information is detected; and if the abnormal operation information does not appear, taking the response data 1 to be processed as the target data. If the abnormal operation information occurs, retaining the data 1 corresponding to the field 1 in the historical response data 301, removing the data 2 corresponding to the field 2 to obtain the response data 2 to be processed, inputting the response data 2 to be processed into the client operating in the debugging mode, and detecting whether the abnormal operation information occurs on the client; if no abnormal operation information occurs, the response data 2 to be processed is used as the target data, and the final target data 302 can be obtained after all the fields in the historical response data 301 are processed in sequence. The final target data 302 is data that enables the client to function normally, and is part of the historical response data 301 that is processed by the client.
In this embodiment, target data processed by the client is predetermined offline by the client operating in the debugging mode, and then a preset information white list is constructed, so that accuracy of the constructed preset information white list corresponding to the client is further improved, and further, some redundant data are prevented from being missed in subsequent filtering. In addition, the target data is determined through the scheme of the debugging mode, and whether the client is abnormal in operation or not is verified, so that the influence on the client can be reduced or even completely avoided after the filtered response data is sent to the client, and the stability and the reliability of the operation of the client are improved.
Optionally, in an embodiment of the present disclosure, the response data includes a plurality of data field identifications, and each of the data field identifications corresponds to data, and as shown in fig. 3 again in combination with reference, the response data may include, for example, data 1 to data 7 corresponding to field 1 to field 7, respectively. Correspondingly, as shown in fig. 4, in step S103, based on a preset information white list, filtering part of the data in the response data to obtain the target response data may specifically include the following steps:
step S401: and acquiring a plurality of data field identifications in the response data.
Illustratively, the server obtains a plurality of data field identifications such as field 1 to field 7 in the response data.
Step S402: and filtering data corresponding to a specified field identifier in a plurality of data field identifiers in the response data based on a target data field identifier in the preset information white list to obtain data corresponding to the target data field identifier, wherein the specified field identifier is the rest of the data field identifiers except the target data field identifier.
Illustratively, the target data field identifications are, for example, field 1, field 2, field 5, field 6, and field 7. If the specified field identifications are field 3 and field 4, the server obtains the data 1, data 2, data 5, data 6 and data 7 corresponding to the target data field identifications such as field 1, field 2, field 5, field 6 and field 7 respectively based on the target data field identifications such as field 1, field 2, field 5, field 6 and field 7 in the preset information white list and the data 3 and data 4 corresponding to the plurality of data field identifications such as field 1 to field 3 and field 4 in field 7 in the filter response data.
Step S403: and determining the target response data based on the data corresponding to the target field identification.
Specifically, the server determines target response data based on the target data field identification, such as data 1, data 2, data 5, data 6, and data 7 corresponding to field 1, field 2, field 5, field 6, and field 7, respectively, and the target response data includes data 1, data 2, data 5, data 6, and data 7 corresponding to field 1, field 2, field 5, field 6, and field 7, respectively.
Optionally, in an embodiment of the present disclosure, before sending the target response data to the client in step S104, the method includes the following steps: and compressing the target response data, and sending the compressed target response data to the client. It is understood that, for the specific implementation of compression, reference may be made to existing data compression techniques, which are not described in detail herein.
In this embodiment, the target response data is compressed and then sent to the client, so that the amount of the transmitted data is further reduced, and under the condition that the network bandwidth between the client and the server is limited, the transmission time of the response data issued by the server is further reduced, and the transmission speed is further increased.
Optionally, on the basis of the foregoing embodiment, in an embodiment of the present disclosure, the compressing the target response data may specifically include: and converting the target response data into target response data in a specified data format. The specified data format comprises any one of a Protobuf data exchange format, a JSON data exchange format and an XML (Extensible Markup Language) data exchange format.
For example, the JSON data exchange format and the XML data exchange format may be understood by referring to the prior art, and are not described herein.
The Protobuf data exchange format is a Google open source data exchange format, the internal data is in a pure binary format, and the Protobuf data exchange format does not depend on languages and platforms, and has the advantages of simplicity, small data volume, quickness and the like. At present, the JSON data exchange format is mostly adopted when data are transmitted based on the HTTP protocol, but the Protobuf data exchange format is not adopted.
In one example, the server converts the target response data into target response data in a Protobuf data exchange format, and then the server issues the target response data in the Protobuf data exchange format to the client for presentation. In this embodiment, the target response data is converted into a Protobuf data exchange format and then transmitted to the client, so that the amount of transmitted data can be further reduced, the transmission time of the response data issued by the server is further reduced under the condition that the network bandwidth between the client and the server is limited, and the transmission speed is further increased.
It should be noted that although the various steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that these steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc. Additionally, it will also be readily appreciated that the steps may be performed synchronously or asynchronously, e.g., among multiple modules/processes/threads.
An embodiment of the present disclosure provides a data processing apparatus, and as shown in fig. 5, the data processing apparatus may include a receiving module 501, an obtaining module 502, a filtering module 503, and a sending module 504:
the receiving module 501 is configured to receive an HTTP request sent by a client.
The obtaining module 502 is configured to obtain corresponding response data in response to the HTTP request.
The filtering module 503 is configured to filter part of the data in the response data based on a preset information white list to obtain target response data.
The sending module 504 is configured to send the target response data to the client, so that the client displays the target response data.
The data processing device provided by the embodiment of the disclosure receives an HTTP request sent by a client, responds to the HTTP request to obtain corresponding response data, and filters part of data in the response data based on a preset information white list to obtain target response data; and sending the target response data to the client so that the client displays the target response data. Therefore, after the server responds to the HTTP request of the client to obtain the corresponding response data, part of the response data in the response data is filtered based on the preset information white list, and then the filtered response data is issued to the client.
Optionally, in an embodiment of the present disclosure, the apparatus may further include a white list establishing module, configured to: acquiring target data processed by the client, wherein the target data is part of historical response data received by the client; determining a target data field identifier corresponding to the target data; and determining the preset information white list based on the target data field identification, wherein the preset information white list comprises the target data field identification.
Optionally, in an embodiment of the present disclosure, the obtaining, by the white list establishing module, target data processed by the client includes: receiving target data sent by a preset buried point code, wherein the preset buried point code is configured in a source code of the client in advance.
Optionally, in an embodiment of the present disclosure, the obtaining, by the white list establishing module, target data processed by the client includes: checking a source code running result of the client to obtain a checking result; and determining target data processed by the client based on the viewing result.
Optionally, in an embodiment of the present disclosure, the checking the source code running result of the client by the white list establishing module to obtain a checking result, where the checking includes: acquiring a viewing script; and executing the viewing script to view the source code running result of the client to obtain the viewing result.
Optionally, in an embodiment of the present disclosure, the obtaining, by the white list establishing module, target data processed by the client includes: removing data corresponding to one or more data fields in the historical response data to obtain response data to be processed; running a source code of the client based on a debugging mode, inputting the response data to be processed into the client running in the debugging mode, and detecting whether the client runs abnormally; and if the abnormal operation information does not appear, taking the response data to be processed as the target data.
Optionally, in an embodiment of the present disclosure, the apparatus may further include a data determining module, configured to run a source code of the client based on a debug mode, input the target data into the client running in the debug mode, and detect whether the client runs abnormally; and if the abnormal operation information does not appear, taking the target data as the final target data.
Optionally, in an embodiment of the present disclosure, the response data includes a plurality of data field identifications, and each of the data field identifications corresponds to data. The filtering module 503 is configured to obtain a plurality of data field identifiers in the response data; based on a target data field identifier in the preset information white list, filtering data corresponding to a specified field identifier in a plurality of data field identifiers in the response data to obtain data corresponding to the target data field identifier, wherein the specified field identifier is the rest of the data field identifiers except the target data field identifier; and determining the target response data based on the data corresponding to the target field identification.
Optionally, in an embodiment of the present disclosure, the apparatus may further include a data compression module, configured to compress the target response data before the sending module 504 sends the target response data to the client. The sending module 504 is further configured to send the compressed target response data to the client.
Optionally, in an embodiment of the present disclosure, the compressing the target response data by the data compression module includes: converting the target response data into target response data in a specified data format; the specified data format comprises any one of a Protobuf data exchange format, a JSON data exchange format and an XML data exchange format.
The specific manner in which the above-mentioned embodiments of the apparatus, and the corresponding technical effects brought about by the operations performed by the respective modules, have been described in detail in the embodiments related to the method, and will not be described in detail herein.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units. The components shown as modules or units may or may not be physical units, i.e. may be located in one place or may be distributed over a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the wood-disclosed scheme. One of ordinary skill in the art can understand and implement it without inventive effort.
The embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the data processing method according to any one of the embodiments.
The readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
An embodiment of the present disclosure also provides an electronic device, including a processor and a memory for storing a computer program. Wherein the processor is configured to perform the steps of the data processing method in any of the above embodiments via execution of the computer program.
An electronic device 600 according to this embodiment of the invention is described below with reference to fig. 6. The electronic device 600 shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the electronic device 600 is embodied in the form of a general purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 that connects the various system components (including the storage unit 620 and the processing unit 610), a display unit 640, and the like.
Wherein the storage unit stores program code that can be executed by the processing unit 610 to cause the processing unit 610 to perform the steps according to various exemplary embodiments of the present invention described in the data processing method section described above in this specification. For example, the processing unit 610 may perform the steps of the data processing method as shown in fig. 1.
The storage unit 620 may include readable media in the form of volatile storage units, such as a random access memory unit (RAM) 6201 and/or a cache storage unit 6202, and may further include a read-only memory unit (ROM) 6203.
The memory unit 620 may also include a program/utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 630 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 600, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 600 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 650. Also, the electronic device 600 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via the bus 630. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, to name a few.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the data processing method according to the embodiments of the present disclosure.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (12)

1. A data processing method, comprising:
receiving an HTTP request sent by a client;
responding the HTTP request to acquire corresponding response data;
acquiring target data processed by the client, wherein the target data is part of historical response data received by the client;
determining a target data field identifier corresponding to the target data;
determining a preset information white list based on the target data field identification, wherein the preset information white list comprises the target data field identification;
filtering part of data in the response data based on the preset information white list to obtain target response data;
and sending the target response data to the client so that the client displays the target response data.
2. The data processing method according to claim 1, wherein the obtaining target data processed by the client comprises:
receiving target data sent by a preset buried point code, wherein the preset buried point code is configured in a source code of the client in advance.
3. The data processing method according to claim 1, wherein the obtaining target data processed by the client comprises:
checking a source code running result of the client to obtain a checking result;
and determining target data processed by the client based on the viewing result.
4. The data processing method of claim 3, wherein the viewing the running result of the source code of the client to obtain a viewing result comprises:
acquiring a viewing script;
and executing the viewing script to view the source code running result of the client to obtain the viewing result.
5. The data processing method according to claim 1, wherein the obtaining target data processed by the client comprises:
removing data corresponding to one or more data fields in the historical response data to obtain response data to be processed;
running a source code of the client based on a debugging mode, inputting the response data to be processed into the client running in the debugging mode, and detecting whether the client runs abnormally;
and if the abnormal operation information does not appear, taking the response data to be processed as the target data.
6. The data processing method according to any one of claims 2 to 4, characterized in that the method further comprises:
running a source code of the client based on a debugging mode, inputting the target data into the client running in the debugging mode, and detecting whether the client runs abnormally;
and if the abnormal operation information does not appear, taking the target data as the final target data.
7. The data processing method according to any one of claims 3 to 5, wherein the response data comprises a plurality of data field identifications, and each of the data field identifications corresponds to data;
the filtering part of the data in the response data based on the preset information white list to obtain target response data includes:
acquiring a plurality of data field identifications in the response data;
based on a target data field identifier in the preset information white list, filtering data corresponding to a specified field identifier in a plurality of data field identifiers in the response data to obtain data corresponding to the target data field identifier, wherein the specified field identifier is the rest of the data field identifiers except the target data field identifier;
and determining the target response data based on the data corresponding to the target data field identification.
8. The data processing method according to any one of claims 1 to 5, wherein before sending the target response data to the client, the method comprises:
compressing the target response data;
and sending the compressed target response data to the client.
9. The data processing method of claim 8, wherein the compressing the target response data comprises:
converting the target response data into target response data in a specified data format;
the specified data format comprises any one of a Protobuf data exchange format, a JSON data exchange format and an XML data exchange format.
10. A data processing apparatus, comprising:
the receiving module is used for receiving the HTTP request sent by the client;
the acquisition module is used for responding the HTTP request to acquire corresponding response data; acquiring target data processed by the client, wherein the target data is part of historical response data received by the client; determining a target data field identifier corresponding to the target data; determining a preset information white list based on the target data field identification, wherein the preset information white list comprises the target data field identification;
the filtering module is used for filtering part of data in the response data based on the preset information white list to obtain target response data;
and the sending module is used for sending the target response data to the client so as to enable the client to display the target response data.
11. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the data processing method of any one of claims 1 to 9.
12. An electronic device, comprising:
a processor; and
a memory for storing a computer program;
wherein the processor is configured to perform the steps of the data processing method of any one of claims 1 to 9 via execution of the computer program.
CN202111021610.6A 2021-09-01 2021-09-01 Data processing method, data processing device, storage medium and electronic equipment Active CN113676547B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111021610.6A CN113676547B (en) 2021-09-01 2021-09-01 Data processing method, data processing device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111021610.6A CN113676547B (en) 2021-09-01 2021-09-01 Data processing method, data processing device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113676547A CN113676547A (en) 2021-11-19
CN113676547B true CN113676547B (en) 2023-04-07

Family

ID=78547981

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111021610.6A Active CN113676547B (en) 2021-09-01 2021-09-01 Data processing method, data processing device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113676547B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104394120A (en) * 2014-10-13 2015-03-04 广州华多网络科技有限公司 Parameter valuing method and device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6279016B1 (en) * 1997-09-21 2001-08-21 Microsoft Corporation Standardized filtering control techniques
US20070156839A1 (en) * 2005-12-29 2007-07-05 International Business Machines Corporation Web services for wireless pervasive devices
US10146880B2 (en) * 2015-12-15 2018-12-04 Samsung Electronics Co., Ltd. Determining a filtering parameter for values displayed in an application card based on a user history
CN108023920B (en) * 2016-10-28 2021-11-26 阿里巴巴集团控股有限公司 Data packet transmission method, equipment and application interface
CN107453946B (en) * 2017-07-20 2020-07-17 阿里巴巴集团控股有限公司 Field management method and device and electronic equipment
CN108984625A (en) * 2018-06-19 2018-12-11 平安科技(深圳)有限公司 Information filtering method, device, computer equipment and storage medium
CN110609954A (en) * 2019-08-30 2019-12-24 深圳壹账通智能科技有限公司 Data acquisition method and device, computer equipment and storage medium
CN111405033B (en) * 2020-03-13 2023-02-10 深圳前海环融联易信息科技服务有限公司 Data acquisition method and device, computer equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104394120A (en) * 2014-10-13 2015-03-04 广州华多网络科技有限公司 Parameter valuing method and device

Also Published As

Publication number Publication date
CN113676547A (en) 2021-11-19

Similar Documents

Publication Publication Date Title
KR102158557B1 (en) Method and device for determining response time
CN111083225B (en) Data processing method and device in Internet of things platform and Internet of things platform
CN110708346B (en) Information processing system and method
WO2018223717A1 (en) Webpage front-end testing method, device, system, apparatus and readable storage medium
CN109684188B (en) Test method and device
CN111130987A (en) Automatic acquisition method and device for AWR report, electronic equipment and storage medium
US20200097355A1 (en) Method and apparatus for outputting information
CN110457049A (en) Realize method, apparatus, electronic equipment and the storage medium of plug-in unit automation
CN109299124B (en) Method and apparatus for updating a model
CN114371888A (en) Method and device for hot updating of log collection plug-in, electronic equipment and readable medium
CN113676547B (en) Data processing method, data processing device, storage medium and electronic equipment
CN112131092A (en) Page debugging method and device
CN114840379A (en) Log generation method, device, server and storage medium
CN112395194B (en) Method and device for accessing test platform
CN109756393B (en) Information processing method, system, medium, and computing device
CN110633182B (en) System, method and device for monitoring server stability
CN109408104B (en) Method and device for acquiring game integration information
CN111741046B (en) Data reporting method, data acquisition method, device, equipment and medium
CN114374745A (en) Protocol format processing method and system
CN108628909B (en) Information pushing method and device
CN110928801A (en) Role authority test method and device, computer medium and electronic equipment
CN114666258B (en) Interface testing method, device, electronic equipment and medium
CN111708684B (en) Recording method and device for page access and computer system
CN113986681A (en) Method and device for detecting buried point data
US20160119199A1 (en) Reporting page composition data

Legal Events

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