CN112395107A - Tax control equipment control method and device, storage medium and electronic equipment - Google Patents

Tax control equipment control method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112395107A
CN112395107A CN202011287714.7A CN202011287714A CN112395107A CN 112395107 A CN112395107 A CN 112395107A CN 202011287714 A CN202011287714 A CN 202011287714A CN 112395107 A CN112395107 A CN 112395107A
Authority
CN
China
Prior art keywords
task
queue
tax
task queue
priority
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
CN202011287714.7A
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.)
Aisino Corp
Original Assignee
Aisino Corp
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 Aisino Corp filed Critical Aisino Corp
Priority to CN202011287714.7A priority Critical patent/CN112395107A/en
Publication of CN112395107A publication Critical patent/CN112395107A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/04Billing or invoicing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/10Tax strategies
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07GREGISTERING THE RECEIPT OF CASH, VALUABLES, OR TOKENS
    • G07G5/00Receipt-giving machines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/484Precedence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • General Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Technology Law (AREA)
  • Cash Registers Or Receiving Machines (AREA)

Abstract

The disclosure relates to a method and a device for controlling tax control equipment, a storage medium and electronic equipment. The method comprises the following steps: receiving a tax service request message, wherein the tax service request message comprises a first tax task to be processed and a device identifier of a target tax control device corresponding to the first tax task; adding the first tax task to a first task queue; under the condition that the first task queue is not processed, determining a current task queue which is currently processed; if the number of the current task queues is larger than or equal to the preset maximum processing queue number, determining queue priorities of the first task queue and the current task queue, and taking the task queue with the lowest queue priority in the current task queue as a second task queue; stopping processing the second task queue under the condition that the queue priority of the first task queue is higher than that of the second task queue; the target tax control device is controlled to process the first task queue, so that tax task requests of a plurality of tax control devices are processed in parallel based on priority.

Description

Tax control equipment control method and device, storage medium and electronic equipment
Technical Field
The disclosure relates to the field of control, and in particular, to a method and an apparatus for controlling a tax control device, a storage medium, and an electronic device.
Background
Along with the development of networks and the internet, tax control equipment and software are also developed towards intellectualization, and the tax control equipment and software generally have service functions of invoice making, invoice uploading, tax copying and the like, but the tax control equipment in the related technology works in series, and the tax control equipment needs to be sequentially started and controlled to process related services according to different tax control service requests, so that the time consumption is long, and the timeliness of invoicing of a user cannot be met when the invoicing service is busy.
Disclosure of Invention
In order to solve the above problems, the present disclosure provides a method and an apparatus for controlling a tax control device, a storage medium, and an electronic device.
In a first aspect, the present disclosure provides a method for controlling a tax control device, where the method includes:
receiving a tax service request message, wherein the tax service request message comprises a first tax task to be processed and a device identifier of a target tax control device corresponding to the first tax task;
adding the first tax task to a first task queue corresponding to the equipment identifier;
determining a current task queue being processed if the first task queue is unprocessed;
determining queue priorities of the first task queue and the current task queue under the condition that the number of the current task queue is greater than or equal to the preset maximum processing queue number, and taking the task queue with the lowest queue priority in the current task queue as a second task queue;
stopping processing the second task queue if the queue priority of the first task queue is higher than the queue priority of the second task queue;
and taking the first task queue as a new current task queue, and controlling the target tax control equipment to process the first task queue.
Optionally, the determining queue priorities of the first task queue and the current task queue includes: acquiring task priority of tax tasks in a queue to be processed; the queue to be processed comprises the first task queue or the current task queue; and taking the highest task priority of the tax tasks in the queue to be processed as the queue priority of the queue to be processed.
Optionally, the stopping processing the second task queue includes: and if the second task queue comprises the second tax task which is being processed, stopping processing other tax tasks in the second task queue after the second tax task is continuously processed.
Optionally, after the task queue with the lowest queue priority in the current task queue is used as a second task queue, the method further includes: and if the first queue priority is lower than or equal to the queue priority of the second task queue, setting the state of the first task queue to be a pending state.
Optionally, the method further comprises: polling the task queue in the state to be processed under the condition that the number of the current task queue is smaller than the preset maximum processing task number, and determining a third task queue with the highest queue priority and a device identifier of the tax control device corresponding to the third task queue; and taking the third task queue as a new current task queue, and controlling tax control equipment corresponding to the third task queue to process the third task queue.
Optionally, the adding the first tax task to the first task queue corresponding to the device identifier includes: packaging the first tax task according to a preset format, wherein the preset format comprises the following steps: the equipment identification of the target tax control equipment, the task priority of the first tax task, the task name of the first tax task and the task content of the first tax task; and adding the packaged first tax task to a first task queue corresponding to the equipment identifier.
Optionally, the adding the first tax task to the first task queue corresponding to the device identifier further includes: sorting the tax tasks in the first task queue from high to low according to the task priority, and adding the first tax tasks to corresponding positions of the first task queue according to the task priority;
the controlling the target tax control device to process the first task queue comprises: and controlling the target tax control equipment to process the tax tasks in the first task queue according to the sequence of the task priorities from high to low.
In a second aspect, the present disclosure provides an apparatus for controlling a tax control device, the apparatus comprising:
the tax business request receiving module is used for receiving a tax business request message, wherein the tax business request message comprises a first tax task to be processed and a device identifier of a target tax control device corresponding to the first tax task;
the first task queue management module is used for adding the first tax task to a first task queue corresponding to the equipment identifier;
a current task queue determining module, configured to determine a current task queue currently being processed when the first task queue is not processed;
the second task queue determining module is used for determining queue priorities of the first task queue and the current task queue under the condition that the number of the current task queue is greater than or equal to the preset maximum processing queue number, and taking the task queue with the lowest queue priority in the current task queue as a second task queue;
the second task queue management module is used for stopping processing the second task queue under the condition that the queue priority of the first task queue is higher than that of the second task queue;
and the target tax control equipment control module is used for taking the first task queue as a new current task queue and controlling the target tax control equipment to process the first task queue.
Optionally, the second task queue determining module is further configured to:
acquiring task priority of tax tasks in a queue to be processed; the queue to be processed comprises the first task queue or the current task queue;
and taking the highest task priority of the tax tasks in the queue to be processed as the queue priority of the queue to be processed.
Optionally, the second task queue management module is configured to, if the second task queue includes a second tax task that is being processed, stop processing other tax tasks in the second task queue after the second tax task is continuously processed.
Optionally, the first task queue management module is further configured to set the state of the first task queue to a pending state if the first queue priority is lower than or equal to the queue priority of the second task queue.
Optionally, the apparatus further comprises:
a third task queue determining module, configured to poll the task queue in the to-be-processed state when the number of the current task queue is smaller than the preset maximum processing task number, and determine a third task queue with a highest queue priority and an equipment identifier of the tax control equipment corresponding to the third task queue;
and the third task queue management module is used for taking the third task queue as a new current task queue and controlling tax control equipment corresponding to the third task queue to process the third task queue.
Optionally, the first task queue management module is configured to package the first tax task according to a preset format, where the preset format includes: the equipment identification of the target tax control equipment, the task priority of the first tax task, the task name of the first tax task and the task content of the first tax task; and adding the packaged first tax task to a first task queue corresponding to the equipment identifier.
Optionally, the first task queue management module is further configured to sort the tax tasks in the first task queue from high to low according to the task priority, and add the first tax task to a corresponding position of the first task queue according to the task priority;
and the target tax control equipment control module is used for controlling the target tax control equipment to process the tax tasks in the first task queue according to the sequence of the task priorities from high to low.
In a third aspect, the present disclosure provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of the first aspect of the present disclosure.
In a fourth aspect, the present disclosure provides an electronic device comprising: a memory having a computer program stored thereon; a processor for executing the computer program in the memory to implement the steps of the method of the first aspect of the disclosure.
By adopting the technical scheme, receiving a tax service request message, wherein the tax service request message comprises a first tax task to be processed and a device identifier of a target tax control device corresponding to the first tax task; adding the first tax task to a first task queue corresponding to the equipment identifier; under the condition that the first task queue is not processed, determining a current task queue which is currently processed; under the condition that the number of the current task queues is larger than or equal to the preset maximum processing queue number, determining queue priorities of the first task queue and the current task queue, and taking the task queue with the lowest queue priority in the current task queue as a second task queue; stopping processing the second task queue under the condition that the queue priority of the first task queue is higher than the queue priority of the second task queue; the first task queue is used as a new current task queue, and the target tax control equipment is controlled to process the first task queue, so that tax task requests of a plurality of tax control equipment are processed in parallel according to the priority, and the tax task processing efficiency is improved.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
FIG. 1 is a schematic diagram of an application scenario of an invoice management system provided by an embodiment of the disclosure;
FIG. 2 is a flowchart of a method for controlling a tax control device according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an apparatus controlled by a tax control device according to an embodiment of the present disclosure;
FIG. 4 is a schematic structural diagram of another apparatus controlled by a tax control device according to an embodiment of the present disclosure;
fig. 5 is a block diagram of an electronic device provided by an embodiment of the present disclosure;
fig. 6 is a block diagram of another electronic device provided by embodiments of the present disclosure.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
In the description that follows, the terms "first," "second," and the like are used for descriptive purposes only and are not intended to indicate or imply relative importance nor order to be construed.
First, an application scenario of the present disclosure will be explained. The method can be applied to the field of tax affairs, in particular to the control aspect of tax control equipment. For some small and medium-sized enterprise taxpayers, the invoicing and issuing business is less, and the cost for independently deploying and managing a set of tax control equipment is higher, so the invoice business is often managed in an invoice service unit, and the invoice service unit can intensively manage a large amount of tax control equipment of the taxpayers, so the cost of the taxpayers is reduced. In the related technology, the tax control devices of the invoice service unit work in series, and for different tax service requests of different taxpayers, the tax control devices corresponding to the taxpayers need to be started in sequence and controlled to process the tax services in the tax service requests, so that the time consumption is long, and the timeliness of invoicing of a large number of users cannot be met when the invoicing services are busy.
In order to solve the above problems, the present disclosure provides a method, an apparatus, a storage medium, and an electronic device for controlling a tax control device, where the method may receive a tax service request message, where the tax service request message includes a first tax task to be processed and a device identifier of a target tax control device corresponding to the first tax task; adding the first tax task to a first task queue corresponding to the equipment identifier; under the condition that the first task queue is not processed, determining a current task queue which is currently processed; under the condition that the number of the current task queues is larger than or equal to the preset maximum processing queue number, determining queue priorities of the first task queue and the current task queue, and taking the task queue with the lowest queue priority in the current task queue as a second task queue; stopping processing the second task queue when the queue priority of the first task queue is higher than the queue priority of the second task queue; the first task queue is used as a new current task queue, and the target tax control equipment is controlled to process the current task queue, so that tax task requests of a plurality of tax control equipment are processed in parallel based on priority, and the tax task processing efficiency is improved.
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings.
Fig. 1 is a schematic diagram of an application scenario of an invoice management system provided in an embodiment of the present disclosure, as shown in fig. 1, the invoice management system includes: a local tax control management device 101, one or more tax control devices 102, an invoice server 103, and an enterprise invoice management platform 104. The local tax control management equipment 101 is connected with one or more tax control equipment 102, can manage the tax control equipment of a plurality of taxpayers in a centralized manner, can be a gold tax disk or a tax Ukey, is identity authentication and information encryption equipment of an electronic invoice public service platform, and can help the taxpayers to handle basic services such as issuing, tax declaration, inquiry, uploading and the like of value-added tax common invoices and electronic common invoices. The invoice server 103 is connected with the enterprise invoice management platform 104 and the local tax control management device 101, and the enterprise invoice management platform 104 is used for an enterprise end and is used for the enterprise to perform invoice services such as invoice issuing and the like. Taking invoice issuing as an example, an enterprise client sends an invoice issuing service request through the enterprise invoice management platform 104, after receiving the invoice issuing service request, the invoice server 103 determines the tax control device 102 corresponding to the enterprise taxpayer, generates a tax service request and sends the tax service request to the local tax control management device 101, and the local tax control management device 101 controls the corresponding tax control device 102 to issue an invoice according to the received tax service request. In the invoice management system, when a plurality of tax control devices 102 exist, the plurality of tax control devices can be controlled in parallel to process corresponding tax services, so that the processing efficiency of the tax services is improved. Because the maximum number of tax control devices that can be processed simultaneously by a local tax control management device is limited, a method for controlling tax control devices based on priority management is needed.
Fig. 2 is a method for controlling tax control equipment according to an embodiment of the present disclosure, and as shown in fig. 2, an implementation subject of the method may be a local tax control management equipment in the invoice management system, where the method includes:
s201, receiving a tax service request message.
The tax service request message comprises a first tax task to be processed and a device identifier of a target tax control device corresponding to the first tax task.
The tax service request message may be a message initiated by a taxpayer at the enterprise invoice management platform, processed by the invoice server and sent to the local tax control management device. The enterprise invoice management platform corresponds to target tax control equipment, and different tax control equipment corresponds to different equipment identifications so as to distinguish different taxpayers.
The first tax task included in the tax service request message may be any one of tax tasks such as invoice issuing, invoice query, invoice uploading, tax copying and reporting, and the like.
S202, adding the first tax task to a first task queue corresponding to the equipment identification.
Because of the particularity of the tax control equipment, each tax control equipment can only process one tax task at the same time, therefore, in the disclosure, each tax control equipment is provided with one task queue, each task queue can contain one or more tax tasks, and the association between the tax control equipment and the task queue is realized through the equipment identification. In this way, the first tax task may be added to the first task queue corresponding to the device identifier according to the device identifier in the tax service request message.
Optionally, the hardware code of the tax control device may be used as the device identifier, and the location information of the tax control device may also be used as the device identifier.
S203, under the condition that the first task queue is not processed, determining the current task queue which is currently processed.
It should be noted that, if the first task queue is already in process, after the first tax task is added to the first task queue, the first task queue may wait for the tax task to be processed.
If the first task queue is not processed, the current task queue currently being processed needs to be determined, and how to process the first task queue is determined according to the number of the current task queue, the priority of the current task queue and the priority of the first task queue. The detailed manner may refer to the description of the subsequent steps S204 to S206.
S204, under the condition that the number of the current task queues is larger than or equal to the preset maximum processing queue number, determining the queue priorities of the first task queue and the current task queue, and taking the task queue with the lowest queue priority in the current task queue as a second task queue.
The preset maximum processing queue number is the maximum number of task queues capable of being processed by the preset local tax control management equipment, and can be set according to the performance of the local tax control management equipment.
When the number of the current task queues is greater than or equal to the preset maximum processing queue number, it is indicated that the local tax control management device cannot process a new task queue at present, and at this time, processing needs to be performed according to the queue priorities of the first task queue and the current task queue.
The queue priority may be set according to the tasks in the queue, for example, the number of the tasks in the queue may be compared, and the higher the number of the tasks in the queue, the higher the queue priority; the earliest task request time in the queue may be compared, and the earlier the request time, the higher the queue priority.
S205, stopping processing the second task queue under the condition that the queue priority of the first task queue is higher than the queue priority of the second task queue.
In this step, the currently processed tax task in the second task queue may be stopped from processing and no other tax tasks in the second task queue are processed, so as to process the first task queue with higher queue priority.
And S206, taking the first task queue as a new current task queue, and controlling the target tax control equipment to process the first task queue.
By adopting the method, a tax service request message is received, wherein the tax service request message comprises a first tax task to be processed and a device identifier of a target tax control device corresponding to the first tax task; adding the first tax task to a first task queue corresponding to the equipment identifier; under the condition that the first task queue is not processed, determining a current task queue which is currently processed; under the condition that the number of the current task queues is larger than or equal to the preset maximum processing queue number, determining queue priorities of the first task queue and the current task queue, and taking the task queue with the lowest queue priority in the current task queue as a second task queue; stopping processing the second task queue under the condition that the queue priority of the first task queue is higher than the queue priority of the second task queue; the first task queue is used as a new current task queue, and the target tax control equipment is controlled to process the first task queue, so that tax task requests of a plurality of tax control equipment are processed in parallel according to the priority, and the tax task processing efficiency is improved.
In some other embodiments of the present disclosure, the step S204 may determine the queue priorities of the first task queue and the current task queue by:
firstly, task priorities of tax tasks in a queue to be processed are obtained, wherein the queue to be processed comprises a first task queue or a current task queue.
The task priority of the tax task can be determined according to the type of the tax task, the type of the tax task includes invoice issuing, invoice uploading, invoice inquiring and tax copying, and exemplarily, the task priority can be set from high to low as: invoice issuing, copying tax, invoice uploading and invoice inquiring.
And secondly, taking the highest task priority of the tax tasks in the queue to be processed as the queue priority of the queue to be processed.
For example, if the pending queue includes a tax task whose task type is invoice, the queue priority of the pending queue is set to the task priority of invoice, that is, the queue priority of the pending queue is the highest.
Therefore, the queue priority of the task queue can be determined according to the task priority of the tax tasks in the task queue to be processed, so that different processing can be performed on the task queue to be processed according to different queue priorities, and the processing efficiency of the high-priority tax tasks is improved.
Optionally, different device priorities may be set for different tax control devices, and the queue priority of the queue to be processed may be obtained according to the device priority of the tax control device corresponding to the queue to be processed. Therefore, the tax task of the first tax control equipment of the important taxpayer can be processed preferentially according to the mode, and the tax processing efficiency of the important taxpayer can be further improved when the business is busy.
In some other embodiments of the present disclosure, in the step S205, if the second task queue includes the second tax task being processed, after the second tax task is continuously processed, the processing of other tax tasks in the second task queue is stopped. Therefore, the processing failure of the second tax task due to interruption can be avoided, and the processing efficiency of the tax task can be improved.
Optionally, after the processing of the other tax tasks in the second task queue is stopped, a stop command may be sent to the second tax control device corresponding to the second tax task, and the second tax control device is notified to stop working safely, and enter an energy saving mode or shut down directly. Thus, the power consumption of the tax control equipment can be saved.
In addition, after the task queue with the lowest queue priority in the current task queue is used as the second task queue, if the first queue priority is lower than or equal to the queue priority of the second task queue, the state of the first task queue is set to be a pending state, and the processing of the second task queue is not stopped. Therefore, the low-priority task queue can be prevented from preempting the high-priority task queue, and the first task queue with low priority is queued for processing.
Further, when the number of the current task queues is smaller than the preset maximum processing task number, the task queues in the to-be-processed state can be polled, and a third task queue with the highest queue priority and equipment identifications of tax control equipment corresponding to the third task queue are determined; and taking the third task queue as a new current task queue, and controlling tax control equipment corresponding to the third task queue to process the third task queue. Therefore, the task queue in a pending state can be timely processed according to the queue priority through polling, and the processing efficiency of the tax task is improved.
In some further embodiments of the present disclosure, the first tax task may be further added to the first task queue corresponding to the device identifier by:
firstly, packaging the first tax task according to a preset format, wherein the preset format comprises the following steps: the tax control system comprises a device identification of a target tax control device, a task priority of a first tax task, a task name of the first tax task and task content of the first tax task.
The preset format may be a data structure or a message format, which is not limited in this disclosure.
And then, adding the packaged first tax task to a first task queue corresponding to the equipment identifier.
Therefore, the first tax task is packaged into the preset format in the mode, the tax control equipment is convenient to process, and the processing efficiency of the tax business is improved.
Further, the tax tasks in the first task queue can be sorted from high to low according to the task priority, and the first tax tasks are added to corresponding positions of the first task queue according to the task priority of the first tax tasks; and then controlling the target tax control equipment to process the tax tasks in the first task queue according to the order of the task priority of the tax tasks in the first task queue from high to low.
In this embodiment, the task priority of the tax task may also be determined according to the type of the tax task, and for example, the task priorities may be set in order from high to low as: issuing invoice, copying tax, uploading invoice and inquiring invoice. If the first task queue currently contains the tax tasks with various priorities, the tax tasks are sorted from high to low according to the priorities, and if the priority of the first tax task is invoicing, the first tax task is added to the first task queue after all the tax tasks with the types of invoicing are the tax tasks with invoicing and before all the tax tasks with the types of copying and reporting tax.
Therefore, after the tax tasks are sorted according to the priority, the tax tasks in the task queue are conveniently processed in sequence, and the processing efficiency of the tax tasks is further improved.
Optionally, after all the tax tasks in the first task queue are processed, if no new tax task is added to the first task queue within a preset time, an energy-saving instruction may be sent to the target tax control device corresponding to the first tax task, and the target tax control device is notified to enter an energy-saving mode or enter a standby state, so that power consumption of the tax control device may be saved.
In some other embodiments of the present disclosure, each tax control device may be controlled by a service process to complete a tax task, so that a unique service process may be set for each tax control device, and service processes of different tax control devices are distinguished by different device identifiers. Thus, the controlling of the target fiscal device to process the first task queue in step S206 may be specifically implemented in the following manner: and determining a target service process corresponding to the target tax control equipment according to the equipment identification, actively starting the target service process, and sequentially analyzing and processing the tax tasks in the first task queue until all the tax tasks in the first task queue are processed. Therefore, the tax control equipment is controlled through the service process, and the tax task is processed.
In addition, in the invoice management system, any two of the local tax control management device, the tax control device, the invoice server and the enterprise invoice management platform may communicate with each other by using an HTTP (Hypertext Transfer Protocol) Protocol or an HTTPs (Hypertext Transfer Protocol over secure Hypertext Transfer Protocol) Protocol. As the HTTPS ensures the security of the transmission process through the transmission encryption and the identity authentication on the basis of the HTTP, the security can be increased by using the HTTPS protocol, and the safety and the reliability of the tax task processing can be ensured.
Fig. 3 is a schematic structural diagram of an apparatus for controlling a tax control device according to an embodiment of the present disclosure, and as shown in fig. 3, the apparatus includes:
a tax service request receiving module 301, configured to receive a tax service request message, where the tax service request message includes a first tax task to be processed and an equipment identifier of a target tax control equipment corresponding to the first tax task;
a first task queue management module 302, configured to add the first tax task to a first task queue corresponding to the device identifier;
a current task queue determining module 303, configured to determine, when the first task queue is not processed, a current task queue currently being processed;
a second task queue determining module 304, configured to determine queue priorities of the first task queue and the current task queue when the number of the current task queue is greater than or equal to a preset maximum processing queue number, and use a task queue with a lowest queue priority in the current task queue as a second task queue;
a second task queue management module 305, configured to stop processing the second task queue if the queue priority of the first task queue is higher than the queue priority of the second task queue;
and the target tax control device control module 306 is configured to use the first task queue as a new current task queue, and control the target tax control device to process the first task queue.
Optionally, the second task queue determining module 304 is further configured to:
acquiring task priority of tax tasks in a queue to be processed; the pending queue comprises the first task queue or the current task queue;
and taking the highest task priority of the tax tasks in the queue to be processed as the queue priority of the queue to be processed.
Optionally, the second task queue management module 305 is configured to, if the second task queue includes the second tax task being processed, stop processing other tax tasks in the second task queue after the second tax task is continuously processed.
Optionally, the first task queue managing module 302 is further configured to set the state of the first task queue to be in a pending state if the first queue priority is lower than or equal to the queue priority of the second task queue.
Optionally, fig. 4 is a schematic structural diagram of another apparatus for controlling a tax control device according to an embodiment of the present disclosure, and as shown in fig. 4, the apparatus further includes:
a third task queue determining module 401, configured to poll the task queue in the pending state when the number of the current task queue is smaller than the preset maximum processing task number, and determine a third task queue with a highest queue priority and a device identifier of the tax control device corresponding to the third task queue;
the third task queue management module 402 takes the third task queue as a new current task queue, and controls the tax control device corresponding to the third task queue to process the third task queue.
Optionally, the first task queue management module 302 is configured to package the first tax task according to a preset format, where the preset format includes: the equipment identification of the target tax control equipment, the task priority of the first tax task, the task name of the first tax task and the task content of the first tax task; and adding the packaged first tax task to a first task queue corresponding to the equipment identifier.
Optionally, the first task queue management module 302 is further configured to sort the tax tasks in the first task queue from high to low according to the task priority, and add the first tax task to a corresponding position of the first task queue according to the task priority;
the target tax control device control module 306 is configured to control the target tax control device to process the tax tasks in the first task queue according to the order from high to low of the task priority.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 5 is a block diagram illustrating an electronic device 500 in accordance with an example embodiment. As shown in fig. 5, the electronic device 500 may include: a processor 501 and a memory 502. The electronic device 500 may also include one or more of a multimedia component 503, an input/output (I/O) interface 504, and a communication component 505.
The processor 501 is configured to control the overall operation of the electronic device 500, so as to complete all or part of the steps in the method for controlling a tax control device. The memory 502 is used to store various types of data to support operation at the electronic device 500, such as instructions for any application or method operating on the electronic device 500 and application-related data, such as contact data, messaging, pictures, audio, video, and so forth. The Memory 502 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk. The multimedia component 503 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 502 or transmitted through the communication component 505. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 504 provides an interface between the processor 501 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 505 is used for wired or wireless communication between the electronic device 500 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, which is not limited herein. The corresponding communication component 505 may thus comprise: Wi-Fi module, Bluetooth module, NFC module, etc.
In an exemplary embodiment, the electronic Device 500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described method for controlling a fiscal Device.
In another exemplary embodiment, a computer readable storage medium including program instructions which, when executed by a processor, implement the steps of the above-described tax control apparatus controlling method is also provided. For example, the computer readable storage medium may be the memory 502 described above comprising program instructions that are executable by the processor 501 of the electronic device 500 to perform the method for controlling a tax control device described above.
Fig. 6 is a block diagram illustrating an electronic device 600 according to an example embodiment. For example, the electronic device 600 may be provided as a server. Referring to fig. 6, the electronic device 600 includes a processor 622, which may be one or more in number, and a memory 632 for storing computer programs executable by the processor 622. The computer program stored in memory 632 may include one or more modules that each correspond to a set of instructions. Further, the processor 622 can be configured to execute the computer program to perform the above-described tax control device control method.
Additionally, electronic device 600 may also include a power component 626 that may be configured to perform power management of electronic device 600 and a communication component 650 that may be configured to enable communication, e.g., wired or wireless communication, of electronic device 600. The electronic device 600 may also include input/output (I/O) interfaces 658. The electronic device 600 may operate based on an operating system stored in the memory 632, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, and so on.
In another exemplary embodiment, a computer readable storage medium including program instructions which, when executed by a processor, implement the steps of the above-described tax control apparatus controlling method is also provided. For example, the computer readable storage medium may be the memory 632 described above that includes program instructions executable by the processor 622 of the electronic device 600 to perform the method for tax control device control described above.
In another exemplary embodiment, a computer program product is also provided, which comprises a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-mentioned tax control device control method when executed by the programmable apparatus.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. In order to avoid unnecessary repetition, various possible combinations will not be separately described in this disclosure.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.

Claims (10)

1. A tax control equipment control method is characterized by comprising the following steps:
receiving a tax service request message, wherein the tax service request message comprises a first tax task to be processed and a device identifier of a target tax control device corresponding to the first tax task;
adding the first tax task to a first task queue corresponding to the equipment identifier;
determining a current task queue being processed if the first task queue is unprocessed;
determining queue priorities of the first task queue and the current task queue under the condition that the number of the current task queue is greater than or equal to the preset maximum processing queue number, and taking the task queue with the lowest queue priority in the current task queue as a second task queue;
stopping processing the second task queue if the queue priority of the first task queue is higher than the queue priority of the second task queue;
and taking the first task queue as a new current task queue, and controlling the target tax control equipment to process the first task queue.
2. The method of claim 1, wherein determining queue priorities for the first task queue and the current task queue comprises:
acquiring task priority of tax tasks in a queue to be processed; the queue to be processed comprises the first task queue or the current task queue;
and taking the highest task priority of the tax tasks in the queue to be processed as the queue priority of the queue to be processed.
3. The method of claim 1, wherein stopping processing the second task queue comprises:
and if the second task queue comprises the second tax task which is being processed, stopping processing other tax tasks in the second task queue after the second tax task is continuously processed.
4. The method of claim 1, wherein after said using the task queue with the lowest queue priority in the current task queue as a second task queue, the method further comprises:
and if the first queue priority is lower than or equal to the queue priority of the second task queue, setting the state of the first task queue to be a pending state.
5. The method of claim 4, further comprising:
polling the task queue in the state to be processed under the condition that the number of the current task queue is smaller than the preset maximum processing task number, and determining a third task queue with the highest queue priority and a device identifier of the tax control device corresponding to the third task queue;
and taking the third task queue as a new current task queue, and controlling tax control equipment corresponding to the third task queue to process the third task queue.
6. The method of claim 1, wherein adding the first tax task to the first task queue corresponding to the device identification comprises:
packaging the first tax task according to a preset format, wherein the preset format comprises the following steps: the equipment identification of the target tax control equipment, the task priority of the first tax task, the task name of the first tax task and the task content of the first tax task;
and adding the packaged first tax task to a first task queue corresponding to the equipment identifier.
7. The method of claim 6, wherein adding the first tax task to the first task queue corresponding to the device identification further comprises:
sorting the tax tasks in the first task queue from high to low according to the task priority, and adding the first tax tasks to corresponding positions of the first task queue according to the task priority;
the controlling the target tax control device to process the first task queue comprises:
and controlling the target tax control equipment to process the tax tasks in the first task queue according to the sequence of the task priorities from high to low.
8. An apparatus for controlling a tax control device, the apparatus comprising:
the tax business request receiving module is used for receiving a tax business request message, wherein the tax business request message comprises a first tax task to be processed and a device identifier of a target tax control device corresponding to the first tax task;
the first task queue management module is used for adding the first tax task to a first task queue corresponding to the equipment identifier;
a current task queue determining module, configured to determine a current task queue currently being processed when the first task queue is not processed;
the second task queue determining module is used for determining queue priorities of the first task queue and the current task queue under the condition that the number of the current task queue is greater than or equal to the preset maximum processing queue number, and taking the task queue with the lowest queue priority in the current task queue as a second task queue;
the second task queue management module is used for stopping processing the second task queue under the condition that the queue priority of the first task queue is higher than that of the second task queue;
and the target tax control equipment control module is used for taking the first task queue as a new current task queue and controlling the target tax control equipment to process the first task queue.
9. 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 method according to any one of claims 1 to 7.
10. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of any one of claims 1 to 7.
CN202011287714.7A 2020-11-17 2020-11-17 Tax control equipment control method and device, storage medium and electronic equipment Pending CN112395107A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011287714.7A CN112395107A (en) 2020-11-17 2020-11-17 Tax control equipment control method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011287714.7A CN112395107A (en) 2020-11-17 2020-11-17 Tax control equipment control method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN112395107A true CN112395107A (en) 2021-02-23

Family

ID=74606042

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011287714.7A Pending CN112395107A (en) 2020-11-17 2020-11-17 Tax control equipment control method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112395107A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127172A (en) * 2021-04-21 2021-07-16 上海销氪信息科技有限公司 Task execution method and device, electronic equipment and storage medium
CN113256360A (en) * 2021-07-07 2021-08-13 深圳高灯计算机科技有限公司 Invoice processing control method, device, equipment and storage medium based on Ukey cabinet
CN113961334A (en) * 2021-12-23 2022-01-21 联通智网科技股份有限公司 Task processing method, device, equipment and storage medium
CN114049193A (en) * 2022-01-14 2022-02-15 深圳高灯计算机科技有限公司 Invoice authentication deduction method and system based on tax control cabinet
CN115147168A (en) * 2022-06-20 2022-10-04 广东航天信息爱信诺科技有限公司 Electronic invoice issuing task processing method, device and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110321202A (en) * 2018-03-29 2019-10-11 优酷网络技术(北京)有限公司 Task processing method and device
CN111210286A (en) * 2019-12-26 2020-05-29 大象慧云信息技术有限公司 Tax control server-based efficient invoice issuing method and system
CN111930486A (en) * 2020-07-30 2020-11-13 中国工商银行股份有限公司 Task selection data processing method, device, equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110321202A (en) * 2018-03-29 2019-10-11 优酷网络技术(北京)有限公司 Task processing method and device
CN111210286A (en) * 2019-12-26 2020-05-29 大象慧云信息技术有限公司 Tax control server-based efficient invoice issuing method and system
CN111930486A (en) * 2020-07-30 2020-11-13 中国工商银行股份有限公司 Task selection data processing method, device, equipment and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127172A (en) * 2021-04-21 2021-07-16 上海销氪信息科技有限公司 Task execution method and device, electronic equipment and storage medium
CN113256360A (en) * 2021-07-07 2021-08-13 深圳高灯计算机科技有限公司 Invoice processing control method, device, equipment and storage medium based on Ukey cabinet
CN113961334A (en) * 2021-12-23 2022-01-21 联通智网科技股份有限公司 Task processing method, device, equipment and storage medium
CN113961334B (en) * 2021-12-23 2022-05-31 联通智网科技股份有限公司 Task processing method, device, equipment and storage medium
CN114049193A (en) * 2022-01-14 2022-02-15 深圳高灯计算机科技有限公司 Invoice authentication deduction method and system based on tax control cabinet
CN115147168A (en) * 2022-06-20 2022-10-04 广东航天信息爱信诺科技有限公司 Electronic invoice issuing task processing method, device and system

Similar Documents

Publication Publication Date Title
CN112395107A (en) Tax control equipment control method and device, storage medium and electronic equipment
CN108737270B (en) Resource management method and device for server cluster
CN107111508B (en) Programmatic event detection and message generation for requests to execute program code
CN107729139B (en) Method and device for concurrently acquiring resources
JP2021529386A (en) Execution of auxiliary functions on the on-demand network code execution system
US10771533B2 (en) Adaptive communication control device
US10659410B2 (en) Smart message delivery based on transaction processing status
KR100883517B1 (en) Prediction-based dynamic thread pool management method and agent platform using the same
US9753786B2 (en) Client server communication system
KR20210027400A (en) Implementation of compliance settings by mobile devices to comply with configuration scenarios
KR102407334B1 (en) Gateway apparatus and operating method thereof
WO2021012506A1 (en) Method and apparatus for realizing load balancing in speech recognition system, and computer device
US20130297821A1 (en) Client based congestion management
US9760412B2 (en) Client server communication system
CN114296953A (en) Multi-cloud heterogeneous system and task processing method
CN113111666A (en) System and method for realizing multi-language translation of application program
CN116880990A (en) Task execution method, device, electronic equipment and computer readable storage medium
CN107632893B (en) Message queue processing method and device
US20220276901A1 (en) Batch processing management
CN112714179B (en) Client multitask installation method, system, equipment and medium based on browser
CN111459653B (en) Cluster scheduling method, device and system and electronic equipment
CN112187570A (en) Risk detection method and device, electronic equipment and readable storage medium
CN106484536B (en) IO scheduling method, device and equipment
CN113704274B (en) Data reading method and electronic equipment
CN113032010B (en) Command transmission control method, terminal and computer readable storage medium

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