Cloud invoicing machine, invoice selection method and storage medium thereof
Through virtualized routers and USB expansion technology, the problem of limited number of tax UKEYs is solved, sharing of multiple USB interfaces and batch invoice checking are realized, improving the efficiency of invoice checking.
Patent Information
- Application Number
- CN202210318865.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-29
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-03-29
AI Technical Summary
In the existing technology, the number of tax UKEYs is limited by the number of USB ports on the computer, resulting in invoice checking efficiency, and most existing software is based on the WINDOWS system, making it difficult to support the sharing and batch operations of multiple USB devices.
Through the combination of a virtualized router and an expanded N-port HUB control panel, a multi-port micro-management switch, and a multi-USB port to Ethernet controller, USB IP technology and virtualization technology are used to realize the expansion and sharing of multiple USB interfaces, supporting multiple Each tax UKEY can be operated at the same time, and batch invoices can be checked automatically through the monitoring program.
It achieves efficient management of multiple tax UKEYs and batch invoice selection, optimizes the invoice selection process, supports the operation of multiple USB devices in the remote WINDOWS system, and improves operational efficiency.
Smart Images

Figure CN114629657B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of tax control technology, and in particular to a cloud invoicing machine, an invoice selection method thereof, and a storage medium. Background Art
[0002] In modern society, electronic invoices are increasingly used. In the future, electronic invoices will surely replace paper invoices. If enterprises do not have invoice deduction slips and do not print electronic invoices, the previous method of going to the tax hall or purchasing self-checking software to scan paper invoices will no longer be applicable. At present, it is more common to insert the tax UKEY into a computer with a window system, and then manually log in to the tax bureau's VAT invoice comprehensive service platform to query or check invoices. This manual login to the tax bureau's VAT invoice comprehensive service platform can only check invoices for a single tax UKEY, which has the problem of low efficiency and the problem of a small number of tax UKEYs being operated due to the number of computer USB ports. Summary of the invention
[0003] In order to solve the above problems, an embodiment of the present invention provides a cloud invoicing machine, a method for selecting invoices therefor, and a storage medium.
[0004] Specifically, on the one hand, a cloud invoicing machine is provided, which has an invoice checking function, including:
[0005] A virtualized router comprises: a first processor, and connected to the first processor: one or more USBHOSTs, a memory, one or more Ethernet modules, and a serial port module; the first processor is pre-installed with an openwrt system, and a virtualized router system and a virtualized WINDOWS system are pre-configured on the openwrt system through a qemu command, wherein a first monitoring program is also set on the openwrt system, and the first monitoring program is used to implement an invoice checking function;
[0006] One or more N-port HUB control boards, including: a second processor, and connected to the second processor: a cascaded HUB module and a USB power control module; the input end of each N-port HUB control board is connected to the output end of a USBHOST, and the output end of each N-port HUB control board includes N USB interfaces that can be inserted into a tax UKEY, which is used to expand one USB interface into N USB interfaces through the cascaded HUB modules, wherein N is an integer greater than 1, and the power of the USB interface is controlled by the second processor and the USB power control module;
[0007] The first monitoring program implements the invoice selection function by executing the following steps:
[0008] S11, obtaining the basic tax information of the tax UKEY inserted into the output end of an expansion N-port HUB control board through the USBHOST;
[0009] S12, when receiving the instruction related to invoice selection sent by the background through Ethernet, parse the instruction, determine the tax UKEY specified by the instruction, and judge whether the token authentication information of the value-added invoice comprehensive service platform cached locally and corresponding to the specified tax UKEY is expired; if so, execute S13; otherwise, determine that the cached token authentication information is valid token authentication information, and execute S14;
[0010] S13, communicating with the designated tax UKEY and the backend through USBHOST and Ethernet respectively, so as to perform client authentication between the designated tax UKEY and the value-added invoice integrated service platform, and obtain valid token authentication information of the designated tax UKEY, and update the token authentication information in the cache with the obtained valid token authentication information;
[0011] S14, communicate with the value-added invoice comprehensive service platform based on the valid token authentication information, and execute the invoice checking business for the designated tax UKEY.
[0012] Furthermore, in the cloud invoicing machine, a plurality of Ethernet modules are configured into a predetermined number of LANs and WANs, and the cloud invoicing machine further comprises:
[0013] A plurality of multi-port micro-managed switches, comprising: a third processor, an interactive machine module and a power control module connected to the third processor; each multi-port micro-managed switch is respectively connected to one LAN, for expanding the LAN into a LAN for connecting multiple non-standard POE devices, controlling the communication and power status of preset corresponding devices, and obtaining the MAC address of the preset corresponding port;
[0014] A plurality of multi-USB-port to Ethernet controllers, including: a fourth processor, and connected to the fourth processor: a storage medium, a cascaded HUB module, and a USB power control module; the input end of each multi-USB-port to Ethernet controller is connected to a non-standard POE Ethernet interface and the output end includes a plurality of USB interfaces that can be inserted into the tax UKEY, which are used to expand the number of USB interfaces, realize USB-to-Ethernet communication for the tax UKEY inserted into the USB interface, control the USB interface power of the inserted tax UKEY, and support USBIP Server to remotely mount USB devices; wherein the fourth processor is an ARMCPU that supports the Linux system;
[0015] The first monitoring program also implements the invoice checking function by executing the following steps:
[0016] Before step S12, execute S21: obtain the tax basic information of the tax UKEY inserted into the output end of the multi-USB port to Ethernet controller through SOCKET;
[0017] Step S13 also includes:
[0018] S131, determine whether the designated tax UKEY is a tax UKEY inserted into the output end of an N-port HUB control board or a tax UKEY inserted into the output end of a multi-USB port to Ethernet controller; and based on the determination result, perform client authentication between the designated tax UKEY and the value-added invoice integrated service platform via USBHOST or SOCKET.
[0019] Furthermore, in the cloud invoicing machine, S131 includes:
[0020] Obtain the client authentication request information of the specified tax UKEY, and generate a client authentication request according to the client authentication request information;
[0021] Send the client authentication request to the value-added invoice integrated service platform through the Ethernet channel, and obtain the server authentication request information from the value-added invoice integrated service platform;
[0022] Get the client authentication credential information of the specified tax UKEY;
[0023] The client authentication credential information is sent to the value-added invoice comprehensive service platform through the Ethernet channel, and the valid token authentication information of the designated tax UKEY is obtained from the value-added invoice comprehensive service platform.
[0024] Furthermore, the cloud invoicing machine, wherein S11 and S21 also include: a step of turning on the power of the tax UKEY before obtaining the basic tax information of the tax UKEY and a step of turning off the power of the tax UKEY after obtaining the basic tax information of the tax UKEY.
[0025] Further, the cloud invoicing machine, wherein S21 includes:
[0026] S211, execute the cat / tmp / dhcp.leases script instruction to obtain the IP address of the entire intranet in the openwrt system and the corresponding MAC address association table;
[0027] S212, according to the IP address of the multi-USB port to Ethernet controller, obtain the tax basic information of the tax UKEY inserted into the multi-USB port to Ethernet controller.
[0028] Furthermore, the cloud invoicing machine, wherein S212 further includes:
[0029] Compare the obtained actual IP address of the multi-USB port to Ethernet controller with the initially set IP address of the multi-USB port to Ethernet controller; if they are consistent, obtain the basic tax information of the tax UKEY inserted into the multi-USB port to Ethernet controller according to the initially set IP address of the multi-USB port to Ethernet controller; if they are inconsistent, obtain the basic tax information of the tax UKEY inserted into the multi-USB port to Ethernet controller according to the actual IP address of the multi-USB port to Ethernet controller, and use the actual IP address to update the initially set IP address of the multi-USB port to Ethernet controller.
[0030] Furthermore, the cloud invoicing machine, wherein a second monitoring program is further configured in the virtualized WINDOWS system, the second monitoring program is used to access the value-added invoice integrated service platform through the virtualized window system to implement the invoice checking function;
[0031] The second monitoring program implements the invoice selection function by executing the following steps to access the value-added invoice comprehensive service platform through the virtualized window system:
[0032] Connect to the virtualized WINDOWS system through SPICE client software;
[0033] By communicating with the first monitoring program in SOCKET mode, the basic tax information of all tax UKEYs currently inserted into the cloud invoicing machine is obtained;
[0034] Search for the tax UKEY you want to operate;
[0035] Notify the first monitoring program of information related to the tax UKEY to be operated through SOCKET, so that the first monitoring program can open the USBIP SERVER and bind the tax UKEY to be operated to the USBIP SERVER;
[0036] Start USBIP CLIENT and mount the tax UKEY to be operated on the virtualized WINDOWS system.
[0037] Furthermore, in the cloud invoicing machine, one or more of the virtualized router, an N-port HUB control board, a multi-port micro-management switch, and a multi-USB port to Ethernet controller are installed with a fan module for heat dissipation.
[0038] Furthermore, the cloud invoicing machine, wherein the basic tax information includes: company name, taxpayer identification number, equipment number and equipment location information.
[0039] Furthermore, the cloud invoicing machine, wherein the invoice checking service includes one of the following: invoice checking; querying checked invoices; cancelling checked invoices.
[0040] Furthermore, in the cloud invoicing machine, the first monitoring program is configured to start automatically after the openwrt system is started; and the second monitoring program is configured to start automatically after the virtualized WINDOWS system is started.
[0041] In another aspect, a method for selecting an invoice using any of the cloud invoicing machines described above is provided, comprising:
[0042] Start the openwrt system;
[0043] The compiled first monitoring program is started.
[0044] Furthermore, in the method, after the openwrt system is started, the compiled first monitoring program is automatically started.
[0045] On the other hand, a computer-readable storage medium is provided, in which at least one program is stored, and the at least one program is executed by a processor to implement any of the cloud invoicing machines described above.
[0046] The above technical solution has the following technical effects:
[0047] The technical solution of the embodiment of the present invention provides a cloud invoicing machine implemented by utilizing relevant USB technology, router technology and virtualization technology. The cloud invoicing machine implements a virtualized router and generates a virtualized windows system through qemu in the openwrt system through virtualization technology, and increases the number of tax UKEYs supported for management through an N-port HUB control board and / or a multi-port micro-management switch and a multi-USB port to Ethernet controller. It also simulates login with the tax bureau's value-added tax invoice comprehensive service platform based on the acquired tax UKEY certificate related information to obtain the background token authentication information, thereby realizing batch invoice checking or other UKEY-related business functions.
[0048] In a further technical solution of an embodiment of the present invention, the cloud invoicing machine can realize the sharing of the tax UKEY by caching the tax UKEY and the token authentication information of the tax bureau's value-added tax invoice comprehensive service platform, so that multiple users can operate the same tax UKEY at the same time, providing convenience for people.
[0049] In a further technical solution of an embodiment of the present invention, USBIP technology and virtualization technology are combined to realize the operation of different tax UKEYs in a virtual machine desktop of a remote WINDOWS system. The number of UKEYs that can be operated in this way far exceeds the number of USB ports supported by a single computer, thereby optimizing the manual login method of the national tax invoicing software or the tax bureau's value-added tax invoice comprehensive service platform, expanding the number of manageable tax UKEYs, and using a monitoring program to automatically realize the invoice checking of batch tax UKEYs. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 This is a schematic diagram of the structure of a cloud invoicing machine with an invoice checking function according to an embodiment of the present invention;
[0051] Figure 2 This is a hardware block diagram of a virtualized router included in a cloud invoicing machine according to an embodiment of the present invention;
[0052] Figure 3 This is an exemplary hardware block diagram of an N-port expansion HUB control board used in a cloud invoicing machine according to an embodiment of the present invention;
[0053] Figure 4 An exemplary hardware block diagram of a multi-port micro-managed switch used in a cloud invoicing machine according to an embodiment of the present invention;
[0054] Figure 5 This is a hardware block diagram of a multi-USB port to Ethernet controller used in a cloud invoicing machine according to an embodiment of the present invention;
[0055] Figure 6 A schematic diagram of the process of implementing invoice selection in a cloud invoicing machine according to an embodiment of the present invention;
[0056] Figure 7 A schematic diagram of a process of realizing invoice selection as a whole using a cloud invoicing machine cabinet according to an embodiment of the present invention;
[0057] Figure 8 The present invention is a flowchart of a cloud invoicing machine according to an embodiment of the present invention using a virtualized window system and the software or platform of the tax bureau's official website to access a value-added invoice comprehensive service platform. DETAILED DESCRIPTION
[0058] To further illustrate the various embodiments, the present invention provides drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, a person of ordinary skill in the art should be able to understand other possible implementations and advantages of the present invention. The components in the figures are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0059] When facing the problems of the prior art, the inventor of the present application found that: since the tax UKEY is a USB device, in order to realize services such as invoicing and invoice checking, it is necessary to communicate with the tax UKEY through USB-related protocols. From a technical point of view, direct USB communication or indirect USB communication is generally used. Direct USB communication means that the CPU or MCU communicates with the USB device directly through the USB HOST, but it is limited by the USB protocol definition that a USB HOST can expand a maximum of 128 USB devices (including HUB) and the HUB cascade cannot exceed 5 levels. In actual use, the more HUB cascade levels, the longer the operation of the USB device, the more stability it will have, and the same CPU or MCU supports a relatively small number of USBhosts. Therefore, the advantage of direct USB communication is that the communication rate with the USB device is fast, and the communication is stable when the number of HUB cascade levels is not large. The disadvantage is that the number of manageable USB devices is small.
[0060] Indirect USB communication is to communicate by converting the USB protocol into other protocols, such as USBIP protocol. Indirect USB communication can enable different CPUs or MCUs to share USB devices in a local area network, but the communication rate is relatively low because the protocol has been converted. Therefore, the advantages of indirect USB communication are: a large number of USB devices can be managed, but the rate is relatively low. Moreover, if there are many IP devices in the local area network, routing related technologies will be needed to manage the corresponding IP devices.
[0061] Most of the existing drivers or software officially provided by the tax bureau are developed based on the WIONDOWS system. If you want to use these software, you must provide support for the WINDOWS environment. From a technical point of view, you can directly install the WINDOWS system or use virtualization technology to realize the virtualized WINDOWS system.
[0062] Based on the above findings, the inventor of the present application provides a solution combining USB technology, router technology and virtualization technology to solve the problems of the prior art. The present invention is further described in conjunction with the accompanying drawings and specific implementation methods.
[0063] Embodiment 1:
[0064] A cloud invoicing machine with an invoice checking function according to an embodiment of the present invention comprises:
[0065] A virtualized router comprises: a first processor, and connected to the first processor: one or more USBHOSTs, a memory, one or more Ethernet modules, and a serial port module; the first processor is pre-installed with an openwrt system, and a virtualized router system and a virtualized WINDOWS system are pre-configured on the openwrt system through a qemu command, wherein a first monitoring program is also set on the openwrt system, and the first monitoring program is used to implement an invoice checking function;
[0066] One or more N-port HUB control boards, including: a second processor, and connected to the second processor: a cascaded HUB module and a USB power control module; the input end of each N-port HUB control board is connected to the output end of a USBHOST, and the output end of each N-port HUB control board includes N USB interfaces that can be inserted into a tax UKEY, which is used to expand one USB interface into N USB interfaces through the cascaded HUB modules, wherein N is an integer greater than 1, and the power of the USB interface is controlled by the second processor and the USB power control module;
[0067] The first monitoring program implements the invoice selection function by executing the following steps:
[0068] S11, obtaining the tax basic information of the tax UKEY inserted into the output end of an expansion N-port HUB control board through the USBHOST; illustratively, the tax basic information of the tax UKEY includes one or more of the following: company name, taxpayer identification number, device number, and device location information;
[0069] S12, when receiving the instruction related to invoice selection sent by the background through Ethernet, parse the instruction, determine the tax UKEY specified by the instruction, and judge whether the token authentication information of the value-added invoice comprehensive service platform cached locally and corresponding to the specified tax UKEY is expired; if so, execute S13; otherwise, determine that the cached token authentication information is valid token authentication information, and execute S14;
[0070] S13, communicating with the designated tax UKEY and the backend through USBHOST and Ethernet respectively, so as to perform client authentication between the designated tax UKEY and the value-added invoice integrated service platform, and obtain valid token authentication information of the designated tax UKEY, and update the token authentication information in the cache with the obtained valid token authentication information;
[0071] S14, communicating with the value-added invoice integrated service platform according to the valid token authentication information, and executing the invoice checking service for the designated tax UKEY. Exemplarily, the invoice checking service includes one or more of the following: invoice checking; querying the checked invoice; and cancelling the checked invoice.
[0072] The cloud invoicing machine of this embodiment of the present invention realizes a virtualized router through the openwrt system, and uses an N-port HUB control board to expand the number of manageable tax UKEYs, and can automatically check invoices of batch tax UKEYs using a monitoring program.
[0073] In order to further expand the number of manageable tax UKEYs, in a further technical solution of an embodiment of the present invention, the cloud invoicing machine also includes a cloud invoicing machine with a multi-port micro-management switch and a multi-USB port to Ethernet controller.
[0074] Furthermore, the plurality of Ethernet modules are configured into a predetermined number of LANs and WANs, and the cloud invoicing machine further comprises:
[0075] A plurality of multi-port micro-managed switches, comprising: a third processor, an interactive machine module and a power control module connected to the third processor; each multi-port micro-managed switch is respectively connected to one LAN, for expanding the LAN into a LAN for connecting multiple non-standard POE devices, controlling the communication and power status of preset corresponding devices, and obtaining the MAC address of the preset corresponding port;
[0076] A plurality of multi-USB-port to Ethernet controllers, including: a fourth processor, and connected to the fourth processor: a storage medium, a cascaded HUB module, and a USB power control module; the input end of each multi-USB-port to Ethernet controller is connected to a non-standard POE Ethernet interface and the output end includes a plurality of USB interfaces that can be inserted into the tax UKEY, which are used to expand the number of USB interfaces, realize USB-to-Ethernet communication for the tax UKEY inserted into the USB interface, control the USB interface power of the inserted tax UKEY, and support USBIP Server to remotely mount USB devices; wherein the fourth processor is an ARMCPU that supports the Linux system;
[0077] The first monitoring program also implements the invoice checking function by executing the following steps:
[0078] Before step S12, execute S21: obtain the tax basic information of the tax UKEY inserted into the output end of the multi-USB port to Ethernet controller through SOCKET;
[0079] Step S13 also includes:
[0080] S131, determine whether the designated tax UKEY is a tax UKEY inserted into the output end of an N-port HUB control board or a tax UKEY inserted into the output end of a multi-USB port to Ethernet controller; and based on the determination result, perform client authentication between the designated tax UKEY and the value-added invoice integrated service platform via USBHOST or SOCKET.
[0081] Further, step S21 includes: S211, executing the cat / tmp / dhcp.leases script instruction to obtain the IP address of the entire intranet in the openwrt system and the corresponding MAC address association table; S212, according to the IP address of the multi-USB port to Ethernet controller, obtaining the basic tax information of the tax UKEY inserted into the multi-USB port to Ethernet controller.
[0082] Embodiment 2
[0083] Figure 1 FIG. 1 is a schematic diagram of the structure of a cloud invoicing machine with an invoice selection function according to an embodiment of the present invention. In this embodiment, the cloud invoicing machine is implemented as a cabinet. Figure 1 The cloud invoicing machine of this embodiment includes a virtualized router, multiple one-expansion N-port HUB control boards, multiple multi-port micro-management switches, and multiple multi-USB port to Ethernet controllers. The output ends of the multiple one-expansion N-port HUB control boards and the multiple multi-USB port to Ethernet controllers include multiple USB interfaces, and the tax UKEY can be inserted into the above multiple USB interfaces.
[0084] Figure 2 FIG. 1 is a hardware block diagram of a virtualized router included in the cloud invoicing machine of this embodiment. The virtualized router is referred to as module 1 in the following text. Figure 2 , the module 1 includes CPU, USBHOST, memory, hard disk, Ethernet module, serial port module and fan module, etc. The module pre-uses the open source openwrt system transplantation to realize the use of an X86 processor to support both the router system and the WINDOWS system. The virtualized router system is implemented by the ARM system. In this example, there are two USBHOST channels, and 6 Ethernet modules can realize 6 Ethernets. In this example, 6 Ethernets are configured as 1 WAN and 5 LANs.
[0085] In this module 1, a first monitoring program, namely monitoring program 1, is provided in the openwrt system. The monitoring program 1 mainly implements one or more of the following functions: realizing tax UKEY invoice checking, invoicing and other services through the USBHOST channel, updating the location of the cabinet tax UKEY, collecting the information of the cabinet tax UKEY (company name, taxpayer identification number, equipment number, location information), virtualization system monitoring, realizing the LAN mounting of the tax UKEY through USBIP (such as realizing the USBIP SERVER function), fan control and token authentication information caching between the VAT invoice comprehensive service platform of the tax bureau, etc.
[0086] In the module 1, a second monitoring program, namely monitoring program 2, is provided in the virtualized WINDOWS system. The second monitoring program is used to access the value-added invoice integrated service platform through the virtualized WINDOWS system to implement the invoice selection function. Exemplarily, the functions of the monitoring program 2 include: querying the relevant information of the cabinet tax UKEY, and implementing the LAN mounting of the tax UKEY through USBIP (such as implementing the USBIP CLIENT function).
[0087] Specifically, the exemplary process of system migration is as follows:
[0088] --》Configure qemu-arm related information in the Utilities / Virtualization path of the openwrt system kernel for preparation of virtualized ARM system;
[0089] --》Configure qemu-x86_64 related information in the openwrt system kernel Utilities / Virtualization path for virtualization WINDOWS system preparation;
[0090] --》Configure qemu vnc and qemuspice related information in the openwrt system kernel Utilities / Virtualization path to prepare for remote connection to the virtualized WINDOWS system through the spice protocol;
[0091] --》Configure network card related information in the openwrt system kernel to prepare for configuring 6 Ethernet channels into 1 WAN and 5 LAN channels;
[0092] --》Configure USB related information in the openwrt system kernel to prepare for supporting 2-way USBHOST function;
[0093] --》Configure samba4 related information in the openwrt system kernel to prepare for supporting the system LAN file sharing function;
[0094] --》Configure the openwrt system kernel to support USBip and transplant USBip related codes to prepare for supporting the system LAN USB device sharing function;
[0095] --》Compile the openwrt kernel to generate a system image in preparation for writing to the hard disk;
[0096] --》Start the computer and enter the BIOS to set the CPU to enable virtual technology support, use the image writing tool to partition the hard disk format, and write the openwrt image to the hard disk;
[0097] --》After restarting the system, log in to the openwrt system luci interface to enable samba4 related functions for LAN large file sharing preparation. At this point, the openwrt system transplantation is initially completed;
[0098] --》Copy the prepared WINDOWS system ISO file to the shared folder path set by samba4 in the openwrt system.
[0099] --》In the openwrt system, use the qemu x86_64 related instructions to start the installation of the WINDOWS system ISO file;
[0100] --》Use SPICE client (virt-viewer) software to connect to the desktop of the Windows virtual machine that has been started and installed, and continue to install support after entering the virtualized Windows system until the installation is complete;
[0101] --》Use SPICE client (virt-viewer) software to connect to the installed virtualized WINDOWS system, set up WINDOWS system file sharing, install the official website's national tax invoicing software, browser and other commonly used software drivers, and make preparations for the subsequent operation of the tax UKEY manual login to the national tax invoicing software or the tax bureau's VAT invoice comprehensive service platform in the remote WINDOWS system virtual machine desktop;
[0102] --》Use SPICE client (virt-viewer) software to connect to the installed virtualized WINDOWS system, set the file sharing mode of the WINDOWS system, copy and install the transplanted USBip related WINDOWS driver on the virtualized WINDOWS system, and prepare to support the system LAN USB device sharing function. So far, the transplantation of virtualized window system in openwrt system is preliminarily completed;
[0103] --》Transplant the cross-compiled monitoring program 1 to the openwrt system, and set the program to start automatically after the openwrt system starts;
[0104] --》Transfer the cross-compiled monitoring program 2 to the virtualized WINDOWS system, and set the program to start automatically after the virtualized WINDOWS system starts;
[0105] --》So far, the open source openwrt system has been used to transplant and support both router system and WINDOWS system functions.
[0106] Currently, most routers and WINDOWS systems on the market require separate hardware to implement. Through the above-mentioned transplantation method, it is possible to use one X86 processor to support both router system and WINDOWS system functions, thereby reducing hardware costs and occupied space.
[0107] Through the above process, the module 1 realizes the function of a router and can manage the virtualized WINDOWS system. It can also monitor the tax UKEY through Usbhost and Ethernet channels, realize invoicing, obtain tax UKEY token certificate related information, and perform invoice checking and other services. It can also be set to start the fan module for heat dissipation when the virtualized WINDOWS system is successfully started.
[0108] Figure 3 2 is an exemplary hardware block diagram of an N-port HUB control board used in the cloud invoicing machine of this embodiment of the present invention. For the sake of simplicity, the N-port HUB control board is referred to as module 2 in the following text. Figure 3 In a specific implementation, each module 2 includes: MCU, HUB module, USB power control module, fan module and USB interface. In this example, the type of USB interface is USBA interface, but other types of USB interfaces can be used in other embodiments. Exemplarily, the USB power control module in module 2 is a MOS tube power control method. This module 2 is used to expand the USB interface to support the communication of multiple tax UKEY USBs and to control the power supply of the USB port of the corresponding tax UKEY by simulating a HID device. Exemplarily, the HUB module adopts a common HUB chip with one expansion and four USB ports. In this example, a three-level cascade HUB module is selected. As Figure 3, through the combination of cascaded HUB modules and USB power control modules, 48-way USB device communications can be expanded to control. Among them, MCU can adopt the common C51 type single-chip microcomputer. Of course, MCU can also use other single-chip microcomputers or processors. Each module 2 is connected to module 1, and can control the power status of 48-way tax UKEY through USBHID device expansion, and can be set to start the fan module for heat dissipation when the inserted tax UKEY reaches a predetermined threshold. Exemplarily, the module 2 can turn on or off the corresponding tax UKEY by controlling the power on or off of the tax UKEY. Exemplarily, module 2 controls the power status of the corresponding tax UKEY through the MCU and USB power module.
[0109] Figure 4 FIG. 1 is an exemplary hardware block diagram of a multi-port micro-managed switch used in the cloud invoicing machine of this embodiment of the present invention. Figure 4 , each multi-port micro-managed switch includes: a switch module, an MCU, a power control module and a plurality of non-standard POE Ethernet interfaces. Exemplarily, the power control module is a MOS tube power control method. The multi-port micro-managed switch is used to expand multiple non-standard POE devices, control the communication and power status of the corresponding devices, and obtain the MAC address of the corresponding port. For the sake of simplicity, the multi-port micro-managed switch is referred to as module 3. Exemplarily, the switch module adopts a 24-port switching chip module, of which 2 are used to connect to the upstream LAN, 1 of which is used as a backup, and there are 22 channels, which can be expanded into 22 downstream LANs through the combination of Ethernet and the power control module, and have a non-standard POE interface that can control 5V power supply output. The difference between this exemplary multi-port micro-managed switch and an ordinary switch is that the downstream 22 ports are non-standard POE control outputs with a maximum 5V / 1A DC power supply, and the power control method adopts a conventional MOS tube control cost, which will also be much lower than the dedicated POE power control chip.
[0110] Figure 5 This is a hardware block diagram of the multi-USB port to Ethernet controller used in the cloud invoicing machine of this embodiment of the present invention. Figure 5, exemplarily, each multi-USB port to Ethernet controller includes: CPU, DDR, NANDFLASH, HUB, USB power control module and Ethernet module, which are used to expand the communication of multiple tax UKEY USB to Ethernet and control the power of the USB port of the corresponding tax UKEY, and support USBIP SERVER to remotely mount USB devices. Exemplarily, the above-mentioned USB power control module is a MOS tube power control method. For the sake of simplicity, the multi-USB port to Ethernet controller is referred to as module 4 in the following text. Exemplarily, the CPU used in module 4 is ARMCPU, which supports the Linux system. The ARMCPU controls the power of the USB port of the 16-way tax UKEY through the two-level HUB module cascade and the USB power control module, and collects the basic information of the 16-way tax UKEY inserted into the corresponding USB port / interface, such as company name, taxpayer identification number, device number, location information, etc., to realize invoicing and obtaining tax UKEY certificate related information and other services.
[0111] The cloud invoicing machine of the embodiment of the present invention can be expanded to support multiple UKEYs and implement batch invoice checking services. Figure 1 The cloud invoicing machine of the embodiment shown in the example includes: module 1, 2 modules 2, 5 modules 3 and 5 modules 4. In other embodiments of the present invention, other numbers of modules 1, modules 2, modules 3 and modules 4 may be included; or, only a predetermined number of modules 1 and modules 2 may be included; or, only a predetermined number of modules 1, modules 3 and modules 4 may be included. For example, several combinations are given below for illustration:
[0112] Combination 1: The 2-way USB interface of module 1 can be USB A interface here, which is combined with the 2 USB interfaces of module 2 respectively. This can support the business function of managing 96 tax Ukeys for invoice checking. This combination has the lowest cost and is more suitable for customers who manage a small number of tax Ukeys and are more cost-sensitive.
[0113] Combination 2: 5 LAN channels of module 1 are combined with 5 modules 3 (Ethernet interface 1 or Ethernet interface 2), and 22 non-standard POE interfaces of module 3 are combined with 22 non-standard POE interfaces of module 4. It can support the management of up to 22*5*16=1760 tax Ukeys for invoice checking business functions. This combination has a relatively high cost, but it also supports the management of more tax Ukeys.
[0114] Combination three is a combination of combination one and combination two. This combination has the highest cost, but the corresponding number of Ukeys that support tax management is also the maximum 1760+96=1856.
[0115] The cloud invoicing machine of the embodiment of the present invention can achieve different cost controls through modular combinations, namely, a combination of a virtualized router and an N-port HUB control board, or a combination of a virtualized router and a multi-port micro-managed switch and a multi-USB-port to Ethernet controller, so as to meet the actual needs of different customers and facilitate subsequent equipment maintenance.
[0116] Figure 6 The figure is a flow chart of the cloud invoicing machine of this embodiment of the present invention to realize invoice checking. In this process, the virtual router, i.e., module 1, realizes invoice checking through the first monitoring program set thereon. Specifically, module 1 obtains the basic tax information of the tax UKEY inserted into the USB interface of module 2 through the USBHOST channel, obtains the basic tax information of the tax UKEY inserted into the USB interface of module 4 through the SOCKET method, and then uses the basic tax information of all the tax UKEYs obtained to update the basic tax information of the tax UKEY of the cabinet of the entire cloud invoicing machine. When module 1 receives an instruction related to invoice selection sent by the background through Ethernet, it parses the instruction, determines the tax UKEY specified by the instruction, and determines whether the locally cached token authentication information of the value-added invoice integrated service platform with the specified tax UKEY is expired; if so, it communicates with the specified tax UKEY and the background through USBHOST and Ethernet respectively, so as to perform client authentication between the specified tax UKEY and the value-added invoice integrated service platform, and obtain the valid token authentication information of the specified tax UKEY, and use the obtained valid token authentication information to update the cached token authentication information; otherwise, it determines that the cached token authentication information is valid token authentication information. Then, module 1 communicates with the value-added invoice integrated service platform according to the valid token authentication information, and performs the invoice selection business for the specified tax UKEY.
[0117] like Figure 6 The cloud invoicing machine of this embodiment implements invoice selection including the following steps:
[0118] Step 601, module 1 communicates with module 2 through the Usbhost channel USBhid (human interface device) device class, and turns on the power of the tax UKEY inserted into the USB interface of module 2 in turn;
[0119] Step 602, module 1 communicates with the designated tax UKEY in sequence through the Usbhost channel to obtain the designated tax UKEY basic information, such as company name, taxpayer identification number, equipment number, and location information;
[0120] Step 603, module 1 communicates with module 2 through the Usbhost channel USBhid device class, turns off the power of the tax UKEY at the specified position of module 2 in turn, and then executes step 604;
[0121] After the program starts, when executing steps 601 to 603 to access UKEY on module 2, module 1 synchronously executes steps 901 to 906 to access UKEY on module 4, and after executing step 906, it proceeds to execute step 604;
[0122] Step 901, module 1 obtains the IP address of the entire intranet route of the current openwrt system and its corresponding MAC address association table by executing the cat / tmp / dhcp.leases script instruction; illustratively, a shell script is run to parse the device number, MAC address, IP address and device name in the dhcp.lease list;
[0123] Step 902, module 1 communicates with module 3 of the corresponding IP address through an Ethernet channel, such as using TCP protocol communication, to obtain a MAC address table of the port corresponding to module 3;
[0124] Step 903, module 1 obtains the IP address and MAC address table of module 4 on the port corresponding to module 3 through the above process;
[0125] Step 904, module 1 compares the initial preset IP address table of module 4 port corresponding to module 3 port with the current actual IP address of module 4 port corresponding to module 3 port obtained through the above steps to determine whether they are consistent? If yes, execute step 906; otherwise, execute step 905;
[0126] Step 905, module 1 communicates with the current actual IP address of the module 4 port currently plugged into the actual module 3 port through the SOCKET mode, sets the IP address of the module 4 port to the above-mentioned initial preset IP address, and restarts the network of the module 4 currently plugged into the actual module 3 port, and then returns to step 904;
[0127] Step 906, module 1 communicates with the IP address table of module 4 set above in sequence through SOCKET mode, obtains the tax basic information of the tax UKEY on the USB port of the corresponding module 4, and then proceeds to step 604;
[0128] Step 604, module 1 updates the tax basic information of the tax UKEY of the entire cabinet of the cloud invoicing machine, wherein the tax UKEY of the entire cabinet includes the UKEY inserted in each module 2 and each module 4;
[0129] Step 605, module 1 waits to determine whether it has received an instruction related to invoice selection issued by the backend through Ethernet communication; if so, it proceeds to step 606; otherwise, it continues to wait;
[0130] Step 606, module 1 queries whether the token authentication of the local cache corresponding to the tax UKEY for the value-added invoice integrated service platform of the tax bureau has expired? Exemplarily, whether it has expired can be determined by whether the communication with the value-added tax invoice integrated service platform of the tax bureau is successful. If it has expired, go to step 607; otherwise, go to step 623;
[0131] Step 607, module 1 obtains the page version by communicating with the VAT invoice integrated service platform of the tax bureau;
[0132] Step 608, module 1 parses the instruction received in step 606, and determines whether to control the tax UKEY of module 2 to obtain the client authentication request information (clidentHello) related to the certificate? If yes, execute step 609; otherwise, execute step 907, module 1 parses the instruction received in step 606, and determines whether to control the tax UKEY connected to module 4 to obtain the client authentication request information related to the certificate; if yes, execute step 908, which will be described later; otherwise, return to step 607 or 608 as needed;
[0133] Step 609, module 1 communicates with module 2 through the Usbhost channel, for example, by using a USBhid class device, and turns on the tax UKEY power supply at a specified position on the USB interface of module 2;
[0134] Step 610, module 1 performs USB communication with the designated tax UKEY through the Usbhost channel;
[0135] Step 611, module 1 replies the corresponding information to the background through the Ethernet channel;
[0136] Step 612, module 1 communicates with module 2 through the Usbhost channel, for example, by using a USBhid class device, and turns off the power of the tax UKEY at a specified position on the USB interface of module 2;
[0137] Step 613, module 1 obtains the client authentication request information (clientHello) related to the token certificate of the tax UKEY specified above;
[0138] Step 614, module 1 obtains the certificate information through the tax UKEY, generates a client authentication request, communicates with the VAT invoice integrated service platform, and obtains the server authentication request information (serverhello);
[0139] Step 615, module 1 parses the received server authentication request information and determines whether to control the tax UKEY inserted into the USB interface of module 2 to obtain the client authentication credential information related to the certificate; if so, execute step 616; otherwise, execute step 912, which will be described later;
[0140] Step 616, module 1 communicates with module 2 through the Usbhost channel, such as using a USBhid device, to turn on the power of the tax UKEY at the designated location;
[0141] Step 617, module 1 performs USB communication with the designated tax UKEY through the Usbhost channel;
[0142] Step 618, module 1 replies the corresponding information to the background through the Ethernet channel;
[0143] Step 619, module 1 communicates with module 2 through the Usbhost channel, such as using the USBhid device, and turns off the power of the tax UKEY at the designated location of module 2;
[0144] Step 620, module 1 obtains client authentication credential information (clientAuth) related to the certificate corresponding to the tax UKEY;
[0145] Step 621, module 1 communicates with the VAT invoice integrated service platform through the acquired client authentication credential information (clientAuth) to acquire the server authentication credential information (ServeAuth);
[0146] Step 622, module 1 communicates with the VAT invoice integrated service platform through the server-side authentication credential information, obtains the token authentication information corresponding to the UKEY, the obtained token authentication information corresponding to the UKEY is the valid token authentication information corresponding to the UKEY, and uses the obtained valid token authentication information to update the expired token authentication information cached locally;
[0147] Step 623, module 1 obtains the token authentication information corresponding to the tax UKEY, and the token authentication information corresponding to the tax UKEY is valid token authentication information;
[0148] In step 624, module 1 communicates with the invoice platform according to the token authentication information of the corresponding tax UKEY obtained in step 623, and performs invoice checking-related services on the corresponding UKEY, such as invoice checking, querying checked invoices, and / or revoking checked invoices.
[0149] Another branch of the above step 608: Step 907, module 1 determines whether to control the tax UKEY inserted into the USB interface of module 4 to obtain the client authentication request information (clientHello) related to the certificate? If yes, execute step 908; otherwise, return to step 608 and continue to judge;
[0150] Step 908, module 1 communicates with module 4 of the specified IP address through SOCKET, and forwards the background control instruction to the specified module 4;
[0151] Step 909, the designated module 4 turns on the power of the tax UKEY at the designated position in its USB interface;
[0152] Step 910, the designated module 4 performs USB communication with the designated tax UKEY, such as performing USB communication with the designated tax UKEY through a Usbhost channel;
[0153] In step 911, the designated module 4 forwards the corresponding information obtained to module 1 via SOCKET, and module 1 then sends the information to the background, and then proceeds to execute steps 613 to 615.
[0154] Another branch of step 615: step 912, module 1 parses the received server authentication request information and determines whether to control the tax UKEY inserted into the USB interface of module 4 to obtain the client authentication credential information (clientAuth) related to the certificate? If yes, execute step 913; otherwise, return to step 615;
[0155] Step 913, module 1 communicates with the designated IP address in designated module 4 through SOCKET, and forwards the background control instruction to the designated module 4;
[0156] Step 914, the designated module 4 turns on the tax UKEY power supply at the designated position of its own USB interface;
[0157] Step 915, the designated module 4 performs USB communication with the designated tax UKEY, such as performing USB communication with the designated tax UKEY through a USBHOST channel;
[0158] Step 916, the designated module 4 forwards the corresponding information to module 1 via SOCKET communication, and module 1 then sends the information to the background, and then steps 620 to 624 are executed.
[0159] Using the above process, module 1 can realize invoice selection related business for multiple tax UKEYs inserted into the USB interfaces of multiple modules 2 and multiple modules 4 through the monitoring program 1 set thereon.
[0160] Figure 7 This is a schematic diagram of the process of implementing invoice selection using a cloud invoicing machine cabinet as a whole according to an embodiment of the present invention. Figure 7 The cloud invoicing machine cabinet implements invoice checking including the following steps:
[0161] Step 701, the cabinet updates the basic tax information of the cabinet tax UKEY in real time;
[0162] Step 702, determining whether there is an instruction sent to the cabinet by the backend via Ethernet communication;
[0163] If not, return to step 701; if yes, execute step 703 to further determine whether the instruction received by the cabinet is related to the invoice check. If yes, execute step 704; otherwise, return to step 701;
[0164] Step 704: The cabinet checks whether the corresponding tax UKEY cached locally and the token authentication of the VAT invoice integrated platform of the tax bureau have expired. If yes, execute step 705; otherwise, proceed to step 711;
[0165] Step 705, the cabinet obtains the page version by communicating with the VAT invoice integrated service platform of the tax bureau;
[0166] Step 706, the cabinet obtains the client authentication request information (clientHello) related to the authentication certificate by communicating with the corresponding tax UKEY;
[0167] Step 707, the cabinet obtains certificate information (clientHello) through the tax department to generate a client authentication request to communicate with the VAT invoice integrated platform and obtain server authentication request information (serverHello);
[0168] Step 708, the cabinet communicates with the corresponding tax UKEY through the obtained server authentication request information to obtain the client authentication credential information (clientAuth) related to the authentication certificate;
[0169] Step 709, the cabinet communicates with the VAT invoice integrated service platform through the acquired client authentication credential information (clientAuth) to acquire the server authentication credential information (serverAuth);
[0170] Step 710: The cabinet communicates with the integrated VAT invoice service platform through the obtained server authentication credential information to obtain token authentication information, and updates the local cache with the obtained token authentication information;
[0171] Step 711, obtaining the corresponding tax UKEY token authentication information;
[0172] In step 712, the cabinet communicates with the VAT invoice integrated service platform based on the token authentication information of the corresponding tax UKEY obtained, and performs invoice selection-related services, such as invoice selection, querying selected invoices and / or revoking selected invoices.
[0173] Figure 7 The figure shows the process of implementing the invoice selection business from the perspective of the cloud invoicing machine as a whole cabinet in the embodiment of the present invention. The specific working of its internal components can be found in Figure 6 And the above Figure 6 Description.
[0174] The cloud invoicing machine of one embodiment of the present invention can access the value-added invoice comprehensive service platform to realize the invoice selection function through the second monitoring program configured in the virtualized WINDOWS system. Generally speaking, the second monitoring program can access the value-added invoice comprehensive service platform to realize the invoice selection function through the virtualized window system by executing the following steps:
[0175] Connecting the virtualized WINDOWS system via SPICE client software;
[0176] By communicating with the first monitoring program in SOCKET mode, the basic tax information of all tax UKEYs currently inserted into the cloud invoicing machine is obtained;
[0177] Search for the tax UKEY you want to operate;
[0178] Notify the first monitoring program of information related to the tax UKEY to be operated through SOCKET, so that the first monitoring program opens the USBIP SERVER and binds the tax UKEY to be operated to the USBIP SERVER;
[0179] Start USBIP CLIENT and mount the tax UKEY to be operated on the virtualized WINDOWS system.
[0180] Figure 8 This is a flow chart of a cloud invoicing machine in one embodiment of the present invention using a virtualized window system to access the value-added invoice integrated service platform using the software or platform of the tax bureau's official website to select invoices. In this embodiment, related functions can be triggered by manual operation to achieve related access. Figure 8 The software or platform process of implementing manual operation of different tax UKEYs using the tax bureau's official website includes the following steps:
[0181] Use SPICE client (virt-viewer) software to connect to the virtualized WINDOWS system installed in module 1;
[0182] Click the update button, and the monitoring program 2 in module 1 receives the update instruction input by the user, and updates the basic tax information of the tax UKEY of the current cabinet, including the company name, taxpayer identification number, equipment number, and location information;
[0183] Monitoring program 2 searches for the tax UKEY specified for operation;
[0184] Monitoring program 2 forwards the relevant information of the tax UKEY to be operated to monitoring program 1 through SOCKET communication with monitoring program 1;
[0185] Monitoring program 1 parses the instruction and determines whether the tax UKEY at module 2 or the tax UKEY at module 4 is to be controlled;
[0186] If the tax UKEY at module 2 is to be operated, the monitoring program 1 communicates with module 2 through the USBHID class device on the USBHOST channel, turns on the power of the tax UKEY at the specified position of module 2; communicates with the specified tax UKEY through the USBHOST channel, turns on the USBIP SERVER and binds the tax UKEY to the USBIP SERVER; and communicates with the monitoring program 2 through SOCKET, and replies to the tax UKEY that the USBIP SERVER is ready; if the tax UKEY at module 4 is to be operated, the monitoring program 1 communicates with the module 4 of the specified IP through SOCKET communication, and forwards the background control instruction to the module 4; the specified module 4 turns on the power of the tax UKEY at the specified position; and communicates with the specified tax UKEY through USB, turns on the USBIP SERVER and binds the tax UKEY to the USBIP SERVER; the specified module 4 forwards the USBIP related information of the corresponding tax UKEY to the monitoring program 1 in module 1 through SOCKET communication, and the monitoring program 1 replies the information to the monitoring program 2;
[0187] Next, monitoring program 2 starts USBIP CLIENT and mounts the specified tax UKEY onto the virtualized WINDOWS system;
[0188] Then, the user can use the official software or platform of the State Taxation Administration to operate the tax UKEY on the virtualized WINDOWS system.
[0189] Embodiment three:
[0190] The present invention also provides a method for checking invoices using the cloud invoicing machine as described above, comprising: starting an openwrt system; and starting a compiled first monitoring program. The Openwrt system is pre-installed / ported to a virtual router implemented by a processor, etc. A virtualized router system and a virtualized WINDOWS system are pre-configured on the Openwrt system. In a further embodiment, it also includes starting a compiled second monitoring program. In a further embodiment, it also includes automatically starting the first monitoring program after starting the openwrt system; and automatically starting the second monitoring program after starting the virtualized WINDOWS system.
[0191] In the cloud invoicing machine of the embodiment of the present invention, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer unit, and various interfaces and lines are used to connect the various parts of the entire computer unit.
[0192] The storage medium or memory can be used to store the computer program and / or module, and the processor realizes various functions of the computer unit by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0193] Embodiment 4:
[0194] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, it is combined with the hardware of the above-mentioned cloud invoicing machine to realize the cloud invoicing machine with invoice checking function of the embodiment of the present invention described above. Specifically, when the computer program is processed and executed, it is used to execute the steps performed by the cloud invoicing machine described above when performing the invoice checking business. The steps performed by the cloud invoicing machine when performing the invoice checking business include: porting the openwrt system and configuring it to realize the steps of virtualizing the routing system and the virtualizing the WINDOWS system; the steps performed by the first monitoring program and / or the second monitoring program. Preferably, the computer program includes: a ported and configured operwrt system; a first monitoring program and / or a second monitoring program.
[0195] If the module / unit integrated in the computer unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes involved in the method in the above embodiments, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, it can be combined with the hardware of the cloud invoicing machine to implement the cloud invoicing machine with invoice checking function in each of the above embodiments. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory) and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.
[0196] Although the present invention has been specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes may be made to the present invention in form and details without departing from the spirit and scope of the present invention as defined by the appended claims, all of which are within the scope of protection of the present invention.
Claims
1. A cloud invoicing machine, which has an invoice selection function, characterized in that: include: A virtualized router comprises: a first processor, and connected to the first processor: one or more USBHOSTs, a memory, one or more Ethernet modules, and a serial port module; the first processor is pre-installed with an openwrt system, and a virtualized router system and a virtualized WINDOWS system are pre-configured on the openwrt system through a qemu command, wherein a first monitoring program is also set on the openwrt system, and the first monitoring program is used to implement an invoice checking function; One or more N-port HUB control boards, including: a second processor, and connected to the second processor: a cascaded HUB module and a USB power control module; the input end of each of the N-port HUB control boards is connected to the output end of a USBHOST, and the output end of each of the N-port HUB control boards includes N USB interfaces that can be inserted into a tax UKEY, which is used to expand one USB interface into N USB interfaces through the cascaded HUB modules, wherein N is an integer greater than 1, and the power of the USB interface is controlled by the second processor and the USB power control module; The first monitoring program implements the invoice selection function by executing the following steps: S11, obtaining the tax basic information of the tax UKEY inserted into the output end of the N-port HUB control board through the USBHOST; S12, when receiving an instruction related to invoice selection sent by the backend via Ethernet, parse the instruction, determine the tax UKEY specified by the instruction, and determine whether the token authentication information of the locally cached tax UKEY for the value-added invoice integrated service platform is expired; if so, execute S13; otherwise, determine that the cached token authentication information is valid token authentication information, and execute S14; S13, communicating with the designated tax UKEY and the backend through the USBHOST and Ethernet respectively, so as to perform client authentication between the designated tax UKEY and the value-added invoice integrated service platform, and obtain valid token authentication information of the designated tax UKEY, and update the cached token authentication information with the obtained valid token authentication information; S14, communicating with the value-added invoice comprehensive service platform according to the valid token authentication information, and executing the invoice checking service for the designated tax UKEY.
2. The cloud invoicing machine according to claim 1, characterized in that: The plurality of Ethernet modules are configured into a predetermined number of LANs and WANs, and the cloud invoicing machine further includes: A plurality of multi-port micro-managed switches, comprising: a third processor, an interactive machine module and a power control module connected to the third processor; each of the multi-port micro-managed switches is respectively connected to one of the LANs, for expanding the LAN into a LAN for connecting multiple non-standard POE devices, controlling the communication and power status of the corresponding device, and obtaining the MAC address of the corresponding port; A plurality of multi-USB port to Ethernet controllers, comprising: a fourth processor, connected to the fourth processor: a storage medium, a cascaded HUB module, and a USB power control module; the input end of each of the multi-USB port to Ethernet controllers is connected to a non-standard POE Ethernet interface and the output end includes a plurality of USB interfaces that can be inserted into the tax UKEY, which is used to expand the number of USB interfaces, realize USB to Ethernet communication for the tax UKEY inserted into the USB interface, control the USB interface power supply of the inserted tax UKEY and support USBIP Server to remotely mount USB devices; wherein the fourth processor is an ARMCPU that supports the Linux system; Wherein, the first monitoring program also implements the invoice checking function by executing the following steps; Before the step S12, execute S21: obtain the tax basic information of the tax UKEY inserted into the output end of the multi-USB port to Ethernet controller through SOCKET; The step S13 further includes: S131, determine whether the designated tax UKEY is the tax UKEY inserted at the output end of the N-port HUB control board or the tax UKEY inserted at the output end of the multi-USB port to Ethernet controller; and based on the judgment result, perform client authentication between the designated tax UKEY and the value-added invoice comprehensive service platform through USBHOST or through SOCKET.
3. The cloud invoicing machine according to claim 2, characterized in that: The S131 includes: Obtaining the client authentication request information of the designated tax UKEY, and generating a client authentication request according to the client authentication request information; Sending the client authentication request to the value-added invoice integrated service platform through an Ethernet channel, and obtaining server authentication request information from the value-added invoice integrated service platform; Obtain client authentication credential information of the specified tax UKEY; The client authentication credential information is sent to the value-added invoice comprehensive service platform via the Ethernet channel, and the valid token authentication information of the designated tax UKEY is obtained from the value-added invoice comprehensive service platform.
4. The cloud invoicing machine according to claim 1, characterized in that: The basic tax information includes: company name, taxpayer identification number, equipment number and equipment location information.
5. The cloud invoicing machine according to claim 1, characterized in that: The S11 and S21 also include: a step of turning on the power of the tax UKEY before obtaining the basic tax information of the tax UKEY and a step of turning off the power of the tax UKEY after obtaining the basic tax information of the tax UKEY.
6. The cloud invoicing machine according to claim 2, characterized in that: The S21 includes: S211, execute the cat / tmp / dhcp.leases script instruction to obtain the IP address of the entire intranet in the openwrt system and the corresponding MAC address association table; S212: According to the IP address of the multi-USB port to Ethernet controller, obtain the basic tax information of the tax UKEY inserted into the multi-USB port to Ethernet controller.
7. The cloud invoicing machine according to claim 6, characterized in that: The S212 further includes: Compare the obtained actual IP address of the multi-USB port to Ethernet controller with the initially set IP address of the multi-USB port to Ethernet controller; if they are consistent, obtain the basic tax information of the tax UKEY inserted into the multi-USB port to Ethernet controller according to the initially set IP address of the multi-USB port to Ethernet controller; if they are inconsistent, obtain the basic tax information of the tax UKEY inserted into the multi-USB port to Ethernet controller according to the actual IP address of the multi-USB port to Ethernet controller, and use the actual IP address to update the initially set IP address of the multi-USB port to Ethernet controller.
8. The cloud invoicing machine according to claim 2, characterized in that: A second monitoring program is also configured in the virtualized WINDOWS system, and the second monitoring program is used to access the value-added invoice comprehensive service platform through the virtualized WINDOWS system to implement an invoice selection function; The second monitoring program implements the invoice selection function by accessing the value-added invoice comprehensive service platform through the virtualized WINDOWS system by executing the following steps: Connecting the virtualized WINDOWS system via SPICE client software; By communicating with the first monitoring program in SOCKET mode, the basic tax information of all tax UKEYs currently inserted into the cloud invoicing machine is obtained; Search for the tax UKEY you want to operate; Notify the first monitoring program of information related to the tax UKEY to be operated through SOCKET, so that the first monitoring program opens the USBIP SERVER and binds the tax UKEY to be operated to the USBIP SERVER; Start USBIP CLIENT and mount the tax UKEY to be operated on the virtualized WINDOWS system.
9. A method for selecting invoices using the cloud invoicing machine as claimed in any one of claims 1 to 8, characterized in that: include: Start the openwrt system; The compiled first monitoring program is started.
10. A computer-readable storage medium, characterized in that: The storage medium stores at least one program, and the at least one program is executed by the processor to implement the cloud invoicing machine as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Tax UKey-based invoice issuing method and system
CN111210287A
Invoice checking method and device based on middle invoice center, storage medium and electronic equipment
CN113592450A
