Printing method, device, electronic device and computer-readable storage medium

By converting the data to be printed into universal printing files and storing them as image files, the problem of high printing costs caused by data isolation in the catering company's invoicing system is solved, and a more efficient data sharing and printing process is achieved.

CN111880755BActive Publication Date: 2025-01-21BEIJING YIMI INTERNET TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010790045.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-07
Publication Date
2025-01-21
Estimated Expiration
2040-08-07

AI Technical Summary

Technical Problem

In the prior art, the invoicing systems of catering enterprises cannot be printed directly due to the isolated and closed data sources from each other, resulting in the need to establish an additional data sharing channel, resulting in high printing costs.

Method used

By obtaining the data to be printed and converting it into a universal print file, and then converting the universal print file into a picture file and storing it in the storage module, the target picture file is found from the storage module and printed.

Benefits of technology

It improves the applicability of the printing method, ensures the integrity of the data to be printed, reduces the communication costs for data interoperability among various software developers, and reduces printing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111880755B_ABST
    Figure CN111880755B_ABST
Patent Text Reader

Abstract

The present invention proposes a printing method, device, electronic device and computer-readable storage medium, which relate to the field of printing technology. The method includes: obtaining data to be printed, and converting the data to be printed into a universal printing file. Converting the universal printing file into an image file and storing it in a storage module. Searching for a target image file from the storage module and printing it. In the above implementation process, the universal printing file is universal, so obtaining the data to be printed and converting it into a universal printing file can improve the applicability of the printing method, and then converting the universal printing file into an image file that can contain different data contents for storage, thereby ensuring the integrity of the data to be printed. Finally, the target image file that the user needs to print can be searched from the storage module for printing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of printing technology, and in particular to a printing method, device, electronic equipment and computer-readable storage medium. Background Art

[0002] As catering companies move towards the Internet, they actively use the various information tools brought by the Internet and mobile Internet era to better serve consumers and develop their business better and faster. Internet catering refers to the various tools and platforms created by Internet companies for the catering industry, with the same purpose of improving efficiency, improving services, reducing costs and increasing revenue for catering companies.

[0003] Since the catering enterprise system needs to access a variety of Internet software products, such as ordering systems, takeaway systems, payment systems, and invoicing systems, there are often multiple heterogeneous information systems running on different software platforms at the same time. The data sources of these systems are independent and closed to each other, making it difficult to communicate, share, and integrate data between systems, thus forming an "information island". The invoicing system needs to print out the receipts required by users, but the data sources of different software products in the current system are isolated and closed to each other, and cannot be printed directly. And the various Internet software products need to establish additional data sharing channels, resulting in high printing costs. Summary of the invention

[0004] The object of the present invention is to provide a printing method, device, electronic device and computer-readable storage medium to improve the problem of high printing cost in the prior art.

[0005] In a first aspect, an embodiment of the present application provides a printing method, the method comprising: obtaining data to be printed, and converting the data to be printed into a universal printing file, converting the universal printing file into an image file and storing it in a storage module, and searching for a target image file from the storage module and printing it.

[0006] In the above implementation process, the universal printing file is universal, so after obtaining the data to be printed and converting it into a universal printing file, the applicability of the printing method can be improved. The universal printing file is then converted into an image file that can contain different data contents for storage to ensure the integrity of the data to be printed. Finally, the target image file that the user needs to print can be found from the storage module for printing.

[0007] In some embodiments of the present invention, before the step of obtaining the data to be printed, the method further includes: obtaining a configuration file and configuring the interface according to the configuration file. The data is monitored through the interface to obtain the data to be printed from the data. In the above implementation process, the interface is configured according to the configuration file, and the data can be monitored through the interface, thereby effectively reducing the communication cost of data exchange among various software developers.

[0008] In some embodiments of the present invention, the step of searching for a target image file from a storage module and printing the target image file includes: obtaining the target image file, parsing the target image file to obtain an image, recognizing the size of the image, and segmenting the image after the size recognition, recognizing the image content in the segmented image, parsing the characters in the image content and storing them in a print storage unit for printing.

[0009] In the above implementation process, after finding the target image file in the storage module, it is necessary to first parse the target image file to obtain the image therefrom, and then pre-process the image to facilitate subsequent accurate identification of the content to be printed from the image.

[0010] In some embodiments of the present invention, the step of parsing the target image file to obtain the image includes: converting the target image file into a portable document format file. Extracting the image from the portable document format file, the image is a bitmap image. Since the target image file is a vector image file, converting it into a portable document format file facilitates the subsequent process of extracting the image.

[0011] In some embodiments of the present invention, the storage module also includes a label uniquely corresponding to each image file, and the step of searching for the target image file from the storage module includes: obtaining the user's print request, searching for the label corresponding to the print request, and obtaining the image file corresponding to the label as the target image file.

[0012] In a second aspect, an embodiment of the present application provides a printing device, the device comprising: a universal printing file acquisition module, used to acquire data to be printed and convert the data to be printed into a universal printing file; a storage module, used to convert the universal printing file into an image file and store it in the storage module; and a printing module, used to search for a target image file from the storage module and print it.

[0013] In some embodiments of the present invention, the device further includes: a configuration module, used to obtain a configuration file and configure the interface according to the configuration file; and a monitoring module, used to monitor data through the interface to obtain data to be printed from the data.

[0014] In some embodiments of the present invention, the printing module includes: an image acquisition unit, which is used to acquire a target image file and parse the target image file to obtain an image; a preprocessing unit, which is used to identify the size of the image and segment the image after the size identification; and a printing content recognition unit, which is used to identify the image content in the segmented image, parse the characters in the image content and store them in a printing storage unit for printing.

[0015] In some embodiments of the present invention, the picture acquisition unit includes: a format conversion subunit, used to convert the target picture file into a portable document format file; and a picture extraction subunit, used to extract a picture from the portable document format file, where the picture is a bitmap image.

[0016] In some embodiments of the present invention, the storage module further includes a label uniquely corresponding to each image file, and the printing module includes: a request acquisition unit, configured to acquire a user's print request; and a label search unit, configured to search for a label corresponding to the print request, so as to acquire the image file corresponding to the label as the target image file.

[0017] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory for storing one or more programs and a processor. When the one or more programs are executed by the processor, any method in the first aspect is implemented.

[0018] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method as described in any one of the first aspects above. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 A flow chart of a printing method provided by an embodiment of the present invention;

[0021] Figure 2 A structural block diagram of a printing device provided by an embodiment of the present invention;

[0022] Figure 3 A structural block diagram of an electronic device provided by an embodiment of the present invention.

[0023] Icons: 100 - printing device; 110 - general printing file acquisition module; 120 - storage module; 130 - printing module; 101 - memory; 102 - processor; 103 - communication interface. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.

[0025] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0026] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0027] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0028] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0029] Please see Figure 1 , Figure 1 A flowchart of a printing method provided by an embodiment of the present invention, the printing method comprises the following steps:

[0030] Step S110: Acquire the data to be printed, and convert the data to be printed into a universal printing file.

[0031] Before the step of obtaining the data to be printed, a configuration file can be obtained first and the interface can be configured according to the configuration file, and then the data can be monitored through the interface to obtain the data to be printed from the data. After the configuration is performed according to the configuration file, a connection can be established between the module that can generate the data to be printed through different standard specification interfaces so that the data can be transmitted. Then the data is monitored, and when the data to be printed that meets the conditions is monitored, the data to be printed can be obtained.

[0032] For example, the interface of the printer implementing the method is connected to the interface of a terminal device that can generate data to be printed. After the connection is established, the interface is configured according to the configuration file so that the printer can monitor the data to be printed generated by the terminal device through the interface to achieve data sharing among various devices.

[0033] It can be understood that the connection between the printer and the terminal device can be through a connecting cable or a wireless connection, wherein the wireless connection method can be a wireless LAN connection, a mobile network connection, a wireless Bluetooth connection, etc. The specific connection method can be determined according to the actual application scenario.

[0034] After the data to be printed is acquired, a universal printing file can be generated according to the drawing command corresponding to the data to be printed. The universal printing file includes a printing instruction part and a document data part, wherein the printing instruction part includes a header part, a page information part, a printing style instruction part and a group printer related information part, and the group printer related information part includes an output method instruction part, a group printer driver setting information part, the number of member printers, multiple member printer initiator names, multiple member printer driver setting information parts, etc.

[0035] Step S120: converting the general printing file into an image file and storing it in the storage module.

[0036] The image file can be a language image file, that is, a PS file, which can contain data such as images, texts, or a combination of images and texts. Therefore, the general printing file can be converted into an image file for storage, ensuring that the storage module can completely store the printing data.

[0037] When converting a general print file into an image file and storing it in a storage module, the image file can be preprocessed and labels can be obtained based on the preprocessing. For example, information such as the terminal device number, gateway address, authorization permission level, etc. corresponding to the image file can be obtained. In addition, there are keywords of the content in the image file, etc.

[0038] Step S130: searching the target image file from the storage module and printing it.

[0039] In the above implementation process, the universal printing file is universal, so after obtaining the data to be printed and converting it into a universal printing file, the applicability of the printing method can be improved. The universal printing file is then converted into an image file that can contain different data contents for storage to ensure the integrity of the data to be printed. Finally, the target image file that the user needs to print can be found from the storage module for printing.

[0040] In some embodiments of the present invention, when searching for a target image file from a storage module and printing, the target image file may be first obtained and parsed to obtain an image. Then, the image size is identified and the image after size identification is segmented. Finally, the image content in the segmented image is identified, and the characters in the image content are parsed and stored in a print storage unit for printing.

[0041] In the above implementation process, after finding the target image file in the storage module, it is necessary to first parse the target image file to obtain the image therefrom, and then pre-process the image to facilitate subsequent accurate identification of the content to be printed from the image.

[0042] When parsing the target image file, the target image file can be first converted into a portable document format file, and then the image is extracted from the portable document format file, and the image is a bitmap image. Since the target image file is a PS file, and the PS file is a vector image file, converting it into a portable document format file facilitates the subsequent process of extracting the image.

[0043] Portable Document Format (PDF) files can guarantee accurate colors and accurate printing effects for printers no matter which printer is used. That is to say, PDF files will faithfully reproduce every character, color and image of the original. And PDF files are an electronic file format that has nothing to do with the operating system platform. That is to say, PDF files are universal whether in Windows operating system, Unix operating system, or Apple's Mac OS operating system. This feature makes it an ideal document format for electronic document distribution and digital information dissemination on the Internet. PDF files can publish and release multimedia integrated information, and can encapsulate text, fonts, formats, colors, and graphics and images independent of equipment and resolution in one file. It can also contain electronic information such as hypertext links, sounds and dynamic images, and supports special files. It has high integration and security reliability. Therefore, after converting the target image file into a PDF file, the PDF file can be image recognized and text can be recognized.

[0044] As one implementation method, if the target image file includes a plain text image, text extraction can be performed directly, and the extracted text can be matched with text rules. After the match is passed, subsequent printing or storage operations can be performed.

[0045] In some embodiments of the present invention, the storage module also includes a tag that uniquely corresponds to each image file. When searching for a target image file from the storage module, the user's print request can be first obtained, and then the tag corresponding to the print request can be searched from the storage module to obtain the image file corresponding to the tag as the target image file according to the found tag. The accuracy of the search can be guaranteed by storing the tags that uniquely correspond to the image files. In addition, since the target image file is searched in all image files by directly searching the tags, the search efficiency can be greatly improved.

[0046] Among them, when searching for the target image file from the storage module, the target image file may be an encrypted file. Therefore, after finding the encrypted target image file, a decryption request can be sent to the terminal device corresponding to the encrypted target image file, and after receiving the response information corresponding to the decryption request, the encrypted target image file is decrypted according to the response information to avoid highly confidential data to be printed in the terminal device from being accidentally disclosed, thereby ensuring the security of the data to be printed.

[0047] Based on the same inventive concept, the present application embodiment provides a printing device 100, please refer to Figure 2 , the device comprises:

[0048] The universal printing file acquisition module 110 is used to acquire the data to be printed and convert the data to be printed into a universal printing file.

[0049] The storage module 120 is used to convert the general printing file into an image file and store it in the storage module.

[0050] The printing module 130 is used to search for a target image file from the storage module and print it.

[0051] In some embodiments of the present invention, the apparatus further comprises:

[0052] The configuration module is used to obtain the configuration file and configure the interface according to the configuration file.

[0053] The monitoring module is used to monitor the data through the interface to obtain the data to be printed.

[0054] In some embodiments of the present invention, the printing module 130 includes:

[0055] The image acquisition unit is used to acquire a target image file and parse the target image file to obtain an image.

[0056] The preprocessing unit is used to identify the size of the image and segment the image after the size identification.

[0057] The print content recognition unit is used to recognize the image content in the segmented image, parse the characters in the image content and store them in the print storage unit for printing.

[0058] In some embodiments of the present invention, the picture acquisition unit includes:

[0059] The format conversion subunit is used to convert the target image file into a portable document format file.

[0060] The picture extraction subunit is used to extract pictures from portable document format files, and the pictures are bitmap images.

[0061] In some embodiments of the present invention, the storage module further includes a label uniquely corresponding to each image file, and the printing module includes:

[0062] The request acquisition unit is used to acquire the user's print request.

[0063] The label search unit is used to search for the label corresponding to the print request to obtain the image file corresponding to the label as the target image file.

[0064] See also Figure 3 , Figure 3 A schematic block diagram of an electronic device provided in an embodiment of the present application. The electronic device includes a memory 101, a processor 102 and a communication interface 103, and the memory 101, the processor 102 and the communication interface 103 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The memory 101 can be used to store software programs and modules, such as program instructions / modules corresponding to the printing device 100 provided in an embodiment of the present application, and the processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 101. The communication interface 103 can be used to communicate signaling or data with other node devices.

[0065] Among them, the memory 101 can be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc.

[0066] The processor 102 may be an integrated circuit chip with signal processing capability. The processor 102 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0067] Understandably, Figure 3 The structure shown is for illustration only. The electronic device may also include Figure 3 More or fewer components as shown, or with Figure 3 Different configurations shown. Figure 3 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0068] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and a part of the module, program segment or code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0069] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0070] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.

[0071] In summary, the embodiments of the present application provide a printing method, device, electronic device, and computer-readable storage medium, wherein the method includes: obtaining data to be printed, and converting the data to be printed into a universal printing file. Converting the universal printing file into an image file and storing it in a storage module. Searching for a target image file from the storage module and printing it. In the above implementation process, the universal printing file is universal, so obtaining the data to be printed and converting it into a universal printing file can improve the applicability of the printing method, and then converting the universal printing file into an image file that can contain different data contents for storage, thereby ensuring the integrity of the data to be printed. Finally, the target image file that the user needs to print can be searched from the storage module for printing.

[0072] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0073] It will be apparent to those skilled in the art that the present application is not limited to the details of the exemplary embodiments described above, and that the present application can be implemented in other specific forms without departing from the spirit or essential features of the present application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the present application is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims be included in the present application. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

Claims

1. A printing method, characterized in that: The method comprises: Acquire data to be printed, and convert the data to be printed into a universal printing file; Convert the universal print file into a picture file and store it in a storage module; Searching for a target image file from the storage module and printing it; The step of searching for a target image file from the storage module and printing the file comprises: Obtain a target image file, and parse the target image file to obtain an image; Performing size recognition on the image, and segmenting the image after size recognition; The image content in the segmented image is identified, and the characters in the image content are parsed and stored in a printing storage unit for printing.

2. The method according to claim 1, characterized in that Before the step of obtaining the data to be printed, the method further includes: Obtaining a configuration file and configuring the interface according to the configuration file; The data is monitored through the interface to obtain the data to be printed from the data.

3. The method according to claim 1, characterized in that The step of parsing the target image file to obtain an image includes: Converting the target image file into a portable document format file; A picture is extracted from the portable document format file; the picture is a bitmap image.

4. The method according to claim 1, characterized in that The storage module also includes a tag uniquely corresponding to each image file, and the step of searching the target image file from the storage module includes: Get the user's print request; The tag corresponding to the print request is searched to obtain the image file corresponding to the tag as the target image file.

5. A printing device, characterized in that: The device comprises: A print file acquisition module, used for acquiring data to be printed and converting the data to be printed into a universal print file; A storage module, used for converting the universal printing file into a picture file and storing it in the storage module; A printing module, used to search for a target image file from the storage module and print it; The printing module comprises: A picture acquisition unit, used to acquire a target picture file and parse the target picture file to obtain a picture; A preprocessing unit, used to perform size recognition on the image and segment the image after size recognition; The print content recognition unit is used to recognize the image content in the segmented image, parse the characters in the image content and store them in the print storage unit for printing.

6. The device according to claim 5, characterized in that The device also includes: A configuration module, used to obtain a configuration file and configure the interface according to the configuration file; The monitoring module is used to monitor the data through the interface to obtain the data to be printed from the data.

7. An electronic device, characterized in that: include: A memory for storing one or more programs; processor; When the one or more programs are executed by the processor, the method according to any one of claims 1 to 4 is implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Cloud printing method, device and system

    CN110275682A