Method, device and apparatus for processing print information, and computer storage medium
By acquiring and statistically analyzing print information in real time, generating initial and matching statistical files, and optimizing the code based on actual proportion information, the problems of low memory usage and low accuracy in print information processing are solved, achieving efficient and timely processing.
Patent Information
- Application Number
- CN202210716449.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-22
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2042-06-22
AI Technical Summary
In existing technologies, the printing information processing methods result in excessive memory resource consumption, system lag, and low processing accuracy due to failure to copy printing information in a timely manner.
By acquiring the printing information generated by the product in real time, performing statistics using a preset statistical script, generating an initial statistical file, and optimizing the product code based on the matching statistical file and actual ratio information.
It improves the efficiency and accuracy of print information processing, avoids system lag and untimely processing issues, simplifies the search process, and ensures timely resolution of problems.
Smart Images

Figure CN115202595B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a method, device, equipment and computer storage medium for processing printed information. Background Art
[0002] With the rapid advancement of project development and debugging technology, product software developers are striving to accurately process print information while also minimizing its memory usage. This demands higher standards for the accuracy and efficiency of print information processing. Traditionally, engineers in the corresponding modules process the corresponding print information, copying all print information after it appears on the screen. This approach to print information processing has significant drawbacks, including excessive memory usage, which can cause system freezes or reboots, and delays in processing due to a failure to copy print information in a timely manner. This inability to copy print information in a timely manner results in low print information processing accuracy. Summary of the Invention
[0003] The main purpose of the present invention is to provide a method, device, equipment and computer storage medium for processing printed information, aiming to solve the technical problem of how to improve the accuracy of analyzing printed information processing problems.
[0004] To achieve the above object, the present invention provides a method for processing printing information, the method comprising the following steps:
[0005] Acquire the printing information generated by the product in real time, and perform statistics on the printing information according to a preset statistical script to obtain an initial statistical file;
[0006] Obtaining a matching statistical file according to the initial statistical file, and determining actual proportion information according to the matching statistical file;
[0007] The product code is optimized according to the matching statistics file and the actual ratio information.
[0008] Optionally, the step of performing statistics on the printing information according to a preset statistical script to obtain an initial statistical file includes:
[0009] determining image features corresponding to the print information, and counting the print information according to the image features to obtain a statistical information set;
[0010] A statistical requirement threshold in a preset statistical script is determined, and an initial statistical file is determined according to the statistical requirement threshold and the statistical information set.
[0011] Optionally, the step of determining an initial statistical file according to the statistical requirement threshold and the statistical information set includes:
[0012] Determining statistical values corresponding to all printing information in the statistical information set, and sorting the printing information according to the magnitude relationship of the statistical values to obtain a sorted statistical information set;
[0013] Extraction direction information of the sorted statistical information set is determined, and printing information in the sorted statistical information set is extracted according to the statistical requirement threshold and the extraction direction information to obtain an initial statistical file.
[0014] Optionally, the step of extracting the printing information in the sorted statistical information set according to the statistical requirement threshold and the extraction direction information to obtain an initial statistical file includes:
[0015] Extracting printing information from the sorted statistical information set in sequence according to the extraction direction information and storing the extracted printing information into a preset preliminary statistical file as the extracted printing information, counting the extracted printing information to obtain a count value, and detecting whether the count value matches the statistical requirement threshold;
[0016] If the count value matches the statistical requirement threshold, the quasi-initial statistical file stored in the extracted print information is used as the initial statistical file;
[0017] If the count value does not match the statistical requirement threshold, the step of extracting the printing information in the sorted statistical information set in sequence according to the extraction direction information and storing the information in a preset quasi-initial statistical file is performed.
[0018] Optionally, the step of performing matching according to the initial statistical file to obtain a matching statistical file includes:
[0019] Determine the process numbers corresponding to all the extracted print information in the initial statistical file, and write each process number into the corresponding extracted print information to obtain the intended matching print information;
[0020] Determine the process name corresponding to the process number in the to-be-matched printing information, write the process name into the to-be-matched printing information to obtain matching printing information, and aggregate each matching printing information to obtain a matching statistics file.
[0021] Optionally, the step of determining actual ratio information according to the matching statistics file includes:
[0022] Determine the statistical values corresponding to all matching print information in the matching statistical file, and take the sum of all the statistical values as the overall statistical value;
[0023] The quotient between each of the statistical values and the overall statistical value is used as actual ratio information.
[0024] Optionally, the step of optimizing the product code according to the matching statistics file and the actual ratio information includes:
[0025] Determining maximum proportion information in the actual proportion information, determining target printing information corresponding to the maximum proportion information in the matching statistics file, and optimizing the code of the product according to the target printing information;
[0026] The maximum scale information is deleted from the actual scale information, and the step of determining the maximum scale information in the actual scale information is performed according to the actual scale information from which the maximum scale information is deleted, until a generated end instruction is received.
[0027] In addition, to achieve the above-mentioned purpose, the present invention further provides a printing information processing device, comprising:
[0028] An acquisition module is used to obtain the printing information generated by the product in real time, and to perform statistics on the printing information according to a preset statistical script to obtain an initial statistical file;
[0029] a first processing module, configured to obtain a matching statistical file according to the initial statistical file, and determine actual proportion information according to the matching statistical file;
[0030] The second processing module is used to optimize the code of the product according to the matching statistical file and the actual ratio information.
[0031] In addition, to achieve the above-mentioned purpose, the present invention also provides a printing information processing device, including: a memory, a processor, and a printing information processing program stored on the memory and capable of running on the processor, wherein the printing information processing program implements the steps of the printing information processing method when executed by the processor.
[0032] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer storage medium for processing printing information, wherein the computer storage medium stores a printing information processing program, and when the printing information processing program is executed by a processor, the steps of the printing information processing method described above are implemented.
[0033] In the process of developing and debugging the product code, the present invention obtains the print information generated by each debugging of the product in real time when a screen refresh log appears, and performs statistics on the print information according to a preset statistical script to obtain an initial statistical file. The initial statistical file is a file that performs simple quantitative statistics and sorting of the print information. Then, a matching statistical file is obtained based on the initial statistical file, and the actual proportion information of each print information in the total print information is determined based on the matching statistical file. Finally, the product code is optimized based on the matching statistical file and the actual proportion information, thereby achieving the purpose of quickly solving the problem. By performing real-time statistical aggregation on the irregular print information generated during the development and debugging process to obtain a matching statistical file, and performing optimization processing based on the proportion of the print information, the problem of being unable to handle the product problem in a timely manner due to untimely copying of the print information and the complicated steps of searching for the print information in the prior art is avoided. This screen self-checking processing method not only simplifies the search steps by processing the print information, thereby improving the efficiency of the print information processing, but also can process all the print information in a timely manner, thereby improving the accuracy of analyzing the print information processing problem. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a schematic diagram of the structure of a device for processing printing information in a hardware operating environment involved in an embodiment of the present invention;
[0035] Figure 2 1. A flow chart of a first embodiment of a method for processing printed information according to the present invention;
[0036] Figure 3 A schematic diagram of a device module for processing printed information according to the present invention;
[0037] Figure 4 This is a flow chart of the technical solution of the method for processing printed information of the present invention.
[0038] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0039] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0040] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of a device for processing printing information in a hardware operating environment according to an embodiment of the present invention.
[0041] like Figure 1As shown, the printing information processing device may include: a processor 0003, such as a central processing unit (CPU), a communication bus 0001, an acquisition interface 0002, a processing interface 0004, and a memory 0005. Among them, the communication bus 0001 is used to realize the connection and communication between these components. The acquisition interface 0002 may include an information acquisition device and an acquisition unit such as a computer. Optionally, the acquisition interface 0002 may also include a standard wired interface and a wireless interface. The processing interface 0004 may optionally include a standard wired interface and a wireless interface. The memory 0005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk storage. The memory 0005 may also be a storage device independent of the aforementioned processor 0003.
[0042] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the printing information processing device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0043] like Figure 1 As shown, the memory 0005 as a storage medium may include an operating system, an acquisition interface module, a processing interface module, and a print information processing program.
[0044] exist Figure 1 In the printing information processing device shown, the communication bus 0001 is mainly used to realize the connection communication between components; the acquisition interface 0002 is mainly used to connect to the background server and communicate data with the background server; the processing interface 0004 is mainly used to connect to the deployment end (user end) and communicate data with the deployment end; the processor 0003 and the memory 0005 in the printing information processing device of the present invention can be set in the printing information processing device, and the printing information processing device calls the printing information processing program stored in the memory 0005 through the processor 0003, and executes the printing information processing method provided by the embodiment of the present invention.
[0045] Based on the above hardware structure, an embodiment of a method for processing printing information of the present invention is proposed.
[0046] The embodiment of the present invention provides a method for processing printing information, referring to Figure 2 , Figure 2 FIG. 1 is a flow chart of a first embodiment of a method for processing printing information according to the present invention.
[0047] In this embodiment, the method for processing printing information includes:
[0048] Step S10, obtaining the printing information generated by the product in real time, and performing statistics on the printing information according to a preset statistical script to obtain an initial statistical file;
[0049] In this embodiment, during the traditional project development and debugging process, necessary logs can help developers understand the running status of the software and analyze and solve problems when anomalies occur. However, if high-frequency log printing interferes with the analysis of problems by engineers in other modules, a large number of screen-swiping logs will often be found, especially in the stress testing phase. These logs can easily lead to excessive CPU memory resources being occupied, causing serious problems such as system freezes or restarts, and failure to respond to user operations in a timely manner, which greatly affects the user experience. And if the log is not copied in time when a problem occurs, the log when the problem occurs will be overwritten by these screen-swiping logs, seriously affecting the efficiency of problem solving. The printing information generated by the product is obtained in real time, and the printing information is counted according to the preset statistical script to obtain the initial statistical file. The printing information refers to the printing information corresponding to each project, the preset statistical script refers to the script for counting the printing information, and the initial statistical file refers to the file for counting the printing information. Among them, the step of counting the printing information according to the preset statistical script to obtain the initial statistical file includes:
[0050] Step C11, determining image features corresponding to the print information, and counting the print information according to the image features to obtain a statistical information set;
[0051] In this embodiment, the Android platform's logcat (command-line tool) print information: Each line contains the following information: TAG, process ID, and log information. The image features corresponding to the print information can be determined, and the print information (TAG) can be counted based on the image features to obtain a statistical information set. The image features refer to the log information in the logcat print information. Based on the log information, the print information generated by all products is counted separately to obtain a statistical information set. The statistical information set is a collection of counts obtained by counting different print information.
[0052] Step C12: determining a statistical requirement threshold in a preset statistical script, and determining an initial statistical file according to the statistical requirement threshold and the statistical information set.
[0053] After obtaining the statistical information set, the statistical requirement threshold in the preset statistical script will be determined, and the initial statistical file will be determined based on the statistical requirement threshold and the statistical information set. The statistical requirement threshold refers to the number of types of printing information required by the user, which can be customized according to the user. In this application, it can be 50. By counting and counting all printing information, it is possible to avoid the phenomenon of printing information occupying too many resources and not being able to be copied and saved in time. This can not only avoid duplicate printing information occupying resources, but also ensure that the printing information is counted in time to ensure that no information is missed.
[0054] Step S20, obtaining a matching statistical file according to the initial statistical file, and determining actual proportion information according to the matching statistical file;
[0055] In this embodiment, after obtaining the initial statistical file, the printing information within the file is matched to obtain a matching statistical file. The matching statistical file refers to the file obtained by matching the process number and process name of the initial statistical file. The step of matching the initial statistical file to obtain the matching statistical file includes:
[0056] Step C21, determining the process numbers corresponding to all the extracted print information in the initial statistical file, and writing each process number into the corresponding extracted print information to obtain the intended matching print information;
[0057] In this embodiment, since each line of print information contains the following information: tag, process number, and log information, the print information tags are counted based on the image feature log information to obtain a statistical information set, ultimately generating an initial statistical file. The process numbers corresponding to all print information in the initial statistical file are then determined, and all process numbers are written to the corresponding extracted print information to obtain the intended matching print information. The process number refers to the identifier code running in the program system, and the intended matching print refers to the print information whose extracted print information matches the process number. Matching the process number allows for accurate definition of the print information, rather than relying solely on image features, and also provides a convenient basis for subsequent matching of process names.
[0058] Step C22: determining the process name corresponding to the process number in the to-be-matched printing information, and writing the process name into the to-be-matched printing information to obtain matching printing information, and summarizing each matching printing information to obtain a matching statistics file.
[0059] Since each process has a unique PID process number and process name, the corresponding process name can be found based on the PID process number. The corresponding process name can be determined based on the process number in the intended matching print information. By determining the process name corresponding to the process number in the intended matching print information and writing the process name into the intended matching print information, the matching print information is obtained. All the matching print information is summarized to obtain a matching statistics file, where the process name refers to the full name of a process. By determining the process number and process name in the initial statistics file, the corresponding process of the extracted print information can be determined. When the extracted print information is subsequently processed, the process can be quickly processed based on the process name, rather than judging the corresponding process based on the experience of relevant personnel after obtaining the print information, and then dealing with the problem corresponding to the process. This can avoid misjudgments caused by human subjective factors and improve processing efficiency.
[0060] After obtaining the matching statistics file, the actual proportion information corresponding to each matching print information in the matching statistics file is determined, and the matching print information can be processed based on the actual proportion information. This not only improves the processing efficiency of print information, but also adheres to the principle of prioritizing problem solving.
[0061] Step S30: Optimizing the product code according to the matching statistics file and the actual ratio information.
[0062] In this embodiment, after obtaining the matching statistics file and the actual ratio information, the product code will be optimized based on the matching statistics file and the actual ratio information. Optimization refers to solving corresponding problems based on the printing information. The step of optimizing the product code based on the matching statistics file and the actual ratio information includes:
[0063] Step C31, determining maximum ratio information in the actual ratio information, determining target printing information corresponding to the maximum ratio information in the matching statistics file, and optimizing the product code according to the target printing information;
[0064] In this embodiment, generally speaking, the print information that appears more often is the target print information corresponding to the maximum proportion information, and should be processed first to solve the biggest problem. The control determines the maximum proportion information in the actual proportion information, and determines the target print information corresponding to the maximum proportion information in the matching statistical file. Finally, the product problem will be optimized based on the target print information, where the maximum proportion information refers to the numerical value with the largest proportion value and the corresponding related information, and the target print information refers to the print information corresponding to the maximum proportion information. After obtaining the target print information, the process name in the target print information will be determined, and the corresponding target process will be determined based on the process name. The problems generated will be solved in the target process to optimize the product. For example, if the process name corresponding to the target print information a is b, the corresponding target process O will be determined based on the process name b, and the target process O will be given to the corresponding module personnel for corresponding module optimization to solve the problem.
[0065] Step C32: deleting the maximum scale information from the actual scale information, and executing the step of determining the maximum scale information in the actual scale information according to the actual scale information from which the maximum scale information is deleted, until a generated end instruction is received.
[0066] In this embodiment, after processing the target printing information corresponding to the maximum ratio information, the maximum ratio information is deleted from the actual ratio information, thereby obtaining new actual ratio information. Based on this new actual ratio information, the step of determining the maximum ratio information in the actual ratio information is performed. Specifically, when the ratios in the actual ratio information are D%>E%>F%>G%, the target printing information corresponding to D%-E%-F%-G% is processed in sequence. After processing the target printing information corresponding to D%, D% is deleted or masked. This process terminates the matching of the statistical file and the actual ratio information until all ratio values are processed or a generated end instruction is received. This ensures that the printing information is processed expedited according to its importance and sent to the corresponding module processing personnel with accuracy and timeliness.
[0067] Furthermore, this embodiment also provides a flow chart of a method for processing printed information. Figure 4In this embodiment, due to the phenomenon of screen-swiping logs during stress testing and subjective testing in the prior art, a large number of logs are generated, resulting in the need to process a large amount of data during processing, which in turn causes low efficiency in data processing. The corresponding problem may also be missed due to untimely copying of data. Therefore, the technical solution of the present application is proposed, and the script of the present application is executed during stress testing and subjective testing. The number of occurrences of all generated TAGs (print information) is counted and sorted according to size. At the same time, the process number corresponding to each TAG is matched, and the process name corresponding to each TAG is matched according to the process number. Finally, the percentage occupied by each TAG is calculated, and the tester will intuitively and accurately feedback the corresponding print information to the person in charge of the relevant module based on the percentage. The person in charge of the module will accurately optimize based on the print information, thereby quickly solving the problem. By using the technical solution of the present application, the processing efficiency and accuracy of print information can be improved.
[0068] In the process of developing and debugging the product code, when a screen refresh log appears, the present embodiment obtains the print information generated by each debugging of the product in real time, and performs statistics on the print information according to a preset statistical script to obtain an initial statistical file. The initial statistical file is a file that simply counts and sorts the print information. Then, a matching statistical file is obtained based on the initial statistical file, and the actual proportion of each print information to the total print information is determined based on the matching statistical file. Finally, the product code is optimized based on the matching statistical file and the actual proportion information, thereby achieving the purpose of quickly solving the problem. By performing real-time statistics and summarizing the irregular print information generated during the development and debugging process to obtain a matching statistical file, and performing optimization processing based on the proportion of the print information, the phenomenon of the inability to timely handle product problems and the complicated steps of searching for print information in the prior art is avoided. This screen self-checking processing method not only simplifies the search steps by processing the print information, thereby improving the efficiency of print information processing, but also can process all print information in a timely manner, thereby improving the accuracy of analyzing print information processing problems.
[0069] Furthermore, based on the first embodiment of the method for processing print information of the present invention, a second embodiment of the method for processing print information of the present invention is proposed. The method for processing print information includes:
[0070] Furthermore, the step of determining an initial statistical file according to the statistical requirement threshold and the statistical information set includes:
[0071] Step a, determining statistical values corresponding to all printing information in the statistical information set, and sorting the printing information according to the magnitude relationship of the statistical values to obtain a sorted statistical information set;
[0072] In this embodiment, after obtaining the statistical information set, the statistical values corresponding to all the internal printing information are determined, and the printing information is sorted according to the size relationship of the statistical values to obtain a sorted statistical information set, wherein the statistical value refers to the numerical value corresponding to the printing information, and the sorted statistical information set refers to the set obtained after sorting the statistical information set. For example, the internal structure of the statistical information set is printing information (statistical value), when the obtained statistical information set is Q(15), W(40), E(5), the obtained sorted statistical information set is W(40), Q(15), E(5) or E(5), Q(15), W(40). By determining the sorted statistical information set, an extraction basis can be provided for determining the extracted printing information.
[0073] Step b: determining extraction direction information of the sorted statistical information set, and extracting printing information from the sorted statistical information set according to the statistical requirement threshold and the extraction direction information to obtain an initial statistical file.
[0074] After obtaining the sorted statistical information set, the extraction direction information of the sorted statistical information set will be determined, and the print information in the sorted statistical information set will be extracted according to the statistical requirement threshold and the extraction direction information to obtain the initial statistical file. The extraction direction information refers to the extraction direction in the sorted statistical information set. By randomly selecting the first print information value and the second print information value corresponding to two adjacent print information in the sorted statistical information set, and determining the size relationship between the first print information value and the second print information value, if the first print information value is greater than the second print information value, the extraction direction information is extracted from the end close to the first print information; if the first print information value is less than the second print information value, the extraction direction information is extracted from the end close to the second print information; if the first print information value is equal to the second print information value, the values corresponding to the two adjacent print information are reselected. For example, the sorted statistical information set is W(40), Q(15), E(5). If W(40) and Q(15) are randomly selected, it will be found that the value of W(40) is larger, and the print information will be extracted from one end of W(40), that is, the leftmost end.
[0075] In this embodiment, the statistical values corresponding to all print information in the statistical information set are determined, and the print information is sorted according to the magnitude of the statistical values to obtain a sorted statistical information set. Extraction direction information for the sorted statistical information set is determined, and the print information in the sorted statistical information set is extracted according to the statistical requirement threshold and the extraction direction information to obtain an initial statistical file. This allows accurate processing of print information generated by the product without any omissions. By performing sorting and statistical processing on the print information, resources occupied by duplicate print information can be reduced.
[0076] Furthermore, the step of determining an initial statistical file according to the statistical requirement threshold and the statistical information set includes:
[0077] Step c, extracting printing information from the sorted statistical information set in sequence according to the extraction direction information, storing the extracted printing information as the extracted printing information into a preset preliminary statistical file, counting the extracted printing information to obtain a count value, and detecting whether the count value matches the statistical requirement threshold;
[0078] In this embodiment, after obtaining a sorted statistical information set, print information from the sorted statistical information set is sequentially extracted according to the extraction direction information and stored as extracted print information in a preset quasi-initial statistical file. Each time print information is extracted, the extracted print information in the preset quasi-initial statistical file is counted to obtain a count value, and a check is performed to determine whether the count value matches a statistical requirement threshold. The count value refers to the number of print information pieces, and the quasi-initial statistical file refers to the file storing the print information.
[0079] Step d: if the count value matches the statistical requirement threshold, the proposed initial statistical file stored in the extracted print information is used as the initial statistical file;
[0080] Step e: if the count value does not match the statistical requirement threshold, executing the step of extracting the printing information in the sorted statistical information set in sequence according to the extraction direction information and storing it in a preset quasi-initial statistical file.
[0081] When the count value and the statistical requirement threshold are detected, the pseudo-initial statistical file will be operated according to the detection result. When the count value and the statistical requirement threshold match, that is, the count value and the statistical requirement threshold are equal, the pseudo-initial statistical file in which the extracted print information is stored will be directly used as the initial statistical file; when the count value and the statistical requirement threshold do not match, that is, the count value and the statistical requirement threshold are not equal, the step of extracting the print information from the sorted statistical information set in sequence according to the extraction direction information and storing it in the preset pseudo-initial statistical file will be executed, and the new count value will be obtained and compared with the statistical requirement threshold. The step of extracting the print information from the sorted statistical information set in sequence according to the extraction direction information and storing it in the preset pseudo-initial statistical file will be stopped until the two are equal. For example, the print information of the sorted statistical information set is W(40), Q(15), E(5). When the statistical requirement threshold is 2, W(40) will be stored in the quasi-initial statistical file, and the count value will be 1. By comparing the statistical requirement threshold 2 and the count value 1, if they are not equal, the next print information Q(15) after W(40) will be extracted according to the extraction direction information and stored in the quasi-initial statistical file, and the count value will be 2. By comparing the statistical requirement threshold 2 and the count value 2, if they are equal, the quasi-initial statistical file will be used as the initial statistical file.
[0082] In this embodiment, the printing information in the sorted statistical information set is sequentially extracted according to the extraction direction information, and stored as the extracted printing information in a preset quasi-initial statistical file. The extracted printing information is counted to obtain a count value, and a detection is made as to whether the count value matches the statistical requirement threshold. If the count value matches the statistical requirement threshold, the quasi-initial statistical file in which the extracted printing information is stored is used as the initial statistical file. If the count value does not match the statistical requirement threshold, the step of sequentially extracting the printing information in the sorted statistical information set according to the extraction direction information and storing it in the preset quasi-initial statistical file is performed. By sequentially extracting the printing information in the sorted statistical information set according to the extraction direction information to obtain the initial statistical file, a processing basis is provided for the processing of the printing information. Subsequent processing can directly perform corresponding processing based on the relevant information of the printing information in the initial statistical file, thereby improving the accuracy of the printing information processing.
[0083] Furthermore, the step of determining actual ratio information according to the matching statistics file includes:
[0084] Step m, determining the statistical values corresponding to all matching print information in the matching statistical file, and taking the sum of all the statistical values as the overall statistical value;
[0085] Step n: taking the quotient between each of the statistical values and the overall statistical value as actual ratio information.
[0086] In this embodiment, after obtaining the matching statistical file, the proportion value of all matching printing information in the file will be determined. By determining the statistical values of all printing information in the matching statistical file, and taking the sum of all statistical values as the overall statistical value, the quotient between all statistical values and the overall statistical value is calculated as the actual proportion information. The overall statistical value refers to the sum of the values of all printing information in the matching statistical file, and the actual proportion information refers to the proportion of the values of all printing information in the matching statistical file to the total values, which includes the proportion values of all printing information, and the sum of all proportion values is 1. For example, if the matching statistical file is W(40), Q(15), and E(5), the overall statistical value obtained is 40+15+5=60, so the proportion values can be calculated to obtain W(66.6%), Q(25%), and E(8.4%) respectively. The printing information W will be processed first, followed by Q and E in turn. This provides a basis for the priority processing of printing information.
[0087] In this embodiment, statistical values corresponding to all matching print information in the matching statistical file are determined, and the sum of all these statistical values is used as the overall statistical value. The quotient between each statistical value and the overall statistical value is used as the actual ratio information. The actual ratio information can be used to determine the frequency of occurrence of print information, and more frequent print information can be prioritized for processing. This can optimize the steps involved in processing print information and improve processing efficiency.
[0088] The present invention also provides a schematic diagram of a device module for processing printing information, referring to Figure 3 , the printing information processing device includes:
[0089] The acquisition module A01 is used to obtain the printing information generated by the product in real time, and to perform statistics on the printing information according to a preset statistical script to obtain an initial statistical file;
[0090] A first processing module A02 is configured to obtain a matching statistical file based on the initial statistical file, and determine actual ratio information based on the matching statistical file;
[0091] The second processing module A03 is used to optimize the code of the product according to the matching statistics file and the actual ratio information.
[0092] Optionally, the acquisition module A01 is further configured to:
[0093] determining image features corresponding to the print information, and counting the print information according to the image features to obtain a statistical information set;
[0094] A statistical requirement threshold in a preset statistical script is determined, and an initial statistical file is determined according to the statistical requirement threshold and the statistical information set.
[0095] Optionally, the acquisition module A01 is further configured to:
[0096] Determining statistical values corresponding to all printing information in the statistical information set, and sorting the printing information according to the magnitude relationship of the statistical values to obtain a sorted statistical information set;
[0097] Extraction direction information of the sorted statistical information set is determined, and printing information in the sorted statistical information set is extracted according to the statistical requirement threshold and the extraction direction information to obtain an initial statistical file.
[0098] Optionally, the acquisition module A01 is further configured to:
[0099] Extracting printing information from the sorted statistical information set in sequence according to the extraction direction information and storing the extracted printing information into a preset preliminary statistical file as the extracted printing information, counting the extracted printing information to obtain a count value, and detecting whether the count value matches the statistical requirement threshold;
[0100] If the count value matches the statistical requirement threshold, the quasi-initial statistical file stored in the extracted print information is used as the initial statistical file;
[0101] If the count value does not match the statistical requirement threshold, the step of extracting the printing information in the sorted statistical information set in sequence according to the extraction direction information and storing the information in a preset quasi-initial statistical file is performed.
[0102] Optionally, the first processing module A02 is further configured to:
[0103] Determine the process numbers corresponding to all the extracted print information in the initial statistical file, and write each process number into the corresponding extracted print information to obtain the intended matching print information;
[0104] Determine the process name corresponding to the process number in the to-be-matched printing information, write the process name into the to-be-matched printing information to obtain matching printing information, and aggregate each matching printing information to obtain a matching statistics file.
[0105] Optionally, the first processing module A02 is further configured to:
[0106] Determine the statistical values corresponding to all matching print information in the matching statistical file, and take the sum of all the statistical values as the overall statistical value;
[0107] The quotient between each of the statistical values and the overall statistical value is used as actual ratio information.
[0108] Optionally, the second processing module A03 is further configured to:
[0109] Determining maximum proportion information in the actual proportion information, determining target printing information corresponding to the maximum proportion information in the matching statistics file, and optimizing the code of the product according to the target printing information;
[0110] The maximum scale information is deleted from the actual scale information, and the step of determining the maximum scale information in the actual scale information is performed according to the actual scale information from which the maximum scale information is deleted, until a generated end instruction is received.
[0111] The methods executed by the above program modules can refer to the various embodiments of the method for processing printing information of the present invention, and will not be described in detail here.
[0112] The invention also provides a printing information processing device.
[0113] The device of the present invention comprises: a memory, a processor and a printing information processing program stored in the memory and operable on the processor. When the printing information processing program is executed by the processor, the steps of the printing information processing method described above are implemented.
[0114] The present invention also provides a computer storage medium.
[0115] The computer storage medium of the present invention stores a printing information processing program, and when the printing information processing program is executed by a processor, the steps of the printing information processing method described above are implemented.
[0116] The method implemented when the print information processing program running on the processor is executed can refer to the various embodiments of the print information processing method of the present invention, and will not be described in detail here.
[0117] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.
[0118] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0119] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0120] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for processing printed information, characterized in that: The method for processing printing information comprises the following steps: Acquire printing information generated by the product in real time, and perform statistics on the printing information according to a preset statistical script to obtain an initial statistical file, wherein the step of performing statistics on the printing information according to the preset statistical script to obtain the initial statistical file includes: Determine the image features corresponding to the printing information, count the printing information according to the image features to obtain a statistical information set; determine the statistical requirement threshold in a preset statistical script, determine the statistical values corresponding to all the printing information in the statistical information set, and sort the printing information according to the size relationship of the statistical values to obtain a sorted statistical information set; determine the extraction direction information of the sorted statistical information set, extract the printing information in the sorted statistical information set in sequence according to the extraction direction information and store it in a preset quasi-initial statistical file as extracted printing information, count the extracted printing information to obtain a count value, and detect whether the count value matches the statistical requirement threshold; if the count value matches the statistical requirement threshold, use the quasi-initial statistical file stored in the extracted printing information as the initial statistical file; if the count value does not match the statistical requirement threshold, execute the step of extracting the printing information in the sorted statistical information set in sequence according to the extraction direction information and storing it in the preset quasi-initial statistical file; Obtaining a matching statistical file according to the initial statistical file, and determining actual proportion information according to the matching statistical file; The product code is optimized according to the matching statistics file and the actual ratio information.
2. The method for processing printing information according to claim 1, wherein: The step of obtaining a matching statistical file according to the initial statistical file includes: Determine the process numbers corresponding to all the extracted print information in the initial statistical file, and write each process number into the corresponding extracted print information to obtain the intended matching print information; Determine the process name corresponding to the process number in the to-be-matched printing information, write the process name into the to-be-matched printing information to obtain matching printing information, and aggregate each matching printing information to obtain a matching statistics file.
3. The method for processing printing information according to claim 1, wherein: The step of determining actual ratio information according to the matching statistics file includes: Determine the statistical values corresponding to all matching print information in the matching statistical file, and take the sum of all the statistical values as the overall statistical value; The quotient between each of the statistical values and the overall statistical value is used as actual ratio information.
4. The method for processing printing information according to claim 1, wherein: The step of optimizing the product code according to the matching statistics file and the actual ratio information includes: Determining maximum proportion information in the actual proportion information, determining target printing information corresponding to the maximum proportion information in the matching statistics file, and optimizing the code of the product according to the target printing information; The maximum scale information is deleted from the actual scale information, and the step of determining the maximum scale information in the actual scale information is performed according to the actual scale information from which the maximum scale information is deleted, until a generated end instruction is received.
5. A printing information processing device, characterized in that: The printing information processing device includes: An acquisition module is used to obtain the printing information generated by the product in real time, and to perform statistics on the printing information according to a preset statistical script to obtain an initial statistical file; The acquisition module is further used to determine the image features corresponding to the printing information, count the printing information according to the image features to obtain a statistical information set; determine the statistical requirement threshold in a preset statistical script, determine the statistical values corresponding to all the printing information in the statistical information set, and sort the printing information according to the size relationship of the statistical values to obtain a sorted statistical information set; determine the extraction direction information of the sorted statistical information set, extract the printing information in the sorted statistical information set in sequence according to the extraction direction information and store it in a preset quasi-initial statistical file as extracted printing information, count the extracted printing information to obtain a count value, and detect whether the count value matches the statistical requirement threshold; if the count value matches the statistical requirement threshold, use the quasi-initial statistical file stored in the extracted printing information as the initial statistical file; if the count value does not match the statistical requirement threshold, execute the step of extracting the printing information in the sorted statistical information set in sequence according to the extraction direction information and storing it in the preset quasi-initial statistical file; a first processing module, configured to obtain a matching statistical file according to the initial statistical file, and determine actual proportion information according to the matching statistical file; The second processing module is used to optimize the code of the product according to the matching statistical file and the actual ratio information.
6. A printing information processing device, characterized in that: The printing information processing device includes: a memory, a processor, and a printing information processing program stored in the memory and executable on the processor. When the printing information processing program is executed by the processor, the steps of the printing information processing method according to any one of claims 1 to 4 are implemented.
7. A computer storage medium, characterized in that The computer storage medium stores a printing information processing program, and when the printing information processing program is executed by a processor, the steps of the printing information processing method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Method for operating a print server for digital high-capacity printing systems
US20180173473A1