Data processing method and device, storage medium, and electronic device

By monitoring traffic usage in mobile devices, acquiring and verifying data pairs to be verified, the data is saved and played back, and the problem of the inability to reproduce and apply network request data in the existing technology is solved, and the test in multiple scenarios is met need.

CN113784332BActive Publication Date: 2025-02-21BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011249410.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-10
Publication Date
2025-02-21
Estimated Expiration
2040-11-10

AI Technical Summary

Technical Problem

The prior art cannot save and play back data during the network request process in a mobile device, and cannot meet the needs of reproducing and applying data during the process.

Method used

By monitoring the traffic usage of the terminal, obtaining the data pairs to be verified and matching conditions, starting the data playback function, using the matching conditions to verify the usage request data, and obtaining the target network data pair based on the verification results.

Benefits of technology

It realizes the storage of data during network request on the terminal, provides a data basis for data reproduction and application, and obtains the desired data according to the needs of different scenarios, satisfying incomplete material preparation, no network or special network, and positioning errors Test requirements in other scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113784332B_ABST
    Figure CN113784332B_ABST
Patent Text Reader

Abstract

The present disclosure belongs to the field of computer technology, and relates to a data processing method and device, a storage medium, and an electronic device. The method includes: monitoring the traffic usage of the terminal to obtain a pair of data to be verified corresponding to the traffic usage and a matching condition corresponding to the pair of data to be verified; wherein the pair of data to be verified includes usage request data; starting the data playback function of the terminal to play back the pair of data to be verified; using the matching condition to verify the usage request data to obtain a verification result, so as to obtain a target network data pair corresponding to the pair of data to be verified according to the verification result. The present disclosure stores the data in the network request process in the terminal, providing a data basis for the reproduction and application of the data; on the other hand, the desired data can be obtained according to the needs in different scenarios, so as to test the data and other applications, and meet the needs of testing in scenarios where material preparation is incomplete, or there is no network or special network, or positioning error.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a data processing method and a data processing device, a computer-readable storage medium, and an electronic device. Background Art

[0002] With the gradual popularization of mobile devices, the mobile Internet is developing rapidly, and mobile devices are constantly updated. Users can use mobile devices to make network requests to meet their needs in many aspects such as food, clothing, housing and transportation.

[0003] However, when a mobile device uses the network to make a request, there is no system or device that can save the data during the request implementation process, nor can it meet the need to play back the data during the process.

[0004] In view of this, there is an urgent need in the art to develop a new data processing method and device.

[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0006] The purpose of the present disclosure is to provide a data processing method, a data processing device, a computer-readable storage medium and an electronic device, thereby overcoming the technical problem of being unable to save and play back data due to the limitations of related technologies, at least to a certain extent.

[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0008] According to a first aspect of an embodiment of the present invention, there is provided a data processing method, which is applied to a terminal, and the method comprises: monitoring traffic usage of the terminal to obtain a pair of data to be verified corresponding to the traffic usage and a matching condition corresponding to the pair of data to be verified; wherein the pair of data to be verified includes usage request data;

[0009] Starting a data playback function of the terminal to playback the data pair to be verified;

[0010] The usage request data is verified using the matching condition to obtain a verification result, so as to obtain a target network data pair corresponding to the data pair to be verified according to the verification result.

[0011] In an exemplary embodiment of the present invention, the acquiring the to-be-verified data pair corresponding to the traffic usage and the matching condition corresponding to the to-be-verified data pair includes:

[0012] Acquire a flow data pair corresponding to the flow usage, and edit the flow data pair to obtain a data pair to be verified;

[0013] Determine a matching condition corresponding to the data pair to be verified.

[0014] In an exemplary embodiment of the present invention, the acquiring of a traffic data pair corresponding to the traffic usage includes:

[0015] Obtaining usage request data corresponding to the traffic usage, and obtaining network return data corresponding to the traffic usage;

[0016] The usage request data and the network return data are combined to obtain a traffic data pair.

[0017] In an exemplary embodiment of the present invention, the obtaining and determining a matching condition corresponding to the pair of data to be verified include:

[0018] determining a network address condition corresponding to the usage request data;

[0019] determining an identification data condition corresponding to the use request data;

[0020] A data characterization condition corresponding to the usage request data is determined.

[0021] In an exemplary embodiment of the present invention, monitoring the traffic usage of the terminal includes:

[0022] Starting a data collection function of the terminal;

[0023] Respond to network requests under the data collection function and monitor traffic usage corresponding to the network requests.

[0024] In an exemplary embodiment of the present invention, obtaining a target network data pair corresponding to the data pair to be verified according to the verification result includes:

[0025] If the verification result is that the usage request data verification is passed, the to-be-verified data pair that meets the verification condition is determined as the target data pair, and the network request is discarded; and / or

[0026] If the verification result is that the usage request data is not verified, the target network data pair corresponding to the data pair to be verified cannot be obtained, and the network request is sent.

[0027] According to a second aspect of an embodiment of the present invention, there is provided a data processing system, the system comprising:

[0028] A control server, used to start a data collection function of a terminal and send a data reporting instruction to the terminal;

[0029] The terminal is used to respond to the network request under the action of the data collection function and obtain the usage request data corresponding to the network request;

[0030] Sending the usage request data to the front-end gateway server, and monitoring the traffic usage corresponding to the network request to obtain network return data corresponding to the traffic usage;

[0031] The front-end network server is used to receive the usage request and send the usage request data to the business server to receive network return data corresponding to the traffic usage returned by the business server;

[0032] Sending the network return data to the terminal;

[0033] The terminal is used to receive the network return data, and combine the usage request data and the network return data to obtain a flow data pair;

[0034] In response to the data reporting instruction sent by the control server, the flow data pair is sent to the storage server;

[0035] The storage server is used to receive the flow data pair and store the flow data pair.

[0036] In an exemplary embodiment of the present invention, the system further comprises:

[0037] The control server is used to extract the flow data pair from the storage server, and edit the flow data pair to obtain a data pair to be verified; wherein the data pair to be verified includes usage request data;

[0038] A matching condition corresponding to the use request data is determined, and the pair of data to be verified and the matching condition are sent to the storage server, so that the storage server stores the pair of data to be verified and the matching condition.

[0039] In an exemplary embodiment of the present invention, the system further comprises:

[0040] The control server is used to send a data deployment instruction to the storage server;

[0041] The storage server is configured to respond to the data deployment instruction sent by the control server and send the to-be-verified data pair to the terminal;

[0042] The terminal is used to receive the data pair to be verified sent by the storage server and determine the matching condition corresponding to the data pair to be verified; wherein the data pair to be verified includes the use request data;

[0043] Start a data playback function to playback the data pair to be verified;

[0044] The usage request data is verified using the matching condition to obtain a verification result, so as to obtain a target network data pair corresponding to the data pair to be verified according to the verification result.

[0045] In an exemplary embodiment of the present invention, the system further comprises:

[0046] The storage server is configured to respond to the data deployment instruction sent by the control server and send the to-be-verified data pair and the matching condition to the front-end gateway server;

[0047] The terminal is used to send usage request data to the front-end gateway server;

[0048] The front-end gateway server is used to receive the usage request data sent by the terminal;

[0049] Starting the data playback function of the front-end gateway server to play back the data pair to be verified;

[0050] The usage request data is verified using the matching condition to obtain a verification result, so as to obtain a target network data pair corresponding to the data pair to be verified according to the verification result, and send the target network data pair to the terminal.

[0051] In an exemplary embodiment of the present invention, the using the matching condition to verify the use request data to obtain a verification result includes:

[0052] The front-end gateway server is used to obtain the identification information to be verified of the terminal;

[0053] The usage request data and the identification information to be verified are verified using the matching condition to obtain a verification result.

[0054] In an exemplary embodiment of the present invention, the system further comprises:

[0055] The storage server is used to respond to the data deployment instruction sent by the control server and send the data pair to be verified to other terminals other than the terminal, so that the other terminals verify the data pair to be verified to obtain the target network data pair; wherein the data deployment instruction includes terminal identification information of the other terminals.

[0056] According to a third aspect of an embodiment of the present invention, there is provided a data processing device, the device comprising: a data acquisition module, configured to monitor the traffic usage of the terminal to obtain a pair of data to be verified corresponding to the traffic usage and a matching condition corresponding to the pair of data to be verified; wherein the pair of data to be verified includes usage request data;

[0057] A data playback module, configured to start a data playback function of the terminal to play back the data pair to be verified;

[0058] The data verification module is configured to verify the usage request data using the matching condition to obtain a verification result, so as to obtain a target network data pair corresponding to the data pair to be verified according to the verification result.

[0059] According to a fourth aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor and a memory; wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the data processing method of any of the above exemplary embodiments is implemented.

[0060] According to a fifth aspect of an embodiment of the present invention, there is provided a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the data processing method in any of the above exemplary embodiments is implemented.

[0061] It can be seen from the above technical solutions that the data processing method, data processing system, data processing device, computer storage medium and electronic device in the exemplary embodiments of the present invention have at least the following advantages and positive effects:

[0062] In the method and apparatus provided by the exemplary embodiments of the present disclosure, on the one hand, the data to be verified corresponding to the traffic usage is obtained, and the data in the network request process is stored in the terminal to provide a data basis for the reproduction and application of the data; on the other hand, the target network data is obtained by verifying the usage request data, and the desired data can be obtained according to the needs in different scenarios, so as to perform tests on the data and meet the needs of testing in scenarios where material preparation is incomplete, there is no network or special network, or positioning errors.

[0063] 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 present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0065] Figure 1 A flowchart schematically illustrates a data processing method in an exemplary embodiment of the present disclosure;

[0066] Figure 2 A schematic diagram schematically illustrates a flow chart of a method for monitoring traffic usage in an exemplary embodiment of the present disclosure;

[0067] Figure 3 A schematic diagram schematically illustrates a flow chart of a method for obtaining data to be verified in an exemplary embodiment of the present disclosure;

[0068] Figure 4 A schematic diagram schematically illustrates a flow chart of a method for obtaining flow data pairs in an exemplary embodiment of the present disclosure;

[0069] Figure 5 A flowchart schematically illustrating a method for determining a matching condition in an exemplary embodiment of the present disclosure;

[0070] Figure 6 A schematic diagram schematically illustrates a flow chart of a method for obtaining a target network data pair in an exemplary embodiment of the present disclosure;

[0071] Figure 7 A schematic diagram schematically shows a structure of a data processing system in an exemplary embodiment of the present disclosure;

[0072] Figure 8 A flowchart schematically illustrating a data processing flow in an exemplary embodiment of the present disclosure;

[0073] Fig. 9 A schematic diagram schematically shows a flow chart of a front-end gateway server obtaining a verification result in an exemplary embodiment of the present disclosure;

[0074] Fig.10 A schematic diagram schematically shows the structure of a data processing device in an exemplary embodiment of the present disclosure;

[0075] Fig.11 An electronic device for implementing a data processing method in an exemplary embodiment of the present disclosure is schematically shown;

[0076] Fig.12 A computer-readable storage medium for implementing a data processing method in an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0077] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0078] The terms "a", "an", "the" and "said" are used in this specification to indicate the presence of one or more elements / components / etc.; the terms "including" and "having" are used to express an open-ended inclusion and mean that additional elements / components / etc. may exist in addition to the listed elements / components / etc.; the terms "first" and "second" etc. are used only as labels and are not intended to limit the quantity of their objects.

[0079] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings represent the same or similar parts, and their repeated descriptions will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities.

[0080] In view of the problems existing in the related art, the present disclosure proposes a data processing method applied to a terminal. Figure 1 A flow chart of a data processing method is shown, Figure 1 As shown, the data processing method includes at least the following steps:

[0081] Step S110: Monitor the traffic usage of the terminal to obtain a pair of data to be verified corresponding to the traffic usage and a matching condition corresponding to the pair of data to be verified; wherein the pair of data to be verified includes usage request data.

[0082] Step S120: Start the data playback function of the terminal to play back the data pair to be verified.

[0083] Step S130: Verify the usage request data using the matching condition to obtain a verification result, so as to obtain a target network data pair corresponding to the data pair to be verified according to the verification result.

[0084] In an exemplary embodiment of the present disclosure, on the one hand, data to be verified corresponding to traffic usage is obtained, and the data in the network request process is stored in the terminal to provide a data basis for data reproduction and application; on the other hand, the target network data is obtained by verifying the usage request data, and the desired data can be obtained according to the needs in different scenarios, so as to perform tests on the data and meet the needs of testing in scenarios where material preparation is incomplete, there is no network or special network, or there is a positioning error.

[0085] The following is a detailed description of each step of the data processing method.

[0086] In step S110, the traffic usage of the terminal is monitored to obtain a pair of data to be verified corresponding to the traffic usage and a matching condition corresponding to the pair of data to be verified; wherein the pair of data to be verified includes usage request data.

[0087] In an exemplary embodiment of the present disclosure, monitoring of traffic usage of a terminal may be implemented after enabling a data collection function of the terminal.

[0088] In an alternative embodiment, Figure 2 A flow chart of a method for monitoring traffic usage is shown, such as Figure 2 As shown, the method at least includes the following steps: In step S210, the data collection function of the terminal is started.

[0089] The data collection function may be started manually by a user, or may be started through remote control of a server, or may be started in other ways, which is not particularly limited in this exemplary embodiment.

[0090] Furthermore, the data collection function may be a function provided by the terminal, or a function implemented by the terminal through a software development kit (SDK) for traffic collection, or a function implemented by the terminal through other means, and this exemplary embodiment does not specifically limit this.

[0091] In step S220, respond to the network request under the action of the data collection function, and monitor the traffic usage corresponding to the network request.

[0092] When the data collection function is implemented by the traffic collection SDK of the terminal, all applications that the user wants to monitor can be connected to the traffic collection SDK.

[0093] Furthermore, the traffic collection SDK determines the traffic usage by monitoring the network interface accessed by the network request. The monitoring of the network monitoring can be achieved by using the Hook technology.

[0094] Among them, Hook technology is also called hook function. Before the system calls the hook function, the hook program captures the message first, and the hook function gets control first. At this time, the hook function can process (change) the execution behavior of the function, and can also force the end of the message transmission. In simple terms, it is to pull out the system program and turn it into your own execution code fragment. To implement the hook function, there are two steps, namely, using the interface provided by the system, implementing the interface, and then injecting it into the system (used in specific scenarios), and dynamic proxy (used in all scenarios).

[0095] In this exemplary embodiment, traffic usage can be monitored through the data collection function, which meets the user's needs for monitoring traffic usage of specific applications without affecting the user's data privacy.

[0096] After monitoring the traffic usage, a pair of data to be verified corresponding to the traffic usage may be obtained to further determine a matching condition corresponding to the pair of data to be verified.

[0097] In an alternative embodiment, Figure 3 A flow chart of a method for obtaining a pair of data to be verified is shown, Figure 3 As shown, the method includes at least the following steps: In step S310, a flow data pair corresponding to the flow usage is obtained, and the flow data pair is edited to obtain a data pair to be verified.

[0098] In an alternative embodiment, Figure 4 A flow chart of a method for obtaining flow data pairs is shown, such as Figure 4 As shown, the method includes at least the following steps: in step S410, obtaining usage request data corresponding to traffic usage, and obtaining network return data corresponding to the traffic usage.

[0099] The traffic usage may be the situation of initiating a network request, the situation of receiving return data of the network request, or the situation of the total traffic consumed by the network request, and this exemplary embodiment does not specifically limit this.

[0100] Therefore, the usage request data corresponding to the traffic usage situation may be data representing a network request issued by a user. For example, the usage request data may include network address data, identification data, and request representation data.

[0101] The network address data may be a Uniform Resource Locator (URL); the identification data may be data stored on the user's local terminal (Cookie); and the request representation data may be key-value pair data representing the request (Header). In addition, the network address data, identification data, and request representation data may also be other data, which is not specifically limited in this exemplary embodiment.

[0102] The network return data corresponding to the traffic usage may be data corresponding to the network request issued by the user. For example, the network data may include a response code and response data.

[0103] The response code (Response Code) can be a code representing the response status, for example, code 1 represents a successful response, code 2 represents a failed response, etc. The response data (Responsedata) represents the data corresponding to the response status. When the response is successful, the response data is the data requested by the network request; when the response fails, the response data is the data representing the reason for the failure of the response.

[0104] In addition, the network return data may also include other data, and the response code and corresponding data may also include other data, which is not particularly limited in this exemplary embodiment.

[0105] In step S420, the request data and the network return data are combined to obtain a flow data pair.

[0106] In order to save the usage request data and the network return data in pairs, the usage request data and the network return data may be combined to obtain a flow data pair.

[0107] In this exemplary embodiment, traffic data pairs can be obtained by combining the usage request data and the network return data, so as to meet the demand for storing the traffic data pairs in pairs later.

[0108] Furthermore, the terminal may also edit the flow data pair to obtain the corresponding data pair to be verified.

[0109] Specifically, the editing process performed on the traffic data pair may include copying, modifying, deleting, and other processing methods, and may also include other processing methods, which are not particularly limited in this exemplary embodiment.

[0110] It is worth noting that after the flow data pair is copied, a backup flow data pair can be obtained. In addition, the backup flow data pair can be edited by modification or deletion to obtain another flow data pair different from the original flow data pair, so as to perform subsequent verification processing on the original flow data pair or the processed flow data pair according to different requirements.

[0111] In step S320, a matching condition corresponding to the data pair to be verified is determined.

[0112] In an alternative embodiment, Figure 5 A flow chart of a method for determining matching conditions is shown, such as Figure 5 As shown, the method at least includes the following steps: In step S510, a network address condition corresponding to the usage request data is determined.

[0113] When the request data is a URL, a corresponding network address condition may be determined, which is a condition for verifying the URL.

[0114] For example, the network address condition may be a condition that the URL includes the content of orderlist, or may be other conditions, which are not particularly limited in this exemplary embodiment.

[0115] In step S520, an identification data condition corresponding to the use request data is determined.

[0116] When the request data used is the identification data of Cookie, the corresponding identification data condition may be a condition for verifying the Cookie.

[0117] The Cookie may store a personal identification number (PIN) of the SIM card of the terminal, so the identification data condition may be a condition set for the PIN.

[0118] In step S530 , a data characterization condition corresponding to the usage request data is determined.

[0119] When the request data is a Header, the corresponding data representation condition may be a condition for verifying the Header.

[0120] The PIN of the terminal may also be stored in the Header, so the header may also be a condition set for the PIN. In addition, since there are many types of key-value pairs stored in the Header, data representation conditions may also be set for other key-value pairs, and this exemplary embodiment does not specifically limit this.

[0121] In this exemplary embodiment, different matching conditions may be set for different usage request data, so that the matching verification is more targeted and the verification result is more accurate.

[0122] In step S120, a data playback function of the terminal is started to play back the data pair to be verified.

[0123] In an exemplary embodiment of the present disclosure, the data playback function may be a built-in function of the terminal, or a function implemented by the terminal through a data playback SDK, or a function implemented by the terminal in other ways, and this exemplary embodiment does not specifically limit this.

[0124] Furthermore, the data playback function may be started manually by a user, remotely controlled by a server, or in other ways, which is not particularly limited in this exemplary embodiment.

[0125] After starting the data playback function, you can play back the data pairs to be verified. This playback process can achieve the effect of reproducing the consumed materials corresponding to the data pairs to be verified, which can meet the playback needs of various subsequent scenarios.

[0126] In step S130, the use request data is verified using the matching condition to obtain a verification result, so as to obtain a target network data pair corresponding to the data pair to be verified according to the verification result.

[0127] In an exemplary embodiment of the present disclosure, specifically, when the request data is a URL, the corresponding matching condition may be a network address condition. For example, when the URL is xx / orderlist, the network address condition is that the URL must include the content of orderlist, so at this time it can be determined that the URL satisfies the network address condition, that is, satisfies the matching condition, and the verification result can be determined to be passed in the request data verification.

[0128] It is worth noting that when verification is performed using matching conditions, verification may be performed using one matching condition or multiple matching conditions, and this exemplary embodiment does not specifically limit this.

[0129] When multiple matching conditions are used for verification, the verification result must be obtained by executing the matching conditions one by one from top to bottom in the matching order. In addition, multiple matching conditions may also be matched with priority, which is not specifically limited in this exemplary embodiment.

[0130] Furthermore, a target network data pair corresponding to the data pair to be verified may be determined.

[0131] In an alternative embodiment, Figure 6A flow chart of a method for obtaining a target network data pair is shown, such as Figure 6 As shown, the method at least includes the following steps: in step S610, if the verification result is that the requested data is verified, the data pair to be verified that meets the verification condition is determined as the target network data pair, and the network request is discarded.

[0132] For example, when the URL is xx / orderlist, the network address condition is that the URL must include the content of orderlist. Therefore, it can be determined that the URL meets the network address condition, that is, meets the matching condition, and the verification result can be determined as passed using the request data verification.

[0133] Furthermore, the verification of the data pairs to be verified can be performed one by one or multiple data pairs can be verified together. When the data pairs to be verified are verified one by one, when the verification passes, the data pairs to be verified can be directly determined as the target network data pairs; when multiple data pairs to be verified are verified together, the data pairs that pass the verification can be determined as the target network data pairs. Therefore, the number of the determined target network data pairs can be one or at least two, and this exemplary embodiment does not specifically limit this.

[0134] Since the network request has been executed and the target network data can be determined, the network request can be further discarded.

[0135] In step S620, if the verification result is that the requested data is not verified, the target network data pair corresponding to the data pair to be verified cannot be obtained, and a network request is sent.

[0136] For example, when the URL is xx / drawback, the network address condition is that the URL must include the content of orderlist. Therefore, it can be determined that the URL does not meet the network address condition, that is, it does not meet the matching condition. It can be determined that the verification result is that the request data is not verified.

[0137] Therefore, it is impossible to obtain the target network data pair corresponding to the data pair to be verified, and further send the network request to the business server for subsequent processing.

[0138] In this exemplary embodiment, by determining the verification result of the use request data and obtaining the target network data pair according to the verification result, the target network data pair can be used for error correction or viewing in different application scenarios.

[0139] Figure 7 A structural diagram of a data processing system is shown. Figure 7As shown, the system includes a terminal 710 , a control server 720 , a storage server 730 , a front-end gateway server 740 and a business server 750 .

[0140] Among them, the terminal 710 can be a mobile device integrated with a traffic replay SDK, which can perform data collection and data return functions; the control server 720 controls the front-end gateway and traffic replay SDK, and can edit and process the traffic data pairs; the storage server 730 is used to store the recorded traffic data pairs and the edited data pairs to be verified; the front-end gateway server 740 can be placed at the front end of the gateway server, or it can be merged into the gateway server, and can perform functions such as playback and verification of the data pairs to be verified, and then be handed over to various business servers 750.

[0141] Figure 8 A flow chart of a data processing system is shown in FIG. Figure 8 As shown, in step S801, the control server is used to start the data collection function of the terminal and send a data reporting instruction to the terminal.

[0142] The data collection function may be implemented through a data playback SDK or a separate data collection SDK, which is not specifically limited in this exemplary embodiment. Therefore, the control server may remotely control the data collection function to be enabled.

[0143] Subsequently, the control server may also send a data reporting instruction to the terminal to instruct the terminal to report the collected traffic data to the storage server.

[0144] In step S802, the terminal is used to respond to the network request under the data collection function and obtain the usage request data corresponding to the network request.

[0145] The usage request data may be data representing a network request issued by a user. For example, the usage request data may include network address data, identification data, and request representation data.

[0146] The network address data may be a URL, the identification data may be a Cookie, and the request representation data may be a Header. In addition, the network address data, the identification data, and the request representation data may also be other data, which is not specifically limited in this exemplary embodiment.

[0147] In step S803, the usage request data is sent to the front-end gateway server, and the traffic usage corresponding to the network request is monitored to obtain network return data corresponding to the traffic usage.

[0148] The traffic usage may be the situation of initiating a network request, the situation of receiving return data of the network request, or the situation of the total traffic consumed by the network request, and this exemplary embodiment does not specifically limit this.

[0149] The network return data corresponding to the traffic usage may be data corresponding to the network request issued by the user. For example, the network data may include a response code and response data.

[0150] The response code may be a code representing the response status. The response data represents data corresponding to the response status. When the response is successful, the response data is the data requested by the network request; when the response fails, the response data is data representing the reason for the response failure.

[0151] In addition, the network return data may also include other data, and the response code and corresponding data may also include other data, which is not particularly limited in this exemplary embodiment.

[0152] In step S804, the front-end gateway server is used to receive the usage request data and send the usage request data to the business server to receive the network return data corresponding to the traffic usage returned by the business server.

[0153] The service server may process the network request according to the usage request data to generate network return data corresponding to the usage request data.

[0154] In step S805, the network return data is sent to the terminal.

[0155] In step S806, the terminal is used to receive network return data and combine the request data and the network return data to obtain a flow data pair.

[0156] In order to save the usage request data and the network return data in pairs, the usage request data and the network return data may be combined to obtain a flow data pair.

[0157] In step S807, respond to the data reporting instruction sent by the control server and send the flow data pair to the storage server.

[0158] In step S808, the storage server is used to receive the flow data pair and store the flow data pair.

[0159] After receiving the traffic data pair, the storage server may store it.

[0160] In this exemplary embodiment, a method for a data processing system to collect flow data pairs is provided, which can realize the processing of recording consumable materials corresponding to network requests and meet the flow data pair recording requirements for demanding test scenarios.

[0161] In an optional embodiment, in step S809, the control server is used to extract the traffic data pair from the storage server, and edit the traffic data pair to obtain the data pair to be verified; wherein the data pair to be verified includes the usage request data.

[0162] Specifically, the editing process performed on the traffic data pair may include copying, modifying, deleting, and other processing methods, and may also include other processing methods, which are not particularly limited in this exemplary embodiment.

[0163] In step S810, a matching condition corresponding to the use request data is determined, and the data pair to be verified and the matching condition are sent to a storage server so that the storage server stores the data pair to be verified and the matching condition.

[0164] It is worth noting that each piece of usage request data can be matched with a corresponding matching condition, and multiple pieces of usage request data can also be matched with matching conditions, which is not specifically limited in this exemplary embodiment. When no matching condition is configured, full matching is performed by default. Among them, the full matching can be a full match of the URL.

[0165] In this exemplary embodiment, the collected traffic data can be edited and processed by the control server, and the execution terminal of the editing process is not limited to the terminal side, which meets the editing needs in different application scenarios.

[0166] In an optional embodiment, in step S811, the control server is used to send a data deployment instruction to the storage server.

[0167] The data deployment instruction may be an instruction for instructing the storage server to send the data pair to be verified and / or the matching condition to the terminal or the front gateway server, or may be sent to other execution ends, and this exemplary embodiment does not specifically limit this.

[0168] In step S812, the storage server is used to respond to the data deployment instruction sent by the control server and send the data pair to be verified to the terminal.

[0169] When sending data to the terminal, only the data to be verified may be sent, and the terminal configures the matching condition, or the matching condition determined by the control server may be sent to the terminal, which is not particularly limited in this exemplary embodiment.

[0170] In step S813, the terminal is used to receive the data pair to be verified sent by the storage server, and determine the matching condition corresponding to the data pair to be verified; wherein the data pair to be verified includes the usage request data.

[0171] The method of determining the matching condition is the same as step S320 and will not be repeated here.

[0172] In step S814, a data playback function is started to play back the data pair to be verified.

[0173] The method of replaying the data pair to be verified is the same as step S120, which will not be repeated here.

[0174] In step S815, the use request data is verified using the matching condition to obtain a verification result, so as to obtain a target network data pair corresponding to the data pair to be verified according to the verification result.

[0175] The method of obtaining the target network data pair is the same as step S130, which will not be described in detail here.

[0176] After obtaining the target network data pair, the target network data pair can be returned to the corresponding application program to meet the test requirements of the tester for the application program.

[0177] In this exemplary embodiment, by deploying the data to be verified in the storage server to the terminal, the target network data pair can be obtained, and the function of playing back the data pair to be verified on the terminal that collects the traffic data pair is realized, meeting the implementation of application scenarios with this demand.

[0178] In an optional embodiment, in step S816, the storage server is used to respond to the data deployment instruction sent by the control server and send the data pair to be verified and the matching condition to the front-end gateway server.

[0179] When the data deployment instruction of the control server instructs the storage server to send data to the front-end gateway server, the data pair to be verified and the matching conditions can be sent to the front-end gateway server at the same time, so that the front-end gateway server verifies the data pair to be verified using the request data according to the matching conditions determined by the control server.

[0180] In addition, only the data pair to be verified may be sent, and the front-end gateway server may determine the corresponding matching condition by itself, and this exemplary embodiment does not impose any special limitation on this.

[0181] In step S817, the terminal is used to send usage request data to the front gateway server.

[0182] In order to re-simulate the network request corresponding to the data to be verified, the terminal can resend the usage request data at this time to the front gateway, so that the front gateway server can match and verify the usage request data.

[0183] In step S818, the front-end gateway server is used to receive the usage request data sent by the terminal.

[0184] In step S819, the data playback function of the front-end gateway server is started to play back the data pair to be verified.

[0185] The data playback function can be not only a function of the terminal, but also a function of the front gateway server. Specifically, the data playback function of the front gateway server can also be implemented by itself or SDK, etc., and this exemplary embodiment does not make special restrictions on this.

[0186] In step S820, the use request data is verified using the matching condition to obtain a verification result, so as to obtain a target network data pair corresponding to the data pair to be verified according to the verification result, and send the target network data pair to the terminal.

[0187] The verification of the usage request data by the front-end gateway server may be the same as step S130, or the terminal sending the usage request data and the usage request data may be verified simultaneously by using matching conditions.

[0188] In an alternative embodiment, Fig. 9 A flow chart showing a method for a front-end gateway server to obtain a verification result is shown, Fig. 9 As shown, the method at least includes the following steps: In step S910, the front gateway server is used to obtain the identification information to be verified of the terminal.

[0189] The identification information to be verified of the terminal may be a PIN, or a universally unique identifier (UUID) of the terminal, or other unique identification information representing the identity of the terminal, which is not particularly limited in this exemplary embodiment.

[0190] In step S920, the usage request data and the identification information to be verified are verified using the matching condition to obtain a verification result.

[0191] When the pre-positioned gateway server determines the matching condition by itself, the matching condition may also include the verification condition for the identification information to be verified of the terminal. At this time, the use request data and the identification information to be verified may be verified at the same time by the determined matching condition to determine the verification result.

[0192] After the front-end gateway server obtains the verification result, the method of obtaining the target network data pair is the same as the method of obtaining the target network data pair by the terminal. In addition, the front-end gateway server will also return the target network data pair to the original terminal.

[0193] In this exemplary embodiment, when the front-end gateway server verifies the usage request data, it may verify only the usage request data, or it may verify both the usage request data and the identity of the terminal at the same time, so as to provide different verification methods in different application scenarios, and strictly control the identity information of the terminal to avoid data leakage.

[0194] In an optional embodiment, the storage server is used to respond to the data deployment instruction sent by the control server and send the data pair to be verified to other terminals other than the terminal, so that the other terminals can verify the data pair to be verified to obtain the target network data pair; wherein the data deployment execution includes the terminal identification information of the other terminals.

[0195] Since the control server can specify the terminal for data playback and data verification, the terminal for deploying data can be specified through the data deployment instruction. The terminal identification information of the terminal to be specified can be stored in the data deployment instruction. The terminal identification information can be a PIN, a UUID, or other unique identification information that characterizes the identity of the terminal, which is not specifically limited in this exemplary embodiment.

[0196] After the terminal receives the data to be verified, the method of obtaining the target network data pair is the same as step S120 and step S130, which will not be repeated here.

[0197] In this exemplary embodiment, the target network data pair can also be obtained through other terminals, indicating that there is no restriction on use on the terminal, thus satisfying the need to play back data on other terminals.

[0198] The target flow data pair can be used in a variety of application scenarios. Specifically, it can be used in application scenarios where materials are consumed, in application scenarios where there is no network test, in test scenarios where the network is limited, and when reproducing error scenarios. In addition, it can also be used in other application scenarios, and this exemplary embodiment does not make any special restrictions on this.

[0199] For example, when the tester needs to test the order system such as group purchase orders, he can test a normal group purchase list on the terminal or server side to receive the target network data pair of the group purchase. After the group purchase order is completed, the target network data pair can be tested repeatedly to solve the test needs in the scenario where materials will be consumed.

[0200] When there is no network in the test scenario, the control server can be used to send the collected data to the specified collection for testing. The number of mobile phones sent can be one or more, and the data sent can be one or more, which is not specifically limited in this exemplary embodiment.

[0201] When the mobile terminal is in a restricted network, such as a corporate network, a target network data pair may be obtained to perform a test at home or in another network environment after the mobile terminal leaves the restricted network.

[0202] When the user informs that a certain scenario or application will go wrong, the control server can be used to enable the terminal's data collection function to collect the data to be verified. Further, the control server deploys the data to be verified to the front-end gateway server to obtain the target network data pair through the verification of the front-end gateway server. Developers can repeat the user's operation in this scenario to reproduce the error scenario to find the cause of the error and solve the problem.

[0203] In an exemplary embodiment of the present disclosure, on the one hand, data to be verified corresponding to traffic usage is obtained, and the data in the network request process is stored in the terminal to provide a data basis for data reproduction and application; on the other hand, the target network data is obtained by verifying the usage request data, and the desired data can be obtained according to the needs in different scenarios, so as to perform tests on the data and meet the needs of testing in scenarios where material preparation is incomplete, there is no network or special network, or there is a positioning error.

[0204] Furthermore, in an exemplary embodiment of the present disclosure, a data processing device is also provided. Fig.10 A schematic diagram of the structure of a data processing device is shown in FIG. Fig.10 As shown, the data processing device 1000 may include: a data acquisition module 1010, a data playback module 1020 and a data verification module 1030. Among them:

[0205] The data acquisition module 1010 is configured to monitor the traffic usage of the terminal to obtain the data pairs to be verified corresponding to the traffic usage and the matching conditions corresponding to the data pairs to be verified; wherein the data pairs to be verified include usage request data; the data playback module 1020 is configured to start the data playback function of the terminal to play back the data pairs to be verified; the data verification module 1030 is configured to verify the usage request data using the matching conditions to obtain a verification result, so as to obtain the target network data pair corresponding to the data pairs to be verified according to the verification result.

[0206] The specific details of the above-mentioned data processing device 1000 have been described in detail in the corresponding data processing method, so they will not be repeated here.

[0207] It should be noted that, although several modules or units of the data processing device 1000 are mentioned in the above detailed description, such division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0208] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0209] Refer to the following Fig.11 1100 according to this embodiment of the present invention will be described. Fig.11 The electronic device 1100 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0210] like Fig.11 As shown, the electronic device 1100 is in the form of a general computing device. The components of the electronic device 1100 may include, but are not limited to: the at least one processing unit 1110, the at least one storage unit 1120, a bus 1130 connecting different system components (including the storage unit 1120 and the processing unit 1110), and a display unit 1140.

[0211] The storage unit stores program codes, which can be executed by the processing unit 1110, so that the processing unit 1110 executes the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification.

[0212] The storage unit 1120 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 1121 and / or a cache memory unit 1122 , and may further include a read-only memory unit (ROM) 1123 .

[0213] The storage unit 1120 may also include a program / utility 1124 having a set (at least one) of program modules 1125, such program modules 1125 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 may include an implementation of a network environment.

[0214] Bus 1130 may represent 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.

[0215] The electronic device 1100 may also communicate with one or more external devices 1300 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1100, and / or communicate with any device that enables the electronic device 1100 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1150. Furthermore, the electronic device 1100 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1160. As shown, the network adapter 1160 communicates with other modules of the electronic device 1100 via a bus 1130. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0216] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.

[0217] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.

[0218] refer to Fig.12 As shown, a program product 1200 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0219] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0220] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0221] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0222] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0223] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application 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 technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

Claims

1. A data processing method, applied to a terminal, characterized in that: The method comprises: Monitoring the traffic usage of the terminal to obtain a pair of data to be verified corresponding to the traffic usage and a matching condition corresponding to the pair of data to be verified; wherein the pair of data to be verified includes usage request data; Starting a data playback function of the terminal to playback the data pair to be verified; Verifying the usage request data using the matching condition to obtain a verification result, so as to obtain a target network data pair corresponding to the data pair to be verified according to the verification result; Among them, the obtaining of the data pair to be verified corresponding to the traffic usage and the matching conditions corresponding to the data pair to be verified includes: obtaining usage request data corresponding to the traffic usage, and obtaining network return data corresponding to the traffic usage, combining the usage request data and the network return data to obtain a traffic data pair, and editing the traffic data pair to obtain a data pair to be verified, and determining the matching conditions corresponding to the data pair to be verified.

2. The data processing method according to claim 1, characterized in that: The obtaining and determining a matching condition corresponding to the pair of data to be verified include: determining a network address condition corresponding to the usage request data; determining an identification data condition corresponding to the use request data; A data characterization condition corresponding to the usage request data is determined.

3. The data processing method according to claim 1, characterized in that: The monitoring of the traffic usage of the terminal includes: Starting a data collection function of the terminal; Respond to network requests under the data collection function and monitor traffic usage corresponding to the network requests.

4. The data processing method according to claim 3, characterized in that: The step of obtaining a target network data pair corresponding to the data pair to be verified according to the verification result includes: If the verification result is that the usage request data verification is passed, the to-be-verified data pair that meets the verification condition is determined as the target network data pair, and the network request is discarded; and / or If the verification result is that the usage request data is not verified, the target network data pair corresponding to the data pair to be verified cannot be obtained, and the network request is sent.

5. A data processing system, characterized in that: The system comprises: A control server, used to start a data collection function of a terminal and send a data reporting instruction to the terminal; The terminal is used to respond to the network request under the action of the data collection function and obtain the usage request data corresponding to the network request; Sending the usage request data to the front-end gateway server, and monitoring the traffic usage corresponding to the network request to obtain network return data corresponding to the traffic usage; The front-end gateway server is used to receive the usage request data and send the usage request data to the business server to receive network return data corresponding to the traffic usage returned by the business server; Sending the network return data to the terminal; The terminal is used to receive the network return data, and combine the usage request data and the network return data to obtain a flow data pair; In response to the data reporting instruction sent by the control server, the flow data pair is sent to the storage server; The storage server is used to receive the flow data pair and store the flow data pair; The control server is used to extract the flow data pair from the storage server, and edit the flow data pair to obtain a data pair to be verified; wherein the data pair to be verified includes usage request data; Determine a matching condition corresponding to the use request data, and send the pair of data to be verified and the matching condition to the storage server so that the storage server stores the pair of data to be verified and the matching condition; The control server is used to send a data deployment instruction to the storage server; The storage server is configured to respond to the data deployment instruction sent by the control server and send the to-be-verified data pair to the terminal; The terminal is used to receive the data pair to be verified sent by the storage server and determine the matching condition corresponding to the data pair to be verified; wherein the data pair to be verified includes the use request data; Start a data playback function to playback the data pair to be verified; The usage request data is verified using the matching condition to obtain a verification result, so as to obtain a target network data pair corresponding to the data pair to be verified according to the verification result.

6. The data processing system according to claim 5, characterized in that: The system further comprises: The storage server is configured to respond to the data deployment instruction sent by the control server and send the to-be-verified data pair and the matching condition to the front-end gateway server; The terminal is used to send usage request data to the front-end gateway server; The front-end gateway server is used to receive the usage request data sent by the terminal; Starting the data playback function of the front-end gateway server to play back the data pair to be verified; The usage request data is verified using the matching condition to obtain a verification result, so as to obtain a target network data pair corresponding to the data pair to be verified according to the verification result, and send the target network data pair to the terminal.

7. The data processing system according to claim 6, characterized in that: The using the matching condition to verify the usage request data to obtain a verification result includes: The front-end gateway server is used to obtain the identification information to be verified of the terminal; The usage request data and the identification information to be verified are verified using the matching condition to obtain a verification result.

8. The data processing system according to claim 5, characterized in that: The system further comprises: The storage server is used to respond to the data deployment instruction sent by the control server and send the data pair to be verified to other terminals other than the terminal, so that the other terminals verify the data pair to be verified to obtain the target network data pair; wherein the data deployment instruction includes terminal identification information of the other terminals.

9. A data processing device, characterized in that: include: A data acquisition module is configured to monitor the traffic usage of the terminal to obtain a pair of data to be verified corresponding to the traffic usage and a matching condition corresponding to the pair of data to be verified; wherein the pair of data to be verified includes usage request data; A data playback module, configured to start a data playback function of the terminal to play back the data pair to be verified; a data verification module configured to verify the usage request data using the matching condition to obtain a verification result, so as to obtain a target network data pair corresponding to the data pair to be verified according to the verification result; Among them, the obtaining of the data pair to be verified corresponding to the traffic usage and the matching conditions corresponding to the data pair to be verified includes: obtaining usage request data corresponding to the traffic usage, and obtaining network return data corresponding to the traffic usage, combining the usage request data and the network return data to obtain a traffic data pair, and editing the traffic data pair to obtain a data pair to be verified, and determining the matching conditions corresponding to the data pair to be verified.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data processing method according to any one of claims 1 to 4 is implemented.

11. An electronic device, characterized in that: include: processor; A memory, configured to store executable instructions of the processor; The processor is configured to execute the data processing method according to any one of claims 1 to 4 by executing the executable instructions.

Citation Information

Patent Citations

  • Data processing method, device and system for security assurance of service system

    CN110413508A