Print control method, device, computer readable medium, and electronic device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GODOX PHOTO EQUIPMENT CO LTD
- Filing Date
- 2026-04-07
- Publication Date
- 2026-08-04
AI Technical Summary
[0002]目前,打印机在调用云端AI模型生成内容进行打印时,打印机厂商需要付出额外的成本,导致成本过大,且成本无法得到有效管控,业务的可持续性无法得到保证
[0017] According to one aspect of the embodiments of this application, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium, a processor of a computer device reading the computer instructions from the computer-readable storage medium, and the processor executing the computer instructions to cause the computer device to perform the printing control method as described in the above embodiments.
Smart Images

Figure CN122507328A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of printer technology, and more specifically, to a printing control method, apparatus, computer-readable medium, and electronic device. Background Technology
[0002] Currently, printer manufacturers incur additional costs when printing content generated by cloud-based AI models, resulting in excessive costs that cannot be effectively controlled, thus jeopardizing business sustainability. Summary of the Invention
[0003] The embodiments of this application provide a printing control method, apparatus, computer-readable medium, and electronic device, which can at least to some extent achieve effective control over the costs associated with calling cloud AI models to generate content, thus ensuring the sustainability of business.
[0004] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0005] According to one aspect of the embodiments of this application, a printing control method is provided, the method comprising: obtaining identification information of printing resources, the identification information being associated with the remaining amount of resources for generating print content by calling a cloud service; if it is determined, based on the remaining amount of resources associated with the identification information for generating print content by calling a cloud service, that there are remaining resources for generating print content by calling a cloud service, then calling a cloud service to generate print content, and upon successful generation of print content, deducting the remaining amount of resources associated with the identification information for generating print content by calling a cloud service; and printing the print content.
[0006] According to one aspect of the embodiments of this application, a printing control method is provided, the method comprising: obtaining identification information of printing resources, the identification information being associated with the remaining amount of resources for printing content generated by calling a cloud service; calling a cloud service to generate printing content; if it is determined, based on the remaining amount of resources associated with the identification information for printing the printing content generated by calling a cloud service, that there are remaining resources for printing the printing content generated by calling a cloud service, then printing the printing content; if the printing of the printing content is successfully completed, then deducting the remaining amount of resources associated with the identification information for printing the printing content generated by calling a cloud service.
[0007] According to one aspect of the embodiments of this application, a printing control device is provided, the device comprising: a first identification acquisition unit, configured to acquire identification information of printing resources, the identification information being associated with the remaining amount of resources for generating print content by calling a cloud service; a calling and deduction unit, configured to, if it is determined, based on the remaining amount of resources associated with the identification information for generating print content by calling a cloud service, that there are remaining resources for generating print content by calling a cloud service, then calling a cloud service to generate print content, and deducting the remaining amount of resources associated with the identification information for generating print content by calling a cloud service when the print content is successfully generated; and a content printing unit, configured to print the print content.
[0008] In some embodiments of this application, based on the foregoing scheme, the device is located in a portable printer, the portable printer includes an RFID read / write module, and the portable printer is capable of printing on paper in a paper module integrated with an RFID tag; the first identifier acquisition unit is configured to: acquire, based on the RFID read / write module, the identifier information of the printing resources in the RFID tag and the remaining resource amount associated with the identifier information for generating printing content by calling a cloud service; the calling and deduction unit is configured to: deduct, based on the RFID read / write module, the remaining resource amount associated with the identifier information in the RFID tag for generating printing content by calling a cloud service when printing content is successfully generated.
[0009] In some embodiments of this application, based on the foregoing scheme, the calling and deduction unit is configured as follows: if it is determined that there are remaining resources for calling the cloud service to generate print content based on the remaining resource amount associated with the identification information, then the pre-printed border style information in the RFID tag is obtained based on the RFID read / write module, the pre-printed border style information being used to indicate the pre-printed border style of the printing paper in the printing paper module; content generation parameters are determined based on the pre-printed border style information; and the cloud service is called to generate print content based on the content generation parameters.
[0010] In some embodiments of this application, based on the foregoing scheme, the device further includes a sheet count acquisition unit and a remaining sheet count determination unit; the RFID tag also records the number of printed sheets and the total number of sheets allowed to be printed by the printing paper module; before printing the content, the sheet count acquisition unit is configured to: acquire the number of printed sheets and the total number of sheets allowed to be printed in the RFID tag based on the RFID read / write module; the remaining sheet count determination unit is configured to: determine the remaining printable sheets based on the number of printed sheets and the total number of sheets allowed to be printed; the content printing unit is configured to: print the content if the remaining printable sheets are greater than 0.
[0011] In some embodiments of this application, based on the foregoing scheme, the device further includes a legality verification unit, a first remaining resource quantity acquisition unit, and a first remaining resource quantity judgment unit; after acquiring the identification information of the printing resource, the legality verification unit is used to: perform legality verification on the identification information of the printing resource; the first remaining resource quantity acquisition unit is used to: if the identification information of the printing resource passes the legality verification, acquire the remaining resource quantity associated with the identification information for calling cloud services to generate printing content; the first remaining resource quantity judgment unit is used to: determine whether there are remaining resources for calling cloud services to generate printing content based on the remaining resource quantity associated with the identification information for calling cloud services to generate printing content.
[0012] In some embodiments of this application, based on the foregoing scheme, the device further includes a second remaining resource acquisition unit and a second remaining resource determination unit; the first identification acquisition unit is configured to: when receiving a print request from a portable printer, acquire identification information of the print resources carried in the print request; after acquiring the identification information of the print resources, the second remaining resource acquisition unit is configured to: acquire the remaining resource quantity associated with the identification information of the print resources for generating print content by calling cloud services; the second remaining resource determination unit is configured to: determine whether there are remaining resources for generating print content by calling cloud services based on the remaining resource quantity associated with the identification information for generating print content by calling cloud services.
[0013] According to one aspect of the embodiments of this application, a printing control device is provided, the device comprising: a second identification acquisition unit, configured to acquire identification information of printing resources, the identification information being associated with the remaining amount of resources for printing content generated by calling a cloud service; a calling unit, configured to call a cloud service to generate printing content; a verification and printing unit, configured to print the printing content if it is determined, based on the remaining amount of resources associated with the identification information for printing the printing content generated by calling a cloud service, that there are remaining resources for printing the printing content generated by calling a cloud service; and a deduction unit, configured to deduct the remaining amount of resources associated with the identification information for printing the printing content generated by calling a cloud service if the printing of the printing content is successfully completed.
[0014] In some embodiments of this application, based on the foregoing scheme, the device is located in a portable printer, the portable printer includes an RFID read / write module, and the portable printer is capable of printing paper in a paper module integrating an RFID tag; the second identifier acquisition unit is configured to: based on the RFID read / write module, acquire the identifier information of the printing resources in the RFID tag and the remaining amount of printing resources associated with the identifier information and generated by calling a cloud service for printing; the deduction unit is configured to: if the printing of the printing content is successfully completed, deduct the remaining amount of printing resources associated with the identifier information in the RFID tag and generated by calling a cloud service for printing based on the RFID read / write module.
[0015] According to one aspect of the embodiments of this application, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the printing control method as described in the above embodiments.
[0016] According to one aspect of the embodiments of this application, an electronic device is provided, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the printing control method as described in the above embodiments.
[0017] According to one aspect of the embodiments of this application, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium, a processor of a computer device reading the computer instructions from the computer-readable storage medium, and the processor executing the computer instructions to cause the computer device to perform the printing control method as described in the above embodiments.
[0018] In some embodiments of this application, the technical solutions involve first obtaining the identification information of printing resources, which is associated with the remaining amount of resources used to generate print content via cloud services; then, based on the remaining amount of resources associated with the identification information, determining whether there are any remaining resources for generating print content via cloud services; and if so, calling the cloud services to generate print content if there are. If print content is successfully generated, the remaining amount of resources associated with the identification information is deducted; finally, the generated print content can be printed. Therefore, this application transfers the cost associated with generating content via cloud services to the user and effectively controls the cost associated with generating content via cloud services, ensuring business sustainability.
[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0021] Figure 1 A flowchart of a printing control method according to an embodiment of this application is shown; Figure 2 A structural block diagram of a portable printer according to an embodiment of this application is shown; Figure 3 A schematic diagram of the overall process according to an embodiment of this application is shown; Figure 4 An embodiment according to this application is shown. Figure 1 A schematic diagram showing the details of steps 110 and 120 in the embodiment; Figure 5 A detailed flowchart illustrating an embodiment of this application is provided, showing that if, based on the remaining resource quantity associated with the cloud service for generating print content, there are remaining resources for generating print content using the cloud service, then the cloud service is invoked to generate print content, a detailed flowchart is provided. Figure 6 A flowchart of a printing control method according to another embodiment of this application is shown; Figure 7 A block diagram of a printing control device according to an embodiment of this application is shown; Figure 8 A block diagram of a printing control device according to another embodiment of this application is shown; Figure 9 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation
[0022] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.
[0023] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0024] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0025] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0026] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0027] Figure 1 A flowchart of a printing control method according to an embodiment of this application is shown. This printing control method can be executed by any of the following entities: a portable printer, a mobile terminal capable of communicating with the portable printer and / or the cloud, or a cloud platform capable of communicating with the portable printer and / or the mobile terminal. The portable printer can be a pocket printer and may have a camera function; the mobile terminal can be various types of mobile terminals such as smartphones, smart glasses, tablets, and smartwatches; communication between the portable printer and the mobile terminal can be achieved through various methods such as Bluetooth, WiFi, and the Internet. Please see [link to relevant documentation]. Figure 1 As shown, the printing control method may include the following steps: In step 110, the identification information of the printing resources is obtained, and the identification information is associated with the remaining amount of resources for generating printing content by calling the cloud service.
[0028] The identification information for print resources can be used to identify the remaining amount of resources purchased by the user and generated by calling cloud services for printing content.
[0029] For example, when the solution of this application embodiment is applied to a portable printer, the identification information of the printing resources can be, for example, the identification information of the printing paper module (a roll of printing paper), that is, the unique number (PaperID) of the printing paper module; the identification information of the printing resources can also be the identification information that uniquely corresponds to the remaining amount of resources generated by calling the cloud service to print content. The length of the PaperID field can be 16 bytes, and the type can be ASCII; PaperID is a serial number that uniquely identifies the printing paper module.
[0030] Figure 2 A structural block diagram of a portable printer according to an embodiment of this application is shown. See also... Figure 2 As shown, a portable printer may include a main control MCU, a Radio Frequency Identification (RFID) reader / writer module, a microphone, a display screen, a wireless communication module, and a thermal printing module. The portable printer can print from paper in a paper module that integrates RFID tags. The RFID tags can be affixed to the inside of the paper roll (inside the thermal paper core) of the paper module, supporting reading and writing. The user area storage space can be at least 64 bytes, and the RFID tags can be UHF passive tags. The RFID reader / writer module is a UHF reader / writer integrated into the printer (such as an Impinj R420 compatible module or a domestic AS320 series), supporting near-field reading and writing (working distance ≤ 5 cm). The main control MCU can handle voice processing, image synthesis, print control, and RFID communication. The thermal printing module may include a grayscale thermal printhead, supporting 2–4 levels of grayscale or higher grayscale printing output with a resolution ≥ 203 dpi. The wireless communication module can support Bluetooth and / or Wi-Fi communication for connecting to mobile apps or cloud AI services.
[0031] Portable printers can connect wirelessly to mobile devices and can be operated via a mobile app.
[0032] Portable printers can support content generation printing, a function that can convert user-provided content (e.g., content provided by a smart device or portable printer) into another form of content using a cloud-based AI model, and then print it. For example, content generation printing could be a voice-to-image printing function. When needed, the user presses the AI-generated image printing button on the printer and speaks a voice prompt. This prompt is sent to the cloud, where an AI model generates an image (e.g., a line drawing) based on the spoken prompt or its converted text. The cloud then sends this image to the portable printer for printing. Alternatively, users can use the voice-to-image printing function via a mobile device communicating with the portable printer. For instance, the user can capture voice prompts via the mobile device. Specifically, the mobile device can have a pre-set app; when a button in the app is triggered by the user, the mobile device's microphone can start capturing audio signals. Content generation printing can also include other types of printing, such as voice-to-text, image-to-text, and text-to-image, which are not limited here.
[0033] In one embodiment of this application, before obtaining the identification information of the printing resource, the method further includes: when a printing task is received, determining whether executing the printing task requires calling a cloud service to generate printing content; if so, obtaining the identification information of the printing resource.
[0034] If the print job does not require calling cloud services to generate print content, then you can print directly.
[0035] The print job may include identification information indicating whether the print job needs to be executed or whether cloud services need to be called to generate print content. The identification information can be used to determine whether the print job needs to be executed or whether cloud services need to be called to generate print content.
[0036] Whether a print job needs to be executed and whether it requires calling a cloud service to generate print content can be determined based on whether the print job includes print target data. If the print job includes print target data, it can be determined that executing the print job does not require calling a cloud service to generate print content. Print target data can be image data.
[0037] The presence or absence of voice data in the print job can also be used to determine whether a cloud service is needed to generate the print content. If the print job includes voice data, it can be determined that a cloud service is required to generate the print content.
[0038] Figure 3A schematic diagram of the overall process according to an embodiment of this application is shown. First, the user can collect voice input through a portable printer or a mobile terminal communicating with the portable printer to trigger the generation of a print job; then, it is determined whether the print content needs to be generated using cloud AI. If not, the pre-printing preparation begins, and printing can proceed directly.
[0039] Figure 4 An embodiment according to this application is shown. Figure 1 A schematic diagram illustrating the details of steps 110 and 120 in the embodiment. Please refer to... Figure 4 As shown, obtaining the identification information of print resources can specifically include the following steps: In step 110', based on the RFID read / write module, the identification information of the printing resources in the RFID tag and the remaining amount of resources associated with the identification information for generating printing content by calling the cloud service are obtained.
[0040] First, the identification information of the printing resources in the RFID tag can be obtained based on the RFID read / write module, and the legality of the identification information of the printing resources can be verified. If the legality verification is passed, the remaining amount of resources associated with the identification information in the RFID tag and the call to the cloud service to generate the printing content can be obtained based on the RFID read / write module.
[0041] Legality verification can be performed in the cloud, locally on the printer, or a second verification can be performed in the cloud after a single verification on the printer. For example, legality verification may include determining whether the identifier information of the print resource matches the authorized identifier information stored in the cloud or on the printer. Legality verification may also include determining whether the format of the print resource identifier information conforms to predetermined rules.
[0042] The remaining resources associated with the identification information for generating print content using cloud services can be the number of available tokens corresponding to the identification information. These tokens are used to offset the tokens consumed by the cloud AI image generation service. The number of available tokens can be the data corresponding to the field name "Tokens," which can be 2 bytes long and of data type uint16_t. The number of available tokens is essentially the token balance available for cloud AI generation.
[0043] In one embodiment of this application, after obtaining the identification information of the printing resources, the method further includes: performing a legality verification on the identification information of the printing resources; if the identification information of the printing resources passes the legality verification, obtaining the remaining amount of resources associated with the identification information for calling cloud services to generate printing content; and determining whether there are any remaining resources for calling cloud services to generate printing content based on the remaining amount of resources associated with the identification information for calling cloud services to generate printing content.
[0044] In step 120, if it is determined that there are remaining resources for generating print content by calling the cloud service based on the remaining resources associated with the identification information, then the cloud service is called to generate print content, and when the print content is successfully generated, the remaining resources associated with the identification information for generating print content by calling the cloud service are deducted.
[0045] If Tokens (the data corresponding to the Tokens field) is greater than 0, it indicates that there are remaining resources available for calling the cloud service to generate print content. Upon successful print content generation, the cloud can automatically calculate the amount of resources (Tokens) consumed in generating the print content and deduct the remaining resources associated with the current identifier for generating print content from the amount of resources consumed. The initial value of the data corresponding to the Tokens field can be greater than the maximum number of Tokens required to generate all images needed to print one roll of paper, and can even be 10 or 20 times the maximum number of Tokens required to generate all images needed to print one roll of paper. For example, it can provide enough Tokens to generate 1000 images for a roll of 50 sheets of paper.
[0046] Figure 5 This document illustrates a detailed flowchart illustrating how, according to an embodiment of this application, if it is determined, based on the remaining resource quantity associated with the cloud service for generating print content, there are remaining resources available for generating print content using the cloud service, then the cloud service is invoked to generate print content. Please refer to [link to relevant documentation]. Figure 5 As shown, if it is determined that there are remaining resources for generating print content by calling the cloud service based on the remaining resources associated with the identification information, then calling the cloud service to generate print content may specifically include the following steps: In step 510, if it is determined that there are remaining resources for generating print content by calling the cloud service based on the remaining resources associated with the identification information, then the pre-printed border style information in the RFID tag is obtained based on the RFID read / write module. The pre-printed border style information is used to indicate the pre-printed border style of the printing paper in the printing paper module.
[0047] The pre-printed border style information can be data corresponding to the FrameStyle field, which can be 1 byte long and of data type uint8_t. When the data corresponding to the FrameStyle field is 0, it represents no border style; when the data corresponding to the FrameStyle field is 1, it represents using border style A; when the data corresponding to the FrameStyle field is 2, it represents using border style B.
[0048] The RFID tag may also include data corresponding to a HasFrame field, which is a border flag. Its data length can be 1 byte, and its data type can be uint8_t. When the data corresponding to HasFrame is 0, it represents no border; when the data corresponding to HasFrame is 1, it represents a border. Therefore, before obtaining the pre-printed border style information from the RFID tag using the RFID read / write module, the border flag information can be obtained first. If the border flag information is 1, then the pre-printed border style information can be obtained from the RFID read / write module.
[0049] Passive UHF RFID tags can be integrated onto the following three types of dedicated grayscale thermal paper: pure white grayscale paper (without border), pre-printed border style A (such as a retro photo frame), and pre-printed border style B (such as a cartoon border).
[0050] In step 520, the content generation parameters are determined based on the pre-printed border style information.
[0051] Content generation parameters can be image generation parameters, such as resolution, coordinates, size, etc.
[0052] Content generation parameters are those that match the pre-printed border style information. A mapping table between pre-printed border style information and content generation parameters can be built into the printer; the content generation parameters can be obtained by querying this table based on the pre-printed border style information.
[0053] For pure white grayscale paper, full-width printing is required with no restrictions; for pre-printed border style A, the image content must be centered and avoid the 5mm safe zone around the border; for pre-printed border style B, the image must be adapted to a 3:4 ratio and a virtual mask must be overlaid to match the cartoon style.
[0054] In step 530, the cloud service is invoked to generate print content based on the content generation parameters.
[0055] It can use content generation parameters to call cloud-based AI services to generate printable content in the form of images.
[0056] Of course, content generation parameters can also be stored directly in the RFID tag. When print content needs to be generated, the content generation parameters stored in the RFID tag can be read, and the cloud service can be called to generate the print content based on these parameters.
[0057] Of course, in other embodiments of this application, the content adjustment parameters can be determined based on the pre-printed border style information, and after the print content is generated, the print content can be adjusted based on the content adjustment parameters so that the adjusted print content can match the pre-printed border style information; when printing is required, the adjusted print content can be printed.
[0058] Please continue reading Figure 4 As shown, upon successful generation of print content, the remaining resources associated with the cloud service used to generate the print content are deducted. This can specifically include the following steps: In step 120', when the print content is successfully generated, the remaining resources associated with the cloud service for generating the print content, which are linked to the identification information in the RFID tag, are deducted based on the RFID read / write module.
[0059] Please continue reading Figure 3 As shown, if cloud AI is needed to generate print content, the identification information of the print resources in the RFID tag needs to be identified, i.e., it needs to be determined whether it has passed the legality check, and whether the Tokens are greater than 0. If the Tokens are not greater than 0, the message "Insufficient Tokens, please replace the paper roll" can be displayed. If the Tokens are greater than 0, the border information can be read from the RFID tag, and the image layout parameters can be determined based on the border information. The cloud AI can then be called to generate the image based on the image layout parameters. If the image is successfully generated, the number of available Tokens can be deducted according to the required number of Tokens, and the deduction result can be written back to the RFID tag. Then, the pre-printing preparation process can begin. If the image is not successfully generated, the cloud can return an error message, and no Tokens will be deducted in this case.
[0060] If the number of tokens is not greater than 0, printing can be refused; if the number of tokens is not greater than 0, printing can also be allowed, but measures such as reducing the queuing priority of the printing task and reducing the printing quality can be taken.
[0061] In one embodiment of this application, the method further includes: if the remaining amount of resources associated with the identification information for generating print content by calling the cloud service is greater than 0 and less than a predetermined threshold, then the quality of the generated print content is reduced when calling the cloud service to generate print content or the print quality is reduced when printing the print content.
[0062] In this embodiment of the application, by reducing the quality of raw images or prints when the remaining tokens are greater than zero but drop to a certain threshold, the situation where the pre-stored tokens are used up but the paper is not used up can be avoided.
[0063] In one embodiment of this application, the RFID tag also records the number of printed sheets and the total number of sheets allowed to be printed by the printing paper module; before printing the content, the method further includes: obtaining the number of printed sheets and the total number of sheets allowed to be printed in the RFID tag based on the RFID read / write module; and determining the remaining number of printable sheets based on the number of printed sheets and the total number of sheets allowed to be printed.
[0064] The total number of printable pages can be the data corresponding to the MaxPrints field, which can be 2 bytes long, of data type uint16_t, and have a value of 50. The number of printable pages can be the data corresponding to the UsedPrints field, which can be 2 bytes long and of data type uint16_t.
[0065] The remaining number of printable sheets (Remaining) can be calculated using the formula Remaining = MaxPrints - UsedPrints. If Remaining ≤ 0, a message will appear saying "Paper roll is used up, please replace with new paper" and the process will terminate.
[0066] The steps of obtaining the number of printed pages and the total number of allowed pages in the RFID tag based on the RFID read / write module, determining the remaining number of printable pages based on the number of printed pages and the total number of allowed pages, and determining whether the remaining number of printable pages is greater than 0 can be the last few steps before printing, or they can be executed immediately after the user triggers printing (such as before determining whether cloud AI generation or token verification is required).
[0067] All the data recorded in the aforementioned RFID tags can be displayed on the printer's screen and updated in real time.
[0068] In one embodiment of this application, obtaining the identification information of printing resources includes: upon receiving a print request from a portable printer, obtaining the identification information of the printing resources carried in the print request; after obtaining the identification information of the printing resources, the method further includes: obtaining the remaining amount of resources associated with the identification information for generating print content by calling cloud services; and determining whether there are any remaining resources for generating print content by calling cloud services based on the remaining amount of resources associated with the identification information for generating print content.
[0069] In the embodiments of this application, the remaining resource quantity (Token) can be pre-purchased by the user (e.g., purchased online), and bound online to the identification information of the printer's pre-set printing resources. This allows the association between the identification information of the printing resources and the remaining resource quantity generated by calling cloud services to print content to be stored in the cloud. The identification information of the printing resources can be pre-stored in the printer firmware. When printing is required, the user can query the corresponding remaining resource quantity generated by calling cloud services to print content based on the identification information of the printing resources. After printing is completed, the remaining resource quantity in the cloud can be updated.
[0070] In step 130, the printed content is printed.
[0071] After the cloud service generates the print content, it can return the print content to the printer and display it on the printer's screen. Then, the user can trigger a button on the printer to print; the user can also trigger a reprint command on the printer.
[0072] When the remaining number of printable sheets is determined, the printable content is printed. This may include: if the remaining number of printable sheets is greater than 0, then the printable content is printed.
[0073] After successful printing, the number of printed copies can be updated by using UsedPrints=UsedPrints+1, and the updated value can be written to the RFID tag. After writing, the value of UsedPrints can be read from the RFID tag again to verify whether the writing was successful. If the writing fails, the error can be recorded and the print job can be retried before the next print job.
[0074] RFID tags can also store data corresponding to the CRC16 field, which is 2 bytes long and can be of data type uint16_t. This CRC16 field data can be used for data verification.
[0075] Throughout the process, if no RFID tag is detected, it can be determined that the printing paper is unauthorized paper, and all printing can be prohibited; when reading RFID data, if CRC verification is performed, it can prompt "paper information is damaged" and prohibit printing.
[0076] The RFID reader interface can use UART (115200 bps) or SPI, and its antenna layout can surround the bottom of the paper roll mounting cavity to ensure stable reading and writing of tags within a range of 0–4cm; RFID reading and writing and thermal print head driving adopt time-sharing operation (avoiding simultaneous high-frequency operation); RFID tags can be fixed to the center of the inner side of the paper roll core to avoid pulling and damage during winding.
[0077] Figure 6 A flowchart of a printing control method according to another embodiment of this application is shown. This printing control method can be executed by any of the following entities: a portable printer, a mobile terminal capable of communicating with the portable printer and / or the cloud, or a cloud capable of communicating with the portable printer and / or the mobile terminal. See also... Figure 6 As shown, the printing control method may include the following steps: In step 610, the identification information of the printing resources is obtained, and the identification information is associated with the remaining amount of resources for printing the content generated by calling the cloud service.
[0078] The remaining resources for printing content generated by calling cloud services can be the number of times the content generated by calling cloud services can be printed, which is the number of sheets of paper used to print the content generated by calling cloud services.
[0079] In one embodiment of this application, the method is applied to a portable printer, which includes an RFID read / write module and is capable of printing on paper in a paper module integrated with an RFID tag. The step of obtaining the identification information of the printing resources includes: based on the RFID read / write module, obtaining the identification information of the printing resources in the RFID tag and the remaining amount of printing resources associated with the identification information and the printing content generated by calling the cloud service.
[0080] In step 620, the cloud service is invoked to generate the print content.
[0081] In step 630, if it is determined that there are remaining resources for printing the content generated by calling the cloud service, based on the remaining resources associated with the identification information for printing the content generated by calling the cloud service, then the content is printed.
[0082] The remaining amount of resources associated with the identification information of the RFID tag for printing content generated by calling cloud services can be obtained from the RFID tag, and the remaining amount of resources associated with the identification information of the RFID tag for printing content generated by calling cloud services can also be obtained from the cloud.
[0083] In step 640, if the printing of the content is successfully completed, the remaining resources for printing the content generated by calling the cloud service associated with the identification information are deducted.
[0084] In one embodiment of this application, if the printing of the printed content is successfully completed, the remaining resources for printing the printed content generated by calling the cloud service associated with the identification information are deducted, including: if the printing of the printed content is successfully completed, the remaining resources for printing the printed content generated by calling the cloud service associated with the identification information in the RFID tag are deducted based on the RFID read / write module.
[0085] Of course, when the remaining resources associated with the identification information for printing content generated by calling cloud services are stored in the cloud, the remaining resources associated with the identification information for printing content generated by calling cloud services can also be deducted in the cloud.
[0086] The following describes an embodiment of the apparatus described in this application, which can be used to execute the printing control method described in the above embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the printing control method described above.
[0087] Figure 7 A block diagram of a printing control device according to an embodiment of this application is shown. (Refer to...) Figure 7 As shown, a printing control device 700 according to an embodiment of this application includes: a first identifier acquisition unit 710, a call and deduction unit 720, and a content printing unit 730. The first identifier acquisition unit 710 is used to acquire identifier information of printing resources, the identifier information being associated with the remaining amount of resources used to generate print content via a cloud service. The call and deduction unit 720 is used to, if it is determined that there are remaining resources for generating print content via a cloud service based on the remaining resource amount associated with the identifier information, call the cloud service to generate print content, and deduct the remaining resource amount associated with the identifier information when successfully generating print content. The content printing unit 730 is used to print the print content.
[0088] In some embodiments of this application, based on the foregoing scheme, the device is located in a portable printer, the portable printer includes an RFID read / write module, and the portable printer is capable of printing on paper in a paper module integrated with an RFID tag; the first identifier acquisition unit 710 is configured to: acquire the identifier information of the printing resources in the RFID tag and the remaining resource amount associated with the identifier information for generating printing content by calling cloud services, based on the RFID read / write module; the calling and deduction unit 720 is configured to: deduct the remaining resource amount associated with the identifier information in the RFID tag for generating printing content by calling cloud services, based on the RFID read / write module, when printing content is successfully generated.
[0089] In some embodiments of this application, based on the foregoing scheme, the calling and deduction unit 720 is configured as follows: if it is determined that there are remaining resources for calling the cloud service to generate print content based on the remaining resource amount associated with the identification information, then the pre-printed border style information in the RFID tag is obtained based on the RFID read / write module, the pre-printed border style information being used to indicate the pre-printed border style of the printing paper in the printing paper module; content generation parameters are determined based on the pre-printed border style information; and the cloud service is called to generate print content based on the content generation parameters.
[0090] In some embodiments of this application, based on the foregoing scheme, the device further includes a sheet count acquisition unit and a remaining sheet count determination unit; the RFID tag also records the number of printed sheets and the total number of sheets allowed to be printed by the printing paper module; before printing the printed content, the sheet count acquisition unit is configured to: acquire the number of printed sheets and the total number of sheets allowed to be printed in the RFID tag based on the RFID read / write module; the remaining sheet count determination unit is configured to: determine the remaining printable sheets based on the number of printed sheets and the total number of sheets allowed to be printed; the content printing unit 730 is configured to: print the printed content if the remaining printable sheets are greater than 0.
[0091] In some embodiments of this application, based on the foregoing scheme, the device further includes a legality verification unit, a first remaining resource quantity acquisition unit, and a first remaining resource quantity judgment unit; after acquiring the identification information of the printing resource, the legality verification unit is used to: perform legality verification on the identification information of the printing resource; the first remaining resource quantity acquisition unit is used to: if the identification information of the printing resource passes the legality verification, acquire the remaining resource quantity associated with the identification information for calling cloud services to generate printing content; the first remaining resource quantity judgment unit is used to: determine whether there are remaining resources for calling cloud services to generate printing content based on the remaining resource quantity associated with the identification information for calling cloud services to generate printing content.
[0092] In some embodiments of this application, based on the foregoing scheme, the device further includes a second remaining resource quantity acquisition unit and a second remaining resource quantity determination unit; the first identifier acquisition unit 710 is configured to: when receiving a print request from a portable printer, acquire identifier information of the print resources carried in the print request; after acquiring the identifier information of the print resources, the second remaining resource quantity acquisition unit is configured to: acquire the remaining resource quantity associated with the identifier information for calling cloud services to generate print content based on the identifier information of the print resources; the second remaining resource quantity determination unit is configured to: determine whether there are remaining resources for calling cloud services to generate print content based on the remaining resource quantity associated with the identifier information for calling cloud services to generate print content.
[0093] Figure 8 A block diagram of a printing control device according to another embodiment of this application is shown. (Refer to...) Figure 8 As shown, a print control device 800 according to an embodiment of this application includes: a second identifier acquisition unit 810, a calling unit 820, a verification and printing unit 830, and a deduction unit 840. The second identifier acquisition unit 810 is used to acquire identifier information of print resources, the identifier information being associated with the remaining amount of resources for printing content generated by calling a cloud service; the calling unit 820 is used to call a cloud service to generate print content; the verification and printing unit 830 is used to print the print content if, based on the remaining amount of resources associated with the identifier information for printing the print content generated by calling a cloud service, it is determined that there are remaining resources for printing the print content generated by calling a cloud service; the deduction unit 840 is used to deduct the remaining amount of resources associated with the identifier information for printing the print content generated by calling a cloud service if the printing of the print content is successfully completed.
[0094] In some embodiments of this application, based on the foregoing scheme, the device is located in a portable printer, the portable printer includes an RFID read / write module, and the portable printer is capable of printing paper in a paper module with an integrated RFID tag; the second identification acquisition unit 810 is configured to: based on the RFID read / write module, acquire the identification information of the printing resources in the RFID tag and the remaining amount of printing resources associated with the identification information and the associated cloud service generated printing content; the deduction unit 840 is configured to: if the printing of the printing content is successfully completed, deduct the remaining amount of printing resources associated with the identification information in the RFID tag and the associated cloud service generated printing content based on the RFID read / write module.
[0095] Figure 9 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown.
[0096] It should be noted that, Figure 9 The computer system 900 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0097] like Figure 9 As shown, the computer system 900 includes a Central Processing Unit (CPU) 901, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 902 or programs loaded from storage portion 908 into Random Access Memory (RAM) 903, such as performing the methods described in the above embodiments. The RAM 903 also stores various programs and data required for system operation. The CPU 901, ROM 902, and RAM 903 are interconnected via a bus 904. An Input / Output (I / O) interface 905 is also connected to the bus 904.
[0098] The following components are connected to I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to I / O interface 905 as needed. Removable media 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 910 as needed so that computer programs read from them can be installed into storage section 908 as needed.
[0099] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 909, and / or installed from removable medium 911. When the computer program is executed by central processing unit (CPU) 901, it performs various functions defined in the system of this application.
[0100] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0101] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0102] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0103] In one aspect, this application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.
[0104] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0105] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the methods according to the embodiments of this application.
[0106] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0107] The data collection and processing plan outlined in this application must be implemented in strict accordance with the requirements of relevant national laws and regulations, obtaining the informed consent or separate consent of the data subject (or having a legal basis as stipulated by the relevant national laws and regulations), and conducting subsequent data use and processing within the scope authorized by laws and regulations and the data subject.
[0108] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A printing control method, characterized in that, The method includes: Obtain the identification information of the printing resources, which is associated with the remaining amount of resources used to generate the printing content by calling the cloud service; If, based on the remaining resources associated with the cloud service for generating print content, the identification information indicates the existence of remaining resources for generating print content, then the cloud service is invoked to generate print content, and upon successful generation of print content, the remaining resources associated with the cloud service for generating print content are deducted. Print the content.
2. The printing control method according to claim 1, characterized in that, The method is applied to a portable printer, which includes an RFID read / write module and is capable of printing on paper in a paper printing module that integrates RFID tags. The process of obtaining the identification information of the print resources includes: Based on the RFID read / write module, the identification information of the printing resources in the RFID tag and the remaining amount of resources associated with the identification information for generating printing content by calling cloud services are obtained; When print content is successfully generated, the remaining resources associated with the cloud service call for print content generation, linked to the identification information, are deducted, including: Upon successful generation of print content, the remaining resources associated with the cloud service for generating print content, based on the RFID read / write module, are deducted.
3. The printing control method according to claim 2, characterized in that, If, based on the remaining resources associated with the cloud service for generating print content as indicated by the identification information, it is determined that there are remaining resources available for generating print content using the cloud service, then generating print content using the cloud service includes: If, based on the remaining resources associated with the cloud service for generating print content, it is determined that there are remaining resources for generating print content by calling the cloud service, then the pre-printed border style information in the RFID tag is obtained based on the RFID read / write module. The pre-printed border style information is used to indicate the pre-printed border style of the printing paper in the printing paper module. The content generation parameters are determined based on the pre-printed border style information; Based on the parameters generated from the content, a cloud service is invoked to generate the printed content.
4. The printing control method according to claim 2, characterized in that, The RFID tag also records the number of sheets already printed and the total number of sheets that the printing paper module is allowed to print; Before printing the content, the method further includes: The RFID read / write module obtains the number of RFID tags that have been printed and the total number of tags that can be printed. The remaining number of printable pages is determined based on the number of pages already printed and the total number of pages allowed to be printed. The printing of the content includes: If the remaining number of printable sheets is greater than 0, then the printable content will be printed.
5. The printing control method according to claim 1, characterized in that, After obtaining the identification information of the print resource, the method further includes: The legality of the identification information of the printed resources is verified; If the identification information of the printed resources passes the legality verification, then the remaining amount of resources associated with the identification information for generating printed content by calling the cloud service is obtained; Based on the remaining resources associated with the cloud service for generating print content associated with the identification information, determine whether there are any remaining resources for generating print content using the cloud service.
6. The printing control method according to claim 1, characterized in that, The process of obtaining the identification information of the print resources includes: When a print request is received from a portable printer, the identification information of the print resource carried in the print request is obtained; After obtaining the identification information of the print resource, the method further includes: Based on the identification information of the printed resources, obtain the remaining amount of resources associated with the cloud service for generating the printed content; Based on the remaining resources associated with the cloud service for generating print content associated with the identification information, determine whether there are any remaining resources for generating print content using the cloud service.
7. A printing control method, characterized in that, The method includes: Obtain the identification information of the printing resources, which is associated with the remaining amount of resources for printing the content generated by calling the cloud service; Use cloud services to generate print content; If, based on the remaining resources associated with the identification information for printing the content generated by calling the cloud service, it is determined that there are remaining resources for printing the content generated by calling the cloud service, then the content is printed. If the printing of the content is successfully completed, the remaining resources used to print the content generated by calling the cloud service associated with the identification information will be deducted.
8. The printing control method according to claim 7, characterized in that, The method is applied to a portable printer, which includes an RFID read / write module and is capable of printing on paper in a paper printing module that integrates RFID tags. The process of obtaining the identification information of the print resources includes: Based on the RFID read / write module, the identification information of the printing resources in the RFID tag and the remaining amount of printing resources associated with the identification information and the printing content generated by calling the cloud service are obtained. If the printing of the content is successfully completed, the remaining resources used for printing the content generated by calling the cloud service associated with the identification information will be deducted, including: If the printing of the content is successfully completed, the remaining resources for printing the content generated by calling the cloud service associated with the identification information in the RFID tag will be deducted based on the RFID read / write module.
9. A printing control device, characterized in that, The device includes: The first identifier acquisition unit is used to acquire the identifier information of the printing resources, and the identifier information is associated with the remaining amount of resources generated by calling the cloud service to print content; The calling and deduction unit is used to determine if there are remaining resources for calling the cloud service to generate print content based on the remaining resource quantity associated with the identification information, and to call the cloud service to generate print content. When the print content is successfully generated, the remaining resource quantity associated with the identification information for calling the cloud service to generate print content is deducted. The content printing unit is used to print the content.
10. A printing control device, characterized in that, The device includes: The second identifier acquisition unit is used to acquire the identifier information of the printing resources, and the identifier information is associated with the remaining amount of resources for printing the printing content generated by calling the cloud service; The calling unit is used to call cloud services to generate print content; The verification and printing unit is used to print the content if it is determined that there are remaining resources for printing the content generated by calling the cloud service based on the remaining resource quantity associated with the identification information. The deduction unit is used to deduct the remaining resources used to print the content generated by calling the cloud service associated with the identification information if the printing of the printed content is successfully completed.
11. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the printing control method as described in any one of claims 1 to 6 or 7 to 8.
12. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the printing control method as described in any one of claims 1 to 6 or 7 to 8.