A printer document cloud conversion method, system, medium and program product
By determining load parameters and using a polling strategy to allocate tasks based on server capabilities, the method addresses inefficiencies in document cloud conversion systems, achieving balanced load distribution and secure processing.
Patent Information
- Application Number
- CN202410958150.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-07-17
AI Technical Summary
Existing document cloud conversion systems fail to efficiently allocate tasks based on the processing capabilities of task execution servers, leading to uneven load distribution, reduced conversion speed, and inefficiency due to server overload or underutilization.
A method that determines load calculation parameters, including CPU processing speed and task sizes, to assign tasks to servers with the lowest load, using a polling strategy and encryption to ensure security and integrity, and monitors load in real-time to adjust task allocation dynamically.
This method improves conversion efficiency by balancing server loads, ensuring secure document processing, and maintaining system stability through dynamic task allocation and real-time monitoring, thereby enhancing overall performance and fault tolerance.
Smart Images

Figure CN118502693B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of document conversion, and in particular, relates to a printer document cloud conversion method, system, medium and program product. Background Art
[0002] With the development of cloud computing and network technology, printer document cloud conversion technology has made significant progress. Many printer manufacturers have integrated cloud printing functions into their products. Users can send documents directly from the cloud to the printer, or upload scanned documents directly to cloud storage services such as Google Drive, Dropbox, OneDrive, etc.
[0003] In the related technology, the distributed scheduling center includes multiple distributed scheduling servers, which are used to schedule tasks according to customer requests; the big data center is used to save customer task request data and perform statistics and analysis on task data; the task execution server cluster is deployed in different regions and operators, which is used to receive task conversion instructions sent by the distributed scheduling server and send task instructions to the content cache servers of the corresponding regions and operators; the distributed reliable coordination system is used to save the status and properties of all servers of the content management system; the content cache server is used to cache customer files, and the content cache server is deployed with a content management client; the content management client is used to execute tasks issued by the task execution server and feedback the task results to the task execution server.
[0004] However, the distributed scheduling center performs task scheduling based on customer requests. However, since the capabilities of each task execution server to process tasks are different, the maximum task processing capacity that can be carried is also different. If the scheduling method does not match the processing capabilities of each task execution server, it will reduce the speed and efficiency of document conversion. Summary of the invention
[0005] The present application provides a printer document cloud conversion method, system, medium and program product, which are used to allocate corresponding conversion tasks according to the processing capacity of each task server, thereby improving the speed and efficiency of document cloud conversion.
[0006] In a first aspect, the present application provides a printer document cloud conversion method, which determines load calculation parameters corresponding to a number of task servers, the load calculation parameters including unit CPU processing speed, waiting single task size, processing single task size and CPU number;
[0007] Input the load calculation parameters into the load calculation function to obtain a number of task server load indicators corresponding to a number of task servers;
[0008] When it is determined that the document to be converted is received, the document to be converted is divided into a plurality of tasks to be converted according to the division rule input by the user;
[0009] According to the load indicators of all task servers, all tasks to be converted are polled and assigned to the corresponding task servers, and the tasks to be converted are first assigned to the task server with the lowest load indicator.
[0010] By adopting the above technical solution, firstly, the method determines the load calculation parameters of several task servers and inputs them into the load calculation function to obtain the corresponding load index, which provides a quantitative basis for realizing the reasonable allocation of tasks. The load calculation parameters comprehensively consider the hardware performance of the server such as the number of CPUs and processing speed, as well as factors such as the size of the task and the processing progress, and can objectively reflect the real-time load status of the server. Secondly, after receiving the document to be converted, the method divides it into multiple subtasks according to the segmentation rules set by the user, which can give full play to the advantages of distributed processing and greatly improve the conversion efficiency through parallel computing. Finally, according to the load index of each server, the system adopts a polling strategy to allocate subtasks to the server with the lowest load, which realizes load balancing while ensuring the conversion performance, avoids the overload of individual servers affecting the overall efficiency, and allocates corresponding conversion tasks according to the processing capacity of each task server, thereby improving the speed and efficiency of document cloud conversion.
[0011] In conjunction with some embodiments of the first aspect, in some embodiments, the load calculation function is:
[0012] In the formula, is the task server load indicator, To wait for a single task size, To handle a single task size, To complete the progress variable, is the number of CPUs, The unit CPU processing speed.
[0013] By adopting the above technical solution, the numerator of the function consists of two parts: the sum of the waiting task sizes and the sum of the size of the tasks being processed multiplied by the completion ratio, which comprehensively reflects the waiting load and real-time processing load of the server, and can accurately estimate the processing time of subsequent tasks. The denominator of the function takes into account the number of server CPUs and the unit processing speed, reflecting the hardware processing capabilities of the server. The load index T actually represents the time required to process a unit of data volume. The smaller the value, the lower the server load and the higher the processing efficiency. Compared with the method of simply counting the number of tasks or the memory occupied, this function provides a more refined and comprehensive load measurement method. Through quantitative calculation, the load is abstracted into a scalar indicator, which is convenient for comparison and task scheduling between different servers, so that cloud resources can be more reasonably and optimally configured.
[0014] In combination with some embodiments of the first aspect, in some embodiments, when it is determined that a document to be converted is received, the document to be converted is divided into a plurality of tasks to be converted according to a segmentation rule input by a user, specifically including:
[0015] Upon confirming that the document to be converted is received, an encryption key is created using a secure random number generator;
[0016] Determine the corresponding encryption algorithm according to the type of document to be converted;
[0017] Use encryption algorithm to encrypt the document to be converted;
[0018] When it is determined that the document to be converted can be unlocked using the encryption key, the document to be converted is divided into a number of tasks to be converted according to the division rule input by the user.
[0019] By adopting the above technical solution, the document conversion process usually involves the user's privacy data, and necessary security protection measures need to be taken. Using a secure random number generator to create an encryption key, selecting a suitable encryption algorithm based on the type of document to be converted, and encrypting the original document before the segmentation task can effectively prevent the leakage of document content. At the same time, the method also introduces an integrity verification mechanism. Only when the encryption key can successfully unlock the encrypted document will the subsequent task segmentation operation be performed. This can avoid the problem of data corruption during the encryption process that leads to subsequent conversion failure, and improve the fault tolerance and robustness of the system. The organic combination of encryption verification and task segmentation constitutes a set of safe and reliable document conversion processes, which ensures the smooth progress of the conversion task while ensuring the security of user data.
[0020] In combination with some embodiments of the first aspect, in some embodiments, after all tasks to be converted are polled and allocated to corresponding task servers according to the load indicators of all task servers, the method further includes:
[0021] Obtain the real-time load of each task server in real time;
[0022] When it is determined that the real-time load of any task server is greater than a preset load threshold, the load exceeding the preset load threshold is transferred to the task server with the lowest real-time load.
[0023] By adopting the above technical solution, the load status of each server is monitored in real time. When the actual load of a server exceeds the preset threshold, the excess load will be transferred to the server with the lowest current load. This dynamic load balancing strategy can maximize the processing power of the system, relieve the pressure of local servers, and prevent overload from causing service quality degradation or crash. At the same time, real-time load monitoring also provides the system with an adaptive capability, which can dynamically adjust task allocation according to load changes, and always maintain a better resource utilization and task execution efficiency.
[0024] In combination with some embodiments of the first aspect, in some embodiments, after all tasks to be converted are polled and allocated to corresponding task servers according to the load indicators of all task servers, the method further includes:
[0025] Create a task execution log, which is used to record the execution time and resource consumption information of each task to be converted;
[0026] Analyze the task execution log to obtain the factors affecting the conversion efficiency;
[0027] According to the influencing factors, the weights of the corresponding parameters of the load calculation function are reduced.
[0028] By adopting the above technical solution, the concept of task execution log is introduced, and by recording information such as the execution time and resource consumption of each subtask, a data basis is provided for system optimization. By analyzing the log data, key factors affecting conversion efficiency can be found, such as the fact that some types of document conversions are particularly time-consuming, or that some tasks occupy a large amount of memory. Based on these findings, different weights can be assigned to the parameters in the load calculation function to reduce the impact of unfavorable factors on conversion efficiency. For example, the CPU speed weight for processing time-consuming tasks can be increased, or the task size weight for memory-consuming tasks can be reduced, so that these factors will be given priority in task scheduling, and too many unfavorable tasks can be avoided from being assigned to the same server as much as possible, so as to balance the load more reasonably.
[0029] In conjunction with some embodiments of the first aspect, in some embodiments, creating a task execution log specifically includes:
[0030] Create a corresponding unique identifier for each task to be converted;
[0031] Record the execution time of each task to be converted;
[0032] Monitor and record resource consumption information, including CPU usage, memory consumption, and network bandwidth usage.
[0033] By adopting the above technical solution, a unique identifier is assigned to each subtask, and a one-to-one correspondence between tasks and logs is established, so that the execution of tasks can be accurately recorded and tracked. This identifier-based task management method improves the controllability and maintainability of the system, and creates conditions for refined performance analysis and optimization. At the same time, comprehensive monitoring and recording are carried out for multiple key indicators of task execution, including execution time, CPU usage, memory consumption, and network bandwidth. These indicators reflect the occupation of system resources by tasks from different angles and are an important basis for evaluating task performance. By collecting and accumulating these indicator data, we can fully grasp the execution characteristics and laws of document conversion tasks, and provide rich and detailed data support for optimizing task scheduling strategies.
[0034] In conjunction with some embodiments of the first aspect, in some embodiments, the task execution log is analyzed to obtain factors affecting the conversion efficiency, specifically including:
[0035] Perform preprocessing operations on the task execution log to obtain a preprocessed task execution log. The preprocessing operations include removing outliers, standardizing data formats, and converting data.
[0036] Propensity score matching technology is used to analyze the preprocessing task execution logs to obtain the influencing factors.
[0037] By adopting the above technical solutions, the original log data is first preprocessed. By removing outliers, standardizing data formats, converting data types, etc., the quality and availability of the data are improved, creating favorable conditions for subsequent analysis and mining. On this basis, the propensity score matching technology is introduced to identify the key factors that have the greatest impact on task performance by analyzing the correlation between task execution indicators. Compared with simple statistical analysis, propensity score matching can deeply explore the intrinsic connection between indicators, discover the laws and trends hidden in massive log data, and has stronger insight and predictiveness. Using this technology, the bottleneck that restricts the efficiency of document conversion can be accurately located, and the load calculation function can be optimized accordingly, such as increasing the weight of CPU-related parameters to alleviate the problem of insufficient CPU resources, or reducing the impact of memory-related parameters to deal with the situation of excessive memory usage.
[0038] In a second aspect, an embodiment of the present application provides a printer document cloud conversion system, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and one or more processors call the computer instructions to enable the printer document cloud conversion system to execute the method described in the first aspect and any possible implementation method of the first aspect.
[0039] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions. When the instructions are executed on a printer document cloud conversion system, the printer document cloud conversion system executes the method described in the first aspect and any possible implementation method of the first aspect.
[0040] In a fourth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a printer document cloud conversion system, the printer document cloud conversion system executes a method described in any possible implementation manner in the first aspect.
[0041] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0042] 1. The present application provides a method for converting printer documents in the cloud. First, the method determines the load calculation parameters of several task servers and inputs them into the load calculation function to obtain the corresponding load index, which provides a quantitative basis for realizing the reasonable allocation of tasks. The load calculation parameters comprehensively consider the hardware performance of the server, such as the number of CPUs and processing speed, as well as factors such as the size of the task and the processing progress, and can objectively reflect the real-time load status of the server. Secondly, after receiving the document to be converted, the method divides it into multiple subtasks according to the segmentation rules set by the user, which can give full play to the advantages of distributed processing and greatly improve the conversion efficiency through parallel computing. Finally, the system uses a polling strategy to allocate subtasks to the server with the lowest load according to the load index of each server, while ensuring the conversion performance. Load balancing is achieved to avoid the overload of individual servers affecting the overall efficiency. The corresponding conversion tasks are allocated according to the processing capacity of each task server, which improves the speed and efficiency of document cloud conversion.
[0043] 2. The present application provides a method for cloud-based conversion of printer documents. The document conversion process usually involves the privacy data of users, and necessary security protection measures need to be taken. By using a secure random number generator to create an encryption key, selecting a suitable encryption algorithm based on the type of document to be converted, and encrypting the original document before the splitting task, the leakage of the document content can be effectively prevented. At the same time, the method also introduces an integrity verification mechanism. Only when the encryption key can successfully unlock the encrypted document will the subsequent task splitting operation be performed. This can avoid the problem of data corruption during the encryption process of the document leading to subsequent conversion failures, and improve the fault tolerance and robustness of the system. The encryption verification and task splitting are organically combined to form a set of safe and reliable document conversion processes, which ensures the smooth progress of the conversion task while ensuring the security of user data.
[0044] 3. The present application provides a printer document cloud conversion method, which introduces the concept of task execution logs, and provides a data basis for system optimization by recording information such as the execution time and resource consumption of each subtask. By analyzing the log data, key factors affecting conversion efficiency can be found, such as certain types of document conversions are particularly time-consuming, or certain tasks occupy a large amount of memory, etc. Based on these findings, different weights can be assigned to the parameters in the load calculation function to reduce the impact of unfavorable factors on conversion efficiency. For example, the CPU speed weight for processing time-consuming tasks can be increased, or the task size weight for memory-consuming tasks can be reduced, so that these factors will be given priority in task scheduling, and too many unfavorable tasks can be avoided as much as possible from being assigned to the same server, so as to balance the load more reasonably. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a flow chart of a printer document cloud conversion method in an embodiment of the present application.
[0046] Figure 2 This is another flow chart of a printer document cloud conversion method in an embodiment of the present application.
[0047] Figure 3 It is a schematic diagram of the physical device structure of a printer document cloud conversion system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations comprising one or more listed items.
[0049] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0050] An application scenario of an embodiment of the present application is described below:
[0051] In today's fast-paced business environment, companies need to frequently process a large number of documents, such as contracts, reports, invoices, etc. Traditional document processing methods are inefficient and difficult to meet the needs of rapid development of enterprises. Take a large multinational manufacturing company as an example. The company has hundreds of branches and partners around the world and needs to process thousands of documents from different regions and languages every day. These documents need to be converted, translated, archived and other processes before they can be effectively used. Faced with such a large amount of document processing tasks, the company decided to introduce a cloud computing-based document conversion system to make full use of cloud storage and computing resources to improve the speed and efficiency of document processing.
[0052] However, in actual application, the company found that the effect of document conversion was not ideal, and the conversion speed and quality could not meet expectations. After analysis, it was found that the problem lies in the task scheduling link. Although the total amount of computing resources in the cloud is sufficient, the processing capabilities of task execution servers in different regions vary greatly. For example, the task execution server located at the headquarters has a higher configuration and a faster processing speed; while the servers in remote areas are limited by network bandwidth and hardware level, and the processing speed is significantly slower. In addition, the conversion complexity of different types of documents is different. For example, text files convert faster, while image files convert slower. This leads to a very uneven load distribution of task execution servers. The queues of busy servers processing tasks are getting longer and longer, while idle servers have no tasks to execute, resulting in low overall conversion efficiency.
[0053] In addition, due to the different distribution of business volume and document types in each region, fixed task scheduling strategies are difficult to adapt to changes in actual conditions. For example, the tasks at the headquarters are mainly text, while the tasks at the branches are mainly pictures and scanned documents. If the scheduling strategy cannot dynamically adapt to this distribution feature, some servers will often be overloaded while other servers will have low utilization rates. When business peaks arrive, this unreasonable task scheduling will seriously affect the timeliness of document conversion, and even lead to problems such as task backlogs and system crashes.
[0054] Faced with these challenges, the company urgently needs an intelligent task scheduling solution that can fully consider the differences in processing capabilities of different task execution servers, and dynamically adjust the task allocation strategy according to the real-time task type distribution and load conditions, so as to achieve load balancing and optimization of conversion efficiency. At the same time, the solution also needs to have strong fault tolerance and self-adjustment capabilities, and be able to respond to abnormal situations such as server failures and network fluctuations in a timely manner to ensure the continuous and stable operation of document conversion services. Only by solving the problem of task scheduling can the advantages of cloud-based document conversion be truly brought into play, helping enterprises to achieve efficient collaboration and intelligent decision-making. In order to solve the above-mentioned technical problems, the present application provides a printer document cloud conversion method, which is used to allocate corresponding conversion tasks according to the processing capabilities of each task server, so as to improve the speed and efficiency of document cloud conversion.
[0055] Combine the following Figure 1 , a printer document cloud conversion method in an embodiment of the present application is described:
[0056] See also Figure 1 , which is a flow chart of a printer document cloud conversion method in an embodiment of the present application.
[0057] S101, determining load calculation parameters corresponding to a number of task servers;
[0058] The system determines the load calculation parameters corresponding to several task servers, including unit CPU processing speed, waiting single task size, processing single task size and number of CPUs. The system first needs to obtain the list of currently available task servers and determine the parameters required for load calculation for each server. These parameters include unit CPU processing speed, waiting single task size, processing single task size and number of CPUs. Among them, unit CPU processing speed indicates the amount of data that each CPU core can process per second, which is an important indicator for measuring the processing capacity of the server. Waiting single task size and processing single task size respectively indicate the amount of data of the tasks that the current server is waiting to be processed and processing, reflecting the immediate load status of the server. The number of CPUs indicates the parallel processing capability of the server. By comprehensively considering these parameters, the system can accurately evaluate the load level and processing potential of each server.
[0059] For example, suppose the system currently has three task servers A, B, and C, whose unit CPU processing speeds are 100MB / s, 120MB / s, and 150MB / s, respectively, and the number of CPUs is 4 cores, 8 cores, and 12 cores, respectively. At the same time, the monitoring data shows that server A currently has 2 waiting tasks, with sizes of 50MB and 80MB, respectively; server B has 1 waiting task, with a size of 60MB; and server C has no waiting tasks. In addition, server A is processing a 100MB task, with a completion rate of 50%; servers B and C each have 1 task being processed, with sizes of 120MB and 90MB, respectively, with completion rates of 30% and 70%, respectively. The system uses these parameter values as load calculation parameters to provide a basis for subsequent load evaluation and task scheduling.
[0060] S102, inputting the load calculation parameters into the load calculation function to obtain a number of task server load indicators corresponding to the number of task servers;
[0061] The system inputs the load calculation parameters into the load calculation function to obtain several task server load indicators corresponding to several task servers. The load calculation function is:
[0062] In the formula, is the task server load indicator, To wait for a single task size, To handle a single task size, To complete the progress variable, is the number of CPUs, The unit CPU processing speed.
[0063] After obtaining the load calculation parameters of each task server, the system substitutes these parameters into the preset load calculation function to calculate the load index of each server. The load index is a quantitative index that comprehensively measures the load status of the server. The smaller the value, the lighter the load, and the larger the value, the heavier the load. The load calculation function used in this embodiment takes into account multiple factors such as the amount of waiting tasks, the amount of tasks being processed, the CPU processing speed and number, and can objectively and accurately reflect the real-time load level of the server.
[0064] In the function, Indicates the size of the i-th waiting task, represents the size of the i-th task being processed, p is the completion progress of the task, n is the number of CPU cores of the server, and v is the processing speed of a single CPU core. The numerator of the function is composed of the sum of two terms, the first term is the sum of the sizes of all waiting tasks, and the second term is the sum of the remaining sizes of all tasks being processed. Therefore, the larger the numerator, the larger the task backlog of the current server and the heavier the load. The denominator is the total processing power of the server, that is, the product of the number of CPU cores and the processing speed of a single core. The larger the denominator, the stronger the processing power of the server and the lighter the load.
[0065] Continuing with the example in the previous step, substituting the load parameters of each server into the function for calculation, we can get the load indicators of servers A, B, and C respectively:
[0066] A: T_A = (50+80+100×(1-50%)) / (4×100) = 0.325
[0067] B: T_B = (60+120×(1-30%)) / (8×120) = 0.177
[0068] C: T_C = (90×(1-70%)) / (12×150) = 0.015
[0069] It can be seen that the load index of server A is the highest and that of C is the lowest, indicating that the current load of A is the heaviest and that of C is the lightest. The system will optimize subsequent task allocation based on these index values.
[0070] S103, when it is determined that the document to be converted is received, creating an encryption key using a secure random number generator;
[0071] When the system receives the document to be converted uploaded by the user, it first needs to encrypt the document to ensure the security and privacy of the document content. In this step, the system uses a secure random number generator to generate an encryption key for subsequent document encryption operations. A secure random number generator is a dedicated hardware or software that can generate high-quality random numbers. It can ensure that the generated random numbers have good randomness, unpredictability, and non-repeatability, thereby effectively preventing the key from being cracked or stolen.
[0072] For example, the system can call the CryptGenRandom function (Windows) or / dev / random device (Linux) provided by the operating system to generate random numbers. These random number sources are generally based on the physical noise of the system hardware or the user's mouse, keyboard and other peripheral inputs, and have extremely high randomness. In addition, the system can also use some mature cryptographically secure pseudo-random number generation algorithms, such as Hash_DRBG, HMAC_DRBG, etc., to generate random keys by performing complex cryptographic transformations on an initial seed value. Assuming that the system uses the AES-256 encryption algorithm, it is necessary to generate a 256-bit (32-byte) random key, which can be expressed as a 32-byte hexadecimal string, such as "0x7a4e2b8f9c1d...". The generated key will be properly stored and used in subsequent encryption and decryption processes.
[0073] S104, determining a corresponding encryption algorithm according to the type of the document to be converted;
[0074] Different types of documents have different data formats and structural characteristics, so an encryption algorithm that is suitable for them is required to achieve the best encryption effect and performance. In this step, the system automatically selects the best encryption algorithm based on the type of document to be converted. Common document types include plain text, Office documents, PDF documents, pictures, audio and video, etc. For these different types, the system presets a series of optimized encryption algorithms.
[0075] For example, for plain text files, you can use classic symmetric encryption algorithms, such as AES and 3DES. These algorithms are safe and efficient and are widely used in text data encryption scenarios. For Office documents, such as Word and Excel, their internal structure is relatively complex. In addition to text content, they also contain format information, metadata, etc. Therefore, you can use encryption solutions designed specifically for Office, such as the built-in password protection function of Microsoft Office, or convert the document into an encrypted ZIP package. For PDF documents, you can use the security processing SDK provided by Adobe, such as Adobe ReaderExtension SDK, which provides rich PDF encryption, permission control, digital signature and other functions. For image files, you can use image encryption algorithms based on block and permutation, such as Arnold permutation algorithm and encryption algorithm based on chaos theory. These algorithms can achieve high-intensity encryption while retaining the visual quality of the image. Similarly, audio and video files can be protected by format encapsulation, encoding parameter encryption, digital watermarking and other methods. The system will dynamically select the optimal encryption algorithm and solution by comprehensively considering factors such as document type, security requirements, and processing efficiency.
[0076] S105, using an encryption algorithm to perform an encryption operation on the document to be converted;
[0077] After determining the encryption algorithm, the system uses the encryption key generated in the previous step to perform the actual encryption operation on the document to be converted. The encryption process is usually divided into the following steps: First, the system reads the content of the document to be encrypted and divides it into several data blocks according to certain rules. For text documents, blocks can be divided according to a fixed length (such as 128 bytes) or according to specific delimiters (such as line breaks, paragraph delimiters, etc.). For binary documents, such as pictures, audio and video, blocks can be divided according to a fixed number of bytes (such as 4KB) or according to data frames, data packets, etc.
[0078] Secondly, the system uses the specified encryption algorithm and key to perform encryption transformation on each data block, converting the plaintext data into ciphertext data. The encryption algorithm performs a series of complex mathematical operations and logical operations on the plaintext data, such as permutation, substitution, XOR, etc., making the ciphertext data difficult to crack and restore even without knowing the key. Taking the AES algorithm as an example, it uses a multi-round iterative encryption process, each round of which includes steps such as byte replacement, row shift, column confusion, and round key addition. Through the combination of these steps, a very high-intensity encryption effect can be achieved.
[0079] Finally, the system assembles all the encrypted ciphertext data blocks in the original order to obtain a complete encrypted document. At the same time, the system will attach the encryption key, algorithm parameters and other information used in the encryption to the encrypted document in a certain format for subsequent decryption and restoration operations.
[0080] For example, suppose a user uploads a Word document named "Business Contract.docx", and the system determines to use the AES-256 algorithm for encryption. First, the system generates a 32-byte random key, such as "0x7a4e2b8f9c1d...", then reads the document content, divides it into 4KB blocks, and obtains several 4KB plaintext data blocks. Next, the system uses the AES algorithm and key to encrypt each data block to obtain the corresponding ciphertext data block. Finally, all ciphertext data blocks are assembled in sequence, and the key and other information are written to the end of the document to obtain the encrypted document "Business Contract_encrypted.docx". In this way, even if the document is intercepted during transmission and storage, the attacker cannot decipher the document content without knowing the key, thereby ensuring the confidentiality of the document.
[0081] S106, when it is determined that the document to be converted can be unlocked using the encryption key, the document to be converted is divided into a plurality of tasks to be converted according to the division rule input by the user;
[0082] Although the security of the encrypted document is guaranteed, it also increases the difficulty of subsequent processing, because any conversion operation requires the document to be decrypted first. In order to avoid unnecessary decryption overhead, the system will first verify whether the encryption key can successfully unlock the document before actually performing the conversion task segmentation. Only when the key is confirmed to be valid will the system continue to perform the subsequent task segmentation steps.
[0083] Specifically, the system uses the stored encryption key and the corresponding decryption algorithm to decrypt and verify the encrypted document. Taking the example of the previous step as an example, the system reads the "Business Contract_encrypted.docx" document, extracts the attached encryption key information, and then uses the AES-256 algorithm to decrypt the document data, restoring the ciphertext data block to a plaintext data block. Then, the system reassembles the plaintext data block into a complete document content according to the original document structure, and compares it with the original "Business Contract.docx" document. If the decrypted content is exactly the same as the original document, it means that the encryption key is valid and the subsequent conversion operation can continue. If the decrypted content is erroneous or inconsistent with the original document, it means that the encryption key is invalid or the document has been damaged. The system will terminate subsequent operations and report an error to the user.
[0084] After verification, the system divides the document to be converted into several independent conversion tasks according to the task segmentation rules entered by the user. The task segmentation rules define how to decompose a large document processing task into multiple small, parallel-executable subtasks to improve conversion efficiency. Common segmentation rules include segmentation based on dimensions such as number of pages, number of words, number of paragraphs, and file size. For example, it can be stipulated that each conversion subtask can process a maximum of 100 pages or 10MB of content.
[0085] Assume that the user specifies to split the document by the number of pages, and each subtask processes a maximum of 50 pages. The system first obtains the total number of pages of the "Business Contract.docx" document, assuming it is 130 pages. According to the splitting rules, the system divides the document into 3 subtasks: the first subtask processes pages 1-50, the second subtask processes pages 51-100, and the third subtask processes pages 101-130. Each subtask contains document content data, page format information, image resources, etc. within the corresponding page range. In this way, a large document conversion task is divided into multiple small, relatively independent conversion subtasks, which can be assigned to different task servers for parallel processing, thereby shortening the total processing time.
[0086] S107 , all tasks to be converted are polled and assigned to corresponding task servers according to the load indicators of all task servers.
[0087] In the previous steps, the system has obtained the real-time load indicators of each task server and divided the documents to be converted into multiple conversion subtasks. In this step, the system comprehensively considers the server load and task characteristics, and assigns the subtasks to suitable servers for execution through the polling scheduling algorithm. Polling scheduling is a basic task scheduling strategy that assigns tasks to different processing nodes in a certain order to achieve balanced distribution of tasks in time and space.
[0088] Specifically, the system first sorts all task servers according to the load index. The smaller the load index (i.e., the lighter the load), the higher the server is ranked. Then, the system selects servers from the sorted server list in a Round-Robin manner, and assigns the current subtask to be assigned to the selected server for processing. The so-called Round-Robin method starts from the head of the list. Continuing with the above example, assuming that the system sorts the server list from small to large in order of load index, the sorted server list is [C, B, A]. At the same time, the "Business Contract.docx" document to be converted has been divided into three subtasks T1, T2, and T3 in the previous step. Starting from the head of the server list, the system assigns execution servers to each subtask in turn:
[0089] T1 is assigned to server C
[0090] T2 is assigned to server B
[0091] T3 is assigned to server A
[0092] It can be seen that the server C with the lightest load gets the task first, and the server A with the heaviest load gets the task last. This can avoid the situation where individual servers are overloaded while other servers are idle.
[0093] After assigning a round of tasks, the system re-evaluates the load of the servers. Due to the assignment of new tasks, the originally lightly loaded servers may become heavily loaded servers. Therefore, the system recalculates the load index of all servers and updates the server ranking according to the new index value. For example, after assigning three tasks T1, T2, and T3, the load index of servers A, B, and C has changed:
[0094] A: T_A = (50+80+100×(1-50%)) / (4×100) = 0.325
[0095] B: T_B = (60+120×(1-30%)+T2_size) / (8×120) = 0.312
[0096] C: T_C = (90×(1-70%)+T1_size) / (12×150) = 0.204
[0097] Among them, T1_size and T2_size represent the data size of tasks T1 and T2 respectively. It can be seen that due to the addition of new tasks, the load index of server B exceeds that of server A, becoming the server with the heaviest load.
[0098] According to the new load index sorting results, the system performs a second round of allocation for the remaining subtasks. Assuming that there are two subtasks T4 and T5 to be allocated, the new allocation results are:
[0099] T4 is assigned to server C
[0100] T5 is assigned to Server A
[0101] In this way, through dynamic load evaluation and polling allocation, the system can continuously optimize task allocation decisions so that the load of all servers is as balanced as possible, thereby improving the execution efficiency of the entire conversion task.
[0102] The above embodiments have the following beneficial effects:
[0103] First, this method determines the load calculation parameters of several task servers and inputs them into the load calculation function to obtain the corresponding load indicators, which provides a quantitative basis for the reasonable allocation of tasks. The load calculation parameters comprehensively consider the hardware performance of the server, such as the number of CPUs and processing speed, as well as factors such as the size and processing progress of the task, and can objectively reflect the real-time load status of the server. Secondly, after receiving the document to be converted, this method divides it into multiple subtasks according to the segmentation rules set by the user, which can give full play to the advantages of distributed processing and greatly improve the conversion efficiency through parallel computing. Finally, according to the load indicators of each server, the system adopts a polling strategy to allocate subtasks to the server with the lowest load, which achieves load balancing while ensuring conversion performance, avoiding the impact of excessive load on individual servers on overall efficiency, and allocating corresponding conversion tasks according to the processing capacity of each task server, thereby improving the speed and efficiency of document cloud conversion.
[0104] The numerator of this function consists of two parts: the sum of the waiting task sizes and the sum of the size of the tasks being processed multiplied by the completion ratio. It comprehensively reflects the waiting load and real-time processing load of the server, and can accurately estimate the processing time of subsequent tasks. The denominator of the function takes into account the number of server CPUs and the unit processing speed, reflecting the hardware processing capabilities of the server. The load index T actually represents the time required to process a unit of data volume. The smaller the value, the lower the server load and the higher the processing efficiency. Compared with the method of simply counting the number of tasks or the memory occupied, this function provides a more refined and comprehensive load measurement method. Through quantitative calculation, the load is abstracted into a scalar indicator, which is convenient for comparison and task scheduling between different servers, so that cloud resources can be more reasonably and optimally configured.
[0105] The document conversion process usually involves the user's private data, and necessary security protection measures need to be taken. Using a secure random number generator to create an encryption key, selecting a suitable encryption algorithm based on the type of document to be converted, and encrypting the original document before the segmentation task can effectively prevent the leakage of document content. At the same time, this method also introduces an integrity verification mechanism. Only when the encryption key can successfully unlock the encrypted document will the subsequent task segmentation operation be performed. This can avoid the problem of data corruption during the encryption process that leads to subsequent conversion failures, and improve the fault tolerance and robustness of the system. The organic combination of encryption verification and task segmentation constitutes a set of safe and reliable document conversion processes, which ensures the smooth progress of conversion tasks while ensuring the security of user data.
[0106] In addition, after obtaining the tasks to be converted of each task server in the above embodiment, further monitoring is still required to make adjustments in real time, specifically: obtaining the real-time load of each task server in real time;
[0107] When it is determined that the real-time load of any task server is greater than a preset load threshold, the load exceeding the preset load threshold is transferred to the task server with the lowest real-time load.
[0108] In the above embodiment, the load status of each server is monitored in real time. When it is found that the actual load of a server exceeds the preset threshold, the excess load will be transferred to the server with the lowest current load. This dynamic load balancing strategy can maximize the use of the system's processing power, relieve the pressure of local servers, and prevent overload from causing service quality degradation or crash. At the same time, real-time load monitoring also provides the system with an adaptive capability, which can dynamically adjust task allocation according to load changes, and always maintain a better resource utilization and task execution efficiency.
[0109] In addition, during the document conversion process, the conversion efficiency may be low. In this case, it is necessary to analyze the factors affecting the conversion rate and then take subsequent measures to optimize the conversion method. Figure 2 , another printer document cloud conversion method in the embodiment of the present application is described:
[0110] See also Figure 2 , is another flow chart of a printer document cloud conversion method in an embodiment of the present application.
[0111] S201, creating a corresponding unique identifier for each task to be converted;
[0112] After the document is divided into multiple tasks to be converted, the system needs to assign a unique identifier to each task for subsequent task management, execution tracking, and result aggregation. The unique identifier can be a globally unique string, usually composed of elements such as task ID, document ID, and timestamp to ensure that there is no duplication across the entire system.
[0113] For example, for the three subtasks T1, T2, and T3 obtained by segmenting the document "Business Contract.docx", the system can assign them the following unique identifiers:
[0114] T1: "contract_20220518_001_p1-50"
[0115] T2: "contract_20220518_001_p51-100"
[0116] T3: "contract_20220518_001_p101-130"
[0117] Among them, "contract" represents the title of the original document, "20220518" is the date when the document was uploaded, "001" is the document serial number automatically generated by the system, and "p1-50" indicates the page range processed by the subtask. Such identifiers are intuitive and clear, and contain key attribute information of the task, making it easier for the system and users to quickly identify and locate the task.
[0118] In implementation, the system usually uses the UUID (Universally Unique Identifier) algorithm to generate a globally unique identifier. The UUID algorithm is based on multiple sources such as timestamps, hardware addresses, random numbers, etc., and generates a 128-bit integer through certain hashing and combination rules, and then converts it into a 36-character string representation. For example, "f81d4fae-7dec-11d0-a765-00a0c91e6bf6" is a typical UUID. It has an extremely low probability of repetition and can be considered unique. The system combines the key attributes of the task with the UUID to form the final task unique identifier, which not only ensures the uniqueness of the identifier, but also takes into account readability and semantics, and is the basis of task management.
[0119] S202, recording the execution time of each task to be converted;
[0120] During the task execution process, the system needs to record the start time and completion time of each task in detail in order to evaluate the task execution efficiency and system performance bottlenecks. By analyzing the task execution time data, we can find room for optimizing task scheduling and resource allocation, and continuously improve the system's task processing capabilities.
[0121] Specifically, when a task is assigned to a server for execution, the system records the time when the task starts executing, generally accurate to milliseconds. For example, subtask T1 is assigned to server C for execution, and its start time may be "2022-05-18 14:30:25.123". Subsequently, the system continues to track the execution progress of the task until the task is completed. When completed, the system records the task end time, such as "2022-05-18 14:35:03.487". From this, it can be calculated that the actual execution time of task T1 on server C is 4 minutes, 38 seconds and 364 milliseconds.
[0122] The system will collect statistics on the time information of all completed and ongoing tasks, and generate a task execution time report, showing detailed data such as waiting time, execution time, and completion time of each task, as well as statistical indicators such as the distribution, average, maximum, and minimum values of task execution time. Through the report, users can intuitively understand the overall execution status of document conversion tasks and the performance level of the system.
[0123] In addition, task execution time data can also be fed back into the task scheduling algorithm as an important reference for server load evaluation. For example, if the average execution time of tasks on a server is significantly longer than that of other servers, it means that the server may have performance problems or be overloaded, and it is necessary to adjust the task allocation strategy and reduce the frequency of task allocation to the server. On the contrary, if the task execution time of a server is very short, its task allocation ratio can be appropriately increased to give full play to its processing capacity. The system continuously optimizes adaptively based on actual execution data, and ultimately achieves a dynamic balance between task scheduling and load distribution.
[0124] S203, monitor and record resource consumption information;
[0125] The system monitors and records resource consumption information, including CPU usage, memory consumption, and network bandwidth usage.
[0126] In addition to task execution time, resource consumption during task execution is also a key basis for evaluating system performance and formulating optimization strategies. The system needs to continuously monitor the underlying resource indicators such as CPU usage, memory consumption, and network bandwidth usage of each server to fully understand the current system resource usage, timely discover and warn resource bottlenecks, and reasonably allocate resources to meet task execution requirements.
[0127] For example, the system collects resource usage data of all servers every 1 second, including CPU usage, memory usage, network uplink and downlink rates, etc. For server C, the collection results at a certain moment may be as follows:
[0128] CPU usage: 65%
[0129] Memory usage: 4.2GB / 8GB
[0130] Network uplink speed: 3.5MB / s
[0131] Network downlink rate: 1.2MB / s
[0132] These data reflect the current resource usage intensity of the server. The CPU usage rate of 65% indicates that the server has sufficient computing resources and can undertake more tasks; the memory usage rate of 52.5% indicates that the memory resources are sufficient; and the network uplink rate is significantly higher than the downlink rate, indicating that the server is mainly responsible for data upload and performs data output tasks.
[0133] The system aggregates the collected resource consumption data into the database and conducts multi-dimensional analysis. On the one hand, it can aggregate data of different time granularities to generate daily / weekly / monthly resource usage reports for servers, characterize the overall trend and rules of resource usage, and facilitate capacity planning and resource optimization; on the other hand, it can associate resource data with task execution data for analysis, explore the correlation between resource usage and task performance, and assist in task scheduling optimization.
[0134] S204, performing a preprocessing operation on the task execution log to obtain a preprocessed task execution log;
[0135] The system performs preprocessing operations on the task execution log to obtain a preprocessed task execution log. The preprocessing operations include removing outliers, standardizing data formats, and converting data.
[0136] In addition to recording the task execution time and resource consumption data, the system also needs to record in detail the various events and key nodes in the task execution process to form a complete task execution log. The task execution log is a faithful record of the system's operating status. By analyzing the task log, you can restore the task execution process, evaluate the conversion quality, and discover and locate abnormal problems.
[0137] The original task execution log usually contains a lot of redundant and noisy data, which is not conducive to subsequent statistical analysis. Therefore, it is necessary to preprocess the log data to remove outliers, standardize the data format, extract key fields, and form a structured and easy-to-analyze log data set.
[0138] The preprocessed log entries are stored in JSON format, and the meaning and type of each field are clearly defined, which greatly improves the data quality and standardization. Outliers are identified and cleaned, such as abnormal timestamps, task status that does not meet the range, etc. In addition, the system also adds some related information of task execution, such as the source document ID corresponding to the task, the user ID that submitted the conversion request, etc., to provide support for subsequent related analysis.
[0139] S205, using propensity score matching technology to analyze the preprocessing task execution log to obtain influencing factors;
[0140] After obtaining the pre-processed structured task execution log, the system needs to identify the key factors that affect task execution efficiency from the massive log data. Since the task execution log contains multi-dimensional attribute information (such as the characteristics of the task itself, server performance parameters, resource usage, etc.), and the impact of different attributes on task efficiency varies, the system uses Propensity Score Matching (PSM) technology to analyze the correlation between each attribute and task efficiency from a statistical perspective and find the most significant influencing factors.
[0141] PSM is a commonly used causal inference and effect evaluation method. It estimates the conditional probability (i.e., propensity score) of the treatment group and the control group under given covariates by constructing a statistical model, and then matches the samples of the treatment group and the control group based on the similarity of the propensity score, thereby eliminating the interference of the covariates and objectively evaluating the treatment effect. PSM is applied to task execution log analysis, that is, through the propensity score matching method, two groups of tasks with significant differences in task execution efficiency are found, and their systematic differences in attribute characteristics are analyzed, and then the direction and intensity of the impact of each attribute on task efficiency are determined.
[0142] S206. According to the influencing factors, reduce the weights of the influencing factors in the corresponding parameters of the load calculation function.
[0143] Through propensity score matching analysis, the system identifies several key factors that significantly affect task execution efficiency, such as the number of document pages, document type, number of converted images, etc. In order to avoid these unfavorable factors as much as possible during task scheduling, the system needs to adjust the original load calculation function to reduce the weights of the parameters corresponding to these influencing factors, thereby reducing their role in load balancing decisions.
[0144] When implementing dynamic weight adjustment, the system combines the real-time feedback data of task execution, periodically triggers propensity score matching analysis, and continuously discovers and quantifies the strength of each influencing factor. Whenever a new significant influencing factor is identified, or the strength of the original influencing factor changes, the system will automatically start the weight adjustment of the load calculation function, generate new load calculation rules, and send them to each server node. The server will use the new load calculation function for task scheduling starting from the next scheduling cycle until it is updated again. Through this feedback adjustment mechanism, the load balancing strategy can be synchronized with the actual task mode and system status to ensure that the scheduling decision is always optimal.
[0145] The above embodiments have the following beneficial effects:
[0146] The concept of task execution log is introduced. By recording the execution time and resource consumption of each subtask, a data basis is provided for system optimization. By analyzing the log data, key factors affecting conversion efficiency can be found, such as the conversion of certain types of documents is particularly time-consuming, or some tasks occupy a large amount of memory. Based on these findings, different weights can be assigned to the parameters in the load calculation function to reduce the impact of unfavorable factors on conversion efficiency. For example, the CPU speed weight for processing time-consuming tasks can be increased, or the task size weight for memory-consuming tasks can be reduced, so that these factors will be given priority in task scheduling, and too many unfavorable tasks can be assigned to the same server as much as possible, so as to balance the load more reasonably.
[0147] A unique identifier is assigned to each subtask, and a one-to-one correspondence between tasks and logs is established, so that the execution of tasks can be accurately recorded and tracked. This identifier-based task management method improves the controllability and maintainability of the system, and creates conditions for refined performance analysis and optimization. At the same time, comprehensive monitoring and recording are carried out for multiple key indicators of task execution, including execution time, CPU usage, memory consumption, and network bandwidth. These indicators reflect the occupation of system resources by tasks from different angles and are an important basis for evaluating task performance. By collecting and accumulating these indicator data, we can fully grasp the execution characteristics and laws of document conversion tasks, providing rich and detailed data support for optimizing task scheduling strategies.
[0148] First, the original log data was preprocessed. By removing outliers, standardizing data formats, converting data types, etc., the quality and availability of the data were improved, creating favorable conditions for subsequent analysis and mining. On this basis, the propensity score matching technology was introduced to identify the key factors that have the greatest impact on task performance by analyzing the correlation between task execution indicators. Compared with simple statistical analysis, propensity score matching can deeply explore the intrinsic connection between indicators and discover the laws and trends hidden in massive log data, with stronger insight and predictiveness. Using this technology, the bottleneck that restricts document conversion efficiency can be accurately located, and the load calculation function can be optimized accordingly, such as increasing the weight of CPU-related parameters to alleviate the problem of insufficient CPU resources, or reducing the impact of memory-related parameters to deal with the situation of excessive memory usage.
[0149] The following describes the system in the embodiment of the present invention from the perspective of hardware processing. Figure 3 , is a schematic diagram of the physical device structure of a printer document cloud conversion system provided in an embodiment of the present application.
[0150] It should be noted that Figure 3 The structure of the system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0151] like Figure 3As shown, the system includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage part 308 to the random access memory (R access memory, R printer document cloud conversion method, system, medium and program product M) 303, such as executing the method in the above embodiment. In the R printer document cloud conversion method, system, medium and program product M303, various programs and data required for system operation are also stored. CPU301, ROM302 and R printer document cloud conversion method, system, medium and program product M303 are connected to each other through a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0152] The following components are connected to the I / O interface 305: an input section 306 including a camera, an infrared sensor, etc.; an output section 307 including a liquid crystal display (LCD) and a speaker, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed so that a computer program read therefrom is installed into the storage section 308 as needed.
[0153] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 309, and / or installed from a removable medium 311. When the computer program is executed by the central processing unit (CPU) 301, various functions defined in the present invention are performed.
[0154] It should be noted that the computer-readable medium shown in the embodiments of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more conductors, portable computer disks, hard disks, random access memories (R), read-only memories (ROM), erasable programmable read-only memories (EPROM), flash memory, optical fibers, portable compact disk read-only memories (Compact Disc-Only Memory, CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In the present invention, computer-readable storage media may be any tangible medium that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof.
[0155] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Among them, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0156] As another aspect, the present invention further provides a computer-readable storage medium, which may be included in the system described in the above embodiment; or may exist independently without being assembled into the system. The above storage medium carries one or more computer programs, and when the above one or more computer programs are executed by a processor of a system, the system implements the method provided in the above embodiment.
[0157] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0158] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.
[0159] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can 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. When the computer program instructions are loaded and 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 transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (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 includes one or more available media integrated. 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 (e.g., a solid-state hard disk), etc.
[0160] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned method embodiments. The aforementioned storage medium includes: ROM or random access memory R printer document cloud conversion method, system, medium and program product M, disk or optical disk and other media that can store program codes.
Claims
1. A printer document cloud conversion method, It is characterized in that include: Determine the load calculation parameters corresponding to the plurality of task servers, wherein the load calculation parameters include unit CPU processing speed, waiting single task size, processing single task size and CPU quantity; The load calculation parameters are input into a load calculation function to obtain a plurality of task server load indicators corresponding to the plurality of task servers. The load calculation function is: In the formula, T is the task server load indicator, and W is i is the size of the waiting single task, the D i is the size of the single task being processed, p is the completion progress variable, n is the number of CPUs, and v is the processing speed of the unit CPU; When it is determined that the document to be converted is received, the document to be converted is divided into a plurality of tasks to be converted according to the division rule input by the user; Allocating the plurality of tasks to be converted to corresponding task servers in round-robin fashion according to the load indicators of all the task servers, wherein the tasks to be converted are first allocated to the task server with the lowest load indicator of the task server; Creating a task execution log, wherein the task execution log is used to record the execution time and resource consumption information of each task to be converted; Analyze the task execution log to obtain factors affecting conversion efficiency; According to the influencing factor, the weight of the influencing factor in the parameter corresponding to the load calculation function is reduced.
2. The method according to claim 1, It is characterized in that In the case of determining that a document to be converted is received, dividing the document to be converted into a plurality of tasks to be converted according to a segmentation rule input by a user, specifically comprising: Upon confirming that the document to be converted is received, an encryption key is created using a secure random number generator; Determining a corresponding encryption algorithm according to the type of the document to be converted; Using the encryption algorithm to perform an encryption operation on the document to be converted; When it is determined that the document to be converted can be unlocked by using the encryption key, the document to be converted is divided into a plurality of tasks to be converted according to a division rule input by a user.
3. The method according to claim 1, It is characterized in that After allocating the plurality of tasks to be converted to corresponding task servers in round-robin fashion according to the load indicators of all the task servers, the method further comprises: Obtaining the real-time load of each of the task servers in real time; When it is determined that the real-time load of any task server is greater than a preset load threshold, the load exceeding the preset load threshold is transferred to the task server with the lowest real-time load.
4. The method according to claim 1, It is characterized in that The creating task execution log specifically includes: Creating a corresponding unique identifier for each of the tasks to be converted; Recording the execution time of each of the tasks to be converted; Monitor and record resource consumption information, including CPU usage, memory consumption, and network bandwidth usage.
5. The method according to claim 1, It is characterized in that The analyzing the task execution log to obtain the factors affecting the conversion efficiency specifically includes: Performing a preprocessing operation on the task execution log to obtain a preprocessed task execution log, wherein the preprocessing operation includes removing outliers, standardizing data formats, and converting data; The preprocessing task execution log is analyzed using propensity score matching technology to obtain the influencing factors.
6. A printer document cloud conversion system, It is characterized in that The system comprises: One or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the system to execute the method as described in any one of claims 1-5.
7. A computer-readable storage medium comprising instructions, It is characterized in that When the instructions are executed on a system, the system is caused to execute the method according to any one of claims 1 to 5.
8. A computer program product, It is characterized in that When the computer program product is run on a system, the system is caused to execute the method according to any one of claims 1 to 5.
