CN107102831A - Data-printing method and apparatus - Google Patents

Data-printing method and apparatus Download PDF

Info

Publication number
CN107102831A
CN107102831A CN201710245523.6A CN201710245523A CN107102831A CN 107102831 A CN107102831 A CN 107102831A CN 201710245523 A CN201710245523 A CN 201710245523A CN 107102831 A CN107102831 A CN 107102831A
Authority
CN
China
Prior art keywords
data
printing
standard instruction
universal standard
converting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710245523.6A
Other languages
Chinese (zh)
Inventor
王建乐
刘佳
张露
孔六五
冯俊
方霄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaodu Information Technology Co Ltd
Original Assignee
Beijing Xiaodu Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaodu Information Technology Co Ltd filed Critical Beijing Xiaodu Information Technology Co Ltd
Priority to CN201710245523.6A priority Critical patent/CN107102831A/en
Publication of CN107102831A publication Critical patent/CN107102831A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1244Job translation or job parsing, e.g. page banding
    • G06F3/1245Job translation or job parsing, e.g. page banding by conversion to intermediate or common format
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management
    • G06F3/1209Improving or facilitating administration, e.g. print management resulting in adapted or bridged legacy communication protocols, e.g. emulation, protocol extension
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1253Configuration of print job parameters, e.g. using UI at the client
    • G06F3/1254Automatic configuration, e.g. by driver

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

Embodiment of the present invention provides data-printing method and apparatus, is related to Computer Applied Technology field.Wherein, the data-printing method includes:Print data is converted into universal standard instruction;Universal standard instruction is sent to printing equipment, so that the printing equipment performs data-printing processing according to universal standard instruction.In the technical scheme that embodiment of the present invention is provided, print data is converted into universal standard instruction by the request end of data-printing, therefore, the request end of data-printing without being individually adapted to respectively for different printing equipments, print data is separately converted to different instructions with the different brands according to printing equipment, so as to substantially reduce manpower and time cost in exploitation link.

Description

Data printing method and apparatus
Technical Field
The present invention relates to the field of computer application technologies, and in particular, to a data printing method and apparatus.
Background
Data printing is an extremely important operation link in many industries, and correct data can be printed on paper as a certificate or reserved as a file and the like according to an accurate pattern through data printing. In the field of electronic commerce, data printing is more widely applied, almost all businesses are involved, and the frequency of printing operation and the number of prints are very large. Therefore, how to print data more efficiently has become a critical issue in various fields, especially in the field of electronic commerce.
However, in the related art, since printing apparatuses of different brands need to be individually adapted to support a printing process of data, and the brands of the printing apparatuses are numerous, a large amount of labor and time costs are consumed in a development process.
Disclosure of Invention
The embodiment of the invention provides a data printing method and equipment, which are used for solving the problems that in the prior art, printing devices of different brands need to be individually adapted to support the printing processing of data, and a large amount of labor and time cost is consumed in a development link.
In a first aspect, an embodiment of the present invention provides a data printing method.
Specifically, the method comprises the following steps:
converting the printing data into a general standard instruction;
and sending the universal standard instruction to a printing device so that the printing device can execute data printing processing according to the universal standard instruction.
In the invention, the request end for data printing converts the print data (printdata) into the universal standard instruction, so that the request end for data printing does not need to separately adapt to different printing devices respectively, and the print data is converted into different instructions respectively according to different brands of the printing devices, thereby greatly reducing the labor and time cost in the development link.
With reference to the first aspect, in some implementations of the invention, converting the print data into the common standard instructions includes:
and converting the printing data into a universal standard instruction according to a set instruction conversion rule.
With reference to the first aspect, in some implementations of the invention, converting the print data into the common standard instructions includes:
identifying whether sensitive data exists in the print data;
if sensitive data exist in the printing data, encrypting the printing data;
and converting the encrypted printing data into a general standard instruction.
In the invention, the printing data is encrypted under the condition that the printing data contains sensitive data, so that the sensitive information can be effectively prevented from being leaked, and the safety of the information is ensured.
With reference to the first aspect, in some implementations of the invention, the method further includes:
the printing apparatus is identified from the searched wireless communication apparatuses.
In the prior art, the connection process of the printing device has the problems of low intelligent degree and the like, so that the connection efficiency of the printing device is influenced. For example, in the case of connecting printing apparatuses according to the clicking behavior of the user, the user needs to search for printing apparatuses one by one from among various types of wireless communication apparatuses; further, in the case of automatically connecting a printing apparatus, it is difficult to ensure that the automatically connected wireless communication apparatus is the printing apparatus.
In contrast, in the present embodiment, the identification process of the printing apparatus is added, and therefore, the connection process of the printing apparatus can be made more intelligent.
With reference to the first aspect, in some implementations of the invention, the method further includes:
the printing apparatus is automatically connected in response to a designation request.
The invention responds to the appointed request to automatically connect the printing device, so the automatic connection of the printing device can be triggered by combining the scene, thereby effectively saving the system resource and reducing the influence on the application performance.
In a second aspect, the embodiment of the present invention provides a client.
Specifically, the client includes:
the conversion module is used for converting the printing data into a general standard instruction;
and the sending module is used for sending the universal standard instruction to a printing device so that the printing device can execute data printing processing according to the universal standard instruction.
In the invention, the request end for data printing converts the print data (printdata) into the universal standard instruction, so that the request end for data printing does not need to separately adapt to different printing devices respectively, and the print data is converted into different instructions respectively according to different brands of the printing devices, thereby greatly reducing the labor and time cost in the development link.
In combination with the second aspect, in some implementations of the invention,
the conversion module is used for executing the following processing to convert the printing data into a general standard instruction: and converting the printing data into a universal standard instruction according to a set instruction conversion rule.
With reference to the second aspect, in some implementations of the invention, the conversion module includes:
the identification unit is used for identifying whether sensitive data exist in the printing data;
an encryption unit configured to perform encryption processing on the print data in a case where there is sensitive data in the print data;
and the conversion unit is used for converting the encrypted printing data into the general standard instruction.
In the invention, the printing data is encrypted under the condition that the printing data contains sensitive data, so that the sensitive information can be effectively prevented from being leaked, and the safety of the information is ensured.
With reference to the second aspect, in some implementations of the invention, the client further includes:
an identification module to identify the printing device from the searched wireless communication devices.
In the prior art, the connection process of the printing device has the problems of low intelligent degree and the like, so that the connection efficiency of the printing device is influenced. For example, in the case of connecting printing apparatuses according to the clicking behavior of the user, the user needs to search for printing apparatuses one by one from among various types of wireless communication apparatuses; further, in the case of automatically connecting a printing apparatus, it is difficult to ensure that the automatically connected wireless communication apparatus is the printing apparatus.
In contrast, in the present embodiment, since the identification module is added to perform the identification process of the printing apparatus, the connection process of the printing apparatus can be made more intelligent.
With reference to the second aspect, in some implementations of the invention, the client further includes:
an automatic connection module for automatically connecting the printing apparatus in response to a specified request.
The invention responds to the appointed request to automatically connect the printing device, so the automatic connection of the printing device can be triggered by combining the scene, thereby effectively saving the system resource and reducing the influence on the application performance.
These and other aspects of the invention will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a flow chart of a method of printing data according to method embodiment 1 of the present invention;
FIG. 2 is a flow chart of a method of printing data according to method embodiment 2 of the present invention;
FIG. 3 is a schematic representation of an instruction conversion rule;
FIG. 4 is a flow chart of a method of printing data according to method embodiment 3 of the present invention;
FIG. 5 is an effect diagram of an encryption process;
FIG. 6 is a flow chart of a method of printing data according to method embodiment 4 of the present invention;
FIG. 7 is a flow chart of a method of printing data according to method embodiment 5 of the present invention;
FIG. 8 is a flow chart of a method of printing data according to method embodiment 6 of the present invention;
FIG. 9 is a flow chart of a method of printing data according to method embodiment 7 of the present invention;
FIG. 10 is a view illustrating an operation flow of connecting a printing apparatus according to a user's click behavior by way of example of Bluetooth communication;
FIG. 11 is an effect diagram of adding delimiters;
FIG. 12 is a schematic diagram of instruction translation of print data;
fig. 13 is a schematic structural diagram of a client according to embodiment 1 of the apparatus of the present invention;
fig. 14 is a schematic structural diagram of a client according to embodiment 3 of the apparatus of the present invention;
fig. 15 is a schematic structural diagram of a client according to embodiment 5 of the apparatus of the present invention;
fig. 16 is a schematic structural diagram of a client according to embodiment 8 of the apparatus of the present invention;
fig. 17 is a schematic structural diagram of a terminal device according to the present invention.
Detailed Description
Various aspects of the invention are described in detail below with reference to the figures and the detailed description. Well-known processes, modules, units and their interconnections, links, communications or operations with each other are not shown or described in detail herein in various embodiments of the invention.
Also, the described features, architectures, or functions may be combined in any manner in one or more embodiments.
Furthermore, it should be understood by those skilled in the art that the following embodiments are illustrative only and are not intended to limit the scope of the present invention. Those of skill in the art will also readily appreciate that the modules, elements, or steps of the various embodiments described herein and illustrated in the figures may be combined and arranged in a wide variety of different configurations.
Technical terms not specifically described in the present specification should be construed in the broadest sense in the art unless otherwise specifically indicated.
In some of the flows described in the present specification and claims and in the above figures, a number of operations are included that occur in a particular order, but it should be clearly understood that these operations may be performed out of order or in parallel as they occur herein, with the order of the operations being indicated as 101, 102, etc. merely to distinguish between the various operations, and the order of the operations by themselves does not represent any order of performance. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive effort based on the embodiments of the present invention, are within the scope of the present invention.
[ METHOD EMBODIMENT 1 ]
Fig. 1 is a flowchart of a data printing method according to method embodiment 1 of the present invention. Referring to fig. 1, in the present embodiment, the method includes:
s11: and converting the printing data into a general standard instruction.
S12: and sending the universal standard instruction to a printing device so that the printing device can execute data printing processing according to the universal standard instruction.
Wherein, the general standard instruction refers to a general standard instruction in the field of data printing. For example, the ESC (EPSON Standard Code) print control command by EPSON (eprson) corporation.
In the invention, the request end for data printing converts the print data (printdata) into the universal standard instruction, so that the request end for data printing does not need to separately adapt to different printing devices respectively, and the print data is converted into different instructions respectively according to different brands of the printing devices, thereby greatly reducing the labor and time cost in the development link.
[ METHOD EMBODIMENT 2 ]
Fig. 2 is a flowchart of a data printing method according to method embodiment 2 of the present invention. As shown in fig. 2, in the present embodiment, the method includes:
s21: and converting the printing data into a universal standard instruction according to a set instruction conversion rule.
S22: and sending the universal standard instruction to a printing device so that the printing device can execute data printing processing according to the universal standard instruction.
The instruction conversion rule defines a conversion rule between print data (printdata) and a general standard instruction (see fig. 3). The instruction conversion rule can be stored in a configuration file, and when data printing processing is required, the instruction conversion rule can be read from the configuration file, and the printing data (printdata) can be converted into the universal standard instruction according to the instruction conversion rule.
[ METHOD EMBODIMENT 3 ]
Fig. 4 is a flowchart of a data printing method according to method embodiment 3 of the present invention. As shown in fig. 4, in the present embodiment, the method includes:
s31: and identifying whether sensitive data exists in the printing data, if not, executing S32, and if so, executing S33.
S32: and converting the printing data into a general standard instruction.
S33: and carrying out encryption processing on the printing data.
S34: and converting the encrypted printing data into a general standard instruction.
S35: and sending the universal standard instruction to a printing device so that the printing device can execute data printing processing according to the universal standard instruction.
Wherein, the sensitive data refers to: all data that would be detrimental to national interests or to the privacy of individuals that an individual has been legally entitled to, if not properly used or unauthorised exposure or modification by a person, include but are not limited to: identification card number, mobile phone number, bank card number, etc.
In the present embodiment, the encryption process is realized, for example, by: and replacing all or part of the sensitive data with the specified data. For example, for the sensitive data of the mobile phone number, the middle 4 bits can be converted into x, and the final effect is shown in fig. 5.
In the invention, the printing data is encrypted under the condition that the printing data contains sensitive data, so that the sensitive information can be effectively prevented from being leaked, and the safety of the information is ensured.
[ METHOD EMBODIMENT 4 ]
Fig. 6 is a flowchart of a data printing method according to method embodiment 4 of the present invention. As shown in fig. 6, in the present embodiment, the method includes:
s41: and identifying whether the sensitive data exists in the printing data or not based on the sensitive data set corresponding to the type of the printing data, if not, executing S42, and if so, executing S43.
S42: and converting the printing data into a general standard instruction.
S43: and carrying out encryption processing on the printing data.
S44: and converting the encrypted printing data into a general standard instruction.
S45: and sending the universal standard instruction to a printing device so that the printing device can execute data printing processing according to the universal standard instruction.
In the present embodiment, the sensitive data sets are individually configured for different types of print data (e.g., order type print data, invoice type print data, and transaction flow type print data).
The sensitive data set defines one or more data fields of sensitive data, data characteristics and the like. Taking the "mobile phone number" field as an example, the data characteristics thereof include: the character is 11 bits in length, is composed of digits, and has the first three digits as designated characters, such as "187", "133", etc.
Since the type of print data and the sensitive data set have a correspondence relationship in the present embodiment, the sensitive data included therein can be individually identified for different types of print data. Specifically, whether or not sensitive data exists in the print data can be identified, for example, by:
(1) reading the sensitive data set according to the type of the printing data;
(2) and sequentially matching each field of the print data with a field defined in the read sensitive data set on a name, if the matching of each field of the print data fails, judging that the print data does not contain the sensitive data, and if at least one field in the print data is successfully matched, judging that the print data contains suspected sensitive data. And the fields successfully matched in the printing data are suspected sensitive fields.
(3) And acquiring data characteristics corresponding to the suspected sensitive field from the sensitive data set. And matching the value of the suspected sensitive field with the corresponding data characteristic, and if the value of at least one suspected sensitive field in the printing data is successfully matched with the corresponding data characteristic, judging that sensitive data exists in the printing data. And the suspected sensitive field of which the value is successfully matched with the corresponding data characteristic is a sensitive field.
In the present embodiment, when it is determined that sensitive data is included in print data, encryption processing needs to be performed on the print data, and specifically, the following method can be adopted:
(1) identifying sensitive fields from the print data;
(2) and performing character replacement processing on the value of the sensitive field to realize encryption processing on the printing data.
Similarly to method embodiment 3, all or part of the value of the sensitive field may be replaced with a specified character.
[ METHOD EMBODIMENT 5 ]
Fig. 7 is a flowchart of a data printing method according to method embodiment 5 of the present invention. As shown in fig. 7, in the present embodiment, the method includes:
s51: the printing apparatus is identified from the searched wireless communication apparatuses.
S52: and converting the printing data into a general standard instruction.
S53: and sending the universal standard instruction to the printing device so that the printing device can execute data printing processing according to the universal standard instruction.
In the prior art, the connection process of the printing device has the problems of low intelligent degree and the like, so that the connection efficiency of the printing device is influenced. For example, in the case of connecting printing apparatuses according to the clicking behavior of the user, the user needs to search for printing apparatuses one by one from among various types of wireless communication apparatuses; further, in the case of automatically connecting a printing apparatus, it is difficult to ensure that the automatically connected wireless communication apparatus is the printing apparatus.
In contrast, in the present embodiment, the identification process of the printing apparatus is added, and therefore, the connection process of the printing apparatus can be made more intelligent.
[ METHOD EMBODIMENT 6 ]
Fig. 8 is a flowchart of a data printing method according to method embodiment 6 of the present invention. As shown in fig. 8, in the present embodiment, the method includes:
s61: from the searched wireless communication devices, the wireless communication device whose name includes the specified keyword is identified as a printing device.
Here, the keyword is, for example, "print".
S62: and converting the printing data into a general standard instruction.
S63: and sending the universal standard instruction to the printing device so that the printing device can execute data printing processing according to the universal standard instruction.
[ METHOD EMBODIMENT 7 ]
Fig. 9 is a flowchart of a data printing method according to method embodiment 7 of the present invention. As shown in fig. 9, in the present embodiment, the method includes:
s71: from the searched wireless communication apparatuses, the wireless communication apparatus whose identifier belongs to the comparison identifier set is identified as a printing apparatus.
Where Identifiers (IDs) of one or more printing devices are defined against a set of identifiers, such identifier information may be provided by the manufacturer of the printing devices.
S72: and converting the printing data into a general standard instruction.
S73: and sending the universal standard instruction to the printing device so that the printing device can execute data printing processing according to the universal standard instruction.
[ METHOD EMBODIMENT 8 ]
The method provided by this embodiment includes all of the contents of any one of method embodiment 1 to method embodiment 7, and is not described herein again. In the present embodiment, the printing apparatus is automatically connected in response to a specified request (for example, a request to acquire a printer setting page, or a request to process an order), illustratively, upon receiving an order processing request for a demand for printing an order, the printing apparatus is automatically connected. Therefore, the automatic connection of the printing device can be triggered in combination with the scene, so that the system resources are effectively saved, and the influence on the application performance is reduced.
[ METHOD EMBODIMENT 9 ]
The data printing method provided in the present embodiment is described below by taking a bluetooth printing apparatus as an example (although the present invention is not limited thereto, and a person skilled in the art may use a Wi-Fi (Wireless-Fidelity) printing apparatus or a GPRS (General packet radio Service) printing apparatus according to actual needs). The method comprises the following steps:
treatment 1: searching for a Bluetooth device, identifying a printing apparatus from the searched Bluetooth devices, and adding the identified printing apparatus to a printer connectable queue. Specifically, the following method can be adopted to identify whether the bluetooth device is a printing apparatus:
treatment 1.1: whether the device name of the bluetooth device contains a keyword (for example, "print" or the like) is identified, if so, processing 1.3 is executed, and if not, processing 1.2 is executed.
Treatment 1.2: an Identifier (ID) for identifying the bluetooth device belongs to a set of identifiers (the identifiers in the set may be provided by a printer manufacturer), and if so, the bluetooth device is determined to be a printing apparatus, and if not, the bluetooth device is determined not to be a printing apparatus.
Treatment 1.3: and identifying whether the Bluetooth equipment supports the writing operation, if so, judging that the Bluetooth equipment is a printing device, and if not, judging that the Bluetooth equipment is not the printing device.
And (3) treatment 2: the printing device is connected.
In the present embodiment, the printing apparatus can be connected in two ways:
(1) connecting a printing device according to the clicking behavior of the user;
(2) the printing device is automatically connected.
With respect to the method (1), as shown in fig. 10, in the case where bluetooth is already on, when the user enters a specified page (for example, a "printing apparatus setting" page), the request side of data printing performs the following processing: searching for connectable wireless communication devices; identifying a printing apparatus (e.g., printer 1, printer 2, and printer 3 in fig. 10) from the searched wireless communication apparatuses; and displaying the identified printing device to the user. The user clicks on the printing apparatus to be connected. The request end of the data printing sends a connection request to the printing device in response to the click behavior of the user.
With respect to the mode (2), in the related art, in order to achieve the connection purpose, if the connection is not successful, the search and the automatic connection operation of the printing apparatus are continuously tried. However, this approach is extremely wasteful of system resources and impacts application performance. In the present embodiment, once the automatic connection fails, the connection request is not repeatedly sent, so as to avoid excessive consumption of system resources and influence on application performance.
Further, in the present embodiment, with respect to the mode (2), it is also possible to automatically connect the printing apparatus in response to a designation request (for example, a request to acquire a printer setting page, or a request to process an order), exemplarily, if an order processing request is received, the printing apparatus is automatically connected for a demand to print an order. Therefore, the automatic connection of the printing device can be triggered in combination with the scene, so that the system resource is further saved, and the influence on the application performance is reduced.
Further, after connecting a certain printing apparatus, the user may disconnect the printing apparatus and connect another printing apparatus.
And (3) treatment: the print data is preprocessed.
Such pre-treatments include, for example, but are not limited to: adding separators to the print data according to the print requirements, the effect of which is shown in fig. 11; and, in the case where the print data contains sensitive data, performing encryption processing on the print data. In this embodiment, the same scheme as that of method embodiment 4 is used to identify sensitive data and encrypt print data, which is not described herein again.
And (4) treatment: according to the set command conversion rule, the preprocessed print data is converted into a general standard command (for example, ESC command) recognizable by the printing apparatus, and the effect is shown in fig. 12.
And (4) treatment 5: and storing the converted general standard instruction in a printing data storage area.
And (6) treatment: the converted universal standard instruction is read from the print data storage area and sent to the printing apparatus so that the printing apparatus performs the data printing process according to the received universal standard instruction.
For example, the converted general-purpose standard commands may be sent to the printing apparatus one by one, or all of the converted general-purpose standard commands may be sent to the printing apparatus at once.
[ DEVICE EMBODIMENT 1 ]
Fig. 13 is a schematic structural diagram of a client according to embodiment 1 of the apparatus of the present invention. Referring to fig. 13, in the present embodiment, the client 1 includes: a conversion module 11, and a sending module 12, specifically:
the conversion module 11 is used for converting the printing data into a general standard instruction.
The sending module 12 is configured to send the universal standard instruction converted by the converting module 11 to a printing apparatus, so that the printing apparatus performs data printing processing according to the universal standard instruction.
Wherein, the general standard instruction refers to a general standard instruction in the field of data printing. For example, the ESC (EPSON Standard Code) print control command by EPSON (eprson) corporation.
In the invention, the request end for data printing converts the print data (printdata) into the universal standard instruction, so that the request end for data printing does not need to separately adapt to different printing devices respectively, and the print data is converted into different instructions respectively according to different brands of the printing devices, thereby greatly reducing the labor and time cost in the development link.
[ DEVICE EMBODIMENT 2 ]
The client provided in this embodiment is the same in structure as the client 1 provided in the device embodiment 1. The difference is that in this embodiment, the conversion module specifically converts the print data into the general standard instruction by: and converting the printing data into a universal standard instruction according to a set instruction conversion rule.
The instruction conversion rule defines a conversion rule between print data (printdata) and a general standard instruction (see fig. 3). The instruction conversion rule can be stored in a configuration file, and when data printing processing is required, the instruction conversion rule can be read from the configuration file, and the printing data (printdata) can be converted into the universal standard instruction according to the instruction conversion rule.
[ DEVICE EMBODIMENT 3 ]
Fig. 14 is a schematic structural diagram of a client according to embodiment 3 of the apparatus of the present invention. Referring to fig. 14, in the present embodiment, the client 3 includes: a conversion module 31, and a sending module 32, specifically:
the conversion module 31 includes: the identification unit 311, the encryption unit 312, and the conversion unit 313, specifically:
the identifying unit 311 is used to identify whether sensitive data exists in the print data.
The encryption unit 312 is configured to perform encryption processing on the print data in a case where the identification unit 311 identifies that sensitive data exists in the print data.
The conversion unit 313 is configured to convert the print data subjected to the encryption processing by the encryption unit 312 into a general-purpose standard instruction.
The sending module 32 is configured to send the universal standard instruction converted by the conversion module 31 to a printing apparatus, so that the printing apparatus performs data printing processing according to the universal standard instruction.
Wherein, the sensitive data refers to: all data that would be detrimental to national interests or to the privacy of individuals that an individual has been legally entitled to, if not properly used or unauthorised exposure or modification by a person, include but are not limited to: identification card number, mobile phone number, bank card number, etc.
In the present embodiment, the encryption process is realized, for example, by: and replacing all or part of the sensitive data with the specified data. For example, for the sensitive data of the mobile phone number, the middle 4 bits can be converted into x, and the final effect is shown in fig. 5.
In the invention, the printing data is encrypted under the condition that the printing data contains sensitive data, so that the sensitive information can be effectively prevented from being leaked, and the safety of the information is ensured.
[ DEVICE EMBODIMENT 4 ]
The client provided in this embodiment is identical in structure to the client 3 provided in the device embodiment 3. The difference is that in the present embodiment, the identifying unit specifically identifies whether sensitive data exists in the print data by: identifying whether sensitive data exists in the print data based on a sensitive data set corresponding to the kind of the print data.
In the present embodiment, the sensitive data sets are individually configured for different types of print data (e.g., order type print data, invoice type print data, and transaction flow type print data).
The sensitive data set defines one or more data fields of sensitive data, data characteristics and the like. Taking the "mobile phone number" field as an example, the data characteristics thereof include: the character is 11 bits in length, is composed of digits, and has the first three digits as designated characters, such as "187", "133", etc.
Since the type of print data and the sensitive data set have a correspondence relationship in the present embodiment, the sensitive data included therein can be individually identified for different types of print data. Specifically, the identification unit may include, for example:
(1) a reading component for reading the sensitive data set according to the type of the printing data.
(2) And the first matching component is used for sequentially matching each field of the printing data with the field defined in the read sensitive data set on the name.
(3) And the first judging component is used for judging that the print data contains suspected sensitive data under the condition that at least one field in the print data is successfully matched. And the fields successfully matched in the printing data are suspected sensitive fields.
(4) An obtaining component to obtain a data feature from the sensitive dataset corresponding to the suspected sensitive field.
(5) And the second matching component is used for matching the value of the suspected sensitive field with the corresponding data characteristic.
(6) And the second judging component is used for judging that the sensitive data exists in the printing data under the condition that the value of at least one suspected sensitive field successfully matches the corresponding data characteristic. And the suspected sensitive field of which the value is successfully matched with the corresponding data characteristic is a sensitive field.
(7) And a third determining component, configured to determine that sensitive data does not exist in the print data in a case where all fields of the print data fail to match in name (there is no field in the print data whose name matches successfully).
In the present embodiment, when it is determined that sensitive data is included in print data, encryption processing needs to be performed on the print data, and specifically, the following method can be adopted:
(1) identifying sensitive fields from the print data;
(2) and performing character replacement processing on the value of the sensitive field to realize encryption processing on the printing data.
Similarly to device embodiment 3, all or part of the value of the sensitive field may be replaced with a specified character.
[ DEVICE EMBODIMENT 5 ]
Fig. 15 is a schematic structural diagram of a client according to embodiment 5 of the apparatus of the present invention. Referring to fig. 15, in the present embodiment, the client 5 includes: the identification module 51, the conversion module 52, and the sending module 53, specifically:
the identification module 51 is used to identify the printing apparatus from the searched wireless communication apparatuses.
The conversion module 52 is used for converting the print data into general standard instructions.
The sending module 53 is configured to send the universal standard instruction converted by the converting module 52 to the printing apparatus identified by the identifying module 51, so that the printing apparatus performs data printing processing according to the universal standard instruction.
In the prior art, the connection process of the printing device has the problems of low intelligent degree and the like, so that the connection efficiency of the printing device is influenced. For example, in the case of connecting printing apparatuses according to the clicking behavior of the user, the user needs to search for printing apparatuses one by one from among various types of wireless communication apparatuses; further, in the case of automatically connecting a printing apparatus, it is difficult to ensure that the automatically connected wireless communication apparatus is the printing apparatus.
In contrast, in the present embodiment, since the identification module is added to perform the identification process of the printing apparatus, the connection process of the printing apparatus can be made more intelligent.
[ DEVICE EMBODIMENT 6 ]
The client provided in this embodiment is identical in structure to the client 5 provided in the device embodiment 5. The difference is that in the present embodiment, the identification module specifically identifies the printing device from the searched wireless communication devices by: from the searched wireless communication devices, the wireless communication device whose name includes the specified keyword is identified as the printing device.
Here, the keyword is, for example, "print".
[ DEVICE EMBODIMENT 7 ]
The client provided in this embodiment is identical in structure to the client 5 provided in the device embodiment 5. The difference is that in the present embodiment, the identification module specifically identifies the printing device from the searched wireless communication devices by: from the searched wireless communication apparatuses, the wireless communication apparatus whose identifier belongs to the comparison identifier set is identified as the printing apparatus.
Where Identifiers (IDs) of one or more printing devices are defined against a set of identifiers, such identifier information may be provided by the manufacturer of the printing devices.
[ DEVICE EMBODIMENT 8 ]
Fig. 16 is a schematic structural diagram of a client according to embodiment 8 of the apparatus of the present invention. Referring to fig. 16, in the present embodiment, the client 8 includes: an automatic connection module 81, a conversion module 82, and a sending module 83, specifically:
the automatic connection module 81 is used to automatically connect the printing apparatus in response to a designation request.
The conversion module 82 is used for converting the printing data into general standard instructions.
The sending module 83 is configured to send the universal standard instruction converted by the conversion module 82 to the printing apparatus connected to the automatic connection module 81, so that the printing apparatus executes data printing processing according to the universal standard instruction.
Since the printing apparatus is automatically connected in response to a specified request (for example, a request to acquire a printer setting page, or a request to process an order, or the like) in the present embodiment, the automatic connection of the printing apparatus is triggered in conjunction with a scene. Therefore, system resources can be effectively saved, and the influence on the application performance is reduced.
As shown in fig. 17, the embodiment of the present invention also provides a terminal device 9 including a memory 91 and a processor 92; wherein,
the memory 91 is for storing one or more computer instructions which, when executed by the processor 92, are capable of implementing the method as described in any one of method embodiments 1 to 9.
In other embodiments of the present invention, the terminal device 9 may further comprise a communication interface for communicating with other devices or a communication network.
Furthermore, embodiments of the present invention also provide a computer storage medium storing one or more computer instructions that, when executed, enable implementation of the method described in any one of method embodiments 1 to 9.
Those skilled in the art will clearly understand that the present invention may be implemented entirely in software, or by a combination of software and a hardware platform. Based on such understanding, all or part of the technical solutions of the present invention contributing to the background may be embodied in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, a smart phone, a network device, etc.) to execute the method according to each embodiment or some parts of the embodiments of the present invention.
As used herein, the term "software" or the like refers to any type of computer code or set of computer-executable instructions in a general sense that is executed to program a computer or other processor to perform various aspects of the present inventive concepts as discussed above. Furthermore, it should be noted that according to one aspect of the embodiment, one or more computer programs implementing the method of the present invention when executed do not need to be on one computer or processor, but may be distributed in modules in multiple computers or processors to execute various aspects of the present invention.
Computer-executable instructions may take many forms, such as program modules, executed by one or more computers or other devices. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. In particular, the functionality of the program modules may be combined or split between various embodiments as desired.
Also, technical solutions of the present invention may be embodied as a method, and at least one example of the method has been provided. The actions may be performed in any suitable order and may be presented as part of the method. Thus, embodiments may be configured such that acts may be performed in an order different than illustrated, which may include performing some acts simultaneously (although in the illustrated embodiments, the acts are sequential).
The definitions given and used herein should be understood with reference to dictionaries, definitions in documents incorporated by reference, and/or their ordinary meanings.
In the claims, as well as in the specification above, all transitional phrases such as "comprising," "having," "containing," "carrying," "having," "involving," "consisting essentially of …," and the like are to be understood to be open-ended, i.e., to include but not limited to. Only "consisting of … …" should be an overphrase of being closed or semi-closed.
The terms and expressions used in the specification of the present invention have been set forth for illustrative purposes only and are not meant to be limiting. It will be appreciated by those skilled in the art that changes could be made to the details of the above-described embodiments without departing from the underlying principles thereof. The scope of the invention is, therefore, indicated by the appended claims, in which all terms are intended to be interpreted in their broadest reasonable sense unless otherwise indicated.
The invention discloses a1 and a data printing method, comprising the following steps:
converting the printing data into a general standard instruction;
and sending the universal standard instruction to a printing device so that the printing device can execute data printing processing according to the universal standard instruction.
A2, the method as in a1, wherein the converting the print data into the common standard instructions comprises:
and converting the printing data into a universal standard instruction according to a set instruction conversion rule.
A3, the method as in a1, wherein the converting the print data into the common standard instructions comprises:
identifying whether sensitive data exists in the print data;
if sensitive data exist in the printing data, encrypting the printing data;
and converting the encrypted printing data into a general standard instruction.
A4, the method of A3, wherein the identifying whether sensitive data exists in the print data includes:
identifying whether sensitive data exists in the print data based on a sensitive data set corresponding to the kind of the print data.
A5, the method of a4, wherein the identifying whether the sensitive data exists in the print data based on the sensitive data set corresponding to the kind of the print data includes:
reading a sensitive data set according to the type of the printing data;
matching fields in the print data with fields defined in the read sensitive data set on names;
if the fields with successfully matched names exist in the printing data, judging that suspected sensitive fields exist in the printing data;
acquiring data characteristics corresponding to the suspected sensitive fields from the sensitive dataset;
matching the value of the suspected sensitive field with the data characteristic;
and if the suspected sensitive field with the successfully matched features exists in the printing data, judging that the sensitive data exists in the printing data.
The method of a6, as in a5, wherein the identifying whether the sensitive data exists in the print data further comprises:
and if the fields with successfully matched names do not exist in the printing data, judging that sensitive data do not exist in the printing data.
A7, the process according to A4,
the encryption processing includes: and replacing all or part of the sensitive data with specified data.
A8, the method of any one of a1 to a7, further comprising:
the printing apparatus is identified from the searched wireless communication apparatuses.
A9, the method of A8, wherein the identifying the printing device from the searched wireless communication devices comprises:
from the searched wireless communication devices, the wireless communication device whose name includes the specified keyword is identified as the printing device.
A10, the method of A8, wherein the identifying the printing device from the searched wireless communication devices comprises:
from the searched wireless communication apparatuses, the wireless communication apparatus whose identifier belongs to the comparison identifier set is identified as the printing apparatus.
A11, the method of any one of a1 to a7, further comprising:
the printing apparatus is automatically connected in response to a designation request.
The invention also discloses B12, a client, comprising:
the conversion module is used for converting the printing data into a general standard instruction;
and the sending module is used for sending the universal standard instruction to a printing device so that the printing device can execute data printing processing according to the universal standard instruction.
B13, the client terminal as B12,
the conversion module is used for executing the following processing to convert the printing data into a general standard instruction: and converting the printing data into a universal standard instruction according to a set instruction conversion rule.
B14, the client side as B12, the conversion module includes:
the identification unit is used for identifying whether sensitive data exist in the printing data;
an encryption unit configured to perform encryption processing on the print data in a case where there is sensitive data in the print data;
and the conversion unit is used for converting the encrypted printing data into the general standard instruction.
B15, the client terminal as B14,
the identification unit is used for executing the following processing to realize the identification of whether sensitive data exists in the printing data: identifying whether sensitive data exists in the print data based on a sensitive data set corresponding to the kind of the print data.
B16, the client terminal as B15, wherein the identification unit comprises:
a reading component for reading the sensitive data set according to the type of the printing data;
a first matching component for matching fields in the print data with fields defined in the read sensitive data set on a name;
the first judging component is used for judging that a suspected sensitive field exists in the printing data under the condition that a field with a successfully matched name exists in the printing data;
an acquisition component configured to acquire data features corresponding to the suspected sensitive fields from the sensitive dataset;
a second matching component for matching the value of the suspected sensitive field with the data feature;
and the second judging component is used for judging that sensitive data exists in the printing data under the condition that a suspected sensitive field with successfully matched features exists in the printing data.
B17, in the client according to B16, the identifying unit further comprises:
and the third judging component is used for judging that no sensitive data exists in the printing data under the condition that no field with successfully matched name exists in the printing data.
B18, the client terminal as B17,
the encryption processing includes: and replacing all or part of the sensitive data with specified data.
The client side of B19 as in any one of B12-B18, further comprising:
an identification module to identify the printing device from the searched wireless communication devices.
B20, the client terminal as B19,
the identification module is used for executing the following processing to realize the identification of the printing device from the searched wireless communication devices: from the searched wireless communication devices, the wireless communication device whose name includes the specified keyword is identified as the printing device.
B21, the client terminal as B19,
the identification module is used for executing the following processing to realize the identification of the printing device from the searched wireless communication devices: from the searched wireless communication apparatuses, the wireless communication apparatus whose identifier belongs to the comparison identifier set is identified as the printing apparatus.
The client side of B22 as in any one of B12-B17, further comprising:
an automatic connection module for automatically connecting the printing apparatus in response to a specified request.
The invention also discloses C23, a terminal device, comprising a memory and a processor; wherein,
the memory is to store one or more computer instructions that, when executed by the processor, are capable of implementing the method as any one of A1-A11.
The invention also discloses D24, a computer storage medium for storing one or more computer instructions, wherein the one or more computer instructions, when executed, are capable of implementing the method of any one of A1-A11.

Claims (10)

1. A method of printing data, the method comprising:
converting the printing data into a general standard instruction;
and sending the universal standard instruction to a printing device so that the printing device can execute data printing processing according to the universal standard instruction.
2. The method of claim 1, wherein converting the print data into the universal standard instructions comprises:
and converting the printing data into a universal standard instruction according to a set instruction conversion rule.
3. The method of claim 1, wherein converting the print data into the universal standard instructions comprises:
identifying whether sensitive data exists in the print data;
if sensitive data exist in the printing data, encrypting the printing data;
and converting the encrypted printing data into a general standard instruction.
4. The method of any of claims 1 to 3, further comprising:
the printing apparatus is identified from the searched wireless communication apparatuses.
5. The method of any of claims 1 to 3, further comprising:
the printing apparatus is automatically connected in response to a designation request.
6. A client, the client comprising:
the conversion module is used for converting the printing data into a general standard instruction;
and the sending module is used for sending the universal standard instruction to a printing device so that the printing device can execute data printing processing according to the universal standard instruction.
7. The client of claim 6,
the conversion module is used for executing the following processing to convert the printing data into a general standard instruction: and converting the printing data into a universal standard instruction according to a set instruction conversion rule.
8. The client of claim 6, wherein the translation module comprises:
the identification unit is used for identifying whether sensitive data exist in the printing data;
an encryption unit configured to perform encryption processing on the print data in a case where there is sensitive data in the print data;
and the conversion unit is used for converting the encrypted printing data into the general standard instruction.
9. The client of any one of claims 6 to 8, wherein the client further comprises:
an identification module to identify the printing device from the searched wireless communication devices.
10. The client of any one of claims 6 to 8, wherein the client further comprises:
an automatic connection module for automatically connecting the printing apparatus in response to a specified request.
CN201710245523.6A 2017-04-14 2017-04-14 Data-printing method and apparatus Pending CN107102831A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710245523.6A CN107102831A (en) 2017-04-14 2017-04-14 Data-printing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710245523.6A CN107102831A (en) 2017-04-14 2017-04-14 Data-printing method and apparatus

Publications (1)

Publication Number Publication Date
CN107102831A true CN107102831A (en) 2017-08-29

Family

ID=59675541

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710245523.6A Pending CN107102831A (en) 2017-04-14 2017-04-14 Data-printing method and apparatus

Country Status (1)

Country Link
CN (1) CN107102831A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108376056A (en) * 2018-02-09 2018-08-07 浙江印歌网络科技有限公司 Method of printing and device
CN109246130A (en) * 2018-10-17 2019-01-18 深圳壹账通智能科技有限公司 Data ciphering method, device, computer equipment and storage medium
CN110231917A (en) * 2018-03-05 2019-09-13 北大方正集团有限公司 Rule-based printing process and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1172301A (en) * 1996-06-30 1998-02-04 三星电子株式会社 Method for processing print data
JP2002328795A (en) * 2001-05-01 2002-11-15 Jekku:Kk System for preparing common format data for printing in a batch and recording medium
CN1445658A (en) * 2002-03-12 2003-10-01 佳能株式会社 Program, medium, information processing device and print data processing method
JP2006119737A (en) * 2004-10-19 2006-05-11 Kyocera Mita Corp Information processor
CN102547028A (en) * 2010-12-13 2012-07-04 夏普株式会社 Information processing device, image output system, and image output assisting device
CN103916233A (en) * 2014-03-28 2014-07-09 小米科技有限责任公司 Information encryption method and device
CN105058998A (en) * 2015-09-05 2015-11-18 吴耀 Printer intelligent box for realizing standardized printing service and using method thereof

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1172301A (en) * 1996-06-30 1998-02-04 三星电子株式会社 Method for processing print data
JP2002328795A (en) * 2001-05-01 2002-11-15 Jekku:Kk System for preparing common format data for printing in a batch and recording medium
CN1445658A (en) * 2002-03-12 2003-10-01 佳能株式会社 Program, medium, information processing device and print data processing method
JP2006119737A (en) * 2004-10-19 2006-05-11 Kyocera Mita Corp Information processor
CN102547028A (en) * 2010-12-13 2012-07-04 夏普株式会社 Information processing device, image output system, and image output assisting device
CN103916233A (en) * 2014-03-28 2014-07-09 小米科技有限责任公司 Information encryption method and device
CN105058998A (en) * 2015-09-05 2015-11-18 吴耀 Printer intelligent box for realizing standardized printing service and using method thereof

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108376056A (en) * 2018-02-09 2018-08-07 浙江印歌网络科技有限公司 Method of printing and device
CN110231917A (en) * 2018-03-05 2019-09-13 北大方正集团有限公司 Rule-based printing process and device
CN109246130A (en) * 2018-10-17 2019-01-18 深圳壹账通智能科技有限公司 Data ciphering method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107784552B (en) Information push task execution method and device, computer equipment and storage medium
CN110287247B (en) Data storage method, device, equipment and storage medium based on Unionpay system
CN105488125A (en) Page access method and apparatus
CN107102831A (en) Data-printing method and apparatus
CN103118140A (en) Method, system and device for sharing file with other users out of relationship circle
CN101316120A (en) Radio frequency user recognition module, member card information processing method and processing system
US20190116036A1 (en) System and method for building a blockchain application
CN106815733A (en) Data processing method, device and system and printer
CN101997900A (en) Cross-terminal copying and pasting system, device and method
CN113240336A (en) Task management system based on label
US7148981B2 (en) Printing apparatus connected to pocket electronic device through network and printing system thereof
CN111190750A (en) Data processing method and system
US20160180300A1 (en) Method and apparatus for managing digital receipts
CN113676290A (en) Data transmission method based on fund system and related equipment
CN111614762B (en) Electronic data exchange system and apparatus comprising an electronic data exchange system
CN109214362A (en) Bill processing method and relevant device
CN107122381B (en) File generation method and device and data analysis method and device
CN110266596B (en) Message processing method, device, equipment and computer readable storage medium
US10133759B1 (en) System for determining storage or output of data objects
CN111324645B (en) Block chain data processing method and device
US10776163B1 (en) Non-hierarchical management system for application programming interface resources
CN105191419B (en) It enables the device to find to service via network controller or group owner
CN115794739A (en) File management system based on block chain
CN108268545B (en) Method and device for establishing hierarchical user label library
CN107632896A (en) A kind of data processing method, data processing equipment and communication apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Building N3, building 12, No. 27, Jiancai Chengzhong Road, Haidian District, Beijing 100086

Applicant after: Beijing Xingxuan Technology Co.,Ltd.

Address before: 100085 Beijing, Haidian District on the road to the information on the ground floor of the 1 to the 3 floor of the 2 floor, room 11, 202

Applicant before: Beijing Xiaodu Information Technology Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170829