CN111259299A - Data processing method, data processing device, computer equipment and storage medium - Google Patents

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

Info

Publication number
CN111259299A
CN111259299A CN202010049301.9A CN202010049301A CN111259299A CN 111259299 A CN111259299 A CN 111259299A CN 202010049301 A CN202010049301 A CN 202010049301A CN 111259299 A CN111259299 A CN 111259299A
Authority
CN
China
Prior art keywords
data
target
value
processed
preset threshold
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010049301.9A
Other languages
Chinese (zh)
Inventor
饶怡骏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202010049301.9A priority Critical patent/CN111259299A/en
Publication of CN111259299A publication Critical patent/CN111259299A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a data processing method, which relates to the field of big data, and comprises the following steps: when data to be processed is received, whether the associated target browser supports a standard interface is determined; if the target browser is determined not to support the standard interface, reading the data volume of the data to be processed, and comparing the data volume with a preset threshold value; determining a corresponding operation instruction according to a comparison result obtained by comparison; and processing the data to be processed based on the operation instruction. The application also provides a data processing device, a computer device and a storage medium. The unified processing of the data is realized, frequent requests are reduced, and the operation stability of the server is improved.

Description

Data processing method, data processing device, computer equipment and storage medium
Technical Field
The present application relates to the field of big data, and in particular, to a data processing method, a data processing apparatus, a computer device, and a storage medium storing computer-readable instructions.
Background
Uploading data of both abnormal and buried point data at the front end in the industry is carried out in real time, namely, as long as the abnormal or buried point data exist, the data are uploaded, and then corresponding programs or threads are called to realize the uploading of the data.
Although the real-time performance of the data is ensured to a certain extent, due to the real-time uploading of the data, the uploading of the data can be completed by frequently calling a program or a thread, so that the workload of the server is increased to a certain extent, and the request pressure of the server is greatly increased by frequently receiving request instructions.
Disclosure of Invention
The application provides a data processing method, a data processing device, computer equipment and a storage medium, so that frequent requests to a server are reduced, and the running stability of the server is improved.
In a first aspect, the present application provides a data processing method, including:
when data to be processed is received, whether the associated target browser supports a standard interface is determined;
if the target browser is determined not to support the standard interface, reading the data volume of the data to be processed, and comparing the data volume with a preset threshold value;
determining a corresponding operation instruction according to a comparison result obtained by comparison;
and processing the data to be processed based on the operation instruction.
In a second aspect, the present application further provides a data processing apparatus, including:
the interface confirmation module is used for determining whether the associated target browser supports the standard interface or not when receiving the data to be processed;
the size comparison module is used for reading the data volume of the data to be processed and comparing the data volume with a preset threshold value if the target browser is determined not to support the standard interface;
the instruction determining module is used for determining a corresponding operation instruction according to a comparison result obtained by comparison;
and the data processing module is used for processing the data to be processed based on the operation instruction.
In a third aspect, the present application further provides a computer device comprising a memory and a processor; the memory is used for storing a computer program; the processor is configured to execute the computer program and to implement the data processing method as described above when executing the computer program.
In a fourth aspect, the present application also provides a computer-readable storage medium, which stores a computer program, which, when executed by a processor, causes the processor to implement the data processing method as described above.
The application discloses a data processing method, when front-end abnormal and buried point data are processed, whether a current browser supports a standard interface is judged firstly, uploading is directly carried out when the standard interface is determined to be supported, and when the standard interface is not supported, a current corresponding processing mode is determined according to the data size of data to be processed, specifically, the data to be processed is directly stored in a local storage of an associated target server, pre-stored data information is adjusted, the data to be processed is stored in a temporary storage device, and then the data to be processed is stored in the local storage when the storage condition is met. The data are processed uniformly, frequent requests are reduced, and the operation stability of the server is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a flow diagram illustrating a data processing method according to one embodiment;
FIG. 2 is a flow chart illustrating a data processing method according to another embodiment;
FIG. 3 is a flowchart illustrating steps of obtaining a predetermined threshold in one embodiment;
FIG. 4 is a flow chart illustrating a data processing method according to still another embodiment;
FIG. 5 is a schematic block diagram of a data processing apparatus in one embodiment;
FIG. 6 is a block diagram showing a schematic configuration of a computer device according to an embodiment.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making an invasive task, are within the scope of the present application.
The flow diagrams depicted in the figures are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order depicted. For example, some operations/steps may be divided, combined or partially combined, so that the actual execution sequence may be changed according to actual situations.
It is to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a flow chart illustrating a data processing method according to an embodiment. The data processing method is used for improving the processing efficiency of data of embedded data at the front section of the web and reducing the request pressure of a data server.
As shown in fig. 1, the data processing method specifically includes:
step S10, when the data to be processed is received, it is determined whether the associated target browser supports the standard interface.
When data to be processed is received, it is first determined whether a target browser associated with the processing device supports a standard interface. In particular, the processing means is associated with a respective browser for detecting whether the browser requires data processing operations. When determining that there is data to be processed which needs to be processed, first determining whether the associated target browser supports a corresponding standard interface.
And processing the data to be processed according to an actual determination result when determining whether the associated target browser supports the corresponding standard interface. Specifically, when it is determined that the target browser supports the standard interface, the data to be processed may be directly uploaded, and when it is determined that the target browser does not support the standard interface, the data to be processed may be correspondingly processed.
In actual application, the standard interface is actually a Beacon interface, and the Beacon interface schedules asynchronous and non-blocking requests for the Web server. When judging whether the browser supports the beacon interface, judging and determining through corresponding address information, specifically, whether address information of navigator.sendBeacon is undefined is used as a judgment basis, if the address information of navigator.sendBeacon is not undefined, it is indicated that the currently associated server supports the beacon interface, otherwise, the beacon interface is not supported.
Further, when data processing is required, data required to be processed needs to be obtained in advance, and 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 the abnormal operation is detected, acquiring the acquired abnormal data as the data to be uploaded.
In practical application, the obtaining mode of the data to be processed comprises data acquisition by using a buried point and acquisition of abnormal data, wherein when the data acquired by the buried point is detected, the data acquired by the buried point is acquired as the data to be processed; and when the abnormal operation is detected, acquiring the acquired abnormal data as the data to be processed.
The embedded point is that a data record acquisition point is embedded in each page in the application server, and when a user accesses the page, the data record acquisition point collects user access behavior logs, wherein the collected user access behavior logs are to-be-processed data.
Step S20, 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 value.
The preset threshold specifically refers to a maximum value of the data size that can be currently stored by the target browser.
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, and the data can be uploaded only after corresponding operations are performed, specifically, the data amount of the data to be processed is compared with a preset threshold value, and then the data to be processed is correspondingly processed according to the obtained comparison result, so that the data is uploaded after the data is processed.
In practical application, when the address information of navigator.sendbeacon is determined to be undefined, it is described that the browser does not support the beacon interface, that is, the target browser does not support the standard interface, at this time, the data size of the data to be processed is read, the obtained data size is compared with a preset threshold, and then different comparison results correspond to different data processing modes. Specifically, the comparison results obtained after the comparison are divided into two types, one is that the data amount of the data to be processed is smaller than or equal to the preset threshold, and the other is that the data amount of the data to be processed is larger than the preset threshold, and the corresponding processing modes are different for different comparison results.
In addition, if the target browser is determined to support the standard interface, the data to be processed is uploaded to the associated server.
Specifically, when the target browser is determined to support 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 indicates that the browser supports the beacon interface, and at this time, the received data to be processed is directly uploaded to the associated server for storage, so as to perform data analysis and processing in the later period.
And step S30, determining a corresponding operation instruction according to the comparison result obtained by the comparison.
After the data volume of the data to be processed is compared with a preset threshold value, a corresponding comparison result is obtained, and then a corresponding operation instruction is obtained according to the obtained comparison result.
Specifically, the obtained comparison result includes that the data amount of the data to be processed is less than or equal to the preset threshold, and the data amount of the data to be processed is greater than the preset threshold. If the data volume of the data to be processed is smaller than or equal to the preset threshold, it indicates that the space value of the storage space of the local memory of the target browser at the moment supports storing the data to be processed, the data to be processed is stored in the local memory of the target browser at the moment, and the control instruction under the comparison result is instruction information for storing the data; if the data volume of the data to be processed is larger than the preset threshold, it indicates 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 at this time, subsequent related operation processing needs to be performed to complete the storage of the data to be processed.
When the data to be processed cannot be directly stored in the local storage of the target browser, the reason of the situation that the data cannot be stored needs to be determined, specifically, the reason why the data volume of the data to be processed is larger than the preset threshold is determined, and then subsequent related operations are performed according to the obtained reason information, so that the obtained control instruction is instruction information for information determination.
Specifically, when information confirmation is performed, it is mainly determined whether or not the preset threshold needs to be updated. In practical applications, there are server changes, but the pre-stored preset threshold in the browser is specific to a specific server, that is, when the server changes, the preset threshold may change accordingly, so the preset threshold is also updated accordingly with the change of the server.
And step S40, processing the data to be processed based on the operation instruction.
After the operation instruction of the data to be processed is obtained, the data to be processed is correspondingly processed according to the obtained operation instruction. Specifically, the corresponding processing includes storing data to be processed, uploading some stored data, and storing the data to be processed.
Specifically, when processing data to be processed according to the obtained operation instruction, the method includes: if the operation instruction is a data storage instruction, storing the data to be processed in a local memory of the target browser; and if the operation instruction is an information confirmation instruction, uploading the 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.
When the obtained operation instruction is determined to be a data storage instruction, it is indicated that the storage space of the current target browser can store data to be uploaded, and at this time, the data to be processed is stored in the local memory.
In practical application, the uploading of the data of the internal front-end exception and the data of the buried point is real-time uploading, but if the data is uploaded as long as the data is received, the working pressure of the target server is obviously increased. The local storage of the browser can be used for storing corresponding data information, so that the data can be stored under a certain condition, and unified batch uploading of the data is carried out when the stored data amount reaches a certain condition, so that the working pressure of the server can be reduced to a certain extent.
In addition, when the obtained operation instruction is determined to be an information confirmation instruction, firstly, data pre-stored in a local memory is obtained, then the data in the local memory is encoded, the encoded data is uploaded to a correlation server, meanwhile, the data in the local memory is deleted for space release, and finally, the data to be processed is stored in the local memory.
Specifically, when the operation instruction is an information confirmation instruction, it is described that there is not enough memory space in the local storage of the browser to process the data to be processed at this time, and therefore, the data pre-stored in the local storage is uploaded to the association server, so that a certain memory space exists in the local storage to store the data to be processed. Meanwhile, when uploading the pre-stored data, the data is deleted from the local storage, but when the browser is not closed, the recorded data is stored in a temporary storage (in the js context), and when the browser is closed, the data stored in the temporary storage is deleted.
In the data processing method, when front-end exception and buried point data are processed, whether a current browser supports a standard interface is judged firstly, and uploading is directly carried out when the standard interface is determined to be supported, and when the standard interface is not supported, a current corresponding processing mode is determined according to the data volume of data to be processed, specifically, the data to be processed is directly stored in a local storage of an associated target server, the pre-stored data information is adjusted, the data to be processed is stored in a temporary storage, and then the data to be processed is stored in the local storage when the storage condition is met. The unified processing of the data is realized, frequent requests are reduced, and the operation stability of the server is improved.
Further, referring to fig. 2, fig. 2 is a schematic flow chart of a data processing method in another embodiment.
Specifically, the data processing method further includes:
and step S01, calculating to obtain a target URL length value supported by the server associated with the target browser.
And step S02, calculating to obtain a space value of the storage space of the local memory of the target browser.
And step S03, 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 obtained comparison result.
Wherein the URL is a uniform resource locator.
The preset threshold is stored in the browser and is a judgment basis for processing data to be processed, and the final uploading of the data is required to be uploaded to a corresponding server, so that the specific numerical value of the preset threshold has a certain relation with the length value of the target URL supported by the associated server, and is also related to a main body of data generation, namely, the space value of the storage space of the local memory of the associated browser. Therefore, when the preset threshold stored in the browser is obtained, the length value of the target URL supported by the target server and the space value of the storage space of the local memory of the currently used target browser need to be determined.
Specifically, when the length value of the target URL supported by the target server is obtained through calculation, assuming that the longest data size of the exception stack information is 1kb, a batch number setting interface is given, and if the batch number is set to 10, the program randomly generates an ASCII character string of 10 × 1 kb. The maximum data volume of the abnormal stack information is obtained according to the actual performance of the server, and the quantity of the batch data can be set to other quantities, specifically, the quantity of the batch data can be set according to the performance of the server.
And then, taking the character string with the given length as a parameter for sending a request for data acquisition to a server, and calling an interface for uploading data in batches by using an extensible hypertext transfer request method.
And then, receiving the feedback information sent by the server according to the sent request instruction, and further carrying out subsequent processing according to the received feedback information. When the feedback information is that the length of the character string is too long, selecting a length continuing request of the character string 1/2, if the length is still too long, selecting a length continuing request of the residual length 1/2+1/4, if the length is still too long, selecting a length continuing request of the residual length 1/2+1/4+1/8, and so on, when the received feedback information is that the length of the data is too short, increasing the current length by 1/2 of the difference value between the initial length and the current length, if the length is still too short, continuing the request by 1/2+1/4 of the difference value between the initial length and the current length, and if the length is still too short, continuing the request by 1/2+1/4+1/8 of the difference value between the initial length and the current length, and repeating the steps until the difference value between the finally detected overlong length and the finally detected overlong length is smaller than 100 (a certain set value), and selecting the overlong length as the length value of the target URL supported by the target server.
The difference formula for detecting the length variation is 1/2+1/22+1/23+...+1/2nAnd n is the number of times of continuous too long or too short, and n is reset to 1 as long as the continuous too long or too short is broken.
When the size of the storage space of the local storage of the target browser is obtained through calculation, the size can be obtained through calculation in a mode of obtaining the length of the target URL supported by the target server through calculation. Specifically, an ASCII string of 1kb × n is randomly generated, and this string is set as a value, "__ tracking _ data _ gauge __" as an identifier (other strings that do not conflict with other local storage identifiers may be exchanged) in the browser local storage. If the storage content size exceeds the storage capacity after setting, the character string length is too long; if the length of the description for not throwing the exception is too short, processing is carried out according to a mode of obtaining a target URL length value supported by the target server through calculation so as to obtain a space value of a local storage space of the target browser.
After the length value of the target URL supported by the target server and the space value of the storage space locally stored in the target browser are obtained, a corresponding preset threshold value is obtained according to the space value and the length value of the target URL, and the obtained preset threshold value is stored in the corresponding browser.
Further, referring to fig. 3, fig. 3 is a flowchart illustrating a step of obtaining the preset threshold in one embodiment.
Specifically, step S03, comparing the length of the target URL with the size of the storage space according to a preset rule, so as to obtain the preset threshold according to the obtained comparison result, includes:
and step S031, obtaining a target space value for comparison according to the space value of the storage space.
Step S032, comparing the target space value with the target URL length value.
Step 033, if the target space value is smaller than the target URL length value, determining that the target space value is the preset threshold value.
Step S034, 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.
Step S035, if the target space value is greater than the target URL length value, determining that the target URL length value is the preset threshold.
When the preset threshold value for judgment is obtained, the determination needs to be made according to the self performance of the associated target browser and the target server. Specifically, when the preset threshold is obtained, a target space value to be compared is obtained according to the obtained space value of the storage space, then the obtained target space value is compared with the obtained length value of the target URL, and then a specific numerical value of the preset threshold is determined according to the obtained comparison result.
In practical application, when the space value of the storage space is compared with the length value of the target URL according to the preset rule, the space value of the storage space is not directly compared with the length value of the target URL, but a proper comparison value is obtained according to the size of the storage space, and then the comparison is carried out with the length value of the target URL. For example, ten percent of the space value of the storage space may be compared with the length value of the target URL, and then the smaller value may be stored as the preset threshold, and the stored preset threshold may be determined according to the obtained comparison result. If the length value of the target URL is less than ten percent of the space value of the storage space, taking the corresponding numerical value of the length value of the target URL as a preset threshold value corresponding to the data size, and otherwise, taking the corresponding numerical value of ten percent of the space value of the storage space as a preset threshold value corresponding to the data size.
The target space value is obtained according to the space value of the storage space of the local storage, and in the above description, the target space value may be set to ten percent of the size of the storage space, and may also be set to other proportions, specifically determined according to the actual state of the local storage of the target browser. In practical applications, since the embedded point server is not frequently changed, that is, the target server associated with the target browser is not frequently changed, the storage period of the preset threshold may be set to three months or half a year, and then the automatic refresh adjustment is performed after the time exceeds the storage period.
Namely, after the preset threshold is obtained, the method further comprises the following steps: and setting the valid period of the preset threshold, and updating the preset threshold when the storage time of the preset threshold exceeds the set valid period. When updating, calculation and determination are performed according to the above-described manner, and then the recalculated preset threshold is stored, and meanwhile, a corresponding valid period is set.
It should be noted that step S033, step S034 and step S035 are three parallel schemes, that is, only one of the three schemes exists in the practical application process.
Further, referring to fig. 4, fig. 4 is a schematic flow chart of a data processing method in another embodiment.
Specifically, after the stored data in the local storage of the target browser is uploaded to the target server, the data processing method further includes:
step S50, when it is detected that the stored data upload fails, calculating a URL length value of the server that receives the stored data.
And step S60, comparing the URL length value with the target URL length value.
And step S70, when the length value of the URL is not equal to the length value of the target URL, updating a preset threshold corresponding to the server receiving the data to be processed.
And step S80, when the URL length value is equal to the target URL length value, determining that the data size of the stored data is too large.
Wherein the stored data is data already stored in the local memory of the target browser.
In the actual application process, not all data uploading or processing can be normally performed, and also data processing fails due to changes of a system or a processor, so when data processing is abnormal, corresponding feedback response needs to be performed in time to ensure that the data processing can be normally performed.
In one embodiment, when it is determined that the remaining space of the local storage of the target browser does not support the data storage of this time, the data stored in the local storage of the target browser needs to be uploaded. When data uploading is carried out, the stored data is uploaded to a related server, when data uploading failure is detected, firstly, relevant information of the server related to a target browser at present is determined, namely, which server for receiving the data is determined, then, a URL length value of a server for receiving the stored data is calculated, and further, the URL length value obtained by calculation is compared with a URL length value of a target server recorded in advance, so that the reason of the data uploading failure is determined according to the comparison result.
When the calculated URL length value is compared with the URL length value of the target server, the obtained comparison results are the same as each other and different from each other, namely the comparison result shows that the target server associated with the target browser is not changed or replaced, and the comparison results are different from each other, namely the comparison result shows that the target server associated with the target browser is replaced due to subsequent requirements or other reasons and related information is not updated timely.
Generally, the URL length values of different servers are different, and it is very likely that the preset threshold will be changed, that is, the data size of the supportable data storage will be different. When a data uploading failure is detected, what the reason of the current data uploading failure needs to be determined, and the result is obtained according to the comparison result between the length value of the URL obtained by current calculation and the length value of the URL of the target server.
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 according to the URL length value of the server associated with the browser, the preset threshold is updated, and then the processing of the stored data is completed after the updating is completed, for example, the stored data is uploaded or continuously stored 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 indicates that the data size of the stored data uploaded currently is too large, and certain operation is performed to complete the processing of the stored data.
When it is determined that the preset threshold needs to be updated, as in the process of obtaining the preset threshold described above, re-judgment is performed according to the calculated URL length value and the size of the storage space of the browser, so as to obtain the updated preset threshold. It should be noted that the manner used at this time is the same as the manner of obtaining the preset threshold, for example, if the preset threshold is obtained by comparing the URL length value with a decimal line of the size of the storage space, at this time, during updating, the calculated URL length value is also compared with the decimal line of the size of the storage space to obtain the updated preset threshold.
Further, 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 data size of the stored data to be uploaded at this time is too large, at this time, corresponding processing is performed on the stored data to complete uploading of the data, for example, data is uploaded by using a back-off algorithm, where the back-off algorithm is that a node on a network waits for a certain time after sending a data collision, the waiting time increases with an index, and if the data uploading criterion fails after processing, the uploaded data in the temporary storage (js context) is lost.
Then, it is further determined whether the size of the storage space of the server receiving the uploaded data is greater than a preset threshold, for example, whether the size of the storage space of the server receiving the uploaded data is greater than twice, may be multiple times, and is not particularly limited.
Referring to fig. 5, fig. 5 is a schematic block diagram of a data processing apparatus according to an embodiment, the data processing apparatus is configured to execute the foregoing data processing method.
As shown in fig. 5, the data processing apparatus 100 includes:
the interface confirmation module 101 is configured to determine whether the associated target browser supports a standard interface when receiving the to-be-processed data.
A size comparison module 102, configured to, if it is determined that the target browser does not support the standard interface, read a data size of the to-be-processed data, and compare the data size with a preset threshold.
And the instruction determining module 103 is configured to determine a corresponding operation instruction according to a comparison result obtained by the comparison.
And the data processing module 104 is configured to process the data to be processed based on the operation instruction.
Further, in an embodiment, the data processing apparatus 100 is further specifically configured to:
when detecting data collected by a buried point, acquiring the data collected by the buried point as data to be processed; or when the target browser is detected to be abnormally operated, acquiring the acquired abnormal data as the data to be processed.
Further, in one embodiment, the data processing apparatus 100 further includes: a first calculation module 105, a second calculation module 106, and a threshold determination module 107.
A first calculating module 105, configured to calculate a length value of a target URL supported by a target server associated with the target browser; a second calculating module 106, configured to calculate a space value of a storage space of the local storage of the target browser; a threshold determining module 107, configured to compare the length value of the target URL with the space value according to a preset rule, so as to obtain the preset threshold according to an obtained comparison result.
Further, in an embodiment, the threshold determining module 107 is further specifically configured to: obtaining a target space value for comparison according to the space value of the storage space; comparing the target space value to the target URL length value; if the target space value is smaller than the target URL length value, determining that the target space value is the preset threshold value; 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; and if the target space value is larger than the target URL length value, determining that the target URL length value is the preset threshold value.
Further, in an embodiment, the instruction determining module 103 is further specifically configured to: if the data volume is smaller than or equal to the preset threshold, determining that the operation instruction is a data storage instruction; and if the data volume is larger than the preset threshold value, determining that the operation instruction is an information confirmation instruction.
Further, in an embodiment, the data processing module 104 is further specifically configured to: if the operation instruction is a data storage instruction, storing the data to be processed in a local memory of the target browser; and if the operation instruction is an information confirmation instruction, uploading the data stored 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.
Further, in one embodiment, the data processing apparatus 100 also includes an exception determination module 108.
An anomaly determination module 108, configured to, when it is detected that the stored data fails to be uploaded, calculate a URL length value of a server that receives the stored data; comparing the URL length value with a target URL length value; when the URL length value is not equal to the target URL length value, updating a preset threshold corresponding to a server receiving the data to be processed; when the URL length value and the target URL length value are equal, determining that the data size of the stored data is too large.
It should be noted that, for convenience and brevity of description, it may be clearly understood by those skilled in the art that the specific working processes of the apparatus and the modules described above may refer to corresponding processes in the foregoing method embodiments, and are not described herein again.
The apparatus described above may be implemented in the form of a computer program which is executable on a computer device as shown in fig. 6.
Referring to fig. 6, fig. 6 is a block diagram illustrating a computer device according to an embodiment. The computer device may be a server.
Referring to fig. 6, the computer device includes a processor, a memory, and a network interface connected through a system bus, wherein the memory may include a nonvolatile storage medium and an internal memory.
The non-volatile storage medium may store an operating system and a computer program. The computer program comprises program instructions which, when executed, cause a processor to perform any of the data processing methods.
The processor is used for providing calculation and control capability and supporting the operation of the whole computer equipment.
The internal memory provides an environment for the execution of a computer program on a non-volatile storage medium, which, when executed by a processor, causes the processor to perform any of the data processing methods.
The network interface is used for network communication, such as sending assigned tasks and the like. Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
It should be understood that the Processor may be a Central Processing Unit (CPU), and the Processor may be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Wherein, in one embodiment, the processor is configured to execute a computer program stored in the memory to implement the steps of:
when data to be processed is received, whether the associated target browser supports a standard interface is determined; if the target browser is determined not to support the standard interface, reading the data volume of the data to be processed, and comparing the data volume with a preset threshold value; determining a corresponding operation instruction according to a comparison result obtained by comparison; and processing the data to be processed based on the operation instruction.
In one embodiment, before implementing the determining whether the associated target browser supports the standard interface when receiving the data to be processed, the processor is further configured to implement:
when detecting data collected by a buried point, acquiring the data collected by the buried point as data to be processed; or when the target browser is detected to be abnormally operated, acquiring the acquired abnormal data as the data to be processed.
In one embodiment, the processor, prior to performing the comparing the data size to the preset threshold, is further configured to perform:
calculating to obtain a target URL length value supported by a server associated with the target browser; calculating to obtain a space value of a storage space of a local storage of the target browser; and comparing the target URL length value with the space value according to a preset rule to obtain the preset threshold according to an obtained comparison result.
In an embodiment, when the comparing the target URL length with the spatial value according to a preset rule is implemented to obtain the preset threshold according to an obtained comparison result, the processor is further configured to implement:
obtaining a target space value for comparison according to the space value of the storage space; comparing the target space value to the target URL length value; if the target space value is smaller than the target URL length value, determining that the target space value is the preset threshold value; 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; and if the target space value is larger than the target URL length value, determining that the target URL length value is the preset threshold value.
In one embodiment, when implementing that the corresponding operation instruction is obtained according to the comparison result obtained by performing the comparison, the processor is further configured to implement:
if the data volume is smaller than or equal to the preset threshold, determining that the operation instruction is a data storage instruction; and if the data volume is larger than the preset threshold value, determining that the operation instruction is an information confirmation instruction.
In one embodiment, when the processor is configured to perform the processing on the data to be processed based on the operation instruction, the processor is configured to perform:
if the operation instruction is a data storage instruction, storing the data to be processed in a local memory of the target browser; and if the operation instruction is an information confirmation instruction, uploading the data stored 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.
In one embodiment, after the uploading of the stored data in the local storage of the target browser to the server associated with the target browser is implemented, the processor is further configured to implement:
when the stored data are detected to be uploaded unsuccessfully, calculating a URL length value of a server receiving the stored data; comparing 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; and when the URL length value is equal to the target URL length value, determining that the data size of the stored data is too large.
The embodiment of the present application further provides a computer readable storage medium, where a computer program is stored in the computer readable storage medium, where the computer program includes program instructions, and the processor executes the program instructions to implement any one of the data processing methods provided in the embodiments of the present application.
The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, for example, a hard disk or a 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 Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the computer device.
While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of data processing, the method comprising:
when data to be processed is received, whether the associated target browser supports a standard interface is determined;
if the target browser is determined not to support the standard interface, reading the data volume of the data to be processed, and comparing the data volume with a preset threshold value;
determining a corresponding operation instruction according to a comparison result obtained by comparison;
and processing the data to be processed based on the operation instruction.
2. The data processing method of claim 1, wherein before determining whether the associated target browser supports the standard interface when the pending data is received, further comprising:
when detecting data collected by a buried point, acquiring the data collected by the buried point as data to be processed; or the like, or, alternatively,
and when the target browser is detected to be abnormal in operation, acquiring the acquired abnormal data as the data to be processed.
3. The data processing method according to claim 1, further comprising, before said comparing the data size with a preset threshold:
calculating to obtain a target URL length value supported by a server associated with the target browser;
calculating to obtain a space value of a storage space of a local storage of the target browser;
and comparing the target URL length value with the space value according to a preset rule to obtain the preset threshold according to an obtained comparison result.
4. The data processing method according to claim 3, wherein the comparing the target URL length with the space value according to a preset rule to obtain the preset threshold according to the obtained comparison result comprises:
obtaining a target space value for comparison according to the space value of the storage space;
comparing the target space value to the target URL length value;
if the target space value is smaller than the target URL length value, determining that the target space value is the preset threshold value;
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;
and if the target space value is larger than the target URL length value, determining that the target URL length value is the preset threshold value.
5. The data processing method according to claim 1, wherein the obtaining of the corresponding operation command according to the comparison result obtained by the comparison comprises:
if the data volume is smaller than or equal to the preset threshold, determining that the operation instruction is a data storage instruction;
and if the data volume is larger than the preset threshold value, determining that the operation instruction is an information confirmation instruction.
6. The data processing method according to claim 5, wherein the processing the data to be processed based on the operation instruction comprises:
if the operation instruction is a data storage instruction, storing the data to be processed in a local memory of the target browser;
and 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.
7. The data processing method according to claim 6, further comprising, after the uploading the stored data in the local storage of the target browser to the server associated with the target browser:
when the stored data are detected to be uploaded unsuccessfully, calculating a URL length value of a server receiving the stored data;
comparing 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;
and when the URL length value is equal to the target URL length value, determining that the data size of the stored data is too large.
8. A data processing apparatus, characterized in that the data processing apparatus comprises:
the interface confirmation module is used for determining whether the associated target browser supports a standard interface or not when receiving the data to be processed;
the size comparison module is used for reading the data volume of the data to be processed and comparing the data volume with a preset threshold value if the target browser is determined not to support the standard interface;
the instruction determining module is used for determining a corresponding operation instruction according to a comparison result obtained by comparison;
and the data processing module is used for processing the data to be processed based on the operation instruction.
9. A computer device comprising a memory and a processor, the memory having stored therein computer-readable instructions which, when executed by the processor, cause the processor to carry out the steps of the data processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, storing a computer program, which computer-readable instructions, when executed by the processors, cause one or more processors to perform the steps of the data processing method according to any one of claims 1 to 7.
CN202010049301.9A 2020-01-16 2020-01-16 Data processing method, data processing device, computer equipment and storage medium Pending CN111259299A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010049301.9A CN111259299A (en) 2020-01-16 2020-01-16 Data processing method, data processing device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010049301.9A CN111259299A (en) 2020-01-16 2020-01-16 Data processing method, data processing device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111259299A true CN111259299A (en) 2020-06-09

Family

ID=70950733

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010049301.9A Pending CN111259299A (en) 2020-01-16 2020-01-16 Data processing method, data processing device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111259299A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114257575A (en) * 2021-12-16 2022-03-29 平安壹账通云科技(深圳)有限公司 Client data processing method and device, electronic equipment and storage medium
CN116149226A (en) * 2023-02-22 2023-05-23 山东中安电力科技有限公司 Switch cabinet remote control system based on data analysis

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114257575A (en) * 2021-12-16 2022-03-29 平安壹账通云科技(深圳)有限公司 Client data processing method and device, electronic equipment and storage medium
CN114257575B (en) * 2021-12-16 2024-04-16 平安壹账通云科技(深圳)有限公司 Client data processing method and device, electronic equipment and storage medium
CN116149226A (en) * 2023-02-22 2023-05-23 山东中安电力科技有限公司 Switch cabinet remote control system based on data analysis
CN116149226B (en) * 2023-02-22 2023-11-10 山东中安电力科技有限公司 Switch cabinet remote control system based on data analysis

Similar Documents

Publication Publication Date Title
CN110928653B (en) Cross-cluster task execution method and device, computer equipment and storage medium
CN111651285A (en) Batch business data processing method and device, computer equipment and storage medium
CN111641563B (en) Flow self-adaption method and system based on distributed scene
CN111259299A (en) Data processing method, data processing device, computer equipment and storage medium
CN111679968A (en) Interface calling abnormity detection method and device, computer equipment and storage medium
CN112367384B (en) Kafka cluster-based dynamic speed limiting method and device and computer equipment
CN110910249B (en) Data processing method and device, node equipment and storage medium
CN111988240A (en) Data sending method and device, electronic equipment and storage medium
CN114189559A (en) Interface repeat request processing method and system based on Axios
CN111752715A (en) System optimization method, device, equipment and storage medium under large quantity of requests
CN111241594B (en) Method, device, computer equipment and storage medium for signing transaction information
CN113420035A (en) Data processing method, system, device, electronic equipment and computer storage medium
CN111159009A (en) Pressure testing method and device for log service system
WO2020177381A1 (en) Method and device for server testing, computer equipment, and storage medium
US9430338B2 (en) Method and computing device for recording log entries
CN106708439A (en) Node selection and calculation method and system in distributed file system
CN113672870B (en) Fault event probability estimation method, device, computer equipment and storage medium
CN115756309A (en) Battery management equipment parameter storage method, battery management equipment and energy storage system
CN112559248B (en) Preprocessing service recovery method, device, equipment and storage medium
CN113360389A (en) Performance test method, device, equipment and storage medium
CN113961334A (en) Task processing method, device, equipment and storage medium
JP6756680B2 (en) Information processing equipment, information processing methods, and information processing programs
CN112395316A (en) Data query method and device
US8677028B2 (en) Interrupt-based command processing
CN111752786A (en) Data storage method, data summarization method, equipment and medium in pressure test process

Legal Events

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