Printing method, equipment and medium
Through a new printing method, users can realize dynamic business data printing by obtaining printing instructions and determining the target printing module without installing the printer driver, which solves the cumbersome problems of driver installation in traditional printing solutions and improves printing flexibility and efficiency.
Patent Information
- Application Number
- CN202411902559.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-05-23
AI Technical Summary
Existing label printing software requires the installation of drivers that match the printer, which limits the user's ability to print dynamic business data without drivers, and the traditional printing process does not support independent creation or customization of printing applications.
A printing method is proposed, by obtaining printing instructions, determining the currently accessible target printing module, obtaining its online access path, establishing a communication connection, and sending the data to be printed to the target printing module for printing, realizing dynamic service data printing without installing a printer driver.
It solves the cumbersome problem of installing drivers in traditional printing solutions, realizes dynamic business data printing without drivers, and improves printing flexibility and efficiency.
Smart Images

Figure CN120029563A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a printing method, device and medium. Background Art
[0002] At present, there are many types of label printing software on the market with different functions. These software usually provide a rich library of label templates and powerful editing functions to help users quickly design label templates that meet their needs. However, the label printing process still needs to rely on the printer driver to implement, which means that when users print labels, they must ensure that the driver that matches the printer used is installed on the computer.
[0003] In addition, most label printing software does not support application development based on preset templates. The traditional label printing process often relies on label printing software, and its steps usually include: users first need to design and edit the label templates to be printed in the software, and then organize and prepare the data source in a specific format. Users bind the designed label templates to the data source before batch printing operations can be performed. This series of processes is strictly limited to the label printing software, which limits the ability of users or developers to independently create or customize printing applications according to specific needs.
[0004] Therefore, how to improve the flexibility and scalability of label printing has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The main purpose of the embodiments of the present application is to propose a printing method, device and medium, aiming to achieve the purpose of printing dynamic business data without installing a printer driver.
[0006] To achieve the above object, a first aspect of an embodiment of the present application provides a printing method, the method comprising:
[0007] Obtaining a printing instruction, wherein the printing instruction includes data to be printed;
[0008] Determine a currently accessible target printing module according to the printing instruction;
[0009] Obtaining an online access path of the target printing module;
[0010] Establishing a communication connection with the target printing module according to the online access path;
[0011] The data to be printed is sent to the target printing module for data printing.
[0012] The method provided in the first aspect can solve the problem in the prior art that a driver matching the printer used must be installed on the computer before printing can be performed, thereby achieving the purpose of printing dynamic business data without installing a printer driver.
[0013] In one possible implementation, the printing instruction includes a printing module manufacturer node identifier and a printing module node identifier;
[0014] The step of determining a currently accessible target printing module according to the printing instruction includes:
[0015] According to the print module manufacturer node identifier, a target manufacturer node corresponding to the print module manufacturer node identifier is retrieved from a system registry, wherein the target manufacturer node is associated with at least one candidate print module node;
[0016] According to the printing module node identifier, a currently accessible target printing module corresponding to the printing module node identifier is determined from the at least one candidate printing module node associated with the target manufacturer node.
[0017] In a possible implementation, the system registry records node identifiers of multiple candidate manufacturer nodes;
[0018] The step of retrieving a target manufacturer node corresponding to the printing module manufacturer node identifier in a system registry according to the printing module manufacturer node identifier includes:
[0019] Performing character-by-character matching processing on the printing module manufacturer node identifier and the node identifier of each candidate manufacturer node recorded in the system registration table to obtain a first matching result;
[0020] According to the first matching result, a target manufacturer node corresponding to the printing module manufacturer node identifier is determined.
[0021] In a possible implementation, determining the target manufacturer node corresponding to the printing module manufacturer node identifier according to the first matching result includes:
[0022] When the first matching result is that the node identifiers of the plurality of candidate manufacturer nodes are inconsistent with the node identifier of the printing module manufacturer, among the node identifiers of the plurality of candidate manufacturer nodes, a node identifier whose first N characters are the same as the first N characters of the node identifier of the printing module manufacturer is determined as the target manufacturer node identifier;
[0023] The candidate manufacturer node corresponding to the target manufacturer node identifier is determined as the target manufacturer node corresponding to the printing module manufacturer node identifier.
[0024] In a possible implementation, determining the target manufacturer node corresponding to the printing module manufacturer node identifier according to the first matching result includes:
[0025] When the first matching result is that among the node identifiers of multiple candidate manufacturer nodes, there is a target manufacturer node identifier that is consistent with the printing module manufacturer node identifier, the candidate manufacturer node corresponding to the target manufacturer node identifier is determined as the target manufacturer node corresponding to the printing module manufacturer node identifier.
[0026] In a possible implementation, determining, according to the print module node identifier, a currently accessible target print module corresponding to the print module node identifier from among the at least one candidate print module node associated with the target manufacturer node includes:
[0027] Determine at least one currently accessible standby printing module node among the at least one candidate printing module node associated with the target manufacturer node;
[0028] Performing character-by-character matching processing on the printing module node identifier and the node identifier of the at least one standby printing module node to obtain a second matching result;
[0029] According to the second matching result, a target printing module corresponding to the printing module node identifier is determined.
[0030] In a possible implementation, determining the target printing module corresponding to the printing module node identifier according to the second matching result includes:
[0031] When the second matching result is that the node identifier of the at least one spare printing module node is inconsistent with the printing module node identifier, among the node identifiers of the at least one spare printing module node, a node identifier whose first N characters are the same as the first N characters of the printing module node identifier is determined as the target printing node identifier;
[0032] The standby printing module node corresponding to the target printing node identifier is determined as the target printing module corresponding to the printing module node identifier.
[0033] In a possible implementation, determining the target printing module corresponding to the printing module node identifier according to the second matching result includes:
[0034] When the second matching result is that there is a target printing node identifier consistent with the printing module node identifier in the node identifier of the at least one backup printing module node, the backup printing module node corresponding to the target printing node identifier is determined as the target printing module corresponding to the printing module node identifier.
[0035] In a second aspect, an electronic device is provided, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the printing method as described in any possible implementation manner in the first aspect when executing the computer program.
[0036] In a third aspect, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the printing method as described in any possible implementation manner in the first aspect is implemented.
[0037] It can be seen from the technical solutions provided by one or more embodiments of the above specification that the printing method provided by the embodiments of the present application obtains a printing instruction, wherein the printing instruction includes the data to be printed, determines the currently accessible target printing module according to the printing instruction, obtains the online access path of the target printing module, establishes a communication connection with the target printing module according to the online access path, and finally sends the data to be printed to the target printing module for data printing. This solves the problem in the prior art that a driver matching the printer used must be installed on the computer before printing can be performed, which is cumbersome to operate. This achieves the purpose of dynamic business data printing without installing a printer driver, thereby improving printing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate one or more embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the description of one or more embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0039] Figure 1 It is a schematic diagram of the system architecture of a printing method provided in an embodiment of the present application.
[0040] Figure 2 It is a flow chart of a printing method provided in an embodiment of the present application.
[0041] Figure 3 It is a schematic diagram of an application scenario of a printing method provided in an embodiment of the present application.
[0042] Figure 4It is a structural block diagram of an electronic device according to an embodiment of the present application.
[0043] Reference numerals: user terminal 110 , multiple printing modules 120 . DETAILED DESCRIPTION
[0044] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below in conjunction with the drawings in one or more embodiments of this specification. Obviously, the one or more embodiments described are only part of the embodiments of this specification, not all of the embodiments. Based on one or more embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.
[0045] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0046] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0047] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other. The embodiments of the present invention are further described below in conjunction with the accompanying drawings.
[0048] Figure 1 1 is a schematic diagram of a system architecture of a printing method provided in an embodiment of the present application. The system architecture may include a user terminal 110 and multiple printing modules 120. The user terminal 110 and the multiple printing modules 120 may be directly or indirectly connected via wired or wireless communication. The multiple printing modules may be inkjet printers, laser printers, thermal printers, etc., which are not specifically limited in the embodiment of the present application.
[0049] Figure 2 is an optional flow chart of the printing method provided in the embodiment of the present application. Figure 2 The method may include but is not limited to steps S100 to S500.
[0050] First, as Figure 2As shown, a printing method is provided, the method comprising:
[0051] S100: Obtain a printing instruction, where the printing instruction includes data to be printed.
[0052] It should be noted that, in some embodiments, the step of obtaining the data to be printed includes but is not limited to: the printing control module provides a program and creates a printing template on the provided program, and the user edits the content to be printed in the created printing template, such as text, one-dimensional barcode, two-dimensional barcode, and picture content; wherein each text, one-dimensional barcode, two-dimensional barcode, and entire content is an element, and the elements include elements with fixed content and elements with variable content, and element IDs are set for elements with variable content; an external data source is set, and the elements in the printing template are bound to the external data source according to the element ID set for the elements with variable content, and the printing control module uses the received external data source as an index to find the corresponding element in the printing template and replace the content to obtain the element to be printed; the printing control module creates a memory bitmap according to the required size, and draws the obtained elements to be printed one by one to the memory bitmap, and then performs black and white binary processing on the processed memory bitmap to obtain image data and encapsulate it in a specific format to obtain data to be printed that can be recognized by the printing module. Users can develop custom programs based on the designed printing templates, which not only improves the efficiency and accuracy of label printing, but also provides users with greater flexibility and customizability, allowing users to quickly create labels or print content that meet their requirements according to their business needs. It should also be noted that the printing control module can be an SDK (Software Development Kit), and the embodiments of the present application do not limit the type of printing control module. In addition, it is understandable that the embodiments of the present application do not limit the content that needs to be printed.
[0053] S200, determining a currently accessible target printing module according to a printing instruction.
[0054] S300, obtaining an online access path of a target printing module.
[0055] S400: Establishing a communication connection with a target printing module according to the online access path.
[0056] S500, sending the data to be printed to the target printing module for data printing.
[0057] It should be noted that the printing method provided in the embodiment of the present application includes: obtaining a printing instruction, wherein the printing instruction includes data to be printed, determining a currently accessible target printing module according to the printing instruction, obtaining an online access path of the target printing module, establishing a communication connection with the target printing module according to the online access path, and finally sending the data to be printed to the target printing module for data printing. This solves the problem that traditional printing solutions, from template design to printing, mostly rely on printing software, that is, it is still necessary to install a driver matching the printer used on the computer before printing can be performed, which is cumbersome to operate. This achieves the purpose of dynamic business data printing without installing a printer driver, thereby improving printing efficiency.
[0058] In one possible implementation, the print instruction includes a print module manufacturer node identifier and a print module node identifier; determining the currently accessible target print module based on the print instruction includes: based on the print module manufacturer node identifier, retrieving the target manufacturer node corresponding to the print module manufacturer node identifier in the system registry, wherein the target manufacturer node is associated with at least one candidate print module node; based on the print module node identifier, determining the currently accessible target print module corresponding to the print module node identifier among the at least one candidate print module node associated with the target manufacturer node.
[0059] Exemplarily, the print module manufacturer node identifier refers to the unique identity identifier of the manufacturer in the industrial Internet identification resolution system, including but not limited to the country code, industry code, enterprise code and other parts; the print module node identifier refers to the unique identity identifier of the print module within the manufacturer node, including but not limited to the product code, model code, batch number and other parts. The print module manufacturer node identifier and the print module node identifier provide a unique identity identifier for the print module. Through these two identifiers, the currently accessible target print module can be accurately found, thereby improving the efficiency of the printing work. In addition, it can be understood that the embodiments of the present application do not limit the components of the print module manufacturer node identifier and the print module node identifier.
[0060] like Figure 3 As shown, Figure 3A schematic diagram of an application scenario of a printing method provided in an embodiment of the present application. In one application scenario, it is assumed that the user terminal 110 is a computer and the multiple printing modules 120 are multiple printing devices; the user terminal 110 obtains a printing instruction in response to the user's operation, wherein the printing instruction includes data to be printed, and the user terminal 110 determines an accessible target printing module according to the printing instruction and obtains an online access path to the target printing module. Subsequently, the user terminal 110 establishes a communication connection with the target printing module, and then the user terminal 110 sends the data to be printed to the target printing module, the target printing module receives the data to be printed, and prints the data according to the data to be printed.
[0061] In one possible implementation, the system registry records node identifiers of multiple candidate manufacturer nodes; based on the print module manufacturer node identifier, the target manufacturer node corresponding to the print module manufacturer node identifier is retrieved from the system registry, including: matching the print module manufacturer node identifier with the node identifier of each candidate manufacturer node recorded in the system registry character by character to obtain a first matching result; and determining the target manufacturer node corresponding to the print module manufacturer node identifier based on the first matching result.
[0062] It should be noted that the system registry contains data such as the program information, port information, and default settings of the printing module. The program information stores the program name, version, manufacturer information, etc. The manufacturer information records the node identifiers of multiple candidate manufacturer nodes. According to the printing module manufacturer node identifier, the target manufacturer node corresponding to the printing module manufacturer node identifier is retrieved from the system registry. The process includes matching the printing module manufacturer node identifier with the node identifier of each candidate manufacturer node recorded in the system registry word by word. The word-by-word matching process will not ignore any character differences, so it can accurately find matching items, and has the advantages of high accuracy, good flexibility, strong scalability, and easy implementation.
[0063] In one possible implementation, determining the target manufacturer node corresponding to the printing module manufacturer node identifier based on the first matching result includes: when the first matching result is that the node identifiers of multiple candidate manufacturer nodes are inconsistent with the printing module manufacturer node identifier, among the node identifiers of the multiple candidate manufacturer nodes, determining the node identifier whose first N characters are the same as the first N characters of the printing module manufacturer node identifier as the target manufacturer node identifier; and determining the candidate manufacturer node corresponding to the target manufacturer node identifier as the target manufacturer node corresponding to the printing module manufacturer node identifier.
[0064] Exemplarily, when the first matching result is that the node identifiers of multiple candidate manufacturer nodes are inconsistent with the node identifier of the printing module manufacturer, the first N characters are consistent, which can be considered as different identifiers caused by version iteration update, so it can be judged that the identifiers are consistent. In order to fix known errors in the printing module, improve the performance of the printing module, add new functions to the printing module, or adapt to new network environments, the node identifier of the printing module manufacturer will be updated regularly or irregularly. The advantages brought by the update are reflected in multiple levels. First, from a security perspective, the update usually includes fixes for known security vulnerabilities, which helps prevent potential network attacks and data leaks and protect user data security and privacy. In addition, performance optimization is also a major focus of the update. By improving algorithms, increasing processing speed or reducing latency, the printing module can process data more efficiently and provide faster service response after updating the node identifier of the printing module manufacturer. In addition to improvements in security and performance, the update also brings the addition of new functions. These new functions may include supporting new communication protocols, providing additional data analysis tools, or enhancing the friendliness of the user interface. These new functions not only enrich the function set of the printing module, but also enable it to better adapt to the changing market environment and user needs. In addition, updates also help maintain the compatibility of the printing module with new technologies and hardware. With the continuous advancement of technology, new hardware devices and software platforms continue to emerge. Through updates, manufacturers can ensure that the printing module can keep pace with new technologies and avoid compatibility issues caused by outdated technology. Finally, from the perspective of maintenance and upgrades, updates also bring many conveniences. The updated printing module manufacturer node identification is usually accompanied by more detailed documentation and more complete technical support, which makes it easier for users to understand and use new functions, and also helps to reduce maintenance costs and improve upgrade efficiency. In addition, it is understandable that the embodiments of the present application do not limit the reasons why the printing module manufacturer node identification needs to be updated.
[0065] Exemplarily, when the node identification of the printing module manufacturer is updated but the node identification of the candidate manufacturer node recorded in the system registry is not updated synchronously, there is a situation where the first matching result is that the node identifications of multiple candidate manufacturer nodes are inconsistent with the node identification of the printing module manufacturer. In this case, among the node identifications of multiple candidate manufacturer nodes, the node identification whose first N characters are the same as the first N characters of the node identification of the printing module manufacturer is determined as the node identification of the candidate manufacturer node recorded in the target system registry; the candidate manufacturer node corresponding to the target manufacturer node identification is determined as the target manufacturer node corresponding to the node identification of the printing module manufacturer. That is, the effective use of partial matching information, due to the asynchronous update of the node identification of the printing module manufacturer node and the node identification of the candidate manufacturer node recorded in the system registry, the front part of the matching characters also contains valuable information, the node identification of this part of the matching characters is determined as the node identification of the candidate manufacturer node recorded in the target system registry, and then the candidate manufacturer node corresponding to the target manufacturer node identification is determined as the target manufacturer node corresponding to the node identification of the printing module manufacturer. Allowing partial matching increases the flexibility of matching, and when the string of the node identifier is long and the characters are not completely matched, the node identifier of the candidate manufacturer node whose first N characters are the same as the first N characters of the printing module manufacturer node identifier is determined as the node identifier of the candidate manufacturer node recorded in the target system registry; the candidate manufacturer node corresponding to the target manufacturer node identifier is determined as the target manufacturer node corresponding to the printing module manufacturer node identifier, which can improve the matching efficiency, thereby improving the efficiency of establishing a communication connection with the target printing module, and further improving the overall printing efficiency.
[0066] In one possible implementation, the target manufacturer node corresponding to the printing module manufacturer node identifier is determined based on the first matching result, including: when the first matching result is a node identifier of multiple candidate manufacturer nodes, and there is a target manufacturer node identifier that is consistent with the printing module manufacturer node identifier, the candidate manufacturer node corresponding to the target manufacturer node identifier is determined as the target manufacturer node corresponding to the printing module manufacturer node identifier.
[0067] It should be noted that when the characters of the node identification of the printing module manufacturer and the node identification of the candidate manufacturer node are compared one by one in character order, if there is a character string of the node identification of the candidate manufacturer node that matches the character string of the node identification of the printing module manufacturer, the character string of the node identification of the candidate manufacturer node is regarded as the target manufacturer node identification, and the candidate manufacturer node corresponding to the target manufacturer node identification is determined as the target manufacturer node corresponding to the node identification of the printing module manufacturer. The word-by-word matching method is very direct, easy to understand and implement, and because it is compared one by one in character order, it can accurately identify small differences between character strings, and word-by-word matching is not limited by character string length, character set or encoding method, has wide applicability, low resource consumption, does not require additional memory to store intermediate results or perform complex calculations, and does not require preprocessing of the character string, thereby improving the efficiency of determining the target manufacturer node.
[0068] In one possible implementation, the method of determining a currently accessible target print module corresponding to the print module node identifier among the at least one candidate print module node associated with the target manufacturer node based on the print module node identifier includes: determining at least one currently accessible backup print module node among the at least one candidate print module node associated with the target manufacturer node; matching the print module node identifier with the node identifier of the at least one backup print module node character by character to obtain a second matching result; and determining the target print module corresponding to the print module node identifier based on the second matching result.
[0069] Exemplarily, a print module node is a node that communicates and exchanges data with other network devices and is provided by a printing manufacturer. The main function of the print module node is to provide printing services, receive print requests from computers or other network devices, and send print tasks to the print module for printing. Secondly, it is responsible for transmitting printing-related data in the network, including print requests, print tasks, print module status information, etc. Users can configure and manage the print module through the printer node, such as changing the IP address, port number, print queue settings, etc. of the print module.
[0070] Exemplarily, the target manufacturer node is associated with at least one printing module node, and at least one currently accessible standby printing module node is determined from at least one candidate printing module node associated with the target manufacturer node, wherein the accessible printing module node refers to a printing module node that allows other nodes to communicate and exchange data through the connection, and the printing module node identifier and the node identifier of at least one standby printing module node are matched character by character to obtain a second matching result, and the target printing module corresponding to the printing module node identifier is determined according to the second matching result. The character-by-character matching process will not ignore any character difference, so that the matching item can be found accurately, and has the advantages of high accuracy, good flexibility, strong scalability, and easy implementation.
[0071] In one possible implementation, determining the target printing module corresponding to the printing module node identifier based on the second matching result includes: when the second matching result is that the node identifier of the at least one spare printing module node is inconsistent with the printing module node identifier, among the node identifiers of the at least one spare printing module node, determining the node identifier whose first N characters are the same as the first N characters of the printing module node identifier as the target printing node identifier; and determining the spare printing module node corresponding to the target printing node identifier as the target printing module corresponding to the printing module node identifier.
[0072] Exemplarily, when the second matching result is that the node identifier of at least one standby printing module node is inconsistent with the printing module node identifier, the first N characters are consistent, which can be considered as the different identifiers caused by the version iteration update, so it can be judged that the identifiers are consistent. With the continuous advancement of printing technology and the continuous upgrading of operating systems, the old printing module node identifier may not be fully compatible with new systems or technologies. In order to ensure that the printing module can smoothly receive and process printing data from computers or other devices, it is necessary to update the printing module node identifier to support the latest printing protocols and functions. Secondly, network security threats are becoming increasingly severe, and the printing module node, as a key node in the network, may also become a target of hacker attacks. Updating the printing module node identifier can introduce more advanced security features, fix known security vulnerabilities, thereby effectively preventing malicious attacks and data leaks, and protecting users' printing data and privacy. In addition, updating the printing module node identifier can also optimize the performance of the printing module. By improving the printing algorithm, reducing energy consumption, and increasing the printing speed, the overall performance of the printing module can be significantly improved, bringing users a more efficient and energy-saving printing experience. At the same time, as user needs continue to change, new printing module functions continue to emerge. Updating the printing module node identifier can ensure that the printing module can support these new functions, such as wireless printing, remote monitoring, etc., thereby meeting the increasingly diverse needs of users. By updating the printing module node identifier, it can be ensured that the printing module remains compatible with the latest technologies and systems, improving printing efficiency and quality while protecting the user's printing data and privacy. In addition, it is understandable that the embodiments of the present application do not limit the reasons why the printing module node identifier needs to be updated.
[0073] Exemplarily, when the print module node identifier is updated but the node identifier of at least one spare print module node is not synchronously updated, there is a second matching result that the node identifier of at least one spare print module node is inconsistent with the print module node identifier. In this case, in the node identifier of at least one spare print module node, the node identifier whose first N characters are the same as the first N characters of the print module node identifier is determined as the target print node identifier; the spare print module node corresponding to the target print node identifier is determined as the target print module corresponding to the print module node identifier. That is, the partial matching information is effectively utilized. Since the print module node identifier and the node identifier of at least one spare print module node are not updated synchronously, the front partially matched characters also contain valuable information, and the node identifier of this partially matched character is determined as the target print node identifier; and then the spare print module node corresponding to the target print node identifier is determined as the target print module corresponding to the print module node identifier. Allowing partial matching increases the flexibility of matching, and when the string of the node identifier is long and the characters are not completely matched, the node identifier of at least one spare printing module node whose first N characters are the same as the first N characters of the printing module node identifier is determined as the target printing node identifier; and then the spare printing module node corresponding to the target printing node identifier is determined as the target printing module corresponding to the printing module node identifier, which can improve the matching efficiency, thereby improving the efficiency of establishing a communication connection with the target printing module, and further improving the overall printing efficiency.
[0074] In one possible implementation, determining the target printing module corresponding to the printing module node identifier based on the second matching result includes: when the second matching result is the node identifier of the at least one backup printing module node, and there is a target printing node identifier that is consistent with the printing module node identifier, determining the backup printing module node corresponding to the target printing node identifier as the target printing module corresponding to the printing module node identifier.
[0075] It should be noted that when the characters of the print module node identifier and the node identifier of at least one spare print module node are compared one by one in character order, if there is a character string of the node identifier of at least one spare print module node that matches the character string of the print module node identifier one by one, the character string of the node identifier of the at least one spare print module node is regarded as the target print node identifier, and then the spare print module node corresponding to the target print node identifier is determined as the target print module corresponding to the print module node identifier. The character-by-character matching method is very direct, easy to understand and implement, and because it is compared one by one in character order, it can accurately identify the slight difference between the character strings, and the character-by-character matching is not limited by the length of the character string, the character set or the encoding method, has wide applicability, low resource consumption, does not require additional memory to store intermediate results or perform complex calculations, and does not require preprocessing of the character string, thereby improving the efficiency of determining the target print module.
[0076] The present application also provides an electronic device, such as Figure 4 As shown, the electronic device 1400 includes:
[0077] one or more processors 1410;
[0078] The memory 1420 stores one or more programs. When the one or more programs are executed by the one or more processors 1410, the one or more processors 1410 implement the printing method provided by any embodiment of the present application.
[0079] The memory 1420, as a non-transient network system, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory 1420 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 1420 may optionally include a memory 1420 remotely arranged relative to the processor 1410, and these remote memories 1420 may be connected to the processor 1410 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0080] The memory 1420 may be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1420 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1420, and the processor 1410 calls and executes the methods of the embodiments of this application.
[0081] The processor 1410 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.
[0082] In some embodiments, the electronic device further comprises:
[0083] Input / output interface, used to realize information input and output;
[0084] Communication interface, used to realize communication interaction between this device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0085] A bus that transmits information between the various components of the device (e.g., the processor 1410, the memory 1420, the input / output interface, and the communication interface);
[0086] The processor 1410 , the memory 1420 , the input / output interface and the communication interface can be connected to each other in communication within the device via a bus.
[0087] An embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute a printing method provided by any embodiment of the present application.
[0088] An embodiment of the present application also provides a computer program product, including a computer program or computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer program or computer instructions from the computer-readable storage medium, and the processor executes the computer program or computer instructions, so that the computer device executes the printing method provided by any embodiment of the present application.
[0089] The system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of the system architecture and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are equally applicable to similar technical problems.
[0090] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0091] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0092] The above describes some embodiments of the present application with reference to the accompanying drawings, but does not limit the scope of the present invention. Any modification, equivalent substitution and improvement made by those skilled in the art without departing from the scope and essence of the present invention shall be within the scope of the present application.
[0093] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0094] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0095] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0096] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0097] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0098] The preferred embodiments of the embodiments of the present application have been described above with reference to the accompanying drawings. This does not limit the scope of the rights of the embodiments of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall fall within the scope of the rights of the embodiments of the present application.
Claims
1. A printing method, characterized in that: The method comprises: Obtaining a printing instruction, wherein the printing instruction includes data to be printed; Determine a currently accessible target printing module according to the printing instruction; Obtaining an online access path of the target printing module; Establishing a communication connection with the target printing module according to the online access path; The data to be printed is sent to the target printing module for data printing.
2. The method according to claim 1, characterized in that The printing instruction includes a printing module manufacturer node identifier and a printing module node identifier; The step of determining a currently accessible target printing module according to the printing instruction includes: According to the print module manufacturer node identifier, a target manufacturer node corresponding to the print module manufacturer node identifier is retrieved from a system registry, wherein the target manufacturer node is associated with at least one candidate print module node; According to the printing module node identifier, a currently accessible target printing module corresponding to the printing module node identifier is determined from the at least one candidate printing module node associated with the target manufacturer node.
3. The method according to claim 2, characterized in that The system registry records node identifiers of multiple candidate manufacturer nodes; The step of retrieving a target manufacturer node corresponding to the printing module manufacturer node identifier in a system registry according to the printing module manufacturer node identifier includes: Performing character-by-character matching processing on the printing module manufacturer node identifier and the node identifier of each candidate manufacturer node recorded in the system registration table to obtain a first matching result; According to the first matching result, a target manufacturer node corresponding to the printing module manufacturer node identifier is determined.
4. The method according to claim 3, characterized in that The step of determining, according to the first matching result, a target manufacturer node corresponding to the printing module manufacturer node identifier includes: When the first matching result is that the node identifiers of the plurality of candidate manufacturer nodes are inconsistent with the node identifier of the printing module manufacturer, among the node identifiers of the plurality of candidate manufacturer nodes, a node identifier whose first N characters are the same as the first N characters of the node identifier of the printing module manufacturer is determined as the target manufacturer node identifier; The candidate manufacturer node corresponding to the target manufacturer node identifier is determined as the target manufacturer node corresponding to the printing module manufacturer node identifier.
5. The method according to claim 3, characterized in that: The step of determining, according to the first matching result, a target manufacturer node corresponding to the printing module manufacturer node identifier includes: When the first matching result is that among the node identifiers of multiple candidate manufacturer nodes, there is a target manufacturer node identifier that is consistent with the printing module manufacturer node identifier, the candidate manufacturer node corresponding to the target manufacturer node identifier is determined as the target manufacturer node corresponding to the printing module manufacturer node identifier.
6. The method according to claim 2, characterized in that The step of determining, according to the print module node identifier, a currently accessible target print module corresponding to the print module node identifier from among the at least one candidate print module node associated with the target manufacturer node comprises: Determine at least one currently accessible standby printing module node among the at least one candidate printing module node associated with the target manufacturer node; Performing character-by-character matching processing on the printing module node identifier and the node identifier of the at least one standby printing module node to obtain a second matching result; According to the second matching result, a target printing module corresponding to the printing module node identifier is determined.
7. The method according to claim 6, characterized in that The step of determining the target printing module corresponding to the printing module node identifier according to the second matching result includes: When the second matching result is that the node identifier of the at least one spare printing module node is inconsistent with the printing module node identifier, among the node identifiers of the at least one spare printing module node, a node identifier whose first N characters are the same as the first N characters of the printing module node identifier is determined as the target printing node identifier; The standby printing module node corresponding to the target printing node identifier is determined as the target printing module corresponding to the printing module node identifier.
8. The method according to claim 6, characterized in that The step of determining the target printing module corresponding to the printing module node identifier according to the second matching result includes: When the second matching result is that there is a target printing node identifier consistent with the printing module node identifier in the node identifier of the at least one backup printing module node, the backup printing module node corresponding to the target printing node identifier is determined as the target printing module corresponding to the printing module node identifier.
9. An electronic device, characterized in that: include: one or more processors; A memory having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the printing method as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the printing method according to any one of claims 1 to 8 is implemented.