CN114884897A - User behavior data reporting method and device - Google Patents

User behavior data reporting method and device Download PDF

Info

Publication number
CN114884897A
CN114884897A CN202210404828.8A CN202210404828A CN114884897A CN 114884897 A CN114884897 A CN 114884897A CN 202210404828 A CN202210404828 A CN 202210404828A CN 114884897 A CN114884897 A CN 114884897A
Authority
CN
China
Prior art keywords
user behavior
behavior data
target
transmission
data
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
CN202210404828.8A
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.)
Bank of China Financial Technology Co Ltd
Original Assignee
Bank of China Financial Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Financial Technology Co Ltd filed Critical Bank of China Financial Technology Co Ltd
Priority to CN202210404828.8A priority Critical patent/CN114884897A/en
Publication of CN114884897A publication Critical patent/CN114884897A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/26Flow control; Congestion control using explicit feedback to the source, e.g. choke packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/25Flow control; Congestion control with rate being modified by the source upon detecting a change of network conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/27Evaluation or update of window size, e.g. using information derived from acknowledged [ACK] packets

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Alarm Systems (AREA)

Abstract

The application provides a method and a device for reporting user behavior data, wherein the method comprises the following steps: acquiring transmission information of a target array, wherein the target array comprises a plurality of pieces of user behavior data, and the transmission information comprises transmission failure times corresponding to the target user behavior data in the plurality of pieces of user behavior data and generation time of the target user behavior data; and determining user behavior data to be sent from the target array under the condition that the transmission information meets a transmission condition, and sending the user behavior data to be sent to a target server, wherein the transmission condition is determined based on historical user behavior data reporting conditions, so that the success rate of data reporting is improved, and data loss is avoided.

Description

User behavior data reporting method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for reporting user behavior data.
Background
The speed of generating the user behavior data by the client is high, and the data volume is large. The user has limited income brought by reporting the data, but the user resources such as flow and bandwidth are consumed, and the user experience is influenced and the problem of data loss is easily caused when the reporting fails, so that the reporting of the data needs to be optimized, and the integrity and timeliness of the data can be better ensured only by continuously improving the user experience.
The conventional method comprises the steps of sending a hypertext Transfer Protocol (HTTP) request once every time a record is generated, and reporting data to a server, wherein a large number of HTTP requests are additionally added in the method, so that user resources are wasted, and the use function experience is influenced; the other mode is to temporarily store data at the client side and automatically report the data after a certain amount of data is reached.
Disclosure of Invention
The application provides a user behavior data reporting method and device, which are used for solving the defects that the success rate of data reporting is low and data loss is easily caused in the prior art and improving the success rate of data reporting.
The application provides a method for reporting user behavior data, which comprises the following steps:
acquiring transmission information of a target array, wherein the target array comprises a plurality of pieces of user behavior data, and the transmission information comprises transmission failure times corresponding to the target user behavior data in the plurality of pieces of user behavior data and generation time of the target user behavior data;
and determining user behavior data to be sent from the target array under the condition that the transmission information meets a transmission condition, and sending the user behavior data to be sent to a target server, wherein the transmission condition is determined based on historical user behavior data reporting conditions.
According to the method for reporting user behavior data provided by the application, the transmission condition includes at least one of the following:
the transmission failure times corresponding to the target user behavior data are greater than the target times;
the generation time of the target user behavior data is earlier than the target time;
a transmit time window is reached, the transmit time window being determined based on network conditions with the target server and the amount of user behavior data in the target array.
According to the method for reporting user behavior data provided by the application, the method further comprises the following steps:
acquiring a return value sent by the target server, and analyzing the return value to obtain a data sending result;
updating at least one of the target array, the transmission information of the target array, and the transmission condition based on the data transmission result.
According to the method for reporting user behavior data provided by the present application, the updating at least one of the target array, the transmission information of the target array, and the transmission condition based on the data transmission result includes:
deleting the user behavior data which are successfully transmitted in the target array under the condition that the data transmission result is successful; alternatively, the first and second electrodes may be,
and under the condition that the data sending result is failure, executing an operation of adding one to the transmission failure times corresponding to the target user behavior data, and updating the transmission time window in the transmission condition based on the transmission failure times.
According to the method for reporting user behavior data provided by the application, the method further comprises the following steps:
under the condition that first user behavior data are obtained, determining the generation time of the first user behavior data;
and storing the first user behavior data and the generation time of the first user behavior data to the target array according to the sequence from the initial storage position of the target array to the back.
According to the method for reporting user behavior data provided by the application, the method further comprises the following steps:
acquiring a return value sent by the target server, and analyzing the return value to obtain a time difference between the target server and a client;
the determining a generation time of the first user behavior data comprises:
determining a generation time of the first user behavior data based on the time difference and a time of a client.
According to the method for reporting user behavior data provided by the application, the determining the user behavior data to be sent from the target array comprises the following steps:
determining whether the amount of user behavior data in the target array exceeds a first target amount;
determining that the user behavior data to be sent are a second target number of pieces of user behavior data from the initial storage position of the target array under the condition that the number of the user behavior data in the target array exceeds the first target number; alternatively, the first and second electrodes may be,
and under the condition that the quantity of the user behavior data in the target array does not exceed the first target quantity, determining the user behavior data to be sent as all the user behavior data in the target array.
The present application further provides a device for reporting user behavior data, including:
the device comprises a judging module, a judging module and a judging module, wherein the judging module is used for acquiring transmission information of a target array, the target array comprises a plurality of pieces of user behavior data, and the transmission information comprises transmission failure times corresponding to the target user behavior data in the plurality of pieces of user behavior data and generation time of the target user behavior data;
and the data reporting module is used for determining user behavior data to be sent from the target array and sending the user behavior data to be sent to a target server under the condition that the transmission information meets a transmission condition, wherein the transmission condition is determined based on historical user behavior data reporting conditions.
The application also provides an electronic device, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein when the processor executes the program, the processor realizes any one of the above user behavior data reporting methods.
The present application further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements any of the above methods for reporting user behavior data.
The present application further provides a computer program product, including a computer program, where when executed by a processor, the computer program implements any one of the above methods for reporting user behavior data.
According to the user behavior data reporting method and device, the transmission information of the target array is obtained, the target array comprises a plurality of pieces of user behavior data, the transmission information comprises the transmission failure times corresponding to the target user behavior data in the plurality of pieces of user behavior data and the generation time of the target user behavior data, whether the transmission information meets the transmission condition or not is determined, the user behavior data to be sent in the target array are sent to the target server side under the condition that the transmission information meets the transmission condition, and the transmission condition is determined based on the historical data reporting condition, so that the success rate of data reporting can be improved, and data loss is avoided.
Drawings
In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings needed for the description of the embodiments or the prior art will be 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 based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a user behavior data reporting method provided in the present application;
FIG. 2 is a schematic flow chart illustrating dynamic adjustment of a transmission policy based on historical data according to the present application;
FIG. 3 is a schematic flow chart of storing user behavior data into a target array according to the present application;
fig. 4 is a schematic structural diagram of a device for reporting user behavior data according to the present application;
fig. 5 is a schematic structural diagram of an electronic device provided in the present application.
Detailed Description
To make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be clearly and completely described below with reference to the drawings in 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 any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a schematic flow chart of a method for reporting user behavior data according to an embodiment of the present application, where the method for reporting user behavior data shown in fig. 1 includes: step 100 and step 101.
The method for reporting the user behavior data provided by the embodiment of the application is applied to a client.
Step 100, obtaining transmission information of a target array.
The target array comprises a plurality of pieces of user behavior data, and the transmission information comprises transmission failure times corresponding to target user behavior data in the plurality of pieces of user behavior data and generation time of the target user behavior data.
It will be appreciated that the target array is used to temporarily store user behavior data.
It should be noted that the user behavior data includes data of behavior records generated by the user at the client, such as interface browsing, interface staying, button clicking, file uploading and downloading, and the like.
Alternatively, the target user behavior data may be a piece of user behavior data that is generated earliest in time in the target array. And if the user behavior data in the target array is arranged according to the generated time sequence, and the newly generated user behavior data is added to the tail end of the array, the target user behavior data is the first record of the head end of the target array.
The client temporarily stores the acquired data in a local target array of the client, and determines whether transmission failure times corresponding to target user behavior data, generation time of the target user behavior data and other transmission information meet transmission conditions, wherein the transmission conditions are determined based on historical data reporting conditions.
Step 101, determining user behavior data to be sent from the target array and sending the user behavior data to be sent to a target server under the condition that the transmission information meets a transmission condition, wherein the transmission condition is determined based on historical user behavior data reporting conditions.
In some embodiments, the transmission condition includes at least one of:
the transmission failure times corresponding to the target user behavior data are greater than the target times;
the generation time of the target user behavior data is earlier than the target time;
a transmit time window is reached, the transmit time window is determined based on network conditions with the target server and the amount of user behavior data in the target array.
Determining whether the transmission information satisfies a transmission condition, including:
and determining whether the transmission information meets the transmission condition based on at least one of whether the transmission failure times corresponding to the target user behavior data are larger than the target times, whether the generation time of the target user behavior data is earlier than the target time and whether the transmission failure times reach a transmission time window.
Optionally, the client periodically detects the network condition and network connectivity with the target server. When used in a traffic state, the transmission time window can be dynamically extended and can be set to be 1.5 times of the current transmission time window; when the network state is poor, the data volume sent each time is reduced, the sending number is set to be 2/3 times of the current sending number, and the sending time is prolonged.
When the network is detected to be idle, the sending frequency is increased, and when the corresponding network is busy, the sending frequency is reduced. The network busy status can be obtained by listening to all HTTP requests of the client.
In addition, when the amount of data temporarily stored in the client is excessive, the transmission frequency and the amount of data to be transmitted each time are increased.
Optionally, the determination of the transmission condition includes three aspects:
first, the number of transmission failures.
The transmission failure times corresponding to the target user behavior data represent the times that the target user behavior data has been attempted to be transmitted but the transmission has failed. The reason for the failure may be that the network is in a bad condition or the bearer capability of the server is limited.
It should be noted that, if the target user behavior data is successfully transmitted, the target user behavior data is deleted from the target array, at this time, the first piece of data in the target array is the user behavior data with the longest generation time in the unsent data, that is, after the transmission is successful, the target user behavior data is updated, the number of transmission failures corresponding to the updated target user behavior data is zero, and the number of transmission failures is gradually accumulated after the transmission is failed.
And determining whether the transmission failure times corresponding to the target user behavior data are greater than the target times, and considering that the transmission condition is met under the condition that the transmission failure times corresponding to the target user behavior data are greater than the target times.
And secondly, recording the generation time.
Because the user behavior data in the target array are arranged according to the time sequence and are transmitted from front to back according to the time sequence, the first user behavior data in the target array is unsent data with the earliest time in the target array.
And determining whether the generation time of the target user behavior data is earlier than the target time, and considering that the transmission condition is met under the condition that the generation time of the target user behavior data is earlier than the target time.
And thirdly, a fixed transmission time window.
It will be appreciated that data transmission will occur at regular intervals, i.e. reaching a fixed transmission time window is considered to satisfy the transmission condition.
It should be noted that, when the first aspect and the second aspect satisfy the transmission condition, the reporting of the user behavior data is immediately triggered even if the fixed transmission time window is not reached. In case the first and second aspects do not meet the transmission conditions, the reporting of the user behavior data is triggered only when a fixed transmission time window is reached. That is, the lowest priority is the reporting condition that reaches a fixed transmission time window.
In some embodiments, the determining, from the target array, user behavior data to be sent includes:
determining whether the amount of user behavior data in the target array exceeds a first target amount;
determining that the user behavior data to be sent are a second target number of pieces of user behavior data from the initial storage position of the target array under the condition that the number of the user behavior data in the target array exceeds the first target number; alternatively, the first and second liquid crystal display panels may be,
and under the condition that the quantity of the user behavior data in the target array does not exceed the first target quantity, determining the user behavior data to be sent as all the user behavior data in the target array.
It should be noted that the first target number and the second target number may be the same or different.
And after receiving the reporting instruction, the data reporting module of the client acquires the data volume which can be sent in the rule module, judges whether the temporarily stored data volume is smaller than a set value, reports all the data if the temporarily stored data volume is smaller than the set value, and intercepts a fixed amount of data if the temporarily stored data volume is smaller than the set value, and reports the intercepted data to the target server.
According to the user behavior data reporting method, the transmission information of the target array is obtained, the target array comprises a plurality of pieces of user behavior data, the transmission information comprises the transmission failure times corresponding to the target user behavior data in the plurality of pieces of user behavior data and the generation time of the target user behavior data, whether the transmission information meets the transmission condition or not is determined, the user behavior data to be sent in the target array are sent to the target server side under the condition that the transmission information meets the transmission condition, and the transmission condition is determined based on the historical data reporting condition, so that the success rate of data reporting can be improved, and data loss is avoided.
In some embodiments, the method for reporting user behavior data further includes dynamically adjusting the transmission policy based on the historical data, as shown in fig. 2, where the step of dynamically adjusting the transmission policy based on the historical data includes step 200 and step 201.
And 200, acquiring a return value sent by the target server, and analyzing the return value to obtain a data sending result.
It should be noted that the return value sent by the target server is determined based on the received message sent by the client, and includes a success in sending or a failure in sending.
Step 201, updating at least one of the target array, the transmission information of the target array and the transmission condition based on the data transmission result.
It should be noted that the return value represents the sending condition of the historical data, and the transmission policy may be dynamically adjusted based on the sending condition of the historical data.
The transmission policy may include the timing of the transmission and the amount of data transmitted.
Alternatively, two cases of returning values are explained below:
and firstly, deleting the user behavior data which is successfully transmitted in the target array under the condition that the data transmission result is successful.
And deleting the successfully sent data, thereby reducing the occupation of memory resources. In addition, deleting data after a successful transmission can prevent loss of data.
And secondly, under the condition that the data sending result is failure, executing an operation of adding one to the transmission failure times corresponding to the target user behavior data, and updating the transmission time window in the transmission condition based on the transmission failure times.
Optionally, updating the transmission time window in the transmission condition based on the transmission failure times may include:
and under the condition that the transmission failure times are less than or equal to the target times, adjusting the size of the transmission time window according to the transmission failure times so as to prolong the time length from the current time to the next time of trying to send.
After each recording report fails, the next trial time can be prolonged, and the specific prolonging rule is as follows: the delivery time window is increased 1/2 for each increment failure of 1.
For example, the current time window for delivery is every 10 minutes, and after a new failure, the time window for delivery is adjusted to be every 15 minutes.
In case the transmission failure times are equal to or greater than the target times, the transmission time window remains unchanged, e.g. 2 times the original transmission time window.
It will be appreciated that in the event that the number of failed attempts exceeds the target number, the delivery time window is no longer extended but remains at a fixed duration.
According to the user behavior data reporting method, the return value sent by the target server is obtained, the return value is analyzed, the data sending result is obtained, the transmission strategy is dynamically adjusted by updating at least one of the target array, the transmission information of the target array and the transmission condition based on the data sending result, the client data reporting behavior is dynamically adjusted through information such as network state, service capacity and historical data reporting conditions, idle network resources are fully utilized, the service capacity of the server is mined, the reporting success rate is improved, and the client resources are saved.
In some embodiments, the method for reporting user behavior data further includes: storing the user behavior data into the target array, as shown in fig. 3, includes steps 300 and 301.
Step 300, under the condition that the first user behavior data is obtained, determining the generation time of the first user behavior data.
The first user behavior data may be any piece of user behavior data.
Optionally, a generation time field T is added to each piece of user behavior data in the target array, and is used to identify the generation time of each record and to make a determination whether a sending condition is met during data sending.
The generation time defaults to client time, but since there is a time difference between the client and server times, in some embodiments, this difference may be eliminated to keep time consistent with the server time.
Optionally, the generation time of the first user behavior data is determined based on a time difference between the target server and the client and the generation time of the first user behavior data at the client.
In some embodiments, the method for reporting user behavior data further includes:
and acquiring a return value sent by the target server, and analyzing the return value to obtain the time difference between the target server and the client.
Determining a generation time of the first user behavior data, comprising:
determining a generation time of the first user behavior data based on the time difference and a time of a client.
It is understood that the generation time of the acquired first user behavior data may be adjusted according to a time difference between the client and the server.
For example, the time of the client is 1 second earlier than that between the servers, the generation time of the first user behavior data acquired by the client is 10 o 'clock, 10 minutes and 10 seconds, and the generation time of the first user behavior data is adjusted to 10 o' clock, 10 minutes and 9 seconds.
Step 301, storing the first user behavior data and the generation time of the first user behavior data to the target array according to a sequence from a starting storage position of the target array to a later position.
It can be understood that the starting storage location of the target array is the head end of the target array, and the storage is sequentially performed from the starting storage location of the target array to the back end of the target array, that is, the newly generated user behavior data is added to the tail end of the array.
The user behavior data in the target array are arranged according to the time sequence of generation, and the position of the user behavior data with the earlier generation time is closer to the head end of the target array. That is, in the process of transmitting the user behavior data in the destination array, the data at the head end of the destination array is preferentially transmitted.
According to the user behavior data reporting method, the transmission information of the target array is obtained, the target array comprises a plurality of pieces of user behavior data, the transmission information comprises the transmission failure times corresponding to the target user behavior data in the plurality of pieces of user behavior data and the generation time of the target user behavior data, whether the transmission information meets the transmission condition or not is determined, the user behavior data to be sent in the target array are sent to the target server side under the condition that the transmission information meets the transmission condition, and the transmission condition is determined based on the historical data reporting condition, so that the success rate of data reporting can be improved, and data loss is avoided.
The following describes the user behavior data reporting apparatus provided in the present application, and the user behavior data reporting apparatus described below and the user behavior data reporting method described above may be referred to in a corresponding manner.
As shown in fig. 4, the apparatus 400 for reporting user behavior data includes: a judging module 410 and a data reporting module 420.
A determining module 410, configured to obtain transmission information of a target array, where the target array includes a plurality of pieces of user behavior data, and the transmission information includes transmission failure times corresponding to target user behavior data in the plurality of pieces of user behavior data and generation time of the target user behavior data;
a data reporting module 420, configured to determine user behavior data to be sent from the target array and send the user behavior data to be sent to a target server when the transmission information meets a transmission condition, where the transmission condition is determined based on a historical user behavior data reporting condition.
Optionally, the transmission condition includes at least one of:
the transmission failure times corresponding to the target user behavior data are greater than the target times;
the generation time of the target user behavior data is earlier than the target time;
a transmit time window is reached, the transmit time window being determined based on network conditions with the target server and the amount of user behavior data in the target array.
Optionally, the device for reporting user behavior data further comprises,
an analysis module to: acquiring a return value sent by the target server, and analyzing the return value to obtain a data sending result;
and the rule adjusting module is used for updating at least one of the target array, the transmission information of the target array and the transmission condition based on the data sending result.
Optionally, the updating at least one of the target array, the transmission information of the target array, and the transmission condition based on the data transmission result includes:
deleting the user behavior data which are successfully transmitted in the target array under the condition that the data transmission result is successful; alternatively, the first and second electrodes may be,
and under the condition that the data sending result is failure, executing an operation of adding one to the transmission failure times corresponding to the target user behavior data, and updating the transmission time window in the transmission condition based on the transmission failure times.
Optionally, the apparatus for reporting user behavior data further includes a data storage module, configured to:
under the condition that first user behavior data are obtained, determining the generation time of the first user behavior data;
and storing the first user behavior data and the generation time of the first user behavior data to the target array according to the sequence from the initial storage position of the target array to the back.
Optionally, the parsing module is further configured to: acquiring a return value sent by the target server, and analyzing the return value to obtain a time difference between the target server and a client;
the determining a generation time of the first user behavior data comprises:
determining a generation time of the first user behavior data based on the time difference and a time of a client.
Optionally, the determining, from the target array, user behavior data to be sent includes:
determining whether the amount of user behavior data in the target array exceeds a first target amount;
determining that the user behavior data to be sent are a second target number of pieces of user behavior data from the initial storage position of the target array under the condition that the number of the user behavior data in the target array exceeds the first target number; alternatively, the first and second electrodes may be,
and under the condition that the quantity of the user behavior data in the target array does not exceed the first target quantity, determining the user behavior data to be sent as all the user behavior data in the target array.
It should be noted that the apparatus provided in the embodiment of the present application can implement all the method steps implemented by the method embodiment and achieve the same technical effect, and detailed descriptions of the same parts and beneficial effects as the method embodiment in this embodiment are omitted here.
Fig. 5 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 5: a processor (processor)510, a communication Interface (Communications Interface)520, a memory (memory)530 and a communication bus 540, wherein the processor 510, the communication Interface 520 and the memory 530 communicate with each other via the communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform a user behavior data reporting method, comprising:
acquiring transmission information of a target array, wherein the target array comprises a plurality of pieces of user behavior data, and the transmission information comprises transmission failure times corresponding to the target user behavior data in the plurality of pieces of user behavior data and generation time of the target user behavior data;
and determining user behavior data to be sent from the target array under the condition that the transmission information meets a transmission condition, and sending the user behavior data to be sent to a target server, wherein the transmission condition is determined based on historical user behavior data reporting conditions.
Furthermore, the logic instructions in the memory 530 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present application further provides a computer program product, where the computer program product includes a computer program, where the computer program is stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, a computer is capable of executing the method for reporting user behavior data provided by the foregoing methods, where the method includes:
acquiring transmission information of a target array, wherein the target array comprises a plurality of pieces of user behavior data, and the transmission information comprises transmission failure times corresponding to the target user behavior data in the plurality of pieces of user behavior data and generation time of the target user behavior data;
and determining user behavior data to be sent from the target array under the condition that the transmission information meets a transmission condition, and sending the user behavior data to be sent to a target server, wherein the transmission condition is determined based on historical user behavior data reporting conditions.
In another aspect, the present application further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented to perform the method for reporting user behavior data provided by the foregoing methods when executed by a processor, and the method includes:
acquiring transmission information of a target array, wherein the target array comprises a plurality of pieces of user behavior data, and the transmission information comprises transmission failure times corresponding to the target user behavior data in the plurality of pieces of user behavior data and generation time of the target user behavior data;
and determining user behavior data to be sent from the target array and sending the user behavior data to be sent to a target server under the condition that the transmission information meets transmission conditions, wherein the transmission conditions are determined based on historical user behavior data reporting conditions.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (11)

1. A user behavior data reporting method is characterized by comprising the following steps:
acquiring transmission information of a target array, wherein the target array comprises a plurality of pieces of user behavior data, and the transmission information comprises transmission failure times corresponding to the target user behavior data in the plurality of pieces of user behavior data and generation time of the target user behavior data;
and determining user behavior data to be sent from the target array under the condition that the transmission information meets a transmission condition, and sending the user behavior data to be sent to a target server, wherein the transmission condition is determined based on historical user behavior data reporting conditions.
2. The method of claim 1, wherein the transmission condition comprises at least one of the following:
the transmission failure times corresponding to the target user behavior data are greater than the target times;
the generation time of the target user behavior data is earlier than the target time;
a transmit time window is reached, the transmit time window is determined based on network conditions with the target server and the amount of user behavior data in the target array.
3. The method of claim 1, further comprising:
acquiring a return value sent by the target server, and analyzing the return value to obtain a data sending result;
updating at least one of the target array, the transmission information of the target array, and the transmission condition based on the data transmission result.
4. The method according to claim 3, wherein the updating at least one of the target array, the transmission information of the target array, and the transmission condition based on the data transmission result includes:
deleting the user behavior data which are successfully transmitted in the target array under the condition that the data transmission result is successful; alternatively, the first and second electrodes may be,
and under the condition that the data sending result is failure, executing an operation of adding one to the transmission failure times corresponding to the target user behavior data, and updating the transmission time window in the transmission condition based on the transmission failure times.
5. The method of claim 1, further comprising:
under the condition that first user behavior data are obtained, determining the generation time of the first user behavior data;
and storing the first user behavior data and the generation time of the first user behavior data to the target array according to the sequence from the initial storage position of the target array to the back.
6. The method of claim 5, further comprising:
acquiring a return value sent by the target server, and analyzing the return value to obtain a time difference between the target server and a client;
the determining a generation time of the first user behavior data comprises:
determining a generation time of the first user behavior data based on the time difference and a time of a client.
7. The method of claim 1, wherein the determining the user behavior data to be sent from the target array comprises:
determining whether the amount of user behavior data in the target array exceeds a first target amount;
determining that the user behavior data to be sent are a second target number of pieces of user behavior data from the initial storage position of the target array under the condition that the number of the user behavior data in the target array exceeds the first target number; alternatively, the first and second electrodes may be,
and under the condition that the quantity of the user behavior data in the target array does not exceed the first target quantity, determining the user behavior data to be sent as all the user behavior data in the target array.
8. A device for reporting user behavior data is characterized by comprising:
the device comprises a judging module, a judging module and a judging module, wherein the judging module is used for acquiring transmission information of a target array, the target array comprises a plurality of pieces of user behavior data, and the transmission information comprises transmission failure times corresponding to the target user behavior data in the plurality of pieces of user behavior data and generation time of the target user behavior data;
and the data reporting module is used for determining user behavior data to be sent from the target array and sending the user behavior data to be sent to a target server under the condition that the transmission information meets a transmission condition, wherein the transmission condition is determined based on historical user behavior data reporting conditions.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for reporting user behavior data according to any one of claims 1 to 7.
10. A non-transitory computer readable storage medium, having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for reporting user behavior data according to any one of claims 1 to 7.
11. A computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the method for reporting user behavior data according to any of claims 1 to 7.
CN202210404828.8A 2022-04-18 2022-04-18 User behavior data reporting method and device Pending CN114884897A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210404828.8A CN114884897A (en) 2022-04-18 2022-04-18 User behavior data reporting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210404828.8A CN114884897A (en) 2022-04-18 2022-04-18 User behavior data reporting method and device

Publications (1)

Publication Number Publication Date
CN114884897A true CN114884897A (en) 2022-08-09

Family

ID=82669241

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210404828.8A Pending CN114884897A (en) 2022-04-18 2022-04-18 User behavior data reporting method and device

Country Status (1)

Country Link
CN (1) CN114884897A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109714415A (en) * 2018-12-26 2019-05-03 北京小米移动软件有限公司 Data processing method and device
CN111865674A (en) * 2020-07-09 2020-10-30 腾讯科技(深圳)有限公司 Log processing method, device and medium
CN113687974A (en) * 2021-10-22 2021-11-23 飞狐信息技术(天津)有限公司 Client log processing method and device and computer equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109714415A (en) * 2018-12-26 2019-05-03 北京小米移动软件有限公司 Data processing method and device
CN111865674A (en) * 2020-07-09 2020-10-30 腾讯科技(深圳)有限公司 Log processing method, device and medium
CN113687974A (en) * 2021-10-22 2021-11-23 飞狐信息技术(天津)有限公司 Client log processing method and device and computer equipment

Similar Documents

Publication Publication Date Title
CN110290217B (en) Data request processing method and device, storage medium and electronic device
US20200267070A1 (en) Systems and methods for setting a rate limit for a computing device
US7437428B1 (en) System and method for transferring data over a network
EP2461536A1 (en) Method and system for data synchronization in content delivery network
MXPA05000901A (en) Mailbox pooling pre-empting criteria.
CN107872396B (en) Communication method with timeout control, processing device, terminal device and server
CN111865674A (en) Log processing method, device and medium
CN112073128A (en) Communication equipment performance test method and device
CN111092934A (en) Method for updating client routing and storage medium
CN115002238A (en) Traffic transmission method, device, equipment and storage medium
CN111404842B (en) Data transmission method, device and computer storage medium
EP1256212B1 (en) System and method for transferring data over a network
CN114884897A (en) User behavior data reporting method and device
US20170223136A1 (en) Any Web Page Reporting and Capture
JP2006080615A (en) Method and apparatus for managing network, and program
CN111371675B (en) Intelligent addressing method, device, equipment and storage medium thereof
CN109688085B (en) Transmission control protocol proxy method, storage medium and server
CN112612848A (en) Method, device and system for real-time data synchronization, electronic equipment and storage medium
CN110784518A (en) Static resource acquisition method and device
CN111371573B (en) Message interaction method and device
CN111586438A (en) Method, device and system for processing service data
CN115208799B (en) Heartbeat management method, device and storage medium
CN116828022B (en) Method, device, equipment and medium for managing connection relation with server
CN111641698B (en) Data statistical method, system, equipment and storage medium
CN115767614B (en) Communication system, method and device

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