[go: up one dir, main page]

CN116954530B - Printer data processing method and server - Google Patents

Printer data processing method and server Download PDF

Info

Publication number
CN116954530B
CN116954530B CN202311203823.XA CN202311203823A CN116954530B CN 116954530 B CN116954530 B CN 116954530B CN 202311203823 A CN202311203823 A CN 202311203823A CN 116954530 B CN116954530 B CN 116954530B
Authority
CN
China
Prior art keywords
printing
equipment
printed
server
parameters
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.)
Active
Application number
CN202311203823.XA
Other languages
Chinese (zh)
Other versions
CN116954530A (en
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.)
Zhuhai Xinye Electronic Technology Co Ltd
Original Assignee
Zhuhai Xinye Electronic 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 Zhuhai Xinye Electronic Technology Co Ltd filed Critical Zhuhai Xinye Electronic Technology Co Ltd
Priority to CN202311203823.XA priority Critical patent/CN116954530B/en
Publication of CN116954530A publication Critical patent/CN116954530A/en
Application granted granted Critical
Publication of CN116954530B publication Critical patent/CN116954530B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/1222Increasing security of the print job
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/1238Secure printing, e.g. user identification, user rights for device usage, unallowed content, blanking portions or fields of a page, releasing held jobs
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/1278Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
    • G06F3/128Direct printing, e.g. sending document file, using memory stick, printing from a camera
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/1278Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
    • G06F3/1285Remote printer device, e.g. being remote from client or server
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

The application discloses a printer data processing method and a server, wherein a printing request sent by electronic equipment is acquired, the printing request carries encrypted printing data, a first key parameter corresponding to the electronic equipment is called, the encrypted printing data is analyzed to obtain a parameter to be printed and a second key parameter, and the second key parameter is used as a key parameter required for decrypting the next printing request, so that the printer data safety can be ensured under the condition that the data is intercepted, and the data safety risk is reduced; matching target printer equipment corresponding to the parameters to be printed so as to select the corresponding printer equipment according to different parameters to be printed, thereby being applicable to various printing requirements; and generating a print job based on the parameters to be printed, transmitting the print job to the target printer equipment, wherein the print job is used for the target printer equipment to execute printing operation, so that various printing requirements of users are met, and data security can be ensured.

Description

Printer data processing method and server
Technical Field
The application relates to the technical field of printers, in particular to a printer data processing method and a processor.
Background
Printers such as thermal printers, label printers, ticket printers, portable printers, etc., as a common printing solution, provide a stable, reliable, and economical printing function, but as network technology advances, user printing demands become diversified. The printer is usually directly connected to a computer or a mobile device through a local connection mode (such as USB, bluetooth, etc.), and a user needs to physically connect the printer to the device to perform a printing operation, so that the printing requirement of the user is limited by a specific printer, and the diversified printing requirement of the user cannot be met.
In the related art, the printer technology and the cloud technology are combined to realize the purpose of providing a more flexible and convenient printing solution, but the cloud printer relates to a process of uploading printing data from user equipment to a cloud for processing and storing, and has a large data security risk.
Disclosure of Invention
The application provides a printer data processing method and a server, which are used for solving the technical problem that a cloud printer has a large data security risk.
To solve the above technical problem, in a first aspect, the present application provides a printer data processing method, applied to a server, where the server is communicatively connected to at least one printer device and an electronic device, the method including:
acquiring a printing request sent by the electronic equipment, wherein the printing request carries encrypted printing data;
invoking a first key parameter corresponding to the electronic equipment, analyzing the encrypted printing data to obtain a parameter to be printed and a second key parameter, wherein the first key parameter is a key parameter obtained by decrypting a previous printing request, and the second key parameter is used as a key parameter required by decrypting a next printing request;
matching target printer equipment corresponding to the parameters to be printed by using a preset equipment matching strategy, wherein the equipment matching strategy comprises matching relations between various printing parameters and various printer equipment;
and generating a print job based on the parameters to be printed, and transmitting the print job to the target printer device, wherein the print job is used for the target printer device to directly execute printing operation.
In some implementations of the first aspect, the calling a first key parameter corresponding to the electronic device, and parsing the encrypted print data to obtain a parameter to be printed and a second key parameter, includes:
based on an encryption communication strategy between the server and the electronic equipment, calling a key parameter obtained by decrypting a last printing request as the first key, wherein the last printing request is a printing request sent to the server last time by the electronic equipment, and the encryption communication strategy comprises an encryption algorithm and a key exchange strategy adopted between the server and the electronic equipment;
decrypting the encrypted print data based on the first key parameter to obtain decrypted print data in a plaintext form and the second key parameter, and caching the second key parameter for decrypting a next print request;
and according to the coding format of the decrypted printing data, carrying out data analysis on the decrypted printing data to obtain the parameters to be printed.
In some implementations of the first aspect, before the obtaining the print request sent by the electronic device, the method further includes:
receiving a handshake request initiated by the electronic equipment, wherein the handshake request carries identity information of the electronic equipment;
based on a trusted device list of the server, carrying out identity verification on the identity information;
if the identity information exists in the trusted equipment list, judging that the identity information passes verification, and randomly selecting a target encryption algorithm from a preset algorithm list;
generating the encrypted communication policy based on the target encryption algorithm;
and carrying out handshake verification on the electronic equipment and the server based on the encryption communication strategy so as to establish communication connection between the electronic equipment and the server.
In some implementations of the first aspect, the randomly selecting the target encryption algorithm from the preset algorithm list includes:
generating a random number by using a preset random algorithm;
randomly selecting the target encryption algorithm from the preset algorithm list based on the random number, wherein the preset algorithm list comprises a plurality of encryption algorithms and the number of each encryption algorithm;
the expression of the preset random algorithm is as follows:
wherein,indicate->Random number generated when personal electronic device handshakes with server,/->Indicate->Random number generated when personal electronic device handshakes with server,/->、/>And->For the known parameter determined based on the largest number of the list of preset algorithms +.>Representing a modulo operation.
In some implementations of the first aspect, the generating the encrypted communication policy based on the target encryption algorithm includes:
invoking the preset key exchange strategy, wherein the preset key exchange strategy comprises a strategy for performing the current decryption based on the key parameter obtained by the previous decryption, and taking the key parameter obtained by the current decryption as the decryption key parameter of the next decryption;
and assembling the preset key exchange strategy and the target encryption algorithm to obtain the encryption communication strategy.
In some implementations of the first aspect, the matching, with a preset device matching policy, the target printer device corresponding to the parameter to be printed includes:
determining whether the parameter to be printed contains a target IP address by using the equipment matching strategy;
if the parameters to be printed contain the target IP address, determining that the target printer equipment is the printer equipment corresponding to the target IP address;
if the parameters to be printed do not contain the target IP address, sequentially matching the corresponding relation between each printing demand parameter in the parameters to be printed and the printer equipment by utilizing the parameter matching priority in the equipment matching strategy;
and determining the printer equipment type corresponding to the parameter to be printed based on the corresponding relations obtained by matching, and selecting the target printer equipment corresponding to the printer equipment type from the equipment idle list.
In some implementations of the first aspect, the generating a print job based on the parameters to be printed and transmitting the print job to the target printer device includes:
performing printing rendering on the parameters to be printed to obtain rendered parameters to be printed;
based on a secure transport layer protocol between the server and the target printer device, packaging the rendered parameters to be printed, and generating the print task;
and transmitting the print task to the target printer device and requesting to return to a printing state.
In some implementations of the first aspect, after the generating a print job based on the parameters to be printed and transmitting the print job to the target printer device, the method further includes:
and feeding back the target printer equipment and the printing state corresponding to the printing request to the electronic equipment.
In a second aspect, the present application also provides a server in communication with at least one printer device and an electronic device, the server comprising:
the acquisition module is used for acquiring a printing request sent by the electronic equipment, wherein the printing request carries encrypted printing data;
the analysis module is used for calling a first key parameter corresponding to the electronic equipment, analyzing the encrypted printing data to obtain a parameter to be printed and a second key parameter, wherein the first key parameter is a key parameter obtained by decrypting a previous printing request, and the second key parameter is used as a key parameter required by decrypting a next printing request;
the matching module is used for matching the target printer equipment corresponding to the parameters to be printed by utilizing a preset equipment matching strategy, and the equipment matching strategy comprises matching relations between various printing parameters and various printer equipment;
and the transmission module is used for generating a print task based on the parameters to be printed and transmitting the print task to the target printer equipment, wherein the print task is used for the target printer equipment to directly execute the printing operation.
In some implementations of the second aspect, the parsing module includes:
the calling unit is used for calling a key parameter obtained by decrypting a last printing request as the first key based on an encryption communication strategy between the server and the electronic equipment, wherein the last printing request is a printing request sent to the server last time by the electronic equipment, and the encryption communication strategy comprises an encryption algorithm and a key exchange strategy adopted between the server and the electronic equipment;
the decryption unit is used for decrypting the encrypted printing data based on the first key parameter to obtain the decrypted printing data in a plaintext form and the second key parameter, and caching the second key parameter for decrypting the next printing request;
and the analysis unit is used for carrying out data analysis on the decrypted printing data according to the coding format of the decrypted printing data to obtain the parameters to be printed.
Compared with the prior art, the application has the following beneficial effects:
the method comprises the steps that a server is in communication connection with at least one printer device and electronic equipment to obtain a printing request sent by the electronic equipment, the printing request carries encrypted printing data, a first key parameter corresponding to the electronic equipment is called to analyze the encrypted printing data to obtain a parameter to be printed and a second key parameter, the first key parameter is a key parameter obtained by decrypting a previous printing request, and the second key parameter is used as a key parameter required by decrypting a next printing request, so that an intruder cannot decrypt the printing request by using a key carried by the current request even if the printing request is intercepted maliciously, the safety of the printer data can be guaranteed under the condition that the data is intercepted, and the data safety risk is reduced; matching target printer equipment corresponding to the parameters to be printed by using a preset equipment matching strategy, wherein the equipment matching strategy comprises matching relations between various printing parameters and various printer equipment so as to select the corresponding printer equipment aiming at different parameters to be printed, thereby being applicable to various printing requirements; and generating a print job based on the parameters to be printed and transmitting the print job to the target printer device, wherein the print job is used for the target printer device to directly execute the printing operation, so that the printer device can directly execute the printing operation without further processing data, and the data processing performance requirement of the printer device is reduced. The method and the device realize that various printing requirements of users are met, and data security can be guaranteed.
Drawings
FIG. 1 is a flow chart of a printer data processing method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a printer system according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Referring to fig. 1, fig. 1 is a flowchart of a printer data processing method according to an embodiment of the present disclosure. The printer data processing method can be applied to a server. The printer system shown in fig. 2, the server is communicatively connected to at least one printer device, including but not limited to ticket printers, label printers, thermal printers, portable printers, etc., and to electronic devices, including but not limited to smart phones, notebook computers, tablet computers, desktop computers, etc. As shown in fig. 1, the printer data processing method of the present embodiment includes steps S101 to S104, and is described in detail as follows:
step S101, a print request sent by the electronic device is obtained, where the print request carries encrypted print data.
In this step, when a user has a print request, selecting, by the electronic device, a data material to be printed and the print request, where the data material may be dot matrix print data such as text data and image data or vector print data, and the print request includes a print paper size, number, color, and the like; the electronic device encrypts the data material, the printing requirement and the first key parameter to generate a printing request, and sends the printing request to the server, and the server receives and caches the printing request.
It should be noted that, the embodiment can meet the scene requirement that the user initiates the print request at any place, be applicable to more print scenes, and improve the flexibility and convenience of the print solution.
In some embodiments, before the step S101, the method further includes:
receiving a handshake request initiated by the electronic equipment, wherein the handshake request carries identity information of the electronic equipment;
based on a trusted device list of the server, carrying out identity verification on the identity information;
if the identity information exists in the trusted equipment list, judging that the identity information passes verification, and randomly selecting a target encryption algorithm from a preset algorithm list;
generating the encrypted communication policy based on the target encryption algorithm;
and carrying out handshake verification on the electronic equipment and the server based on the encryption communication strategy so as to establish communication connection between the electronic equipment and the server.
In this embodiment, the electronic device may initiate a handshake request to the server based on a secure transport layer protocol (Transport Layer Security, TLS) or a secure sockets layer protocol (Secure Socket Layer, SSL). In order to ensure the equipment credibility of the handshake initiator, the electronic equipment needs to carry identity information when initiating a handshake request, wherein the identity information can be account information and the like registered in a credible equipment list in a server; and the server verifies the identity information of the electronic equipment, and if the identity information is matched with the account information in the trusted equipment list, the identity information is judged to pass the verification.
The preset algorithm list is a collection of encryption algorithms or hash algorithms for data encryption between the electronic device and the server. In order to further improve data security, a random algorithm is adopted to select any one target encryption algorithm in a preset algorithm list for handshaking between different electronic devices and servers, and the target encryption algorithm is used for generating an encryption communication strategy between the electronic devices and the servers.
The encryption communication policy is a communication policy defining what encryption algorithm is adopted between the electronic device and the server for data encryption and what key exchange rule is adopted for key acquisition. Based on the encrypted communication policy, at least two data exchanges are performed between the electronic device and the server to verify that the symmetric key for encryption and decryption was generated. It should be noted that, for the first communication, the electronic device may encrypt the data with the preset key parameter, and the server decrypts the data with the preset key parameter.
It should be noted that, by defining the encryption communication policy between different electronic devices and the server, the present application can avoid reverse cracking by adopting a conventional encryption algorithm, thereby improving the security of communication data between the electronic devices and the server.
Optionally, the selecting step of the target encryption algorithm includes:
generating a random number by using a preset random algorithm;
randomly selecting the target encryption algorithm from the preset algorithm list based on the random number, wherein the preset algorithm list comprises a plurality of encryption algorithms and the number of each encryption algorithm;
the expression of the preset random algorithm is as follows:
wherein,indicate->Random number generated when personal electronic device handshakes with server,/->Indicate->Random number generated when personal electronic device handshakes with server,/->、/>And->For the known parameter determined based on the largest number of the list of preset algorithms +.>Representing a modulo operation.
In this alternative embodiment, the known parameters are determined by the largest number of the list of preset algorithms、/>And->Which can be updated periodically to make the target encryption algorithm selected at random for different electronic devices repeatable in a short time (i.e. in +.>The same is input ∈ ->The same applies) with unpredictability over a long period of time (i.e. periodically updating parameters、/>And->For a long time->The same is input, ++>Possibly the same). Meanwhile, the maximum value of the random number can be effectively limited not to exceed the maximum number of the preset algorithm list by adopting modulo arithmetic. The embodiment improves the security of the encryption algorithm between the electronic equipment and the server, and effectively avoids the type of the encryption algorithm adopted by pre-cracking.
Optionally, the step of generating the encrypted communication policy includes:
invoking the preset key exchange strategy, wherein the preset key exchange strategy comprises a strategy for performing the current decryption based on the key parameter obtained by the previous decryption, and taking the key parameter obtained by the current decryption as the decryption key parameter of the next decryption;
and assembling the preset key exchange strategy and the target encryption algorithm to obtain the encryption communication strategy.
In this optional embodiment, the preset key exchange policy is a key exchange rule between the electronic device and the server, specifically, a first key parameter obtained by decrypting a previous printing request by using the server is used as a decryption key of the current printing request; and the second key parameter obtained by decrypting the current printing request is used as a decryption key of the next printing request. Compared with the traditional printer, the data are encrypted and decrypted by the same secret key, and the data are encrypted by different secret keys every time of data transmission, so that the communication data security can be further improved.
Further, the preset key exchange strategy and the target encryption algorithm are assembled to generate an encryption communication strategy, and the encryption communication strategy is fed back to the electronic equipment to serve as a data encryption strategy when the electronic equipment initiates a printing request.
Optionally, for different electronic devices, the server establishes a corresponding application group for storing a corresponding encrypted communication policy and caching the print request of the corresponding electronic device.
Step S102, a first key parameter corresponding to the electronic equipment is called, the encrypted printing data is analyzed, parameters to be printed and second key parameters are obtained, the first key parameters are key parameters obtained by decrypting the previous printing request, and the second key parameters are used as key parameters required by decrypting the next printing request.
In this step, the first key parameter is a key parameter obtained by the server analyzing the encrypted print data of the previous print request, and is cached in the server and used as a decryption key of the encrypted print data of the current print request. The parameters to be printed include data material to be printed and print requirements.
It should be noted that, the embodiment uses key cross transmission to effectively confuse the data invaginator, so as to ensure that the security of the encrypted print data is still ensured even after the print request is intercepted. Meanwhile, the embodiment further improves the data transmission safety by adopting different encryption algorithms in cooperation with different electronic devices.
In some embodiments, the step S102 includes:
based on an encryption communication strategy between the server and the electronic equipment, calling a key parameter obtained by decrypting a last printing request as the first key, wherein the last printing request is a printing request sent to the server last time by the electronic equipment, and the encryption communication strategy comprises an encryption algorithm and a key exchange strategy adopted between the server and the electronic equipment;
decrypting the encrypted print data based on the first key parameter to obtain decrypted print data in a plaintext form and the second key parameter, and caching the second key parameter for decrypting a next print request;
and according to the coding format of the decrypted printing data, carrying out data analysis on the decrypted printing data to obtain the parameters to be printed.
In this embodiment, the encrypted communication policy includes a target encryption algorithm and a key exchange rule, the target encryption algorithm includes, but is not limited to, AES (advanced encryption Standard), DES (data encryption Standard), 3DES, RC4, blowfish, RSA, elliptic Curve Cryptography (ECC), diffie-Hellman, RSA, elliptic Curve Cryptography (ECC), diffie-Hellman, MD5, SHA-1, SHA-256, and the like.
Optionally, according to the target encryption algorithm and the first key parameter in the encryption communication policy, the encrypted print data is decrypted, so as to obtain decrypted print data in a plaintext format and the second key parameter. Wherein the symmetric encryption algorithm uses the same key for encryption and decryption, whereas the asymmetric encryption algorithm uses a public key for encryption and a private key for decryption.
Optionally, determining the print data format used based on the decrypted print data, the print data format including, but not limited to, text files (e.g., plain text or markup language format), image files (e.g., JPEG, PNG) and page description language (e.g., PDF, postScript); and according to the used printing data format, selecting a corresponding analysis method to analyze the decrypted printing data. Meanwhile, for the print data of the text file type, text contents can be parsed by lines, and print instructions, text contents, formatting commands, and the like therein can be identified. For image file type print data, the image data may be parsed and rendered using an image processing library. For page description language type print data, the corresponding parser may be used to parse and render layout, text, graphics, and other elements of the page.
Step S103, matching the target printer equipment corresponding to the parameters to be printed by using a preset equipment matching strategy, wherein the equipment matching strategy comprises matching relations between various printing parameters and various printer equipment.
In this step, the printer system includes a plurality of printer devices, and for different printing requirements, different types of printer devices need to be applied, such as thermal printers need to be used for thermal printing, portable printers need to be used for portable printing, ticket printers need to be used for ticket printing, and the like. Therefore, according to the device matching policy, the embodiment matches the target printer device corresponding to the parameter to be printed, so as to meet various printing requirements. The device matching policy includes a matching priority of the print demand parameters, and a matching relationship (correspondence relationship) of the plurality of print demand parameters and the printer device.
Alternatively, the printer system adopts a master-slave mode, a server is used as a host, a plurality of printer devices are respectively used as slaves, and the host selects a target slave from the plurality of slaves as a target printer device.
In some embodiments, the step S103 includes:
determining whether the parameter to be printed contains a target IP address by using the equipment matching strategy;
if the parameters to be printed contain the target IP address, determining that the target printer equipment is the printer equipment corresponding to the target IP address;
if the parameters to be printed do not contain the target IP address, sequentially matching the corresponding relation between each printing demand parameter in the parameters to be printed and the printer equipment by utilizing the parameter matching priority in the equipment matching strategy;
and determining the printer equipment type corresponding to the parameter to be printed based on the corresponding relations obtained by matching, and selecting the target printer equipment corresponding to the printer equipment type from the equipment idle list.
In this embodiment, the parameter matching priority in the device matching policy can meet the personalized requirement of the user, for example, support the user to select a designated printer device to print, and when the user selects the printer device through the printer list displayed on the electronic device, the electronic device carries the target IP address of the printer device when generating the print request.
When the user does not designate a printer device, the server allocates a target printer device to the current print request. Illustratively, determining the printer device type based on the parameters to be printed includes:
if the parameters to be printed include a print speed demand parameter, determining the type of the high-speed printer device by considering the number of pages Printed Per Minute (PPM) and the time of top page printing of the printer device.
If the parameters to be printed include print quality requirement parameters, such as printing high quality images, photographs or documents, etc., a printer having high resolution and fine printing technology is selected.
If the parameters to be printed include print paper size and type requirement parameters, the type of printer device supporting the print paper size and type requirement parameters is selected.
If the parameters to be printed comprise the double-sided printing requirement parameters, selecting a printer device with an automatic double-sided printing function.
Further, when there are a plurality of printer devices satisfying the printer device type, then the free device is selected as the target printer device, i.e., any one printer device is selected from the device free list as the target printer device.
Step S104, generating a print task based on the parameters to be printed, and transmitting the print task to the target printer device, wherein the print task is used for the target printer device to directly execute printing operation.
In this step, the parameters to be printed obtained by parsing in step S103 are rendered into a format for printing, including, but not limited to, processing and formatting the image, formatting and paging the text, and laying out and arranging the page elements. And packaging and transmitting the rendered parameters to be printed to target printer equipment. The target printer device outputs the rendered parameters to be printed as physical forms according to the parameters to be printed.
In some embodiments, the step S104 includes:
performing printing rendering on the parameters to be printed to obtain rendered parameters to be printed;
based on a secure transport layer protocol between the server and the target printer device, packaging the rendered parameters to be printed, and generating the print task;
and transmitting the print task to the target printer device and requesting to return to a printing state.
In this embodiment, in order to ensure the communication security between the server and the target printer device, the recording protocol and the handshake protocol in the secure transport layer protocol are adopted in this embodiment to package the rendered parameters to be printed, so as to generate a print job. And transmitting the print job to a job queue of the target printer device, and periodically requesting to update the print status.
In some embodiments, after the step S104, further includes:
and feeding back the target printer equipment and the printing state corresponding to the printing request to the electronic equipment.
In the embodiment, the target printer device and the printing state are fed back to the electronic device, so that a user can clearly and intuitively know the printer device executing the current printing request and the printing progress, and user experience is improved.
In order to execute the printer data processing method corresponding to the method embodiment, corresponding functions and technical effects are realized. Referring to fig. 3, fig. 3 shows a block diagram of a server according to an embodiment of the present application. For convenience of explanation, only the portions related to the present embodiment are shown, and the server provided in the embodiment of the present application includes:
an obtaining module 301, configured to obtain a print request sent by the electronic device, where the print request carries encrypted print data;
the parsing module 302 is configured to invoke a first key parameter corresponding to the electronic device, parse the encrypted print data to obtain a parameter to be printed and a second key parameter, where the first key parameter is a key parameter obtained by decrypting a previous print request, and the second key parameter is a key parameter required by decrypting a next print request;
a matching module 303, configured to match the target printer device corresponding to the parameter to be printed by using a preset device matching policy, where the device matching policy includes a matching relationship between multiple printing parameters and multiple printer devices;
and the transmission module 304 is configured to generate a print job based on the parameters to be printed, and transmit the print job to the target printer device, where the print job is used for the target printer device to directly perform a printing operation.
In some embodiments, the parsing module 302 includes:
the calling unit is used for calling a key parameter obtained by decrypting a last printing request as the first key based on an encryption communication strategy between the server and the electronic equipment, wherein the last printing request is a printing request sent to the server last time by the electronic equipment, and the encryption communication strategy comprises an encryption algorithm and a key exchange strategy adopted between the server and the electronic equipment;
the decryption unit is used for decrypting the encrypted printing data based on the first key parameter to obtain the decrypted printing data in a plaintext form and the second key parameter, and caching the second key parameter for decrypting the next printing request;
and the analysis unit is used for carrying out data analysis on the decrypted printing data according to the coding format of the decrypted printing data to obtain the parameters to be printed.
In some embodiments, the server further comprises:
the receiving module is used for receiving a handshake request initiated by the electronic equipment, wherein the handshake request carries the identity information of the electronic equipment;
the verification module is used for carrying out identity verification on the identity information based on a trusted equipment list of the server;
the selecting module is used for judging that the identity information passes verification if the identity information exists in the trusted equipment list, and randomly selecting a target encryption algorithm from a preset algorithm list;
the generation module is used for generating an encryption communication strategy based on the target encryption algorithm;
and the establishing module is used for carrying out handshake verification on the electronic equipment and the server based on the encryption communication strategy so as to establish communication connection between the electronic equipment and the server.
In some embodiments, the selecting module is specifically configured to:
generating a random number by using a preset random algorithm;
randomly selecting the target encryption algorithm from the preset algorithm list based on the random number, wherein the preset algorithm list comprises a plurality of encryption algorithms and the number of each encryption algorithm;
the expression of the preset random algorithm is as follows:
wherein,indicate->Random number generated when personal electronic device handshakes with server,/->Indicate->Random number generated when personal electronic device handshakes with server,/->、/>And->For the known parameter determined based on the largest number of the list of preset algorithms +.>Representing a modulo operation.
In some embodiments, the generating module is specifically configured to:
invoking the preset key exchange strategy, wherein the preset key exchange strategy comprises a strategy for performing the current decryption based on the key parameter obtained by the previous decryption, and taking the key parameter obtained by the current decryption as the decryption key parameter of the next decryption;
and assembling the preset key exchange strategy and the target encryption algorithm to obtain the encryption communication strategy.
The matching module 303 is specifically configured to:
determining whether the parameter to be printed contains a target IP address by using the equipment matching strategy;
if the parameters to be printed contain the target IP address, determining that the target printer equipment is the printer equipment corresponding to the target IP address;
if the parameters to be printed do not contain the target IP address, sequentially matching the corresponding relation between each printing demand parameter in the parameters to be printed and the printer equipment by utilizing the parameter matching priority in the equipment matching strategy;
and determining the printer equipment type corresponding to the parameter to be printed based on the corresponding relations obtained by matching, and selecting the target printer equipment corresponding to the printer equipment type from the equipment idle list.
In some embodiments, the transmission module 304 includes:
performing printing rendering on the parameters to be printed to obtain rendered parameters to be printed;
based on a secure transport layer protocol between the server and the target printer device, packaging the rendered parameters to be printed, and generating the print task;
and transmitting the print task to the target printer device and requesting to return to a printing state.
In some embodiments, the server further comprises:
and the feedback module is used for feeding back the target printer equipment and the printing state corresponding to the printing request to the electronic equipment.
The server may implement the printer data processing method of the method embodiment. The options in the method embodiments described above are also applicable to this embodiment and will not be described in detail here. The rest of the embodiments of the present application may refer to the content of the method embodiments described above, and in this embodiment, no further description is given.
In several embodiments provided herein, it will be understood that each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device to perform all or part of the steps of the method described in the various embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing embodiments have been provided for the purpose of illustrating the objects, technical solutions and advantages of the present application in further detail, and it should be understood that the foregoing embodiments are merely examples of the present application and are not intended to limit the scope of the present application. It should be noted that any modifications, equivalent substitutions, improvements, etc. made by those skilled in the art, which are within the spirit and principles of the present application, are intended to be included within the scope of the present application.

Claims (7)

1. A printer data processing method, characterized by being applied to a server, which is communicatively connected to at least one printer device and an electronic device, the method comprising:
receiving a handshake request initiated by the electronic equipment, wherein the handshake request carries identity information of the electronic equipment;
based on a trusted device list of the server, carrying out identity verification on the identity information;
if the identity information exists in the trusted equipment list, judging that the identity information passes verification, and randomly selecting a target encryption algorithm from a preset algorithm list;
generating an encrypted communication strategy based on the target encryption algorithm;
performing handshake verification on the electronic equipment and the server based on the encrypted communication strategy to establish communication connection between the electronic equipment and the server;
acquiring a printing request sent by the electronic equipment, wherein the printing request carries encrypted printing data;
invoking a first key parameter corresponding to the electronic equipment, analyzing the encrypted printing data to obtain a parameter to be printed and a second key parameter, wherein the first key parameter is a key parameter obtained by decrypting a previous printing request, and the second key parameter is used as a key parameter required by decrypting a next printing request;
matching target printer equipment corresponding to the parameters to be printed by using a preset equipment matching strategy, wherein the equipment matching strategy comprises matching relations between various printing parameters and various printer equipment;
generating a print job based on the parameters to be printed, and transmitting the print job to the target printer device, wherein the print job is used for the target printer device to directly execute printing operation;
the calling of the first key parameter corresponding to the electronic equipment and the analysis of the encrypted printing data are carried out to obtain a parameter to be printed and a second key parameter, and the method comprises the following steps:
based on an encryption communication strategy between the server and the electronic equipment, calling a key parameter obtained by decrypting a last printing request as the first key, wherein the last printing request is a printing request sent to the server last time by the electronic equipment, and the encryption communication strategy comprises an encryption algorithm and a key exchange strategy adopted between the server and the electronic equipment;
decrypting the encrypted print data based on the first key parameter to obtain decrypted print data in a plaintext form and the second key parameter, and caching the second key parameter for decrypting a next print request;
according to the coding format of the decrypted printing data, carrying out data analysis on the decrypted printing data to obtain the parameters to be printed;
the generating the encrypted communication policy based on the target encryption algorithm includes:
invoking a preset key exchange strategy, wherein the preset key exchange strategy comprises a strategy for performing current decryption based on key parameters obtained by previous decryption, and taking the key parameters obtained by current decryption as decryption key parameters of next decryption;
and assembling the preset key exchange strategy and the target encryption algorithm to obtain the encryption communication strategy.
2. The printer data processing method as claimed in claim 1, wherein said randomly selecting the target encryption algorithm from the preset algorithm list comprises:
generating a random number by using a preset random algorithm;
randomly selecting the target encryption algorithm from the preset algorithm list based on the random number, wherein the preset algorithm list comprises a plurality of encryption algorithms and the number of each encryption algorithm;
the expression of the preset random algorithm is as follows:
X i+1 =(aX i +b)mod c
wherein X is i+1 Representing a random number, X, generated when an i+1th electronic device handshakes with a server i Representing a random number generated when the ith electronic device handshakes with the server, a, b and c are known parameters determined based on the maximum number of the preset algorithm list, and mod represents modulo arithmetic.
3. The printer data processing method as claimed in claim 1, wherein said matching a target printer device corresponding to said parameter to be printed using a preset device matching policy, comprises:
determining whether the parameter to be printed contains a target IP address by using the equipment matching strategy;
if the parameters to be printed contain the target IP address, determining that the target printer equipment is the printer equipment corresponding to the target IP address;
if the parameters to be printed do not contain the target IP address, sequentially matching the corresponding relation between each printing demand parameter in the parameters to be printed and the printer equipment by utilizing the parameter matching priority in the equipment matching strategy;
and determining the printer equipment type corresponding to the parameter to be printed based on the corresponding relations obtained by matching, and selecting the target printer equipment corresponding to the printer equipment type from the equipment idle list.
4. The printer data processing method according to claim 1, wherein the generating a print job based on the parameters to be printed and transmitting the print job to the target printer device includes:
performing printing rendering on the parameters to be printed to obtain rendered parameters to be printed;
based on a secure transport layer protocol between the server and the target printer device, packaging the rendered parameters to be printed, and generating the print task;
and transmitting the print task to the target printer device and requesting to return to a printing state.
5. The printer data processing method according to claim 1, wherein after generating a print job based on the parameters to be printed and transmitting the print job to the target printer device, further comprising:
and feeding back the target printer equipment and the printing state corresponding to the printing request to the electronic equipment.
6. A server in communication with at least one printer device and an electronic device, the server comprising:
the receiving module is used for receiving a handshake request initiated by the electronic equipment, wherein the handshake request carries the identity information of the electronic equipment;
the verification module is used for carrying out identity verification on the identity information based on a trusted equipment list of the server;
the selecting module is used for judging that the identity information passes verification if the identity information exists in the trusted equipment list, and randomly selecting a target encryption algorithm from a preset algorithm list;
the generation module is used for generating an encryption communication strategy based on the target encryption algorithm;
the establishing module is used for carrying out handshake verification on the electronic equipment and the server based on the encryption communication strategy so as to establish communication connection between the electronic equipment and the server;
the acquisition module is used for acquiring a printing request sent by the electronic equipment, wherein the printing request carries encrypted printing data;
the analysis module is used for calling a first key parameter corresponding to the electronic equipment, analyzing the encrypted printing data to obtain a parameter to be printed and a second key parameter, wherein the first key parameter is a key parameter obtained by decrypting a previous printing request, and the second key parameter is used as a key parameter required by decrypting a next printing request;
the matching module is used for matching the target printer equipment corresponding to the parameters to be printed by utilizing a preset equipment matching strategy, and the equipment matching strategy comprises matching relations between various printing parameters and various printer equipment;
the transmission module is used for generating a print task based on the parameters to be printed and transmitting the print task to the target printer equipment, wherein the print task is used for the target printer equipment to directly execute printing operation;
the parsing module comprises:
the calling unit is used for calling a key parameter obtained by decrypting a last printing request as the first key based on an encryption communication strategy between the server and the electronic equipment, wherein the last printing request is a printing request sent to the server last time by the electronic equipment, and the encryption communication strategy comprises an encryption algorithm and a key exchange strategy adopted between the server and the electronic equipment;
the decryption unit is used for decrypting the encrypted printing data based on the first key parameter to obtain the decrypted printing data in a plaintext form and the second key parameter, and caching the second key parameter for decrypting the next printing request;
the analysis unit is used for carrying out data analysis on the decrypted printing data according to the coding format of the decrypted printing data to obtain the parameters to be printed;
the generating module is specifically configured to:
the calling unit is used for calling a preset key exchange strategy, wherein the preset key exchange strategy comprises a strategy for carrying out the current decryption based on the key parameter obtained by the previous decryption, and the key parameter obtained by the current decryption is used as the decryption key parameter of the next decryption;
and the assembling unit is used for assembling the preset key exchange strategy and the target encryption algorithm to obtain the encryption communication strategy.
7. The server according to claim 6, wherein the selecting module is specifically configured to:
generating a random number by using a preset random algorithm;
randomly selecting the target encryption algorithm from the preset algorithm list based on the random number, wherein the preset algorithm list comprises a plurality of encryption algorithms and the number of each encryption algorithm;
the expression of the preset random algorithm is as follows:
X i+1 =(aX i +b)mod c;
wherein X is i+1 Representing a random number, X, generated when an i+1th electronic device handshakes with a server i Representing a random number generated when the ith electronic device handshakes with the server, a, b and c are known parameters determined based on the maximum number of the preset algorithm list, and mod represents modulo arithmetic.
CN202311203823.XA 2023-09-19 2023-09-19 Printer data processing method and server Active CN116954530B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311203823.XA CN116954530B (en) 2023-09-19 2023-09-19 Printer data processing method and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311203823.XA CN116954530B (en) 2023-09-19 2023-09-19 Printer data processing method and server

Publications (2)

Publication Number Publication Date
CN116954530A CN116954530A (en) 2023-10-27
CN116954530B true CN116954530B (en) 2023-12-22

Family

ID=88462341

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311203823.XA Active CN116954530B (en) 2023-09-19 2023-09-19 Printer data processing method and server

Country Status (1)

Country Link
CN (1) CN116954530B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117749532A (en) * 2024-02-07 2024-03-22 珠海芯烨电子科技有限公司 Cloud printer data encryption method and related device
CN118432883B (en) * 2024-04-28 2024-10-22 国合星科(深圳)技术有限公司 Safe printing method and system for network printer
CN118764198B (en) * 2024-09-09 2024-12-27 珠海芯烨电子科技有限公司 Encryption control method and system for printing data in printer

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005159556A (en) * 2003-11-21 2005-06-16 Canon Inc Content usage frequency limiting method, content usage terminal device, content usage system, computer program, and computer-readable recording medium
JP2007165977A (en) * 2005-12-09 2007-06-28 Seiko Epson Corp Wireless communication system and wireless communication method
CN110275682A (en) * 2018-03-15 2019-09-24 阿里巴巴集团控股有限公司 Cloud Method of printing, apparatus and system
WO2019231465A1 (en) * 2018-06-01 2019-12-05 Hewlett-Packard Development Company, L.P. Key encryption key wrapping
KR20220011314A (en) * 2020-07-21 2022-01-28 배병우 The printed lottery production system, and method thereof
WO2022142038A1 (en) * 2020-12-29 2022-07-07 平安普惠企业管理有限公司 Data transmission method and related device
CN116403342A (en) * 2022-12-12 2023-07-07 珠海芯烨电子科技有限公司 Bluetooth-based pos terminal printing method
WO2023160420A1 (en) * 2022-02-25 2023-08-31 百果园技术(新加坡)有限公司 Group message encryption method and apparatus, device and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6717076B2 (en) * 2016-06-28 2020-07-01 コニカミノルタ株式会社 Printing system, encryption key changing method, printer, program
US11314877B2 (en) * 2018-10-25 2022-04-26 Hewlett-Packard Development Company, L.P. Public key encrypted network printing

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005159556A (en) * 2003-11-21 2005-06-16 Canon Inc Content usage frequency limiting method, content usage terminal device, content usage system, computer program, and computer-readable recording medium
JP2007165977A (en) * 2005-12-09 2007-06-28 Seiko Epson Corp Wireless communication system and wireless communication method
CN110275682A (en) * 2018-03-15 2019-09-24 阿里巴巴集团控股有限公司 Cloud Method of printing, apparatus and system
WO2019231465A1 (en) * 2018-06-01 2019-12-05 Hewlett-Packard Development Company, L.P. Key encryption key wrapping
KR20220011314A (en) * 2020-07-21 2022-01-28 배병우 The printed lottery production system, and method thereof
WO2022142038A1 (en) * 2020-12-29 2022-07-07 平安普惠企业管理有限公司 Data transmission method and related device
WO2023160420A1 (en) * 2022-02-25 2023-08-31 百果园技术(新加坡)有限公司 Group message encryption method and apparatus, device and storage medium
CN116403342A (en) * 2022-12-12 2023-07-07 珠海芯烨电子科技有限公司 Bluetooth-based pos terminal printing method

Also Published As

Publication number Publication date
CN116954530A (en) 2023-10-27

Similar Documents

Publication Publication Date Title
CN116954530B (en) Printer data processing method and server
US8924709B2 (en) Print release with end to end encryption and print tracking
JP4235520B2 (en) Information processing apparatus, printing apparatus, print data transmission method, printing method, print data transmission program, and recording medium
US20080235512A1 (en) Print data communication with data encryption and decryption
US7561294B2 (en) Mobile device-enabled secure release of print jobs using parallel decryption
JP5511463B2 (en) Image forming apparatus, image processing system, method for controlling image processing system, and program
US20090063860A1 (en) Printer driver that encrypts print data
JP6977316B2 (en) Setting information usage system, setting information usage method
JP2007082208A (en) System, method, and program for securely transmitting electronic documents between domains in terms of security
CN111193704B (en) HTTP communication method, device and readable storage medium
US20130061059A1 (en) Information processing apparatus, information processing method, and non-transitory computer readable medium
CN113642009B (en) Block chain-based printing method, device, computer equipment and storage medium
JP4549873B2 (en) Protection device and protection system for network connection resources
JP4442583B2 (en) Image processing apparatus, image processing method, and image processing program
US10558412B2 (en) Content delivery network including mobile devices
JP2005324497A (en) Print management system, apparatus used therefor, program, and printing method
JP2014174920A (en) Portable terminal, image output system and program
JP2005199627A (en) Image processing apparatus having output authentication function for confidential print data
JP2007233846A (en) Electronic data storage device, program and method
JP2007196386A (en) Image forming apparatus
US12328587B2 (en) Method and a system for securely sharing datasets via glyphs
CN110381225A (en) Printing apparatus, control method of printing apparatus, and storage medium
JP2009259014A (en) Printing system and method for controlling the same
US20240386079A1 (en) Authorization service system, non-transitory computer readable medium storing program, and authorization service method
JP7234014B2 (en) Information processing device, information processing system, and control method thereof

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
GR01 Patent grant
GR01 Patent grant