Cloud printing dynamic configuration method and system thereof
By analyzing the field boundaries and channel status of cloud printing task documents, the synchronous update of task status and channel number was achieved, solving the problem of non-real-time update of path configuration during task scheduling in existing technologies, and improving the coordination and reliability of task execution.
Patent Information
- Application Number
- CN202511833893.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-12-08
AI Technical Summary
In existing cloud printing technologies, the task scheduling process lacks the ability to coordinate with changes in structural information and channel status responses, resulting in disordered task output order and conflicts in path resource allocation, which reduces the coordination of task flow and the reliability of execution.
By obtaining the field boundary coordinates and text quantity of the task document paragraphs, analyzing the changes in field spacing, and establishing a corresponding relationship with the channel status, the task status is driven to switch between pause and resume. The control status and channel number are updated synchronously with the configuration content and path instructions to ensure that the task output is filled in according to the paragraph number order, and that the transmission control and path adjustment are kept in sync.
It enhances the adaptability of task scheduling and the connectivity of path allocation, improves the coordination and reliability of task execution processes, and solves the problem of matching the rhythm of task interruption and recovery.
Smart Images

Figure CN121277451B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud printing technology, and in particular to a dynamic configuration method and system for cloud printing. Background Technology
[0002] The field of cloud printing technology involves terminals accessing remote printing services via a network to complete document submission, parsing, and format conversion tasks. This includes core aspects such as job reception, user authentication, printing parameter settings, device status acquisition, queue management, data transmission, printing execution, and feedback generation. This technology relies on network communication protocols, document rendering, command generation, and print task scheduling mechanisms to form a complete operation process from the cloud to the terminal. Traditional cloud printing dynamic configuration methods and systems refer to solutions for setting configuration information before and after print task submission in cloud printing scenarios. Typically, the terminal manually enters layout parameters, page range, color mode, resolution, and paper size during the task submission stage. A fixed configuration file is then used in the cloud to parse the document in a preset order and generate print commands. The server then compares available options against a static device capability list and sends commands to the device using a sequential query method, completing task registration, task queuing, task distribution, and status feedback operations.
[0003] Existing technologies limit parameter configuration content through static settings before task submission and rely on fixed processes to complete document parsing and instruction issuance. During task execution, they lack the ability to link with changes in structural information and channel status responses. They cannot identify paragraph structure changes based on field aggregation trends, resulting in delays in path configuration response during task scheduling. In scenarios where the status content is constantly changing, channel information cannot achieve dynamic feedback of control status, limiting the ability to match the rhythm of task interruption and recovery. When the channel execution path needs to be adjusted, it cannot generate differentiated instructions based on the actual task structure, further causing the configuration content to fail to synchronize to the output execution stage. For example, in the case of multi-task segmented parallelism, the lack of a real-time update mechanism for channel configuration can easily lead to disordered task output order and conflicts in path resource allocation, reducing the overall task flow coordination and execution reliability. Summary of the Invention
[0004] To address the technical problems existing in the prior art, embodiments of the present invention provide a dynamic configuration method for cloud printing;
[0005] To achieve the above objectives, the present invention adopts the following technical solution: a cloud printing dynamic configuration method, comprising the following steps:
[0006] S1: Obtain the field boundary coordinates and text quantity of paragraphs in the task document, extract the center point position of adjacent fields, analyze the order of field spacing changes, split the paragraph structure of field clustering trend changes, and obtain the structure segment configuration instruction set;
[0007] S2: Based on the segment number in the structure segment configuration instruction set, read the main channel status response content, write it into the task status field, pause transmission, write the task number and channel number into the preset instruction field, and obtain the task configuration pause record item.
[0008] S3: Based on the segment number and channel number in the task configuration pause record item, read the status response content at time intervals, update the configuration status by comparing with the task channel information, and obtain the configuration recovery status mark set;
[0009] S4: Based on the segment number in the configuration recovery status flag set, read the channel with the status flag of idle, fill the segment number into the position of the main channel number and the available channel number, update the path field content, and obtain the path configuration adjustment instruction set;
[0010] S5: Based on the path configuration adjustment instruction set and the segment number and channel number in the structure segment configuration instruction set, fill in the output field, write the control instructions and channel information, and obtain the print task configuration execution instruction content.
[0011] As a further embodiment of the present invention, the structure segment configuration instruction set includes field boundary coordinates, text quantity information, field center point coordinates, field spacing change trend, path direction comparison order, and paragraph structure number; the task configuration pause record item includes segment number, channel number, task number, task status control content, and pause transmission action content; the configuration recovery status marker set includes segment number, channel number, status response content, task channel response information, and configuration status field; the path configuration adjustment instruction set includes segment number, channel number, main channel number, task number, and path status synchronization content; and the print task configuration execution instruction content includes output position, channel number, task segment number, execution path field, and transmission control content.
[0012] As a further aspect of the present invention, the changing paragraph structure refers to analyzing and adjusting the paragraph structure of a document based on field boundary coordinates and text distribution trends;
[0013] The status response content refers to the feedback data associated with the task status during task execution.
[0014] As a further aspect of the present invention, the task channel information refers to a channel-level dynamic record describing the allocation status, running status and response content of the printing task on the channel.
[0015] The output fields refer to the fields that define the output location in the configuration instructions, including task segment number, channel number, execution path, and control instructions.
[0016] As a further aspect of the present invention, the specific steps of S1 are as follows:
[0017] S101: Obtain the field boundary coordinates and text quantity information of paragraphs in the task document, extract the spatial distribution outline of field groups on the page based on the boundary coordinates, compare the outline shape order of adjacent field groups, identify paragraphs with changes in distribution shape, and write the paragraph numbers into the dataset to obtain the field distribution change number set.
[0018] S102: Based on the field distribution change number set, read the field center point position of the corresponding paragraph and the previous paragraph, connect the extension directions of the two center points in sequence, identify the segment number of the direction shift, and write the number into the direction feature dataset to obtain the field direction shift number set.
[0019] S103: Based on the field distribution change number set and the field direction transfer number set, the numbers are cross-searched sequentially to extract the segment numbers that appear simultaneously. The numbers are written into the structure configuration content to obtain the structure segment configuration instruction set.
[0020] As a further aspect of the present invention, the specific steps of S2 are as follows:
[0021] S201: Based on the segment number in the configuration instruction set of the structure segment, extract the content of the main channel response data frame, match the response content of each time corresponding to the current segment number with the response content of the previous frame according to the receiving order, determine the change of the status field, identify the field structure within the range of continuous status changes, and write it into the task control structure to obtain the task status docking information set.
[0022] S202: Based on the task status docking information set, write the segment number marked in the field into the task configuration information table, insert the status field into the status control area of the row where the segment number is located, and obtain the pause transmission action description table.
[0023] S203: Based on the pause transmission action description table, extract the segment number and corresponding channel number indicated by the status field, combine the channel number and segment number into a task index data group, and write it into the control instruction field to obtain the task configuration pause record item.
[0024] As a further aspect of the present invention, the specific steps of S3 are as follows:
[0025] S301: Based on the segment number and channel number in the task configuration pause record item, collect the main channel status response content, connect the continuously read status fields with the previous fields in sequence, judge the field differences, and obtain the status field connection sequence.
[0026] S302: Based on the status field docking sequence, detect the field format in the response content and match it with the current channel response to obtain a set of segment numbers with consistent format;
[0027] S303: Based on the format-consistent segment number set, replace the status of each segment task control field, replace the paused status with the resumed status, and simultaneously replace the identifier in the channel marked as idle to obtain the configuration resumed status marker set.
[0028] As a further aspect of the present invention, the specific steps of S4 are as follows:
[0029] S401: Based on the segment number in the configuration recovery status mark set, extract the status information in the channel marked as idle, and write the corresponding number of the recovery status to the main channel number to obtain the main channel write number set.
[0030] S402: Based on the main channel write number set, find the idle channel number that is not included, match the write number with the task number, and at the same time append the corresponding path status information to the channel marked as idle to obtain the idle channel matching number set.
[0031] S403: Based on the set of idle channel alignment numbers, extract the channel number and segment number, write them into the path field, and attach the synchronization status content to obtain the set of path configuration adjustment instructions.
[0032] As a further aspect of the present invention, the specific steps of S5 are as follows:
[0033] S501: Based on the path configuration adjustment instruction set and the task segment number in the structure segment configuration instruction set, extract the channel number corresponding to the task segment number, and write the channel number into the output area field in the order of the task segment number to obtain the channel order output mapping set.
[0034] S502: Based on the channel sequential output mapping set, retrieve each task segment number in turn, write the channel number and task segment number into the corresponding position of the path field, and attach the content of the transmission action field to obtain the path writing instruction sequence.
[0035] S503: Based on the path writing instruction sequence, write the configuration content of each task segment and the channel number into the task configuration execution area simultaneously, and attach control content field information to obtain the print task configuration execution instruction content.
[0036] A cloud printing dynamic configuration system includes:
[0037] The structural segment recognition module obtains the field boundary coordinates and text quantity of paragraphs in the task document, extracts the center point position of adjacent fields, analyzes the order of changes in field spacing, splits the paragraph structure with changing field clustering trends, and obtains the structural segment configuration instruction set.
[0038] The channel status monitoring module reads the status response content of the main channel based on the segment number in the structure segment configuration instruction set, writes it into the task status field, pauses transmission, writes the task number and channel number into the preset instruction field, and obtains the task configuration pause record item.
[0039] The task status recovery module reads the status response content at time intervals based on the segment number and channel number in the task configuration pause record item, updates the configuration status by comparing with the task channel information, and obtains the configuration recovery status tag set.
[0040] The path configuration update module reads the channel content marked as idle based on the segment number in the configuration recovery status mark set, fills the segment number into the positions of the main channel number and the available channel number, and updates the path field information to obtain the path configuration adjustment instruction set.
[0041] The task instruction generation module fills in the output field based on the path configuration adjustment instruction set and the task segment number and channel number fields in the structure segment configuration instruction set, and writes control instructions and channel information to obtain the print task configuration execution instruction content.
[0042] Compared with the prior art, the advantages and positive effects of the present invention are as follows:
[0043] In this invention, the paragraph structure is divided by the changes in field boundaries and spacing, and a correspondence is established between the paragraph number and the channel status. This drives the task status to switch between pause and resume. The control status and the channel number are updated synchronously with the configuration content and path instructions. The task output is filled in according to the paragraph number order. The transmission control, path adjustment and execution process are kept connected, which enhances the adaptability of task scheduling, the connection of path allocation and the coordination of execution process. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 This is a schematic diagram of the steps of the present invention;
[0046] Figure 2 This is a detailed schematic diagram of S1 of the present invention;
[0047] Figure 3 This is a detailed schematic diagram of S2 of the present invention;
[0048] Figure 4 This is a detailed schematic diagram of S3 of the present invention;
[0049] Figure 5 This is a detailed schematic diagram of S4 of the present invention;
[0050] Figure 6 This is a detailed schematic diagram of S5 of the present invention;
[0051] Figure 7 This is a system module diagram of the present invention. Detailed Implementation
[0052] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0053] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0054] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.
[0055] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0056] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0057] Please see Figure 1 This invention provides a method for dynamic configuration of cloud printing, comprising the following steps:
[0058] S1: Obtain the field boundary coordinates and text quantity information of paragraphs in the task document, read the center point coordinates of fields in adjacent paragraphs, compare the current paragraph field spacing change trend with the previous paragraph path direction, split the paragraph structure with the field aggregation trend change, and write the split paragraph number into the structure configuration content to obtain the structure segment configuration instruction set.
[0059] S2: Based on the segment number in the structure segment configuration instruction set, read the status response content corresponding to the main channel, compare each response content with the previous response status in sequence, fill in the task status control content in sequence, add pause transmission action content in the task configuration information, and add the channel number and task number before the pause to the control instruction field to obtain the task configuration pause record item.
[0060] S3: Based on the segment number and channel number in the task configuration pause record item, continue to read the main channel status response content at fixed time intervals, match the previous and subsequent status response content with the current task channel response information in sequence, and switch the control status of the task segment to the recovery status while keeping the continuously read status content in the same format, and synchronously update the configuration status field to obtain the configuration recovery status tag set.
[0061] S4: Based on the segment number in the configuration recovery status flag set, read the channel content marked as idle, directly associate the segment number with the recovery status field with the main channel number position, associate the segment number without status flag with the available channel number under the current task number, write the corresponding channel number in the channel marked as idle in the original status, and add the path status synchronization content to obtain the path configuration adjustment instruction set.
[0062] S5: Based on the path configuration adjustment instruction set and the task segment number and channel number fields in the structure segment configuration instruction set, fill them into the output position according to the order of the task segment numbers, write the channel number and task segment number into the corresponding execution path field, add transmission control content and channel number information to each task segment content, write them into the print task configuration execution area, and obtain the print task configuration execution instruction content.
[0063] The structure segment configuration instruction set includes field boundary coordinates, text quantity information, field center point coordinates, field spacing change trend, path direction comparison order, and paragraph structure number. The task configuration pause record item includes segment number, channel number, task number, task status control content, and pause transmission action content. The configuration resume status marker set includes segment number, channel number, status response content, task channel response information, and configuration status field. The path configuration adjustment instruction set includes segment number, channel number, main channel number, task number, and path status synchronization content. The print task configuration execution instruction content includes output position, channel number, task segment number, execution path field, and transmission control content.
[0064] Please see Figure 2 The specific steps of S1 are as follows:
[0065] S101: Obtain the field boundary coordinates and text quantity information of paragraphs in the task document, extract the spatial distribution outline of field groups on the page based on the boundary coordinates, compare the outline shape order of adjacent field groups, identify paragraphs with changes in distribution shape, and write the paragraph numbers into the dataset to obtain the field distribution change number set.
[0066] After obtaining the field boundary coordinates and text quantity information of paragraphs in the task document, the coordinate content in the paragraph information is extracted sequentially. The spatial position of the top-left, bottom-right, and left-right coordinate values of each field area is compared. The horizontal width and vertical height of the top-left and bottom-right corner coordinates of the field group boundaries within each paragraph are calculated. The horizontal width value is divided by the text quantity to obtain the average width occupied by each unit of text. This width value is compared with the average width of subsequent field groups to determine if the difference is within 10%. If it is within this range, it is considered a similar field arrangement; otherwise, it is treated as an intervening field. Simultaneously, the vertical coordinates of the field groups on the page are extracted, and the vertical distance is judged. If the vertical spacing is large... A line break is considered to begin when the height is 1.5 times the average height. Further, the number of field groups in each paragraph is counted from the field distribution data. Paragraphs with more than five field groups are extracted, and paragraphs with a field group width variation exceeding 20% are extracted separately. This is used to determine whether there is a significant morphological shift in the field distribution between consecutive paragraphs. The aspect ratio of the field boundaries between the preceding and following paragraphs is then used for comparison. Paragraphs with an aspect ratio variation exceeding 25% are considered to have significant abrupt changes in distribution. The paragraph number of the current paragraph is extracted from these abrupt segments and written into a number list as an identifier of a sudden change in the field group arrangement. Finally, a set of field distribution change numbers is obtained.
[0067] S102: Based on the field distribution change number set, read the field center point position of the corresponding paragraph and the previous paragraph, connect the extension directions of the two center points in sequence, identify the segment number of the direction shift, and write the number into the direction feature dataset to obtain the field direction shift number set;
[0068] First, the field information content of the paragraph corresponding to the field distribution change number and the preceding paragraph is retrieved sequentially. The center point coordinates of all fields in each paragraph are extracted into a set of horizontal and vertical position data. For each pair of paragraphs, the average horizontal and average vertical coordinates of the center point of each field are calculated, representing the horizontal and vertical core distribution point positions of the field in that paragraph, respectively. By connecting the horizontal and vertical coordinates of the core distribution points of the current paragraph and the preceding paragraph, a direction vector representing the field distribution migration is generated. The angle change of the direction vector is used to determine whether the field arrangement has shifted between paragraphs. A direction change of less than 5° can be considered as a continuation of the trend, while a direction change of more than 20° is considered as a significant shift in direction. For example, if the center point of the field in paragraph m is horizontal... With coordinates 240 and 460, and the x-coordinate of the field center point of paragraph m-1 being 180 and 480, the direction vector tilts from the upper left to the lower right. The distribution trend of all fields between adjacent paragraphs is summarized, and the numbers of all paragraphs with directional changes are extracted. For paragraphs with directional changes between 5° and 20°, it is necessary to further determine whether there is concentrated tilting based on the number of field groups within the current paragraph. If the field groups are mainly concentrated on the right side of the page and the number exceeds four groups, it can be inferred that the paragraph direction has shifted; otherwise, no number is recorded. After completing the extraction process of the directional trends between all paragraphs, the numbers of the paragraphs with directional changes are sequentially written into the dataset, ultimately obtaining the set of field direction shift numbers.
[0069] S103: Based on the field distribution change number set and the field direction transfer number set, the numbers are cross-searched sequentially to extract the segment numbers that appear at the same time. The numbers are written into the structure configuration content to obtain the structure segment configuration instruction set.
[0070] First, extract the segment numbers sequentially from the field distribution change number set. Record each number in order in the main index number set. Then, read each segment number sequentially from the field direction transfer number set and perform cross-matching between the currently read number and the main index number set. The core of the matching operation is to determine whether there are segment numbers with the same content in the two number sets. If they exist, retain the segment number as the cross-matching number; otherwise, ignore it. To ensure the accuracy of the cross-matching, the number format needs to be standardized during the number comparison process. For example, pad all segment numbers to four digits, such as padding number 5 to 0005 and number 45 to 0045, to avoid issues caused by the number length. If the number of cross-numbers fails due to inconsistencies, and the number of cross-numbers exceeds two, they need to be rearranged in order of number size. For example, if the field distribution change number set contains segment numbers 0003, 0006, 0012, and 0015, and the field direction transfer number set contains segment numbers 0002, 0006, 0015, and 0018, then the cross-numbered segment numbers will be 0006 and 0015. Based on this, the cross-number result is called, and the cross-numbers are written into the structure configuration content in sequence. The structure configuration content is the basic field set used for subsequent segment control. Each piece of content in this set corresponds to a segment number, and control instruction attributes or path parameter identifiers can be added as needed to obtain the structure segment configuration instruction set.
[0071] Please see Figure 3 The specific steps of S2 are as follows:
[0072] S201: Based on the segment number in the structure segment configuration instruction set, extract the content of the main channel response data frame, match the response content of each time corresponding to the current segment number with the response content of the previous frame according to the receiving order, determine the status field change, identify the field structure within the range of continuous status changes, and write it into the task control structure to obtain the task status docking information set.
[0073] First, the configuration instruction set of each structure segment is disassembled line by line, and the segment number is extracted. This segment number is used as an index to retrieve the corresponding response data frame content from the main channel. During the retrieval process, the byte sequence of the main channel response data frame needs to be split, dividing each frame content into a status field area, a channel field area, and a payload field area. This allows for accurate judgment of status field changes in subsequent processing. For example, when the segment number is 0003, the corresponding response data frame might be the byte sequence 120, 2, 56, where 120 is the status field, 2 is the channel field, and 56 is the payload field. In this case, 120 is taken as the current status field, and the status field of the previous frame, such as 118, is placed side-by-side. The direction of status change is determined by comparing the span between the two values. When the span is within a set range, such as a span greater than 0 and less than 10, it indicates that the status is fluctuating continuously. Based on this, further judgment is made on the changes between the two status fields. For example, it is determined whether the single-byte increase of the status field continues to extend in the same direction. If the previous frame is 118 and the current frame is 120, the increase is 2. If the next frame is 122, the increase is 2. At this time, the increase is consistent and can be regarded as a continuous state change range. By analyzing the continuity of continuous state changes, all frame contents under the same change trend can be classified into the same field structure range. After the field structure range is determined, the segment number and the corresponding change range content are combined and written into the task control structure. In this way, the corresponding expansion of the segment number and the change range content is completed. Whenever the continuous state change range of a certain segment number is determined, it can be classified as the task status docking content of that segment number and incorporated into the task control structure, and finally the task status docking information set is obtained.
[0074] S202: Based on the task status docking information set, write the segment number marked in the field into the task configuration information table, insert the status field into the status control area of the row where the segment number is located, and obtain the pause transmission action description table.
[0075] First, each task status connection information is analyzed, retrieving the task status field and its corresponding segment number value one by one. Based on this, the target location of the task segment in the main task document is determined. For example, if the segment number in the task status connection information is 0057 and the status field is 021, then using 0057 as the index in the task configuration information table, the status control area of row 0057 is located in the table structure. The corresponding status field 021 is inserted using data field matching. The insertion action adopts the field append mode, without overwriting the original field content. At the same time, the action description value is appended to the end of the field area. For example, if the pause transmission action description value is set to "Pause", the insertion form is "021,Pause". During the insertion process, the character encoding of the action description content needs to be unified, and double-byte characters must be used uniformly. The data is encoded in character form before being filled in to avoid content misalignment caused by character incompatibility. Then, the next segment number and corresponding status field information are read from the task status docking information set and the above operation is repeated. After all segment numbers have been written, all newly added status field contents are traversed in the task configuration information table in turn, and the action description values contained in each status field are extracted and summarized into the action description column for reference and retrieval in subsequent operations. During the field summary process, it is necessary to determine whether there are conflicting action description values. For example, if "Pause" and "Stop" are written together under a certain segment number, the description with the first occurrence of the segment number in the task table must be the valid value. Finally, all action descriptions are written into the action description table to obtain the pause transmission action description table.
[0076] S203: Based on the pause transmission action description table, extract the segment number and corresponding channel number indicated by the status field, combine the channel number and segment number into a task index data group, and write it into the control instruction field to obtain the task configuration pause record item;
[0077] First, the segment number and status field content of each record are read sequentially. Record entries with the pause attribute in the action description field are identified. The segment number of these entries is extracted and used as a key index to locate the corresponding channel number in the task channel configuration table. For example, if the segment number is 0043, the channel number 07 can be found by searching the configuration table. Segment number 0043 and channel number 07 are then grouped into a task index data group. The format of each group is uniformly adjusted to ensure that the order of segment and channel numbers is consistent. In all index data groups, the segment number is always first, followed by the channel number. Then, all task index data groups are batch processed and written into the control instructions in the task control table. This field is an independent data column in the task configuration information, used to carry the control parameters required for different task actions. During the writing process, an append mode is used, and existing content is not overwritten. At the same time, character format verification is performed, and single-byte decimal encoding is used uniformly to avoid writing errors caused by cross-byte operations. If non-standard characters appear in the channel number, they need to be preprocessed by a character conversion function to convert them into standard channel identification values. For example, "Channel 1" is converted to "01" and then written again. After the writing operation of all data groups is completed, a field integrity check is performed to confirm that each segment of number has a corresponding channel number. If there are any omissions, the missing data source is added, and finally the task configuration pause record item is obtained.
[0078] Please see Figure 4 The specific steps of S3 are as follows:
[0079] S301: Based on the segment number and channel number in the task configuration pause record item, collect the main channel status response content, connect the continuously read status fields with the previous fields in sequence, judge the field differences, and obtain the status field connection sequence.
[0080] First, the segment number field and its corresponding channel number field in each data item are read. The main channel response data content is retrieved sequentially, and the current response result is continuously collected. Each collection obtains a set of status fields. After each collection, the current status field is compared with the status field of the previous frame response to ensure that the comparison order strictly follows the field arrangement order. During the comparison process, for each field position, its field value is extracted, and the current field value is compared with the corresponding field value of the previous frame at the character level. If the current field value is inconsistent with the field value of the previous frame, it is considered that there is a status change at that field position, and the segment number of the changed field is written to a temporary cache. During the continuous comparison process, the cache synchronization must be maintained to avoid redundant segment numbers being counted repeatedly. In the example, if the field value corresponding to segment number 0058 changes from "A3" to "C7", it is considered that there is a field change, and the changed segment number 0058 is recorded in the cache. After all data collection is completed, the cache segment number index order is compared, and all segment numbers with field changes are connected and organized. The field order is standardized according to the task number to finally obtain the status field connection sequence.
[0081] S302: Based on the status field docking sequence, detect the field format in the response content and match it with the current channel response to obtain a set of segment numbers with consistent format;
[0082] First, read the segment number index marked by the current task and extract the corresponding channel response content in sequence. Extract the field data format structure of each segment from the response content. Combine the field content according to byte length and field order to construct a field format feature string. Each field format feature string must retain the logical order and data width between the original fields. Next, read all the field corresponding to the segment number in the current channel response content and construct the format using the same field combination method as the field format feature string. Then, match the constructed response field format feature string with the previously constructed field format feature strings one by one. During the matching process... Segment numbers with consistent field length, corresponding arrangement order, and identical field type encoding are considered to have the same format. For example, if the field format feature string is "2C-1N-4H", it means that the field consists of a 2-byte character field, a 1-byte numeric field, and a 4-byte hexadecimal field. If the extracted field group composition order of the current response segment matches this, it is considered to have the same format. The corresponding segment number of the response is written to the cache. The field data in the response content of each channel is checked in a loop. All segment numbers that meet the format consistency standard are extracted, deduplicated, and combined into a sequence according to the response order. Finally, a set of segment numbers with the same format is obtained.
[0083] S303: Based on the formatted segment number set, replace the status of each task control field, replace the paused status with the resumed status, and simultaneously replace the identifier in the channel marked as idle to obtain the configuration resumed status identifier set;
[0084] First, the task control field status corresponding to each segment number is extracted sequentially. By reading the current status identifier of the field value in the task control field area, the field containing the pause descriptor in the status value is identified. The original status value of the field is overwritten, replacing the pause description with a resume description. This replacement operation is performed while keeping the field width unchanged. At the same time, to ensure that the control field and the channel marked as idle are updated synchronously, the corresponding position of the segment number in the task configuration information table is called. The status identifier field in the channel area marked as idle is searched, and it is determined whether the current value of the field is still the pause status identifier. If they are the same, the same replacement action is performed. The replacement operation is performed by direct overwriting, without changing the field displacement or field structure. For example, if a segment number is d-12 and its task control field status value is "PAUSEE", it is directly replaced with "RESUME" in the control field position, and the same character content overwriting operation is performed in the channel status marked as idle. After the replacement is completed, all segment numbers that have undergone replacement are summarized and output in the processing order. At the same time, null values and segment numbers that have not undergone replacement are removed to obtain the configuration resume status mark set.
[0085] Please see Figure 5 The specific steps of S4 are as follows:
[0086] S401: Based on the segment number in the configuration recovery status flag set, extract the status information of the channel with the status flag of idle, and write the number of the recovery status to the main channel number to obtain the main channel write number set.
[0087] First, the set of channels marked as idle in the task configuration information table is retrieved. For each segment number, the corresponding channel row marked as idle is located. By reading the status description content in the field of that row, it is determined whether the status content is a recovery status character identifier. If it is a recovery status, it is confirmed that the segment number is in the writable configuration area. Then, a channel association operation is performed on that segment number. The corresponding main channel number field content is matched in the task path channel table marked as idle. The current main channel identifier is read to determine whether it is the default channel or a replaced state. This determination determines whether a channel replacement action needs to be performed. If the result is that a replacement is needed, the main channel value paired with the segment number is extracted from the channel number field. This process involves overwriting the channel identifier bits in the currently marked idle channel rows with the extracted main channel value. During replacement, it is necessary to ensure that the number of digits and character encoding of the channel number remain consistent with the original identifier format. For example, if there is a segment number d-22 in the configuration recovery status mark set, and its original status mark for an idle channel is "CH-TMP", and the extracted main channel number is "CH-M1", then the channel identifier position of the channel marked as idle in that row needs to be directly written with "CH-M1", and the original character content needs to be cleared. This replacement process is repeated until all recovery status segment numbers have been processed. Finally, the segment numbers that have completed the main channel writing are aggregated to obtain the main channel writing number set.
[0088] S402: Based on the main channel write number set, find the idle channel number that is not included, write the number and the task number in the corresponding position, and at the same time append the corresponding path status information to the channel marked as idle to obtain the idle channel number set.
[0089] First, extract the complete list of segment numbers from the task configuration recovery status flag set as the basic number set. Then, compare this number set with the main channel write number set sequentially. Extract segment numbers not appearing in the main channel write number set and retain their index sequence as the remaining target set. For each segment number in this remaining target set, read the corresponding task number field information in the task configuration table, query the channel allocation table under the task number, and select the unassigned channel number under that task number as the free channel number. In the example, segment number d-12 corresponds to task number T-03. In the channel table T-03 field, the empty number is CH-06. Therefore, CH-06 is determined to be the available channel number for d-12. Then, compare d-12 with CH-06. The alignment is performed, and the combined result is written to the task channel configuration area. At the same time, the channel status mapping table is read, and the path status character value corresponding to CH-06 is obtained from the table. For example, "R-PAH" is used as the status identifier character value. This path status value is appended to the path status position of the channel currently marked as idle. This operation must keep the bit structure of the channel marked as idle consistent with the character length of the status field. If the original status field is four characters wide, the path status value is also written in four-character format. After the path status identifier is written, the trailing null character padding logic is retained until the length is consistent. After all segment numbers that have not been written with the main channel number have completed this operation, the set of segment numbers that have completed the alignment channel writing is output, and the set of idle channel alignment numbers is obtained.
[0090] S403: Based on the set of idle channel alignment numbers, extract the channel number and segment number, write them into the path field, and attach the synchronization status content to obtain the set of path configuration adjustment instructions;
[0091] First, extract the channel number and segment number for each group sequentially. Input the extracted channel number into the path field of the current task. Read the path field structure rules to confirm whether the writing width and data format match. If the original path field is preset to a fixed character width, pad the channel number to maintain consistent field length. For example, if segment number d-21 corresponds to channel number CH-07, the path field is defined as six characters, and the channel number is five characters, insert a null character to the left of the channel number to pad it. After writing, read the current status marker area of the path field corresponding to the segment number and add the current segment status synchronization content to the end of the status marker area. This content is obtained by querying the status response. If the current status of d-21 in the example is "SYNC", then "SYNC" will be appended to the end of the status area of the path field. The append operation needs to be processed according to whether there is a reserved space in the original status mark area. If the reserved character length is insufficient, the writing will be completed by replacing the end. After processing a set of channel numbers and segment numbers, the writing timestamp of the path field is updated to indicate the update node. The next set of data is processed, and the process of extracting, writing, filling, and appending status marks is repeated until all the matching numbers are completed and the path field is written and the status is synchronously appended. Finally, the comparison results of the segment numbers and channel numbers involved in all writing actions are sorted out to obtain the set of path configuration adjustment instructions.
[0092] Please see Figure 6 The specific steps of S5 are as follows:
[0093] S501: Based on the path configuration adjustment instruction set and the task segment number in the structure segment configuration instruction set, extract the channel number corresponding to the task segment number, and write the channel number into the output area field in the order of the task segment number to obtain the channel order output mapping set.
[0094] First, the path configuration adjustment instruction set is read, and the segment number field of each path configuration is extracted. This segment number field is then matched against all task segment numbers stored in the structure segment configuration instruction set. When a match is found, the channel number information under the corresponding task segment number is extracted. If the channel number field uses a mixed alphanumeric format, such as CH01, CH02, etc., it is standardized by using a number padding method. Then, according to the arrangement order of the task segment numbers in the structure segment configuration instruction set, the successfully matched channel numbers are sorted. The sorting process is performed according to the order in which the segment numbers appear, ensuring that the mapping relationship between the channel number and the segment number maintains the original task order. For example, if the task segment number order in the structure segment configuration instruction set is D01, D03, D05, the corresponding matched channel number in the path configuration is CH01. 4. CH06 and CH08 are written sequentially to the output area field in the order of task segment numbers. The output area field is a pre-allocated character block, with each channel number occupying a fixed character length. If there are empty character positions or extra channel numbers not referenced by the configured segment number, the unconfigured items are skipped, and only the channel number matching the task segment number is written. A tag is added to the field for each write operation to track the write source in the subsequent channel scheduling process. The tag content is generated by concatenating the channel number and the task segment number. For example, concatenating CH04 and D01 results in CH04-D01. The written tag is recorded separately in the tag field list. After the write is completed, the output area field forms a sequential mapping table, and the mapping relationship is consistent with the order of the task segment numbers, finally obtaining the channel sequential output mapping set.
[0095] S502: Based on the channel sequential output mapping set, each task segment number is retrieved sequentially, the channel number and the task segment number are written into the corresponding position of the path field, and the content of the transmission action field is appended to obtain the path writing instruction sequence.
[0096] First, extract the channel number and corresponding task segment number of each record in the mapping set. Then, traverse the task segment numbers one by one according to the record order. During the traversal, for each task segment number, query its preset storage location in the path field. If the path field is in the form of a two-dimensional table, each row corresponds to a task segment number, and each column is used to write different channel attributes. After obtaining the writing location, write the channel number to the main channel position of the corresponding row. Before writing, check the format of the channel number, such as confirming whether it conforms to the predefined numbering naming conventions CH01, CH02, etc., to avoid path field parsing errors due to format inconsistencies. After completing the channel number writing, search for the transmission action field associated with the current task segment number. The transmission action field is usually a fixed set of values, such as "Enable", "Wait", etc. For each channel number, the corresponding action value is selected and assigned based on the current scheduling status. For example, if task segment number D05 is currently in the enabled state, the transmission action is assigned the value "enabled". This field is written and stored in parallel with the channel number on the same line. During the writing process, it is ensured that the writing order is consistent with the task segment number. Line operations should not be merged due to duplicate channel numbers or identical action field content. Each write is treated as an independent action to ensure that the writing results are traceable. After the writing is completed, the path field is scanned and verified once. The verification includes whether the channel number corresponds to a unique task segment number and whether the action field covers all task segment numbers without omissions. If a blank task segment number line or a duplicate channel number is found in the path field, the error position is marked for subsequent inspection, resulting in the path writing instruction sequence.
[0097] S503: Based on the path writing instruction sequence, the configuration content of each task segment and the channel number are synchronously written into the task configuration execution area, and control content field information is attached to obtain the print task configuration execution instruction content.
[0098] First, extract the task segment number and channel number content for each task. Read the task segment numbers line by line and locate their write address in the task configuration execution area. For example, task segment numbers D07 and D08 are written to lines 7 and 8 of the configuration area, respectively. Obtain the corresponding channel number through a mapping table; for example, D07 corresponds to CH01, and D08 corresponds to CH02. Then, directly write CH01 and CH02 into the corresponding channel number field of the row. The writing process is completed using field assignment, without relying on reference operations. Simultaneously, call the configuration content field corresponding to the task segment number. Channels marked as idle contain information such as transmission direction, rate, and task priority, stored in comma-separated or nested byte format. For example, the configuration content for D07 is "right, 600, 2", indicating rightward transmission, a rate of 600, and a priority of 2. This content should be completely written into the configuration area of the row containing D07. After the configuration is complete, the control content field is appended. The control content field is predefined based on the task segment number and contains control types such as start, hold, and terminate. Each record should have this field appended after the channel number and configuration content. For example, after writing D08, the "hold" field is appended. This process must verify the correspondence between the field type and the configuration content. If the configuration content has a transmission rate of 0, the control field should be terminated. If the configuration content has a rate higher than 200 and a priority of 1, the control field should be start. After all fields are written, the execution area is summarized and verified to ensure that the task segment number, channel number, configuration content, and control content fields in each record are complete and in the correct position. Error information can be presented in the write log in the form of segment number index. For example, if the channel number of D10 is missing, it will be marked as D10 missing channel. After all records are written, they are summarized and output in order to obtain the print task configuration execution instruction content.
[0099] Please see Figure 7 A cloud printing dynamic configuration system, comprising:
[0100] The structural segment recognition module obtains the field boundary coordinates and text quantity of paragraphs in the task document, extracts the center point position of adjacent fields, analyzes the order of changes in field spacing, splits the paragraph structure with changing field clustering trends, and obtains the structural segment configuration instruction set.
[0101] The channel status monitoring module reads the status response content of the main channel based on the segment number in the structural segment configuration instruction set, writes it into the task status field, pauses transmission, writes the task number and channel number into the preset instruction field, and obtains the task configuration pause record item.
[0102] The task status recovery module reads the status response content at time intervals based on the segment number and channel number in the task configuration pause record, updates the configuration status by comparing it with the task channel information, and obtains the configuration recovery status tag set.
[0103] The path configuration update module reads the channel content marked as idle based on the segment number in the configuration recovery status flag set, fills the segment number into the positions of the main channel number and the available channel number, and updates the path field information to obtain the path configuration adjustment instruction set.
[0104] The task instruction generation module adjusts the task segment number and channel number fields in the path configuration instruction set and the structure segment configuration instruction set, fills in the output field, writes control instructions and channel information, and obtains the content of the print task configuration execution instruction.
[0105] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for dynamic configuration of cloud printing, characterized in that, Includes the following steps: S1: Obtain the field boundary coordinates and text quantity of paragraphs in the task document, extract the center point position of adjacent fields, analyze the order of field spacing changes, split the paragraph structure of field clustering trend changes, and obtain the structure segment configuration instruction set; S2: Based on the segment number in the structure segment configuration instruction set, read the main channel status response content, write it into the task status field, pause transmission, write the task number and channel number into the preset instruction field, and obtain the task configuration pause record item. S3: Based on the segment number and channel number in the task configuration pause record item, read the status response content at time intervals, update the configuration status by comparing with the task channel information, and obtain the configuration recovery status mark set; S4: Based on the segment number in the configuration recovery status flag set, read the channel with the status flag of idle, fill the segment number into the position of the main channel number and the available channel number, update the path field content, and obtain the path configuration adjustment instruction set; S5: Based on the path configuration adjustment instruction set and the segment number and channel number in the structure segment configuration instruction set, fill in the output field, write the control instructions and channel information, and obtain the print task configuration execution instruction content; The structure segment configuration instruction set includes field boundary coordinates, text quantity information, field center point coordinates, field spacing change trend, path direction comparison order, and paragraph structure number. The task configuration pause record item includes segment number, channel number, task number, task status control content, and pause transmission action content. The configuration recovery status marker set includes segment number, channel number, status response content, task channel response information, and configuration status field. The path configuration adjustment instruction set includes segment number, channel number, main channel number, task number, and path status synchronization content. The print task configuration execution instruction content includes output position, channel number, task segment number, execution path field, and transmission control content. The aforementioned paragraph structure refers to analyzing and adjusting the paragraph structure of a document based on field boundary coordinates and text distribution trends; The status response content refers to the feedback data associated with the task status during task execution.
2. The cloud printing dynamic configuration method according to claim 1, characterized in that, The task channel information refers to the channel-level dynamic record describing the allocation status, running status, and response content of the printing task on the channel; The output fields refer to the fields that define the output location in the configuration instructions, including task segment number, channel number, execution path, and control instructions.
3. The cloud printing dynamic configuration method according to claim 1, characterized in that, The specific steps of S1 are as follows: S101: Obtain the field boundary coordinates and text quantity information of paragraphs in the task document, extract the spatial distribution outline of field groups on the page based on the boundary coordinates, compare the outline shape order of adjacent field groups, identify paragraphs with changes in distribution shape, and write the paragraph numbers into the dataset to obtain the field distribution change number set. S102: Based on the field distribution change number set, read the field center point position of the corresponding paragraph and the previous paragraph, connect the extension directions of the two center points in sequence, identify the segment number of the direction shift, and write the number into the direction feature dataset to obtain the field direction shift number set. S103: Based on the field distribution change number set and the field direction transfer number set, the numbers are cross-searched sequentially to extract the segment numbers that appear simultaneously. The numbers are written into the structure configuration content to obtain the structure segment configuration instruction set.
4. The cloud printing dynamic configuration method according to claim 1, characterized in that, The specific steps of S2 are as follows: S201: Based on the segment number in the configuration instruction set of the structure segment, extract the content of the main channel response data frame, match the response content of each time corresponding to the current segment number with the response content of the previous frame according to the receiving order, determine the change of the status field, identify the field structure within the range of continuous status changes, and write it into the task control structure to obtain the task status docking information set. S202: Based on the task status docking information set, write the segment number marked in the field into the task configuration information table, insert the status field into the status control area of the row where the segment number is located, and obtain the pause transmission action description table. S203: Based on the pause transmission action description table, extract the segment number and corresponding channel number indicated by the status field, combine the channel number and segment number into a task index data group, and write it into the control instruction field to obtain the task configuration pause record item.
5. The cloud printing dynamic configuration method according to claim 1, characterized in that, The specific steps for S3 are as follows: S301: Based on the segment number and channel number in the task configuration pause record item, collect the main channel status response content, connect the continuously read status fields with the previous fields in sequence, judge the field differences, and obtain the status field connection sequence. S302: Based on the status field docking sequence, detect the field format in the response content and match it with the current channel response to obtain a set of segment numbers with consistent format; S303: Based on the format-consistent segment number set, replace the status of each segment task control field, replace the paused status with the resumed status, and simultaneously replace the identifier in the channel marked as idle to obtain the configuration resumed status marker set.
6. The cloud printing dynamic configuration method according to claim 1, characterized in that, The specific steps of S4 are as follows: S401: Based on the segment number in the configuration recovery status mark set, extract the status information in the channel marked as idle, and write the corresponding number of the recovery status to the main channel number to obtain the main channel write number set. S402: Based on the main channel write number set, find the idle channel number that is not included, match the write number with the task number, and at the same time append the corresponding path status information to the channel marked as idle to obtain the idle channel matching number set. S403: Based on the set of idle channel alignment numbers, extract the channel number and segment number, write them into the path field, and attach the synchronization status content to obtain the set of path configuration adjustment instructions.
7. The cloud printing dynamic configuration method according to claim 1, characterized in that, The specific steps of S5 are as follows: S501: Based on the path configuration adjustment instruction set and the task segment number in the structure segment configuration instruction set, extract the channel number corresponding to the task segment number, and write the channel number into the output area field in the order of the task segment number to obtain the channel order output mapping set. S502: Based on the channel sequential output mapping set, retrieve each task segment number in turn, write the channel number and task segment number into the corresponding position of the path field, and attach the content of the transmission action field to obtain the path writing instruction sequence. S503: Based on the path writing instruction sequence, write the configuration content of each task segment and the channel number into the task configuration execution area simultaneously, and attach control content field information to obtain the print task configuration execution instruction content.
8. A cloud printing dynamic configuration system, characterized in that, The system is used to implement the cloud printing dynamic configuration method according to any one of claims 1-7, the system comprising: The structural segment recognition module obtains the field boundary coordinates and text quantity of paragraphs in the task document, extracts the center point position of adjacent fields, analyzes the order of changes in field spacing, splits the paragraph structure with changing field clustering trends, and obtains the structural segment configuration instruction set. The channel status monitoring module reads the status response content of the main channel based on the segment number in the structure segment configuration instruction set, writes it into the task status field, pauses transmission, writes the task number and channel number into the preset instruction field, and obtains the task configuration pause record item. The task status recovery module reads the status response content at time intervals based on the segment number and channel number in the task configuration pause record item, updates the configuration status by comparing with the task channel information, and obtains the configuration recovery status tag set. The path configuration update module reads the channel content marked as idle based on the segment number in the configuration recovery status mark set, fills the segment number into the positions of the main channel number and the available channel number, and updates the path field information to obtain the path configuration adjustment instruction set. The task instruction generation module fills in the output field based on the path configuration adjustment instruction set and the task segment number and channel number fields in the structure segment configuration instruction set, and writes control instructions and channel information to obtain the print task configuration execution instruction content.
Citation Information
Patent Citations
Information printing method and device, computer equipment and computer readable storage medium
CN116431085A
Printer document cloud conversion method and system, medium and program product
CN118502693A