[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN114138212A - Task scheduling method, device, printing system, electronic device and storage medium - Google Patents

Task scheduling method, device, printing system, electronic device and storage medium Download PDF

Info

Publication number
CN114138212A
CN114138212A CN202111426871.6A CN202111426871A CN114138212A CN 114138212 A CN114138212 A CN 114138212A CN 202111426871 A CN202111426871 A CN 202111426871A CN 114138212 A CN114138212 A CN 114138212A
Authority
CN
China
Prior art keywords
task
equipment
printing
default
acquiring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111426871.6A
Other languages
Chinese (zh)
Inventor
刘威
方海平
罗幸明
戴晓华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Supcon Technology Co Ltd
Original Assignee
Zhejiang Supcon 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 Zhejiang Supcon Technology Co Ltd filed Critical Zhejiang Supcon Technology Co Ltd
Priority to CN202111426871.6A priority Critical patent/CN114138212A/en
Publication of CN114138212A publication Critical patent/CN114138212A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/121Facilitating exception or error detection and recovery, e.g. fault, media or consumables depleted
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1259Print job monitoring, e.g. job status
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/126Job scheduling, e.g. queuing, determine appropriate device
    • G06F3/1263Job scheduling, e.g. queuing, determine appropriate device based on job priority, e.g. re-arranging the order of jobs, e.g. the printing sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1278Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
    • G06F3/1285Remote printer device, e.g. being remote from client or server

Landscapes

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

Abstract

The application relates to a task scheduling method, a device, a printing system, an electronic device and a storage medium, wherein the task scheduling method comprises the following steps: acquiring a task to be distributed; determining default equipment according to the task type of the task to be distributed, wherein the equipment type of the default equipment is suitable for the task type; acquiring the equipment state of the default equipment; and if the default equipment has faults, distributing the tasks to be distributed to non-default equipment. By the aid of the method and the device, the problem of interruption of the printing process caused by printing equipment faults is solved, and stable execution of important printing tasks is realized.

Description

Task scheduling method, device, printing system, electronic device and storage medium
Technical Field
The present application relates to the field of printing in DCS systems, and in particular, to a method and an apparatus for scheduling tasks, a printing system, an electronic apparatus, and a storage medium.
Background
A printer is an indispensable part of the DCS system, and is a function frequently used in actual projects. The VF software is a configuration management software. The configuration management software is used as a working platform of system configuration, is associated with control station hardware configuration software, bit number configuration software, control scheme configuration software, function block programming software and monitoring configuration software, and supports functions of off-line downloading, on-line configuration, off-line configuration, multi-person configuration and configuration release, single control station configuration backup and reading, simulation and the like. The printing functions of VF series software applied in the existing DCS system are simple, only some simple manual printing requirements can be met, and unified scheduling management cannot be performed on printing equipment and printing tasks. However, in a high-end market such as a nuclear power industry, users have high requirements for printing, such as unattended automatic printing, automatic detection and automatic switching of printer faults, priority preemption of printing tasks, no loss of printing data and the like.
In the prior art, the time consumed by the corresponding printing task is obtained by calculating the printing task amount of the information to be printed; acquiring printing task information of a plurality of printing devices; matching corresponding target printing equipment according to the time consumed by the printing task and the printing task information; and sending the information to be printed to the target printing equipment for printing.
Aiming at the problem of interruption of the printing process caused by the fault of the printing equipment in the related art, no effective solution is provided at present.
Disclosure of Invention
The embodiment provides a task scheduling method, a task scheduling device, a printing system, an electronic device and a storage medium, so as to solve the problem of interruption of a printing process caused by a printing equipment fault in the related art.
In a first aspect, the present embodiment provides a task scheduling method, applied to a printing system, including:
acquiring a task to be distributed;
determining default equipment according to the task type of the task to be distributed, wherein the equipment type of the default equipment is suitable for the task type;
acquiring the equipment state of the default equipment;
and if the default equipment has faults, distributing the tasks to be distributed to non-default equipment.
In one embodiment, the acquiring the task to be allocated includes: acquiring a plurality of printing tasks; determining a task allocation priority based on the task type of the print task; and acquiring the tasks to be distributed according to the task distribution priority.
In one embodiment, the determining a default device according to the task type of the task to be allocated includes: if the task type is a full log printing task, the corresponding default equipment is a log printer; if the task type is an event record printing task, the corresponding default equipment is an event record printer; and if the task type is an office document printing task, the corresponding default equipment is a document printer.
In one embodiment, the device status at least includes a device network status, and acquiring the device network status of the default device includes: sending an access request to the default equipment, and acquiring a response result of the default equipment; and if the default equipment does not respond, judging that equipment network faults exist in the default equipment.
In one embodiment, the device state further includes a device running state, and acquiring the device running state of the default device includes: and determining the equipment operation faults of the default equipment by acquiring the fault identification codes, wherein the equipment operation faults comprise one or more of paper shortage faults, ink shortage faults, paper jam faults and idle printing queue missing faults.
In one embodiment, if the default device has a fault, the allocating the task to be allocated to a non-default device includes: acquiring the equipment distribution priority of the non-default equipment, wherein the equipment distribution priority is set based on the task type of the task to be distributed; and distributing the tasks to be distributed to the non-default equipment according to the equipment distribution priority.
In a second aspect, in this embodiment, there is provided a task scheduling apparatus, including:
the acquisition module is used for acquiring tasks to be distributed;
the statistical module is used for determining default equipment according to the task type of the task to be distributed, and the equipment type of the default equipment is suitable for the task type;
the judging module is used for acquiring the equipment state of the default equipment;
and the scheduling module is used for allocating the tasks to be allocated to the non-default equipment if the default equipment has faults.
In a third aspect, there is provided in the present embodiment a printing system comprising: the printing system comprises a main server, a standby server, printing equipment and a scheduling terminal, wherein the scheduling terminal is respectively connected with the main server, the standby server and the printing equipment;
the main server is used for acquiring a printing task;
the standby server is used for acquiring the printing task and detecting the working state of the main server, and if the main server has a working fault, the standby server replaces the main server to acquire the printing task;
the scheduling terminal is used for determining default printing equipment according to the task type of the printing task, and the equipment type of the default printing equipment is suitable for the task type; acquiring the equipment state of the default printing equipment; if the default printing equipment has faults, the printing task is distributed to non-default printing equipment;
the printing equipment is used for receiving the printing tasks distributed by the scheduling terminal and printing the printing tasks;
the scheduling terminal is further configured to implement the task scheduling method according to the first aspect.
In a fourth aspect, in this embodiment, there is provided an electronic apparatus, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the task scheduling method according to the first aspect when executing the computer program.
In a fifth aspect, in the present embodiment, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the task scheduling method of the first aspect.
Compared with the related art, the task scheduling method provided by the embodiment is applied to a printing system, and the tasks to be distributed are obtained; determining default equipment according to the task type of the task to be distributed, wherein the equipment type of the default equipment is suitable for the task type; acquiring the equipment state of the default equipment; and if the default equipment has a fault, the task to be distributed is distributed to non-default equipment, so that the problem of interruption of the printing process caused by the fault of the printing equipment is solved, and the stable execution of an important printing task is realized.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more thorough understanding of the application.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a block diagram of a hardware structure of a terminal according to a task scheduling method of an embodiment of the present application;
FIG. 2 is a flow chart of a task scheduling method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a print service deployment according to an embodiment of the present application;
FIG. 4 is a task scheduling diagram of a task scheduling method according to an embodiment of the present application;
fig. 5 is a block diagram of a task scheduling apparatus according to an embodiment of the present application.
Detailed Description
For a clearer understanding of the objects, aspects and advantages of the present application, reference is made to the following description and accompanying drawings.
Unless defined otherwise, technical or scientific terms used herein shall have the same general meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The use of the terms "a" and "an" and "the" and similar referents in the context of this application do not denote a limitation of quantity, either in the singular or the plural. The terms "comprises," "comprising," "has," "having," and any variations thereof, as referred to in this application, are intended to cover non-exclusive inclusions; for example, a process, method, and system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or modules, but may include other steps or modules (elements) not listed or inherent to such process, method, article, or apparatus. Reference throughout this application to "connected," "coupled," and the like is not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. Reference to "a plurality" in this application means two or more. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. In general, the character "/" indicates a relationship in which the objects associated before and after are an "or". The terms "first," "second," "third," and the like in this application are used for distinguishing between similar items and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the present embodiment may be executed in a terminal, a computer, or a similar computing device. For example, the method is executed on a terminal, and fig. 1 is a block diagram of a hardware structure of the terminal according to the task scheduling method of the embodiment of the present application. As shown in fig. 1, the terminal may include one or more processors 102 (only one shown in fig. 1) and a memory 104 for storing data, wherein the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA. The terminal may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those of ordinary skill in the art that the structure shown in fig. 1 is merely an illustration and is not intended to limit the structure of the terminal described above. For example, the terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 can be used for storing computer programs, for example, software programs and modules of application software, such as a computer program corresponding to the task scheduling method in the embodiment, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the above-mentioned method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. The network described above includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
A Distributed Control System (DCS), also called a Distributed Control System, is a new computer Control System compared to a centralized Control System. A DCS is a multi-stage computer system in the tie of a communication network, consisting of a process control stage and a process monitoring stage. Printing is an indispensable part of a DCS system and is one of key optimization objects in the practical application process of the system. The existing configuration management software can only meet some simple manual printing requirements, namely, a printing task sent by a user at a client is directly pushed to printing equipment, but in view of business diversity of printing tasks of a DCS (distributed control system), the importance degree of the printing task is different, the existing printing method cannot perform uniform scheduling management on the printing task, and when the printing equipment breaks down, the situations that the printing task cannot be processed and the printing of the important printing task is interrupted can occur, so that the normal operation of the printing function of the DCS is seriously influenced.
The embodiment provides a task scheduling method which is applied to a printing system. Fig. 2 is a flowchart of a task scheduling method according to an embodiment of the present application, and as shown in fig. 2, the flowchart includes the following steps:
step S201, a task to be allocated is acquired.
Specifically, the tasks to be distributed are acquired based on a typical C/S architecture. The C/S architecture, i.e., Client-Server architecture, refers to a Server-Client architecture. The server is responsible for data management, and the client is responsible for completing interaction tasks with the user. In the present embodiment, the server is a print server, and the client includes a client-side general component. The client interacts with the print server through the client generic component. The interaction process comprises the following steps: a user designates local print data through a client, a file in EMF format is generated according to the local print data, the file is sent to a print server, and a print job is generated in the print server. The print server may adopt a redundant configuration in which a main server and one or more backup servers are provided, and when the main server fails, the service of the main server is switched to one of the backup servers, and the backup server is used as the main server. The client-side general components can be arranged in one or more computer devices to realize the interaction between a plurality of users and the client side.
Step S202, determining default equipment according to the task type of the task to be distributed, wherein the equipment type of the default equipment is suitable for the task type.
Specifically, the job to be assigned means a print job waiting to be assigned to the printer. The print jobs can be classified according to actual service types, and the print jobs are added with marks to distinguish the print jobs of different job types. Corresponding to the service type, different printers can be designated to process print jobs of the corresponding job type, that is, the printing apparatuses are classified into a plurality of apparatus types corresponding to the job type. When a print job is received, the job type of the print job is acquired, and the print job is preferentially assigned to a printer whose device type matches the job type.
Step S203, acquiring the device state of the default device.
Specifically, the device status of the default printer is detected. The device status may be a network connection status of the printer, a device operation status of the printer, or both. It is determined whether the current assignment priority is highest, i.e., whether the default printer is available. The default device may be one printing device or may refer to a plurality of printing devices of the current type.
And step S204, if the default equipment has faults, the tasks to be distributed are distributed to non-default equipment.
Specifically, when only one default printer is available, if the default printer fails and cannot complete the print job, the print job is assigned to a printer of another device type. And when a plurality of default printers exist, judging the equipment states of the current printers one by one, and if all the default printers have faults, distributing the printing tasks to the printers of other equipment types. When the print job is assigned to another type of printer, the priority of the print job of the job type when assigned to a non-default printer may be set in advance, and the job assignment may be performed in order of priority. If no printer is available, the printing server caches the printing task and informs the client that the printer needs to be replaced, so that the printing task is prevented from being lost.
Through the steps, the task scheduling method of the embodiment of the application associates the printing tasks belonging to the same service with the printers according to the service types. The printing tasks are preferentially distributed to the default printers for processing the same service, and if the default printers are detected to have faults, the printing tasks are distributed to the printers for processing other kinds of services, so that continuous printing of important printing tasks is guaranteed, and the reliability and stability of printing are improved.
In one embodiment, print jobs are sent by a client to a print server that employs a redundant configuration to improve server reliability. Specifically, a master server and one or more standby servers can be arranged to implement redundancy configuration, the standby servers can also be called slave servers, and the configuration method is master-slave configuration. Taking the setting of a main server and a standby server as an example, the master-slave identity is determined firstly, the server started firstly is the main server, the server started later is the slave server, after the master-slave identity is determined, data synchronization is performed on data between the main server and the slave server for one time, and then synchronization is performed by timing tasks at preset time intervals such as 50ms, so that the task loss caused by the fault of the print server is prevented.
In one specific embodiment, the print server configuration process includes: after the current print server is started, the working identity of the current print server is determined by comparing the current print server with another print server, and in an initialization stage, identity logic is configured inside the current print server to establish the master-slave identity of the current print server by comparing the current print server with the other print server. After the master-slave identity is determined, the working state of the master server is detected through a heartbeat mechanism. The heartbeat mechanism is a mechanism for sending a self-defined structure body or a heartbeat packet regularly to ensure the validity of the connection. Specifically, the master server sends heartbeat packets to the slave servers at regular time, and the slave servers detect the working state of the master server by receiving the heartbeat packets of the master server at regular time. Under the condition that the main server works well, the slave server rejects all the clients which are possibly connected with the slave server, and the clients select the main server to connect; and when the heartbeat between the main servers is abnormal, the slave servers are actively upgraded to the main servers to continuously work.
The slave server can be set in a hot standby mode and a cold standby mode. The hot standby means that the slave server and the main server operate together, and when the main server fails or stops, the slave server immediately takes the working task of the failed equipment; the cold standby means that after the main server fails or stops, the slave server starts to enter a starting operation state from a stop waiting state and takes the work task of the failed equipment. Preferably, in order to save energy and avoid unnecessary cost loss, the server is configured in a cold standby mode in the embodiment. The slave server can synchronize the printing data of the master server at regular time, but the slave server does not distribute printing tasks and does not accept the connection request of the client, when the slave server detects the heartbeat abnormality of the master server, the slave server can be automatically upgraded to the master server and informs the client to carry out connection switching, and the client is connected with the slave server. When the main server fails, the printing equipment and the slave server are connected in advance, so that the printing equipment and the slave server do not need to be accessed again, and the slave server is upgraded to the main server to execute a printing task.
In one embodiment, if the network communication between the print service and the printing device is abnormal, the print server detects the abnormality and reports the abnormality, and then the manual switching server can be executed through the operation of the client interface, the standby print server is upgraded to the main print server, and the original main print server is downgraded to the standby print server. It is emphasized that the network between the print server and the printing apparatus does not require a redundant setting, and the network between the master and slave print servers requires a redundant setting.
In one embodiment, the acquiring the task to be allocated includes: acquiring a plurality of printing tasks; determining a task allocation priority based on the task type of the print task; and acquiring the tasks to be distributed according to the task distribution priority.
Specifically, when the server receives print files sent by a plurality of clients in the same time period, the print server performs priority ordering according to the task types of the print tasks, for example, when a full-log print task, an event record print task, and a document print task exist, the full-log print task, the event record print task, and the document print task are also set in order from high to low in priority according to business importance. And in a preset time period, when the three types of tasks need to be distributed, preferentially distributing the printing tasks of the task type of full log printing, and then sequentially distributing the event recording tasks and the document printing tasks. The task type and corresponding priority of the printing task can be adjusted according to actual business requirements.
In one embodiment, the determining a default device according to the task type of the task to be allocated includes: if the task type is a full log printing task, the corresponding default equipment is a log printer; if the task type is an event record printing task, the corresponding default equipment is an event record printer; and if the task type is an office document printing task, the corresponding default equipment is a document printer.
Specifically, in this embodiment, the print jobs are divided into three types, i.e., full log print jobs, event record print jobs, and office document print jobs, according to actual business needs. The full log print job refers to: and printing log data in the operation process of the DCS. The log printing generally includes four levels of log data, which are ERROR, WRAN, INFO, DEBUG from high to low, and the so-called full log printing is to print all the four levels of log data. The ERROR log means that ERRORs at this level need to be processed immediately, and when an ERROR occurs, normal access of a user is affected, and the ERROR needs to be processed by an administrator immediately. The WARN log refers to: for the WARN level logs, attention needs to be paid, although it is not required for the administrator to immediately handle them. The WARN log includes two cases: one is that there are significant problems with the solution and the other is the potential problem and suggestion. Applications can tolerate this information, but the information should be checked and repaired in a timely manner. Dangerous operations of some users, such as actions of always adopting wrong passwords to try to log in an administrator account, can also be promoted to the WARN log level for recording. The INFO log is mainly used for recording information such as system running state and user operation behavior. This level log is often used to feed back the current state of the system to the end user. And the DEBUG log has the main function of accurately recording the running state of each step of the system. Through the log, the execution process of each step of certain operation can be checked, and the operation, the parameter and the sequence of the operation can be accurately positioned to cause certain errors. The method can ensure that the problems can be diagnosed through the log record of the DEBUG level under the condition that no error occurs. The information of the log printing generally comprises time, process, thread, level, module, Filter, operator, participation, content and the like. The event records the type of print job, i.e., SOE print job. The SOE, all called Sequence OF Event, refers to Event Sequence logging, and records the time OF occurrence OF a fault and the type OF Event. In most important industrial fields such as main machines of power plants, paper making and the like, once shutdown and parking occur in the process of system joint debugging or production operation, accident reasons need to be searched through a DCS platform, the technical processes of the items are complex and high in real-time performance, general alarm records and historical trends cannot be used for accurate accident analysis, and therefore event sequence records are called as necessary functions of the DCS. The office document printing task refers to a common document printing task generated in the daily office process. Correspondingly, the types of printing devices are classified into three types according to the types of print jobs they handle, namely, log printers, event record printers, and document printers.
FIG. 3 is a schematic diagram of a print service deployment according to an embodiment of the present application, including a primary print server and a backup print server connected to a plurality of clients via a network, as shown in FIG. 3. The main printer server and the standby print server are connected to a plurality of types of printers via a network. Fig. 4 is a task scheduling diagram of a task scheduling method according to an embodiment of the present application, and as shown in fig. 4, a client sends a print request to a scheduling thread of a server, and the scheduling thread sends a print task to different task queues according to task types and task priorities according to states of respective printer devices detected by a detection thread, and further sends the print task to a corresponding printer for printing.
In one embodiment, the device status at least includes a device network status, and acquiring the device network status of the default device includes: sending an access request to the default equipment, and acquiring a response result of the default equipment; and if the default equipment does not respond, judging that equipment network faults exist in the default equipment.
Specifically, the monitoring of the printer judges whether the printer network is normal or not by sending ping network data packets to the printer in a timed and simulated manner. Ping, Ping Packet Internet Groper, is an intel Packet explorer for a program to test network connection volume. Ping is a service command working in the application layer of the TCP/IP network architecture, and mainly sends an ICMP (Internet Control Message Protocol) Echo request Message to a specific destination host, and tests whether the destination station can reach and know the relevant status. Ping is used for determining whether the local host can successfully exchange data packets with another host, and then whether the TCP/IP parameters are correctly set, whether the operation is normal, whether the network is smooth and the like can be inferred according to the returned information.
In one embodiment, the device state further includes a device running state, and acquiring the device running state of the default device includes: and determining the equipment operation faults of the default equipment by acquiring the fault identification codes, wherein the equipment operation faults comprise one or more of paper shortage faults, ink shortage faults, paper jam faults and idle printing queue missing faults.
Specifically, the device operating state of the printer is acquired through an operating system interface. Equipment operational failures include, but are not limited to, paper out, ink out, paper jam, print queue fullness, etc. The equipment fault common to the printer can be set with an identification code, and when the fault identification code of the printer is received, the current equipment is not available.
In one embodiment, if the default device has a fault, the allocating the task to be allocated to a non-default device includes: acquiring the equipment distribution priority of the non-default equipment, wherein the equipment distribution priority is set based on the task type of the task to be distributed; and distributing the tasks to be distributed to the non-default equipment according to the equipment distribution priority.
Specifically, when detecting that the current default printer has a fault, detecting whether other printers of the same equipment type are available, and if all the printers of the same type of the default printer have the fault, distributing the printing tasks to the other types of printers in consideration of avoiding interruption of printing of important printing tasks. When a print job is assigned to a non-default device, printers are classified in advance according to print services, and priorities are determined for each type of printing, that is, the devices are assigned with priorities. For example: the printing tasks comprise full log printing tasks, event record printing tasks and office document printing tasks; printers include journal printers, event log printers, and document printers. When the tasks are distributed, the printing tasks are firstly sorted according to the task priority, and the sorted task distribution sequence is as follows: full log print jobs, event log print jobs, and office document print jobs. And then performing task allocation one by one, allocating a full log printing task first, acquiring the equipment state of the full log printer at this time, if the full log printer is available, allocating the full log printing task to the full log printer, and if the full log printer has a fault, acquiring the equipment allocation priority of the full log printing task. And after the full log print job is distributed, distributing the event record print job. And the event record printing task is preferentially distributed to the event record printer, and if the event record printer fails, the event record printing task is distributed to the document printer. If the document printer is in fault at the moment, the situation that no printer is available is indicated, the printing task is cached at the moment, printer fault alarm is carried out at the client side, the client is informed that the printer needs to be replaced, and the printing task is prevented from being lost.
Through the steps, the printing tasks and the printers are classified and the priority order is established according to the business requirements. Under the condition that the printing system operates normally, different types of printing tasks are distributed to corresponding task queues by the task distribution threads, and when a printer fault occurs, the printer can be preempted according to the task priority. For example: when the full log printer fails, preempting the printer with the lowest priority, namely the document printer according to the preemption rule, suppressing the document printing task, and preempting the SOE event sequence recording printer if the document printer fails again. A difficulty with existing print job scheduling management is that each type of print job is assigned an appropriate printer. According to the method and the device, the printer is defined as the global resource, the default task type, the execution task type and the printer state attribute are defined, and then management is carried out by the scheduling thread, so that the task scheduling efficiency and accuracy are improved, and the stable execution of important printing tasks is guaranteed. It should be noted that the steps illustrated in the above-described flow diagrams or in the flow diagrams of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that, although a logical order is illustrated in the flow diagrams, in some cases, the steps illustrated or described may be performed in an order different than here.
In this embodiment, a task scheduling device is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and details are not described again after the description is given. The terms "module," "unit," "subunit," and the like as used below may implement a combination of software and/or hardware for a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 5 is a block diagram of a task scheduling apparatus according to an embodiment of the present application, and as shown in fig. 5, the apparatus includes:
an obtaining module 10, configured to obtain a task to be allocated;
a statistical module 20, configured to determine a default device according to the task type of the task to be allocated, where the device type of the default device is adapted to the task type;
a judging module 30, configured to obtain a device state of the default device;
and the scheduling module 40 is configured to allocate the task to be allocated to a non-default device if the default device has a fault.
The acquiring module 10 is further configured to acquire a plurality of print jobs; determining a task allocation priority based on the task type of the print task; and acquiring the tasks to be distributed according to the task distribution priority.
The statistical module 20 is further configured to determine that the corresponding default device is a log printer if the task type is a full log printing task; if the task type is an event record printing task, the corresponding default equipment is an event record printer; and if the task type is an office document printing task, the corresponding default equipment is a document printer.
The determining module 30 is further configured to send an access request to the default device, and obtain a response result of the default device; and if the default equipment does not respond, judging that equipment network faults exist in the default equipment.
The determining module 30 is further configured to determine an apparatus operation failure of the default apparatus by acquiring a failure identification code, where the apparatus operation failure includes one or more of a paper out failure, an ink out failure, a paper jam failure, and an idle print queue out failure.
The scheduling module 40 is further configured to obtain a device allocation priority of the non-default device, where the device allocation priority is set based on the task type of the task to be allocated; and distributing the tasks to be distributed to the non-default equipment according to the equipment distribution priority.
The above modules may be functional modules or program modules, and may be implemented by software or hardware. For a module implemented by hardware, the modules may be located in the same processor; or the modules can be respectively positioned in different processors in any combination.
There is also provided in this embodiment a printing system including: the printing system comprises a main server, a standby server, printing equipment and a scheduling terminal, wherein the scheduling terminal is respectively connected with the main server, the standby server and the printing equipment;
the main server is used for acquiring a printing task;
the standby server is used for acquiring the printing task and detecting the working state of the main server, and if the main server has a working fault, the standby server replaces the main server to acquire the printing task;
the scheduling terminal is used for determining default printing equipment according to the task type of the printing task, and the equipment type of the default printing equipment is suitable for the task type; acquiring the equipment state of the default printing equipment; if the default printing equipment has faults, the printing task is distributed to non-default printing equipment;
the printing equipment is used for receiving the printing tasks distributed by the scheduling terminal and printing the printing tasks;
the printing system is also used for realizing the task scheduling method described in any one of the above embodiments.
There is also provided in this embodiment an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
and S1, acquiring the task to be distributed.
S2, determining default equipment according to the task type of the task to be distributed, wherein the equipment type of the default equipment is suitable for the task type.
And S3, acquiring the equipment state of the default equipment.
And S4, if the default equipment has faults, distributing the tasks to be distributed to non-default equipment.
It should be noted that, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments and optional implementations, and details are not described again in this embodiment.
In addition, in combination with the task scheduling method provided in the foregoing embodiment, a storage medium may also be provided in this embodiment to implement the task scheduling method. The storage medium having stored thereon a computer program; the computer program, when executed by a processor, implements any of the task scheduling methods in the above embodiments.
It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to be limiting. All other embodiments, which can be derived by a person skilled in the art from the examples provided herein without any inventive step, shall fall within the scope of protection of the present application.
It is obvious that the drawings are only examples or embodiments of the present application, and it is obvious to those skilled in the art that the present application can be applied to other similar cases according to the drawings without creative efforts. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
The term "embodiment" is used herein to mean that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is to be expressly or implicitly understood by one of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the patent protection. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A task scheduling method is applied to a printing system and is characterized by comprising the following steps:
acquiring a task to be distributed;
determining default equipment according to the task type of the task to be distributed, wherein the equipment type of the default equipment is suitable for the task type;
acquiring the equipment state of the default equipment;
and if the default equipment has faults, distributing the tasks to be distributed to non-default equipment.
2. The task scheduling method according to claim 1, wherein the obtaining the task to be allocated comprises:
acquiring a plurality of printing tasks;
determining a task allocation priority based on the task type of the print task;
and acquiring the tasks to be distributed according to the task distribution priority.
3. The task scheduling method according to claim 1, wherein the determining a default device according to the task type of the task to be allocated comprises:
if the task type is a full log printing task, the corresponding default equipment is a log printer;
if the task type is an event record printing task, the corresponding default equipment is an event record printer;
and if the task type is an office document printing task, the corresponding default equipment is a document printer.
4. The task scheduling method according to claim 1, wherein the device status at least includes a device network status, and the obtaining the device network status of the default device comprises:
sending an access request to the default equipment, and acquiring a response result of the default equipment;
and if the default equipment does not respond, judging that equipment network faults exist in the default equipment.
5. The task scheduling method according to claim 1, wherein the device status further includes a device running status, and the obtaining the device running status of the default device includes:
and determining the equipment operation faults of the default equipment by acquiring the fault identification codes, wherein the equipment operation faults comprise one or more of paper shortage faults, ink shortage faults, paper jam faults and idle printing queue missing faults.
6. The task scheduling method according to claim 1, wherein, if the default device has a failure, the allocating the task to be allocated to a non-default device comprises:
acquiring the equipment distribution priority of the non-default equipment, wherein the equipment distribution priority is set based on the task type of the task to be distributed;
and distributing the tasks to be distributed to the non-default equipment according to the equipment distribution priority.
7. A task scheduling apparatus, comprising:
the acquisition module is used for acquiring tasks to be distributed;
the statistical module is used for determining default equipment according to the task type of the task to be distributed, and the equipment type of the default equipment is suitable for the task type;
the judging module is used for acquiring the equipment state of the default equipment;
and the scheduling module is used for allocating the tasks to be allocated to the non-default equipment if the default equipment has faults.
8. A printing system, comprising: the printing system comprises a main server, a standby server, printing equipment and a scheduling terminal, wherein the scheduling terminal is respectively connected with the main server, the standby server and the printing equipment;
the main server is used for acquiring a printing task;
the standby server is used for acquiring the printing task and detecting the working state of the main server, and if the main server has a working fault, the standby server replaces the main server to acquire the printing task;
the scheduling terminal is used for determining default printing equipment according to the task type of the printing task, and the equipment type of the default printing equipment is suitable for the task type; acquiring the equipment state of the default printing equipment; if the default printing equipment has faults, the printing task is distributed to non-default printing equipment;
the printing equipment is used for receiving the printing tasks distributed by the scheduling terminal and printing the printing tasks;
the scheduling terminal is used for executing the printing task scheduling method of any one of claims 1 to 6.
9. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and the processor is configured to execute the computer program to perform the task scheduling method of any one of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the task scheduling method according to any one of claims 1 to 6.
CN202111426871.6A 2021-11-28 2021-11-28 Task scheduling method, device, printing system, electronic device and storage medium Pending CN114138212A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111426871.6A CN114138212A (en) 2021-11-28 2021-11-28 Task scheduling method, device, printing system, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111426871.6A CN114138212A (en) 2021-11-28 2021-11-28 Task scheduling method, device, printing system, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN114138212A true CN114138212A (en) 2022-03-04

Family

ID=80388402

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111426871.6A Pending CN114138212A (en) 2021-11-28 2021-11-28 Task scheduling method, device, printing system, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN114138212A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1629793A (en) * 2003-12-10 2005-06-22 佳能株式会社 Information processing apparatus, information processing program, print job management method, and recording medium
CN1661543A (en) * 2004-02-27 2005-08-31 联想(北京)有限公司 Method of interrupting printing for solving wrong printing in networked printing system
JP2006178846A (en) * 2004-12-24 2006-07-06 Canon Inc Printer system
US20100183321A1 (en) * 2009-01-16 2010-07-22 Samsung Electronics Co., Ltd. Print terminal unit and method of controlling print
CN102023831A (en) * 2009-09-10 2011-04-20 株式会社理光 Printing system, printing apparatus, computer program, and storage medium
CN102123223A (en) * 2009-12-28 2011-07-13 佳能株式会社 Information processing apparatus, network device, system, control method
CN111414139A (en) * 2020-02-14 2020-07-14 金蝶蝶金云计算有限公司 Online remote printing method and device, computer equipment and storage medium
CN112837779A (en) * 2021-02-19 2021-05-25 江苏人先智能医疗有限公司 Printing control method, device, terminal and system for medicine prescription

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1629793A (en) * 2003-12-10 2005-06-22 佳能株式会社 Information processing apparatus, information processing program, print job management method, and recording medium
CN1661543A (en) * 2004-02-27 2005-08-31 联想(北京)有限公司 Method of interrupting printing for solving wrong printing in networked printing system
JP2006178846A (en) * 2004-12-24 2006-07-06 Canon Inc Printer system
US20100183321A1 (en) * 2009-01-16 2010-07-22 Samsung Electronics Co., Ltd. Print terminal unit and method of controlling print
CN102023831A (en) * 2009-09-10 2011-04-20 株式会社理光 Printing system, printing apparatus, computer program, and storage medium
CN102123223A (en) * 2009-12-28 2011-07-13 佳能株式会社 Information processing apparatus, network device, system, control method
CN111414139A (en) * 2020-02-14 2020-07-14 金蝶蝶金云计算有限公司 Online remote printing method and device, computer equipment and storage medium
CN112837779A (en) * 2021-02-19 2021-05-25 江苏人先智能医疗有限公司 Printing control method, device, terminal and system for medicine prescription

Similar Documents

Publication Publication Date Title
CN109714202B (en) Client off-line reason distinguishing method and cluster type safety management system
US7225356B2 (en) System for managing operational failure occurrences in processing devices
CN109960634B (en) Application program monitoring method, device and system
CN110597664A (en) High-availability cluster resource deployment method, device and related components
CN109344014A (en) A kind of main/standby switching method, device and communication equipment
CN110618864A (en) Interrupt task recovery method and device
CN108234189B (en) Alarm data processing method and device
CN111526038B (en) Service request distribution method and device, computer equipment and readable storage medium
US20050234919A1 (en) Cluster system and an error recovery method thereof
US20060053330A1 (en) Smart card for high-availability clustering
CN115858221A (en) Management method and device of storage equipment, storage medium and electronic equipment
CN114138212A (en) Task scheduling method, device, printing system, electronic device and storage medium
CN113645048A (en) Network card switching method and device and field programmable gate array FPGA
CN114218004A (en) Fault processing method and system of Kubernetes cluster physical node based on BMC
CN113055203B (en) Method and device for recovering exception of SDN control plane
CN110928679B (en) Resource allocation method and device
CN112000442A (en) Method and device for automatically acquiring cluster state based on kubernets platform
CN112367196A (en) Method and device for detecting network communication fault and electronic equipment
CN117909143A (en) Method and device for processing project data, storage medium and electronic equipment
CN117453036A (en) Method, system and device for adjusting power consumption of equipment in server
CN115842860A (en) Monitoring method, device and system for data link
CN114356584A (en) Cloud server migration and resource management method and device and storage medium
CN112965902A (en) Application system evaluation method and device
CN112187919A (en) Storage node management method and related device
CN115687036A (en) Log collection method and device and log system

Legal Events

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

Country or region after: China

Address after: No. 309 Liuhe Road, Binjiang District, Hangzhou City, Zhejiang Province (High tech Zone)

Applicant after: Zhongkong Technology Co.,Ltd.

Address before: No. six, No. 309, Binjiang District Road, Hangzhou, Zhejiang

Applicant before: ZHEJIANG SUPCON TECHNOLOGY Co.,Ltd.

Country or region before: China

CB02 Change of applicant information