Data processing method, device, computer equipment and storage medium

By determining whether the browser supports standard interfaces in the data processing method, and determining the processing method based on the comparison of the data volume and the preset threshold, the problem of frequent data upload and callbacks in the prior art is solved, and the stability of the server is improved.

CN111259299BActive Publication Date: 2025-04-01CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010049301.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-01-16
Publication Date
2025-04-01
Estimated Expiration
2040-01-16

AI Technical Summary

Technical Problem

In the prior art, the real-time upload of front-end exceptions and buried point data frequently calls programs or threads, resulting in increased server workload and high request pressure, affecting the operation stability of the server.

Method used

When receiving the pending data, determine whether the target browser supports the standard interface. If not supported, the amount of read data is compared with the preset threshold, the operation instructions are determined, and the data is processed according to the instructions, including storing it in local storage or adjusting stored data information.

Benefits of technology

By reducing frequent data requests, the server's working pressure and request pressure are reduced, and the server's operating stability is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111259299B_ABST
    Figure CN111259299B_ABST
Patent Text Reader

Abstract

The present application discloses a data processing method, which relates to the field of big data. The method comprises: when receiving data to be processed, determining whether the associated target browser supports a standard interface; if it is determined that the target browser does not support the standard interface, reading the data volume of the data to be processed, and comparing the data volume with a preset threshold; determining a corresponding operation instruction according to a comparison result obtained by the comparison; and processing the data to be processed based on the operation instruction. The present application also provides a data processing device, a computer device, and a storage medium. The method realizes unified processing of data, reduces frequent requests, and improves the operation stability of the server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data, and in particular to a data processing method, a data processing device, a computer device, and a storage medium storing computer-readable instructions. Background Art

[0002] The industry's front-end anomalies and buried data uploads are all uploaded in real time, that is, as long as there are anomalies or buried data needs to be uploaded, and then the corresponding program or thread will be called to realize the data upload.

[0003] Although this processing method ensures the real-time nature of the data to a certain extent, since the data is uploaded in real time, programs or threads will be frequently called to complete the data upload, which increases the workload of the server to a certain extent. The frequent reception of request instructions also greatly increases the request pressure on the server. Summary of the invention

[0004] The present application provides a data processing method, a data processing device, a computer device and a storage medium to reduce frequent requests to a server and improve the operation stability of the server.

[0005] In a first aspect, the present application provides a data processing method, the data processing method comprising:

[0006] When receiving the data to be processed, determining whether the associated target browser supports the standard interface;

[0007] If it is determined that the target browser does not support the standard interface, reading the data volume of the data to be processed, and comparing the data volume with a preset threshold;

[0008] Determine a corresponding operation instruction according to a comparison result obtained by the comparison;

[0009] The data to be processed is processed based on the operation instruction.

[0010] In a second aspect, the present application further provides a data processing device, the data processing device comprising:

[0011] The interface confirmation module is used to determine whether the associated target browser supports the standard interface when receiving the data to be processed;

[0012] A size comparison module, configured to read the data volume of the to-be-processed data and compare the data volume with a preset threshold value if it is determined that the target browser does not support the standard interface;

[0013] An instruction determination module, used for determining a corresponding operation instruction according to a comparison result obtained by the comparison;

[0014] A data processing module is used to process the data to be processed based on the operation instruction.

[0015] In a third aspect, the present application also provides a computer device, comprising a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the data processing method as described above when executing the computer program.

[0016] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the data processing method as described above.

[0017] The present application discloses a data processing method. When processing front-end exceptions and buried data, first determine whether the current browser supports a standard interface. When it is determined that the standard interface is supported, upload directly. When the standard interface is not supported, determine the current corresponding processing method according to the data size of the data to be processed. Specifically, the processing includes directly storing in the local storage of the associated target server, adjusting the pre-stored data information and storing the data to be processed in a temporary storage, and then storing it in the local storage when the storage conditions are met. The unified processing of data is achieved, frequent requests are reduced, and the operation stability of the server is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 is a flow chart of a data processing method in one embodiment;

[0020] Figure 2 is a flow chart of a data processing method in another embodiment;

[0021] Figure 3 A schematic flow chart of the steps of obtaining a preset threshold value in one embodiment;

[0022] Figure 4 is a flowchart of a data processing method in yet another embodiment;

[0023] Figure 5 is a schematic block diagram of a data processing device in one embodiment;

[0024] Figure 6 FIG. 4 is a schematic block diagram of the structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0026] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0027] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0028] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0029] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0030] See also Figure 1 , Figure 1 The data processing method is used to improve the processing efficiency of web front-end buried data and reduce the request pressure of the data server.

[0031] like Figure 1 As shown, the data processing method specifically includes:

[0032] Step S10: When the data to be processed is received, determine whether the associated target browser supports the standard interface.

[0033] When receiving data to be processed, first determine whether the target browser associated with the processing device supports the standard interface. Specifically, the processing device is associated with the corresponding browser and is used to detect whether the browser needs to perform data processing operations. When it is determined that there is data to be processed that needs to be processed, first determine whether the associated target browser supports the corresponding standard interface.

[0034] When determining whether the associated target browser supports the corresponding standard interface, the data to be processed is processed according to the actual determination result. Specifically, when it is determined that the target browser supports the standard interface, the data to be processed can be directly uploaded, and when it is determined that the target browser does not support the standard interface, the data to be processed will be processed accordingly.

[0035] In actual applications, the standard interface is actually the Beacon interface, which schedules asynchronous and non-blocking requests for Web servers. When judging whether the browser supports the Beacon interface, the corresponding address information is used to determine whether the address information of navigator.sendBeacon is undefined. If the address information of navigator.sendBeacon is not undefined, it means that the currently associated server supports the Beacon interface, otherwise it does not support the Beacon interface.

[0036] Furthermore, when data processing is required, the data to be processed needs to be obtained in advance. Specifically, when data collected by a buried point is detected, the data collected by the buried point is obtained as data to be uploaded; or, when an operation abnormality is detected, the collected abnormal data is obtained as data to be uploaded.

[0037] In practical applications, the data to be processed are obtained by using buried points for data collection and obtaining abnormal data. When data collected by buried points are detected, the data collected by buried points are obtained as the data to be processed; when an operational abnormality is detected, the collected abnormal data are obtained as the data to be processed.

[0038] Embedding a data record collection point is to embed a data record collection point in each page of the application server. When the user visits the page, the data record collection point will collect the user's access behavior log, and the collected user access behavior log is the data to be processed.

[0039] Step S20: If it is determined that the target browser does not support the standard interface, read the data volume of the to-be-processed data, and compare the data volume with a preset threshold.

[0040] The preset threshold specifically refers to the maximum value of the amount of data that can be currently stored by the target browser.

[0041] When it is determined that the target browser does not support the standard interface, it is determined that the data to be processed cannot be directly uploaded to the associated server. Corresponding operations need to be performed before the data can be uploaded. Specifically, the amount of the data to be processed is compared with a preset threshold, and then the data to be processed is processed accordingly based on the comparison result to complete the data upload after processing.

[0042] In actual applications, when it is determined that the address information of navigator.sendBeacon is undefined, it means that the browser does not support the beacon interface, that is, the target browser does not support the standard interface. At this time, the amount of data to be processed will be read to compare the obtained data amount with the preset threshold, and then different comparison results correspond to different data processing methods. Specifically, the comparison results obtained after the comparison are divided into two categories, one is that the amount of data to be processed is less than or equal to the preset threshold, and the other is that the amount of data to be processed is greater than the preset threshold, and for different comparison results, the corresponding processing methods are different.

[0043] In addition, if it is determined that the target browser supports the standard interface, the data to be processed is uploaded to the associated server.

[0044] Specifically, when it is determined that the target browser supports the standard interface, the data to be processed is directly uploaded to the associated server for storage. Specifically, when it is determined that the address information of navigator.sendBeacon is not undefined, it means that the browser supports the beacon interface. At this time, the received data to be processed will be directly uploaded to the associated server for storage, so as to facilitate data analysis and processing later.

[0045] Step S30: determining a corresponding operation instruction according to a comparison result obtained through the comparison.

[0046] After comparing the data volume of the data to be processed with the preset threshold, a corresponding comparison result is obtained, and then a corresponding operation instruction is obtained according to the obtained comparison result.

[0047] Specifically, the comparison results obtained include that the amount of data to be processed is less than or equal to a preset threshold, and the amount of data to be processed is greater than the preset threshold. If the amount of data to be processed is less than or equal to the preset threshold, it means that the space value of the storage space of the local memory of the target browser supports the storage of the data to be processed, and the data to be processed will be stored in the local storage of the target browser. Then, the control instruction under this comparison result is the instruction information for data storage; if the amount of data to be processed is greater than the preset threshold, it means that the space value of the storage space of the local memory of the target browser does not support the storage of the data to be processed, and subsequent related operations need to be performed to complete the storage of the data to be processed.

[0048] When the data to be processed cannot be directly stored in the local storage of the target browser, it is necessary to determine the reason why the data cannot be stored, specifically, to determine why the amount of data to be processed is greater than a preset threshold, and then perform subsequent related operations based on the reason information obtained. The control instruction obtained at this time is the instruction information for information determination.

[0049] Specifically, when confirming information, it is mainly determined whether the preset threshold needs to be updated. In actual applications, there are situations where the server is changed, but the preset threshold stored in the browser in advance is for a specific server, that is, when the server is changed, the preset threshold may change accordingly, so the preset threshold will also be updated accordingly with the change of the server.

[0050] Step S40: Process the data to be processed based on the operation instruction.

[0051] After obtaining the operation instruction for the data to be processed, the data to be processed will be processed accordingly according to the obtained operation instruction. Specifically, the corresponding processing includes storing the data to be processed, uploading some stored data, and storing the data to be processed at the same time.

[0052] Specifically, when processing the data to be processed according to the obtained operation instruction, it includes: if the operation instruction is a data storage instruction, the data to be processed is stored in the local memory of the target browser; if the operation instruction is an information confirmation instruction, the data in the local memory of the target browser is uploaded to the server associated with the target browser, and the data to be processed is stored in the local memory of the target browser.

[0053] When it is determined that the obtained operation instruction is a data storage instruction, it means that the storage space of the current target browser can store the data to be uploaded, and the data to be processed will be stored in the local memory at this time.

[0054] In actual applications, the industry's front-end exceptions and buried point data uploads are all uploaded in real time, but if the data is uploaded as soon as it is received, it will obviously put more pressure on the target server. Since the local storage of the browser can be used to store the corresponding data information, under certain circumstances, the data can be stored, and when the amount of stored data reaches a certain level, the data can be uploaded in batches, which can reduce the server's work pressure to a certain extent.

[0055] In addition, when it is determined that the obtained operation instruction is an information confirmation instruction, the data pre-existing in the local memory is first obtained, and then the data in the local memory is encoded, and the encoded data is uploaded to the associated server. At the same time, the data in the local memory is deleted to release space, and finally the data to be processed is stored in the local memory.

[0056] Specifically, when the operation instruction is an information confirmation instruction, it means that there is not enough memory space in the local storage of the browser to process the data to be processed, so the data pre-stored in the local storage will be uploaded to the associated server so that there is a certain storage space in the local storage to store the data to be processed. At the same time, when the pre-stored data is uploaded, the data is deleted from the local storage, but when the browser is not closed, the recorded data will be stored in a temporary storage (js context), and when the browser is closed, the data stored in the temporary storage will be deleted.

[0057] In the above data processing method, when processing front-end exceptions and buried point data, first determine whether the current browser supports the standard interface. If it is determined that the standard interface is supported, upload it directly. If it does not support the standard interface, determine the current corresponding processing method according to the amount of data to be processed. Specifically, the processing includes directly storing it in the local storage of the associated target server, adjusting the pre-stored data information and storing the data to be processed in a temporary storage, and then storing it in the local storage when the storage conditions are met. This achieves unified processing of data, reduces frequent requests, and improves the operating stability of the server.

[0058] Further, refer to Figure 2 , Figure 2 It is a flowchart of a data processing method in another embodiment.

[0059] Specifically, the data processing method further includes:

[0060] Step S01, calculating and obtaining a target URL length value supported by a server associated with the target browser.

[0061] Step S02: Calculate and obtain the space value of the storage space of the local memory of the target browser.

[0062] Step S03: Compare the target URL length value with the space value according to a preset rule to obtain the preset threshold value according to the comparison result.

[0063] Among them, URL is a uniform resource locator.

[0064] The preset threshold is stored in the browser and is the basis for judging the processing of the data to be processed. Since the final upload of the data needs to be uploaded to the corresponding server, the specific value of the preset threshold has a certain relationship with the target URL length value supported by the associated server, and is also related to the subject of data generation, that is, the space value of the storage space of the local memory of the associated browser. Therefore, when obtaining the preset threshold stored in the browser, it needs to be determined based on the target URL length value supported by the target server and the space value of the storage space of the local memory of the target browser currently used.

[0065] Specifically, when calculating the target URL length value supported by the target server, it is assumed that the maximum data size of the exception stack information is 1kb, and a batch quantity setting interface is provided. If the batch quantity is set to 10, the program randomly generates a 10*1kb ASCII string. Among them, the maximum data size of the exception stack information is obtained according to the actual performance of the server, and the number of batch data can also be set to other numbers, which can be set specifically according to the performance of the server.

[0066] Then, the character string of given length is used as a parameter of a request for data acquisition sent to the server to call the interface for batch data upload through the extensible hypertext transfer request method.

[0067] Next, the feedback information sent by the server will be received according to the request instruction sent, and then subsequent processing will be performed according to the received feedback information. When the feedback information is that the string length is too long, the length of 1 / 2 of the string is selected to continue the request. If it is still too long, the length of 1 / 2+1 / 4 of the remaining length is selected to continue the request. If it is still too long, the length of 1 / 2+1 / 4+1 / 8 of the remaining length is selected to continue the request. By analogy, when the received feedback information is that the data length is too short, the current length is increased by 1 / 2 of the difference between the initial length and the current length and the request is continued. If it is still too short, the current length is continued to be increased by 1 / 2+1 / 4 of the difference between the initial length and the current length, and the request is continued. If it is still too short, the current length is continued to be increased by 1 / 2+1 / 4+1 / 8 of the difference between the initial length and the current length, and the request is continued. If it is still too short, the current length is continued to be increased by 1 / 2+1 / 4+1 / 8 of the difference between the initial length and the current length, and by analogy, until the difference between the lengths of the overlong and the overshort is less than 100 (a certain set value), the overshort length is selected as the target URL length value supported by the target server.

[0068] The difference formula for detecting length change is 1 / 2+1 / 2 2 +1 / 2 3 +...+1 / 2 n , where n is the number of consecutive times that the time is too long or too short. Once the consecutive time is broken, n is reset to 1.

[0069] When calculating the storage space size of the target browser's local storage, the same method of calculating the target URL length supported by the target server can be used. Specifically, a 1kb*n ASCII string is randomly generated, and this string is used as the value, and "__tracking_data_gauge__" is used as an identifier (other strings that do not conflict with other local storage identifiers can also be used) and set to the browser's local storage. If an exception is thrown after setting that the storage content size exceeds the storage capacity, it means that the string length is too long; if no exception is thrown, it means that the length is too short. At this time, it will be processed in the same way as the target URL length value supported by the target server to obtain the space value of the local storage storage space of the target browser.

[0070] After obtaining the target URL length value supported by the target server and the space value of the local storage space of the target browser, a corresponding preset threshold will be obtained based on the space value and the target URL length value, and the obtained preset threshold will be stored in the corresponding browser.

[0071] Further, refer to Figure 3 , Figure 3 The figure is a flowchart of the steps of obtaining a preset threshold value in one embodiment.

[0072] Specifically, step S03, comparing the target URL length with the storage space size according to a preset rule to obtain the preset threshold value according to the comparison result, includes:

[0073] Step S031: Obtain a target space value for comparison according to the space value of the storage space.

[0074] Step S032: Compare the target space value with the target URL length value.

[0075] Step S033: If the target space value is less than the target URL length value, determine that the target space value is the preset threshold.

[0076] Step S034: If the target space value is equal to the target URL length value, determine that the target space value or the target URL length value is the preset threshold.

[0077] Step S035: If the target space value is greater than the target URL length value, determine that the target URL length value is the preset threshold.

[0078] When obtaining the preset threshold for judgment, it is necessary to determine it according to the performance of the associated target browser and the target server. Specifically, when obtaining the preset threshold, firstly obtain the target space value for comparison according to the obtained storage space value, then compare the obtained target space value with the obtained target URL length value, and then determine the specific value of the preset threshold according to the obtained comparison result.

[0079] In actual applications, when comparing the space value of the storage space with the target URL length value according to the preset rules, the space value of the storage space is not directly compared with the target URL length value, but a suitable comparison value is obtained according to the size of the storage space, and then compared with the target URL length value. For example, 10% of the space value of the storage space can be compared with the target URL length value, and then the smaller value is stored as the preset threshold, and then the stored preset threshold is determined according to the comparison result. If the target URL length value is less than 10% of the space value of the storage space, the value corresponding to the target URL length value is used as the preset threshold corresponding to the data size, otherwise, the value corresponding to 10% of the space value of the storage space is used as the preset threshold corresponding to the data size.

[0080] The target space value is obtained based on the space value of the storage space of the local memory. In the above description, the target space value can be set to 10% of the storage space size. Similarly, it can also be set to other proportions, which are determined according to the actual status of the local memory of the target browser. In actual applications, since the tracking server will not change frequently, that is, the target server associated with the target browser will not change frequently, the storage period of the preset threshold can be set to three months or six months, and then automatically refreshed and adjusted after the time exceeds the storage period.

[0081] That is, after obtaining the preset threshold, it also includes: setting the validity period of the preset threshold, and when the storage time of the preset threshold exceeds the set validity period, updating the preset threshold. When updating, the calculation is performed in the manner described above, and then the recalculated preset threshold is stored, and the corresponding validity period is also set.

[0082] It should be noted that step S033, step S034 and step S035 are three parallel solutions, that is, in actual application, only one of the three solutions will exist.

[0083] Further, refer to Figure 4 , Figure 4 It is a flowchart of a data processing method in yet another embodiment.

[0084] Specifically, after uploading the stored data in the local memory of the target browser to the target server, the data processing method further includes:

[0085] Step S50: When it is detected that the stored data fails to be uploaded, the URL length value of the server receiving the stored data is calculated.

[0086] Step S60: Compare the URL length value with the target URL length value.

[0087] Step S70: When the URL length value is not equal to the target URL length value, the preset threshold corresponding to the server receiving the data to be processed is updated.

[0088] Step S80: When the URL length value is equal to the target URL length value, it is determined that the amount of the stored data is too large.

[0089] The stored data is data that has been stored in the local storage of the target browser.

[0090] In the actual application process, not all data uploads or processing can proceed normally. Data processing may fail due to changes in the system or processor. Therefore, when data processing exceptions occur, corresponding feedback responses are required in a timely manner to ensure that data processing can proceed normally.

[0091] In one embodiment, when it is determined that the remaining space of the local memory of the target browser does not support the data storage this time, the data stored in the local memory of the target browser needs to be uploaded. When uploading data, the stored data is uploaded to the associated server. When it is detected that the data upload fails, first determine the relevant information of the server currently associated with the target browser, that is, determine which server is receiving the data, and then calculate the URL length value of the server receiving the stored data, and then compare the calculated URL length value with the pre-recorded URL length value of the target server to determine the reason for the data upload failure based on the comparison result.

[0092] When comparing the calculated URL length value with the URL length value of the target server, the comparison results are that the two are the same or different. If the two are the same, it means that the target server associated with the target browser has not changed or replaced. If the two are different, it means that due to subsequent needs or other reasons, the target server associated with the target browser has been replaced, and the relevant information has not been updated in time.

[0093] Generally, different servers have different URL length values, so it is very likely that the preset threshold will change, that is, the amount of data that can be supported for data storage will be different. When data upload failure is detected, it is necessary to determine the reason for the current data upload failure, which is determined by comparing the currently calculated URL length value with the target server's URL length value.

[0094] As can be seen from the above description, when the calculated URL length value is different from the URL length value of the target server, since the preset threshold is determined based on the URL length value of the server associated with the browser, the preset threshold will be updated, and then the processing of the stored data will be completed after the update is completed, such as uploading the stored data or continuing to store it in the local storage of the browser; when the calculated URL length value is the same as the URL length value of the target server, it means that the amount of stored data currently being uploaded is too large, and certain operations will be performed to complete the processing of the stored data.

[0095] When it is determined that the preset threshold needs to be updated, the process of obtaining the preset threshold in the above description is the same, and a new judgment is made based on the URL length value calculated at this time and the storage space size of the browser to obtain the updated preset threshold. It should be noted that the method used at this time is the same as the method of obtaining the preset threshold in the above description. For example, if the preset threshold is obtained by comparing the URL length value with 10% of the storage space size, then when updating at this time, the calculated URL length value is also compared with 10% of the storage space size to obtain the updated preset threshold.

[0096] Furthermore, when it is determined that the calculated URL length value is the same as the URL length value of the target server, it is determined that the amount of stored data to be uploaded at this time is too large. At this time, the stored data will be processed accordingly to complete the data upload, such as using a backoff algorithm to upload the data. The backoff algorithm is that the nodes on the network wait for a certain period of time before sending again after a data conflict. The waiting time grows exponentially. If the data upload fails after processing, the uploaded data will be lost in the temporary storage device (js context).

[0097] Then, the relationship between the storage space size of the server receiving the uploaded data and the preset threshold will also be determined. For example, it will be determined whether the storage space size of the server receiving the uploaded data exceeds twice the preset threshold, or it can be multiple times, without specific restrictions. If it exceeds, the oldest data stored in the server receiving the stored data will be deleted to satisfy "deleted data size = stored data size", where the number of deleted data items is dynamically calculated, and the age of the data can be determined based on the data storage time.

[0098] See also Figure 5 , Figure 5 It is a schematic block diagram of a data processing device in one embodiment, and the data processing device is used to execute the aforementioned data processing method.

[0099] like Figure 5 As shown, the data processing device 100 includes:

[0100] The interface confirmation module 101 is used to determine whether the associated target browser supports the standard interface when receiving the data to be processed.

[0101] The size comparison module 102 is used to read the data volume of the to-be-processed data and compare the data volume with a preset threshold value if it is determined that the target browser does not support the standard interface.

[0102] The instruction determination module 103 is used to determine the corresponding operation instruction according to the comparison result obtained by the comparison.

[0103] The data processing module 104 is used to process the data to be processed based on the operation instruction.

[0104] Furthermore, in one embodiment, the data processing device 100 is further configured to:

[0105] When data collected by the embedding point is detected, the data collected by the embedding point is obtained as data to be processed; or, when it is detected that the target browser runs abnormally, the collected abnormal data is obtained as data to be processed.

[0106] Furthermore, in one embodiment, the data processing device 100 further includes: a first calculation module 105 , a second calculation module 106 and a threshold determination module 107 .

[0107] The first calculation module 105 is used to calculate the target URL length value supported by the target server associated with the target browser; the second calculation module 106 is used to calculate the space value of the storage space of the local memory of the target browser; the threshold determination module 107 is used to compare the target URL length value with the space value according to a preset rule to obtain the preset threshold value based on the comparison result.

[0108] Furthermore, in one embodiment, the threshold determination module 107 is specifically used to: obtain a target space value for comparison based on the space value of the storage space; compare the target space value with the target URL length value; if the target space value is less than the target URL length value, determine that the target space value is the preset threshold; if the target space value is equal to the target URL length value, determine that the target space value or the target URL length value is the preset threshold; if the target space value is greater than the target URL length value, determine that the target URL length value is the preset threshold.

[0109] Furthermore, in one embodiment, the instruction determination module 103 is specifically used to: if the data volume is less than or equal to the preset threshold, determine that the operation instruction is a data storage instruction; if the data volume is greater than the preset threshold, determine that the operation instruction is an information confirmation instruction.

[0110] Furthermore, in one embodiment, the data processing module 104 is specifically used to: if the operation instruction is a data storage instruction, store the data to be processed in the local memory of the target browser; if the operation instruction is an information confirmation instruction, upload the data stored in the local memory of the target browser to a server associated with the target browser, and store the data to be processed in the local memory of the target browser.

[0111] Furthermore, in one embodiment, the data processing device 100 further includes an abnormality determination module 108 .

[0112] The abnormality determination module 108 is used to calculate the URL length value of the server receiving the stored data when it is detected that the upload of the stored data fails; compare the URL length value with the target URL length value; when the URL length value is not equal to the target URL length value, update the preset threshold corresponding to the server receiving the data to be processed; when the URL length value is equal to the target URL length value, determine that the data size of the stored data is too large.

[0113] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device and each module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0114] The above-mentioned device can be implemented in the form of a computer program. Figure 6 Runs on the computer device shown.

[0115] See also Figure 6 , Figure 6 FIG. 1 is a schematic block diagram of a computer device in an embodiment. The computer device may be a server.

[0116] See also Figure 6 The computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.

[0117] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any data processing method.

[0118] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0119] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any data processing method.

[0120] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 6The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0121] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0122] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:

[0123] When receiving data to be processed, determine whether the associated target browser supports the standard interface; if it is determined that the target browser does not support the standard interface, read the data volume of the data to be processed and compare the data volume with a preset threshold; determine the corresponding operation instruction based on the comparison result obtained by the comparison; and process the data to be processed based on the operation instruction.

[0124] In one embodiment, before implementing the step of determining whether the associated target browser supports the standard interface when receiving the data to be processed, the processor is further configured to implement:

[0125] When data collected by the embedding point is detected, the data collected by the embedding point is obtained as data to be processed; or, when it is detected that the target browser runs abnormally, the collected abnormal data is obtained as data to be processed.

[0126] In one embodiment, before implementing the step of comparing the data size with a preset threshold, the processor is further configured to implement:

[0127] Calculate and obtain the target URL length value supported by the server associated with the target browser; calculate and obtain the space value of the storage space of the local memory of the target browser; compare the target URL length value with the space value according to a preset rule to obtain the preset threshold value based on the comparison result.

[0128] In one embodiment, when the processor implements the comparison of the target URL length with the space value according to the preset rule to obtain the preset threshold value according to the comparison result, it is also used to implement:

[0129] A target space value for comparison is obtained according to the space value of the storage space; the target space value is compared with the target URL length value; if the target space value is less than the target URL length value, the target space value is determined to be the preset threshold; if the target space value is equal to the target URL length value, the target space value or the target URL length value is determined to be the preset threshold; if the target space value is greater than the target URL length value, the target URL length value is determined to be the preset threshold.

[0130] In one embodiment, when the processor implements obtaining the corresponding operation instruction according to the comparison result obtained by the comparison, it is also used to implement:

[0131] If the data volume is less than or equal to the preset threshold, the operation instruction is determined to be a data storage instruction; if the data volume is greater than the preset threshold, the operation instruction is determined to be an information confirmation instruction.

[0132] In one embodiment, when the processor implements the processing of the to-be-processed data based on the operation instruction, it is used to implement:

[0133] If the operation instruction is a data storage instruction, the data to be processed is stored in the local memory of the target browser; if the operation instruction is an information confirmation instruction, the data stored in the local memory of the target browser is uploaded to a server associated with the target browser, and the data to be processed is stored in the local memory of the target browser.

[0134] In one embodiment, after implementing uploading the stored data in the local memory of the target browser to the server associated with the target browser, the processor is further configured to implement:

[0135] When it is detected that the upload of the stored data fails, the URL length value of the server receiving the stored data is calculated; the URL length value is compared with the target URL length value; when the URL length value is not equal to the target URL length value, the preset threshold corresponding to the server receiving the stored data is updated; when the URL length value is equal to the target URL length value, it is determined that the data volume of the stored data is too large.

[0136] A computer-readable storage medium is also provided in an embodiment of the present application. The computer-readable storage medium stores a computer program. The computer program includes program instructions. The processor executes the program instructions to implement any data processing method provided in the embodiment of the present application.

[0137] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.

[0138] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A data processing method, characterized in that: The method comprises: When receiving the data to be processed, determining whether the associated target browser supports the standard interface; If it is determined that the target browser does not support the standard interface, then read the data volume of the data to be processed, and compare the data volume with a preset threshold; before comparing the data size with the preset threshold, it also includes: calculating the target URL length value supported by the server associated with the target browser; calculating the space value of the storage space of the local memory of the target browser; comparing the target URL length value with the space value according to a preset rule, so as to obtain the preset threshold according to the comparison result, including: obtaining a target space value for comparison according to the space value of the storage space; comparing the target space value with the target URL length value; if the target space value is less than the target URL length value, determining that the target space value is the preset threshold; if the target space value is equal to the target URL length value, determining that the target space value or the target URL length value is the preset threshold; if the target space value is greater than the target URL length value, determining that the target URL length value is the preset threshold; setting the validity period of the preset threshold, and when the storage time of the preset threshold exceeds the set validity period, updating the preset threshold; Determining a corresponding operation instruction according to a comparison result obtained by the comparison includes: if the data amount is less than or equal to the preset threshold, determining that the operation instruction is a data storage instruction; if the data amount is greater than the preset threshold, determining that the operation instruction is an information confirmation instruction; Processing the data to be processed based on the operation instruction includes: if the operation instruction is a data storage instruction, storing the data to be processed in the local memory of the target browser; if the operation instruction is an information confirmation instruction, uploading the stored data in the local memory of the target browser to a server associated with the target browser, and storing the data to be processed in the local memory of the target browser.

2. The data processing method according to claim 1, characterized in that: When receiving the data to be processed, before determining whether the associated target browser supports the standard interface, the method further includes: When data collected by a buried point is detected, the data collected by the buried point is obtained as data to be processed; or, When it is detected that the target browser is running abnormally, the collected abnormal data is obtained as data to be processed.

3. The data processing method according to claim 1, characterized in that: After uploading the stored data in the local memory of the target browser to the server associated with the target browser, the method further includes: When it is detected that the stored data fails to be uploaded, calculating the URL length value of the server receiving the stored data; Compare the URL length value with the target URL length value; When the URL length value is not equal to the target URL length value, updating a preset threshold corresponding to the server receiving the stored data; When the URL length value is equal to the target URL length value, it is determined that the amount of the stored data is too large.

4. A data processing device, characterized in that: The data processing device comprises: The interface confirmation module is used to determine whether the associated target browser supports the standard interface when receiving the data to be processed; A size comparison module, for reading the data volume of the to-be-processed data and comparing the data volume with a preset threshold value if it is determined that the target browser does not support the standard interface; before comparing the data size with the preset threshold value, it also includes: calculating a target URL length value supported by a server associated with the target browser; calculating a space value of a storage space of a local memory of the target browser; comparing the target URL length value with the space value according to a preset rule, so as to obtain the preset threshold value according to the comparison result, including: obtaining a target space value for comparison according to the space value of the storage space; comparing the target space value with the target URL length value; if the target space value is less than the target URL length value, determining the target space value to be the preset threshold value; if the target space value is equal to the target URL length value, determining the target space value or the target URL length value to be the preset threshold value; if the target space value is greater than the target URL length value, determining the target URL length value to be the preset threshold value; setting an effective period for the preset threshold value, and updating the preset threshold value when the storage time of the preset threshold value exceeds the set effective period; An instruction determination module, used to determine a corresponding operation instruction according to a comparison result obtained by the comparison, including: if the data amount is less than or equal to the preset threshold, determining that the operation instruction is a data storage instruction; if the data amount is greater than the preset threshold, determining that the operation instruction is an information confirmation instruction; A data processing module is used to process the data to be processed based on the operation instruction, including: if the operation instruction is a data storage instruction, the data to be processed is stored in the local memory of the target browser; if the operation instruction is an information confirmation instruction, the stored data in the local memory of the target browser is uploaded to a server associated with the target browser, and the data to be processed is stored in the local memory of the target browser.

5. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the data processing method according to any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, one or more processors are caused to perform the steps of the data processing method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Data processing method and system, client, and page engine

    CN104253788A