Real-time tracking and accurate charging method for cloud printing information
By capturing and analyzing the data blocks of the printing task in the cloud printing environment, identifying the abnormal entropy value and periodic characteristics, adjusting the execution order of the printing task and calculating dynamic penalties and billing, the problem of malicious resource occupation in cloud printing is solved, and fair resource allocation and commercial sustainability are achieved.
Patent Information
- Application Number
- CN202510387332.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2045-03-31
AI Technical Summary
In a cloud printing environment, users may use the characteristics of the cloud printing system to perform malicious behaviors such as forgery printing tasks, repeatedly submitting blank pages or filling low-entropy data, resulting in increased resource occupation and operational costs. It is difficult to identify and prevent these fraudulent behaviors based on page billing.
By capturing the original data information of the cloud printing task at the network transmission layer, dividing it into independent data blocks, calculating the byte probability distribution and normalized entropy value of each data block, detecting the abnormal entropy value difference to generate an abnormal event notification signal, analyzing the data block content to identify periodic features, adjusting the execution order of the printing task, and calculating the nonlinear punishment billing dynamic penalty coefficient.
Real-time identification and tracking of malicious occupation behavior is realized, ensuring fair distribution of resources, dynamically adjusting billing strategies, malicious users bear higher costs, and improving the stability and commercial sustainability of cloud printing services.
Smart Images

Figure CN119902727A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of printing tracking and billing, and more specifically, to a real-time tracking and accurate billing method for cloud printing information. Background Art
[0002] In a cloud printing environment, users can share efficient printing resources by submitting print tasks remotely. However, this convenience also brings potential risks of abuse. For example, some users may take advantage of the characteristics of the cloud printing system to maliciously occupy the print queue and computing resources by forging print tasks, repeatedly submitting blank pages, and filling with low-entropy data, thereby affecting the printing experience of other normal users and increasing the operating costs of cloud printing service providers. Conventional page-based billing methods are difficult to effectively identify such fraudulent behavior, resulting in some users circumventing normal charging rules by constructing low-information tasks, or maliciously occupying the resources of cloud printing devices by submitting periodic tasks, reducing the resource utilization of cloud printing.
[0003] Therefore, how to identify and track users who print abnormally through data analysis, and establish a targeted intelligent billing strategy based on the resource usage of abnormal users to prevent users from maliciously occupying printing resources and ensure resource fairness in the cloud printing environment is an urgent problem that needs to be solved.
[0004] In order to solve the above problems, a technical solution is now provided. Summary of the invention
[0005] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a real-time tracking and accurate billing method for cloud printing information to solve the problems raised in the above-mentioned background technology.
[0006] To achieve the above object, the present invention provides the following technical solutions: S1: Capture the original printing data information of the printing task to be executed in the cloud printing space at the network transmission layer, and divide it into continuous independent data blocks of equal length; S2: Calculate the byte probability distribution of each data block in the memory buffer and convert it into a normalized entropy value. When it is detected that the entropy value difference of three consecutive pairs of adjacent data blocks is less than a preset abnormal entropy value difference threshold, generate an abnormal event notification signal; S3: adding the data block information corresponding to the abnormal event notification signal to the abnormal printing task processing queue; S4: parsing the data block content in the abnormal printing task processing queue, reorganizing the original data stream in time order with user ID as the analysis dimension, and calculating the data stream similarity coefficient sequence under different offsets in segments; S5: Perform interval consistency check on the local peak value of the similarity coefficient sequence to determine whether the current time sequence data stream segment has periodic characteristics, and mark the user ID and time sequence data stream segment with periodicity as abnormal; S6: Monitor the user IDs and data stream segments that carry abnormal marks, adjust the execution order of the printing tasks based on the number of abnormal marks of the user IDs, and calculate the weight of the abnormal printing time occupied by the user IDs; S7: Calculate the dynamic penalty coefficient of nonlinear penalty billing based on the number of abnormal markings and the time weight occupied by the abnormality, and generate an accurate billing bill for the user in combination with the set basic printing billing rules.
[0007] In a preferred embodiment, in S1, capturing the print original data information of the print task to be executed in the cloud print space at the network transmission layer and dividing it into continuous independent data blocks of equal length specifically includes: The gateway is set to capture the original printing data information of the printing task to be executed in the cloud printing space at the network transmission layer. The original printing data information includes the upload timestamp of the printing task, the submitting user ID and the original printing data stream; The original data stream is divided into continuous independent data blocks of equal length according to the preset fixed length, and the divided data blocks are temporarily stored in the memory buffer and attached with timestamps and user IDs.
[0008] In a preferred embodiment, in S2, the byte probability distribution of each data block in the memory buffer is calculated and converted into a normalized entropy value. When it is detected that the entropy value difference of three consecutive pairs of adjacent data blocks is less than a preset abnormal entropy value difference threshold, generating an abnormal event notification signal specifically includes: Perform byte frequency statistics on each data block in the memory buffer and calculate the probability distribution of each byte value in the data block; Based on the Shannon entropy algorithm, the probability distribution of the byte value is converted into a normalized entropy value, and an entropy value sequence with a user ID is generated and written into a temporary storage area; A preset abnormal entropy value difference threshold is used to compare the entropy values of adjacent data blocks in the memory buffer. When it is detected that the entropy value difference of three consecutive pairs of adjacent data blocks is less than the preset abnormal entropy value difference threshold, an abnormal event notification signal carrying the corresponding data block information is generated.
[0009] In a preferred embodiment, in S3, adding the data block information corresponding to the abnormal event notification signal to the abnormal printing task processing queue specifically includes: Establish an abnormal printing task processing queue. When an abnormal event notification signal is received, the corresponding data block and its upload timestamp and user ID are encapsulated as an encrypted verification task package and added to the abnormal printing task processing queue, and the data block information in the memory buffer is cleared at the same time.
[0010] In a preferred embodiment, in S4, parsing the data block content in the abnormal printing task processing queue, reorganizing the original data stream in time order with the user ID as the analysis dimension, and calculating the data stream similarity coefficient sequence at different offsets in segments specifically include: Parse the data block content of the encrypted verification task package in the abnormal printing task processing queue in real time, reorganize the original data stream according to the timestamp and user ID corresponding to the data block, and form a time-sequential data stream based on the user ID dimension; Based on the initialization sliding window of the preset window length and sliding step parameters, the time-sequential data stream is segmented into the sliding window according to the window length; In the sliding window, the similarity coefficient of the time sequence data stream under different offsets is obtained by autocorrelation calculation, a similarity coefficient sequence with offset marks is generated and the local peak points are identified. The calculation formula of the data stream similarity coefficient is:
[0011] In the formula, is the value of the i-th byte in the window length segment, is the preset window length, k is the preset offset, is the mean of all bytes in the window, is the autocorrelation similarity coefficient when the offset is k, and the value range of k is 1 to n / 2.
[0012] In a preferred embodiment, in S5, the local peak values of the similarity coefficient sequence are checked for interval consistency, and it is determined whether the current time sequence data stream segment has periodic characteristics, and abnormal marking is performed on the user ID and time sequence data stream segment with periodicity, which specifically includes: The local peak points in the similarity coefficient sequence under different offsets are checked for interval consistency. When there is a similarity coefficient sequence under a certain offset whose interval standard deviation between local peak points is less than the set tolerance threshold, it is determined that the time sequence data stream has periodicity, and the data stream segments in the window and the corresponding user IDs are marked as abnormal.
[0013] In a preferred embodiment, in S6, monitoring the user ID and data stream segment with abnormal mark, adjusting the execution order of the printing task based on the number of abnormal marks of the user ID, and calculating the weight of the abnormal occupancy of the user ID printing time specifically include: Set the length of the abnormal printing monitoring cycle, extract all user IDs carrying abnormal marks and corresponding data stream segments in the cycle before the current monitoring cycle, and record them as abnormal user IDs and abnormal data stream segments respectively; Adjust the execution order of the print tasks to be executed in the cloud printing space within the current monitoring period based on the ascending order of the number of times the abnormal user ID is marked abnormally; The total execution time of the printing task corresponding to the abnormal data flow segment corresponding to each abnormal user ID is obtained, and the weight of the abnormal printing time occupancy of all abnormal user IDs is calculated based on the proportion of the total execution time of the printing task to the length of the monitoring cycle.
[0014] In a preferred embodiment, in S7, the dynamic penalty coefficient of nonlinear penalty billing is calculated based on the number of abnormal markings and the time weight occupied by the abnormality, and the accurate billing bill is generated for the user in combination with the set basic printing billing rules, which specifically includes: Set basic printing billing rules, obtain the print tasks to be executed in the cloud printing space, and charge the print tasks submitted by user IDs without abnormal marks according to the basic printing billing rules; For the print tasks submitted by the user ID with an abnormal mark, the dynamic penalty coefficient of nonlinear penalty billing is calculated based on the number of times the user ID is marked with an abnormal mark and the weight of the abnormal printing time. The specific calculation method is:
[0015] In the formula, is the dynamic penalty coefficient for the w-th user ID, , are the number of abnormal markings and the abnormal occupancy weight of printing time corresponding to the w-th user ID, To set growth control parameters; The product of the dynamic penalty coefficient corresponding to each user ID carrying the abnormal mark and the basic printing charging rule is used as the final printing charging of the abnormal user ID to generate a final charging bill.
[0016] The technical effects and advantages of the real-time tracking and accurate billing method of cloud printing information of the present invention are as follows: By capturing and analyzing the entropy distribution of cloud printing data streams in real time, we can accurately identify malicious occupation behaviors such as low-entropy forged tasks and repeated submission of tasks, ensuring the reasonable allocation of printing resources. By tracking the periodic characteristics of data streams based on user IDs, we can detect abnormal submission patterns of specific users and improve the ability to identify long-term fraudulent behaviors. By calculating nonlinear penalty coefficients using abnormal markers and occupied time weights, we can dynamically adjust the billing strategy so that malicious users bear higher printing costs and prevent low-cost resource abuse. At the same time, combined with intelligent scheduling strategies, we can optimize the execution order of printing tasks, reduce queue congestion caused by malicious tasks, and improve the overall throughput efficiency of printing tasks. We achieve fair resource allocation, avoid unfair impact on normal users due to malicious occupation, and improve the stability and commercial sustainability of cloud printing services. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A schematic diagram of a real-time tracking and accurate billing method for cloud printing information according to the present invention. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0019] Example 1 Figure 1 The present invention provides a real-time tracking and accurate billing method for cloud printing information, which includes the following steps: S1: Capture the original printing data information of the printing task to be executed in the cloud printing space at the network transmission layer, and divide it into continuous independent data blocks of equal length; S2: Calculate the byte probability distribution of each data block in the memory buffer and convert it into a normalized entropy value. When it is detected that the entropy value difference of three consecutive pairs of adjacent data blocks is less than a preset abnormal entropy value difference threshold, generate an abnormal event notification signal; S3: adding the data block information corresponding to the abnormal event notification signal to the abnormal printing task processing queue; S4: parsing the data block content in the abnormal printing task processing queue, reorganizing the original data stream in time order with user ID as the analysis dimension, and calculating the data stream similarity coefficient sequence under different offsets in segments; S5: Perform interval consistency check on the local peak value of the similarity coefficient sequence to determine whether the current time sequence data stream segment has periodic characteristics, and mark the user ID and time sequence data stream segment with periodicity as abnormal; S6: Monitor the user IDs and data stream segments that carry abnormal marks, adjust the execution order of the printing tasks based on the number of abnormal marks of the user IDs, and calculate the weight of the abnormal printing time occupied by the user IDs; S7: Calculate the dynamic penalty coefficient of nonlinear penalty billing based on the number of abnormal markings and the time weight occupied by the abnormality, and generate an accurate billing bill for the user in combination with the set basic printing billing rules.
[0020] In S1, the original printing data information of the printing task to be executed in the cloud printing space is captured at the network transmission layer and divided into continuous independent data blocks of equal length.
[0021] In the network transport layer (L4, Transport Layer) of the cloud printing space, a dedicated data capture gateway is set up, and the bypass monitoring mode (Mirroring Mode) is adopted to collect real-time data streams for all printing tasks to be executed. When capturing data, only information related to the printing task is captured, and background data not related to printing is filtered out.
[0022] Record the arrival time of the print task data, the ID (identification information) of the user who submitted the print task, and the data stream. Set a fixed block length (based on the file size limit that the cloud printing resource can handle, the default setting is 16KB) to divide the original data stream to be printed into continuous independent data blocks of equal length. If the data stream length is not an integer multiple of the block length, fill the last block of data with zeros to ensure block alignment.
[0023] The segmented data blocks are temporarily stored in an efficient circular buffer. In addition to storing the original print data, each segmented data block also needs to have additional metadata (user ID and arrival timestamp) to ensure the traceability of the data block.
[0024] In S2, the byte probability distribution of each data block in the memory buffer is calculated and converted into a normalized entropy value. When it is detected that the entropy value difference of three consecutive pairs of adjacent data blocks is less than the preset abnormal entropy value difference threshold, an abnormal event notification signal is generated.
[0025] In the memory buffer, the data block of each print task contains the original print data of length L. The byte frequency distribution of each data block is calculated, that is, the number of times each byte value appears in the data block is counted, and its probability distribution is calculated as follows: First, statistics are performed based on bytes (8-bit). The maximum unsigned integer that can be represented is 255, and the byte expression value range is 0-255.
[0026] The total number of bytes contained in each data block is 1024*L bytes. The byte statistical vector V[j] is defined to represent the number of occurrences of byte value j (0≤j≤255) in the data block. The final probability distribution expression is defined as .
[0027] Based on the Shannon entropy algorithm, the probability distribution of the byte value is converted into a normalized entropy value, and an entropy value sequence with the user ID is generated and written into the temporary storage area. The Shannon entropy calculation formula is:
[0028] In the formula, is the entropy value, is the probability of occurrence of byte j in the data block. When all bytes are evenly distributed, the maximum entropy value is 8. When only a small number of bytes appear, the entropy value is close to 0.
[0029] The ratio of the actual entropy value to 8 is calculated as the normalized entropy value (the value range is 0-1).
[0030] An abnormal entropy value difference threshold is preset, and the entropy values of adjacent data blocks in the memory buffer are compared. When it is detected that the entropy value difference of three consecutive pairs of adjacent data blocks is less than the preset abnormal entropy value difference threshold (flexibly set according to the required recognition accuracy requirements, the default setting is 0.125), the data block is considered to be abnormal repeated suspicious data, and an abnormal event notification signal carrying the corresponding data block information is generated, marking the task as a possible forged printing task.
[0031] In S3, the data block information corresponding to the abnormal event notification signal is added to the abnormal printing task processing queue.
[0032] An abnormal printing task processing queue is established to store and manage the printing task data blocks that are detected to be abnormal. The specific size is set based on the data block length. The maximum capacity of the queue is 1000 data blocks. At the same time, a first-in-first-out structure is adopted to ensure that abnormal tasks are processed in the order of detection.
[0033] When an abnormal event notification signal is received, in order to ensure the integrity and tamper-proofness of data block transmission, SHA-256 hash + RSA digital signature is used for encryption and signing to generate an encrypted verification task package.
[0034] The corresponding data block and its upload timestamp and user ID are encapsulated as an encrypted verification task package and added to the abnormal printing task processing queue. After writing into the abnormal printing task queue, the corresponding data block in the memory buffer is immediately cleared to ensure that memory resources are not occupied by abnormal tasks and cause memory overflow.
[0035] In S4, the data block content in the abnormal printing task processing queue is parsed, the original data stream in time sequence is reorganized with user ID as the analysis dimension, and the data stream similarity coefficient sequence under different offsets is calculated in segments.
[0036] The data block content of the encrypted verification task package in the abnormal printing task processing queue is parsed in real time, and the original data stream is reorganized according to the timestamp and user ID corresponding to the data block to form a time-sequential data stream based on the user ID dimension.
[0037] The sliding window is initialized based on the preset window length and sliding step parameters (set as an integer multiple according to the length of the data block), which are set to 64KB and 16KB respectively by default in this embodiment, and the data stream is loaded into the sliding window in segments according to the window length.
[0038] In the sliding window, the similarity coefficient sequence of the data stream under different offsets is obtained by autocorrelation calculation, and a similarity coefficient sequence with offset marks is generated and the local peak points are identified. The calculation formula of the data stream similarity coefficient is:
[0039] In the formula, is the value of the i-th byte in the window length segment, is the preset window length, k is the preset offset, is the mean of all bytes in the window, is the autocorrelation similarity coefficient when the offset is k, and the value range of k is 1 to n / 2.
[0040] When there is a periodic repetitive pattern in the data stream, its autocorrelation similarity coefficient A significant peak will appear when the offset k is equal to the repetition period length RT, because when k=RT, the data segment After the offset The data patterns at the corresponding positions are exactly the same (or highly similar), resulting in the product term Perform full positive accumulation, There are maxima, and the non-periodic random data cancels out the positive and negative product terms. Significantly smaller or close to 0.
[0041] In S5, the local peak values of the similarity coefficient sequence are checked for interval consistency to determine whether the current time sequence data stream segment has periodic characteristics, and the user IDs and time sequence data stream segments with periodicity are marked as abnormal.
[0042] An interval consistency check is performed on the local peak points in the similarity coefficient sequence under different offsets. When there is a similarity coefficient sequence under a certain offset, and the standard deviation of the interval between the local peak points is less than the set tolerance threshold (specifically set according to the average peak size, and required not to exceed 5% of the true value of the standard deviation of the interval between the local peak points), it is determined that the original data stream has periodicity, and the data stream segments in the window and the corresponding user IDs are marked as abnormal.
[0043] In S6, the user IDs and data stream segments carrying abnormal marks are monitored, the execution order of the printing tasks is adjusted based on the number of abnormal marks of the user IDs, and the weight of the abnormal printing time occupied by the user IDs is calculated.
[0044] Define an abnormal printing monitoring cycle , used to periodically monitor abnormal behavior of printing tasks. Monitoring cycle length It can be configured according to system load and business needs, such as 5 minutes, 10 minutes or 1 hour, and all printing tasks are continuously monitored. Each task is monitored by the anomaly detection mechanism during execution.
[0045] When a new monitoring cycle begins, From the anomaly detection records in the , all user IDs marked as abnormal and their corresponding data stream segments are extracted and recorded as the abnormal user ID set and the abnormal data stream segment set respectively.
[0046] All abnormal user IDs are sorted in ascending order according to the number of abnormal mark times (i.e., those with fewer abnormal times are executed first, and those with more abnormal times are ranked last), and the execution order of pending printing tasks in the cloud printing space within the current monitoring cycle is adjusted to prevent abnormal users from continuously occupying cloud printing resources.
[0047] Get the total execution time of the printing task corresponding to the abnormal data flow segment corresponding to each abnormal user ID. Based on the proportion of the total execution time of the printing task to the monitoring cycle length, calculate the weight of the abnormal printing time occupied by all abnormal user IDs. The abnormal occupancy weight is calculated as follows:
[0048] In the formula, The abnormal user ID is The abnormal occupancy weight corresponding to the user is, is the execution time of the printing task corresponding to the lth abnormal data flow segment, m is the mth monitoring cycle, where When cross-cycle execution occurs, ensure The integrity is not truncated.
[0049] In S7, a dynamic penalty coefficient of nonlinear penalty billing is calculated based on the number of abnormal markings and the time weight occupied by the abnormality, and an accurate billing bill is generated for the user in combination with the set basic printing billing rules.
[0050] Set up basic printing billing rules , obtain the print tasks to be executed in the cloud printing space, and charge the print tasks submitted by the user ID without abnormal mark according to the basic printing billing rules.
[0051] For the print tasks submitted by the user ID with an abnormal mark, the dynamic penalty coefficient of nonlinear penalty billing is calculated based on the number of times the user ID is marked with an abnormal mark and the weight of the abnormal printing time. The specific calculation method is:
[0052] In the formula, is the dynamic penalty coefficient for the w-th user ID, , are the number of abnormal markings and the abnormal occupancy weight of printing time corresponding to the w-th user ID, To set the growth control parameter, set it according to the required billing penalty intensity. The default setting is 0.5. The maximum value of item control is 1, that is, when cross-cycle task execution occurs, only the weight within this single monitoring cycle is counted.
[0053] The product of the dynamic penalty coefficient corresponding to each user ID with an abnormal mark and the basic printing billing rule is used as the final printing billing of the abnormal user ID to generate the final billing bill. For example, when the number of abnormal marks of user w is 2 and the abnormal weight of its printing time is 0.75, the penalty coefficient calculation result is , then user w needs to pay times the base rate.
[0054] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.
[0055] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or may be transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium may be a solid-state hard disk.
[0056] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0057] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0058] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0059] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, and may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0060] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0061] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0062] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0063] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A real-time tracking and accurate billing method for cloud printing information, characterized in that: The steps include: S1: Capture the original printing data information of the printing task to be executed in the cloud printing space at the network transmission layer, and divide it into continuous independent data blocks of equal length; S2: Calculate the byte probability distribution of each data block in the memory buffer and convert it into a normalized entropy value. When it is detected that the entropy value difference of three consecutive pairs of adjacent data blocks is less than a preset abnormal entropy value difference threshold, generate an abnormal event notification signal; S3: adding the data block information corresponding to the abnormal event notification signal to the abnormal printing task processing queue; S4: parsing the data block content in the abnormal printing task processing queue, reorganizing the original data stream in time order with user ID as the analysis dimension, and calculating the data stream similarity coefficient sequence under different offsets in segments; S5: Perform interval consistency check on the local peak value of the similarity coefficient sequence to determine whether the current time sequence data stream segment has periodic characteristics, and mark the user ID and time sequence data stream segment with periodicity as abnormal; S6: Monitor the user IDs and data stream segments that carry abnormal marks, adjust the execution order of the printing tasks based on the number of abnormal marks of the user IDs, and calculate the weight of the abnormal printing time occupied by the user IDs; S7: Calculate the dynamic penalty coefficient of nonlinear penalty billing based on the number of abnormal markings and the time weight occupied by the abnormality, and generate an accurate billing bill for the user in combination with the set basic printing billing rules.
2. A method for real-time tracking and accurate billing of cloud printing information according to claim 1, characterized in that: In S1, the original printing data information of the printing task to be executed in the cloud printing space is captured at the network transmission layer and divided into continuous independent data blocks of equal length, specifically including: The gateway is set to capture the original printing data information of the printing task to be executed in the cloud printing space at the network transmission layer. The original printing data information includes the upload timestamp of the printing task, the submitting user ID and the original printing data stream; The original data stream is divided into continuous independent data blocks of equal length according to the preset fixed length, and the divided data blocks are temporarily stored in the memory buffer and attached with timestamps and user IDs.
3. A method for real-time tracking and accurate billing of cloud printing information according to claim 2, characterized in that: In S2, the byte probability distribution of each data block in the memory buffer is calculated and converted into a normalized entropy value. When it is detected that the entropy value difference of three consecutive pairs of adjacent data blocks is less than the preset abnormal entropy value difference threshold, an abnormal event notification signal is generated, specifically including: Perform byte frequency statistics on each data block in the memory buffer and calculate the probability distribution of each byte value appearing in the data block; Based on the Shannon entropy algorithm, the probability distribution of the byte value is converted into a normalized entropy value, and an entropy value sequence with a user ID is generated and written into a temporary storage area; A preset abnormal entropy value difference threshold is used to compare the entropy values of adjacent data blocks in the memory buffer. When it is detected that the entropy value difference of three consecutive pairs of adjacent data blocks is less than the preset abnormal entropy value difference threshold, an abnormal event notification signal carrying the corresponding data block information is generated.
4. A method for real-time tracking and accurate billing of cloud printing information according to claim 3, characterized in that: In S3, adding the data block information corresponding to the abnormal event notification signal to the abnormal printing task processing queue specifically includes: Establish an abnormal printing task processing queue. When an abnormal event notification signal is received, the corresponding data block and its upload timestamp and user ID are encapsulated as an encrypted verification task package and added to the abnormal printing task processing queue, and the data block information in the memory buffer is cleared at the same time.
5. A method for real-time tracking and accurate billing of cloud printing information according to claim 4, characterized in that: In S4, the data block content in the abnormal printing task processing queue is parsed, the original data stream in time sequence is reorganized with the user ID as the analysis dimension, and the data stream similarity coefficient sequence under different offsets is calculated in segments, specifically including: Parse the data block content of the encrypted verification task package in the abnormal printing task processing queue in real time, reorganize the original data stream according to the timestamp and user ID corresponding to the data block, and form a time-sequential data stream based on the user ID dimension; Based on the initialization sliding window of the preset window length and sliding step parameters, the time-sequential data stream is segmented into the sliding window according to the window length; In the sliding window, the similarity coefficient of the time sequence data stream under different offsets is obtained by autocorrelation calculation, a similarity coefficient sequence with offset marks is generated and the local peak points are identified. The calculation formula of the data stream similarity coefficient is: In the formula, is the value of the i-th byte in the window length segment, is the preset window length, k is the preset offset, is the mean of all bytes in the window, is the autocorrelation similarity coefficient when the offset is k, and the value range of k is 1 to n / 2.
6. A method for real-time tracking and accurate billing of cloud printing information according to claim 5, characterized in that: In S5, the local peak values of the similarity coefficient sequence are checked for interval consistency to determine whether the current time sequence data stream segment has periodic characteristics, and abnormal marking is performed on the user ID and time sequence data stream segment with periodicity. Specifically, the following steps are performed: The local peak points in the similarity coefficient sequence under different offsets are checked for interval consistency. When there is a similarity coefficient sequence under a certain offset whose interval standard deviation between local peak points is less than the set tolerance threshold, it is determined that the time sequence data stream has periodicity, and the data stream segments in the window and the corresponding user IDs are marked as abnormal.
7. A method for real-time tracking and accurate billing of cloud printing information according to claim 6, characterized in that: In S6, the user IDs and data stream segments carrying abnormal marks are monitored, and the execution order of the printing tasks is adjusted based on the number of abnormal marks of the user IDs. At the same time, the weight of the abnormal printing time occupied by the user ID is calculated, which specifically includes: Set the length of the abnormal printing monitoring cycle, extract all user IDs carrying abnormal marks and corresponding data stream segments in the cycle before the current monitoring cycle, and record them as abnormal user IDs and abnormal data stream segments respectively; Adjust the execution order of the print tasks to be executed in the cloud printing space within the current monitoring period based on the ascending order of the number of times the abnormal user ID is marked abnormally; The total execution time of the printing task corresponding to the abnormal data flow segment corresponding to each abnormal user ID is obtained, and the weight of the abnormal printing time occupancy of all abnormal user IDs is calculated based on the proportion of the total execution time of the printing task to the length of the monitoring cycle.
8. A method for real-time tracking and accurate billing of cloud printing information according to claim 7, characterized in that: In S7, the dynamic penalty coefficient of nonlinear penalty billing is calculated based on the number of abnormal markings and the time weight occupied by the abnormality, and an accurate billing bill is generated for the user in combination with the set basic printing billing rules, including: Set basic printing billing rules, obtain the print tasks to be executed in the cloud printing space, and charge the print tasks submitted by user IDs without abnormal marks according to the basic printing billing rules; For the print tasks submitted by the user ID with an abnormal mark, the dynamic penalty coefficient of nonlinear penalty billing is calculated based on the number of times the user ID is marked with an abnormal mark and the weight of the abnormal printing time. The specific calculation method is: In the formula, is the dynamic penalty coefficient for the w-th user ID, , are the number of abnormal markings and the abnormal occupancy weight of printing time corresponding to the w-th user ID, To set growth control parameters; The product of the dynamic penalty coefficient corresponding to each user ID carrying the abnormal mark and the basic printing charging rule is used as the final printing charging of the abnormal user ID to generate a final charging bill.
Citation Information
Patent Citations
Apparatus and method for oil production forecasting
CA3123281A1
Abnormal flow monitoring method, device and equipment based on statistics and storage medium
CN110830450A
Method for dynamically screening aperiodic anomalies
CN112862019A
Security risk evaluation system for cloud printing data transmission
CN119311234A
Self-adaptive authority management method of intelligent seal management system
CN119358840A