Queue-based data statistics method and device, computer equipment and storage medium
A data statistics and queue technology, applied in the field of data processing, can solve problems such as low accuracy of data statistics and data changes, and achieve the effect of improving accuracy and avoiding omissions
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
specific Embodiment approach
[0054] see image 3 , image 3 A specific implementation manner of step S2 is shown, and this embodiment includes:
[0055] S21: Encapsulating the order data to be counted into corresponding Java objects.
[0056] S22: Judging whether the queue is full, and obtaining a first judging result.
[0057] Further, if the first judgment result is that the queue is full, then wait for the elements of the queue to be dequeued, or wake up the queue of another thread, and then put the Java object into the tail of the queue.
[0058] S23: If the first judgment result is that the queue is not full, then by accessing the variable variable, put the Java objects into the tail of the queue sequentially.
[0059] Specifically, the volatile variable refers to volatile, which is used as an instruction keyword to ensure that this instruction will not be omitted due to compiler optimization, and requires direct reading of the value each time. In this embodiment, since the counter count of the F...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


