CN111738783B - High-availability electronic invoice issuing method and system - Google Patents

High-availability electronic invoice issuing method and system Download PDF

Info

Publication number
CN111738783B
CN111738783B CN202010829450.7A CN202010829450A CN111738783B CN 111738783 B CN111738783 B CN 111738783B CN 202010829450 A CN202010829450 A CN 202010829450A CN 111738783 B CN111738783 B CN 111738783B
Authority
CN
China
Prior art keywords
tax
electronic invoice
virtual equipment
control server
invoicing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010829450.7A
Other languages
Chinese (zh)
Other versions
CN111738783A (en
Inventor
刘祥涛
王立
周日红
危明武
胡文彬
孙淏添
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guoxin Electronic Bill Platform Information Service Co ltd
Original Assignee
Guoxin Electronic Bill Platform Information Service Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guoxin Electronic Bill Platform Information Service Co ltd filed Critical Guoxin Electronic Bill Platform Information Service Co ltd
Priority to CN202010829450.7A priority Critical patent/CN111738783B/en
Publication of CN111738783A publication Critical patent/CN111738783A/en
Application granted granted Critical
Publication of CN111738783B publication Critical patent/CN111738783B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines

Abstract

The application discloses a high-availability electronic invoice issuing method and a high-availability electronic invoice issuing system, wherein the method comprises the following steps: acquiring address information of a tax control server corresponding to a main virtual device of a current tax number; initiating an electronic invoice issuing request to the tax control server according to the address information so that the tax control server calls the main virtual equipment to complete issuing of the electronic invoice and returns a corresponding electronic invoice issuing result; receiving an electronic invoice billing result, and counting the electronic invoice billing result in a preset time period to obtain a billing failure proportion of the current tax number; and if the invoicing failure proportion is larger than the preset threshold value, switching the standby virtual equipment into the main virtual equipment, and refreshing the main and standby information of the virtual equipment corresponding to the current tax number recorded in the cache so as to call the new main virtual equipment for invoicing. According to the method and the device, when the invoicing failure proportion is larger than the preset threshold value, the standby virtual equipment is switched to the main virtual equipment, and therefore high availability of each tax invoicing service is guaranteed.

Description

High-availability electronic invoice issuing method and system
Technical Field
The present application relates to the field of financial informatization technology, and more particularly, to a method and an apparatus for issuing high-availability electronic invoices, and an electronic device and a computer-readable storage medium.
Background
The tax control server is a special tax control device for realizing enterprise invoicing electronic invoices, can realize the electronic invoice invoicing function with multiple tax numbers and high concurrency, provides high-performance, low-cost, convenient and fast use and simple maintenance tax control invoicing service for enterprise self-construction and third-party electronic invoice service platforms, and simultaneously ensures reliable transmission and safe transmission of tax business data.
The tax control billing can be realized only by installing the enterprise core board for the old tax control server, and after the new tax control server is released, the enterprise core board for the old tax control server is changed into enterprise virtual equipment, and after the enterprise releases the virtual equipment to the new tax control server, the enterprise tax control billing service can be realized. Compared with the core board of the old tax control, the new tax control virtual equipment improves the flexibility and the safety of enterprise invoicing, simultaneously enables the tax control server to support invoicing services with more tax numbers, and increases the number of virtual equipment capable of supporting more than thousands of tax numbers from the original core board which can only support 96 at most.
However, New tax control also faces the same issue of high availability of invoices for enterprises as old tax control. In a new tax control business scene, one tax control server can issue thousands of virtual devices of different enterprises, and when the virtual devices of the enterprises have problems, the invoicing behavior of the enterprises can be influenced, so that the normal operation of the enterprises is influenced, and each virtual device must be ensured to keep business continuity.
Therefore, how to solve the above problems is a great concern for those skilled in the art.
Disclosure of Invention
The application aims to provide a high-availability electronic invoice issuing method and device, electronic equipment and a computer-readable storage medium, and high-availability of each tax invoice issuing service is realized.
To achieve the above object, the present application provides a highly available electronic invoicing method, comprising:
acquiring address information of a tax control server corresponding to a main virtual device of a current tax number;
initiating an electronic invoice issuing request to the tax control server according to the address information so that the tax control server calls the main virtual equipment to complete issuing of an electronic invoice and returns a corresponding electronic invoice issuing result;
receiving the electronic invoice invoicing result, and counting the electronic invoice invoicing result in a preset time period to obtain the invoicing failure proportion of the current tax number;
and if the invoicing failure ratio is larger than a preset threshold value, switching the standby virtual equipment into the main virtual equipment, and refreshing the main and standby information of the virtual equipment corresponding to the current tax number recorded in the cache so as to call the new main virtual equipment for invoicing.
Optionally, the initiating an electronic invoice issuing request to the tax control server according to the address information includes:
and sending the electronic invoice billing request to a security agent module based on a load balancing mode so as to forward the electronic invoice billing request to a corresponding tax control server by using the security agent module according to the address information.
Optionally, the electronic invoice billing result includes any one or a combination of any several of a billing tax number, a tax control server IP and port, billing time, whether billing is successful, a billing failure type, and a billing failure reason.
Optionally, the method further includes:
storing the mapping relation among the main virtual equipment, the standby virtual equipment and the main and standby tax control servers of the current tax number by using a database;
and writing the available main virtual equipment information of the current tax number and the IP and the port of the corresponding tax control server into a cache.
Optionally, the virtual device includes a tax logic kernel and a secure carrier and an operating environment of a tax digital certificate.
Optionally, the method further includes:
sending an interface query request to the tax control server to obtain an interface query result representing whether the interfaces of the tax control server basic server are communicated;
if the interface query result is interface communication, the interface query request is initiated again after the next monitoring period is dormant;
if the interface query result indicates that the interfaces are not communicated, sending the interface query requests of the preset number again;
and if the interface query results corresponding to the preset number of the interface query requests are that the interfaces are not communicated, generating server interface early warning information and returning the server interface early warning information to the management terminal.
Optionally, if the billing failure ratio is greater than the preset threshold, after the switching the standby virtual device to the main virtual device, the method further includes:
and generating early warning information of the billing failure ratio and/or the main-standby switching early warning information and returning the early warning information to the management terminal so as to prompt a manager to carry out troubleshooting.
To achieve the above object, the present application provides a highly available electronic invoice issuing apparatus, including:
the address acquisition unit is used for acquiring the address information of the tax control server corresponding to the main virtual equipment of the current tax number;
the request initiating unit is used for initiating an electronic invoice issuing request to the tax control server according to the address information so that the tax control server calls the main virtual equipment to complete issuing of an electronic invoice and returns a corresponding electronic invoice issuing result;
the result counting unit is used for receiving the electronic invoice billing result and counting the electronic invoice billing result in a preset time period to obtain the billing failure proportion of the current tax number;
and the main/standby switching unit is used for switching the standby virtual equipment into the main virtual equipment and refreshing the main/standby information of the virtual equipment corresponding to the current tax number recorded in the cache if the invoicing failure proportion is greater than a preset threshold value, so that a new main virtual equipment is called for invoicing in the subsequent process.
To achieve the above object, the present application provides an electronic device including:
a memory for storing a computer program;
a processor for implementing the steps of any of the highly available electronic invoicing methods disclosed above when executing the computer program.
To achieve the above object, the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of any of the highly available electronic invoicing methods disclosed in the foregoing.
According to the scheme, the highly-available electronic invoice issuing method comprises the following steps: acquiring address information of a tax control server corresponding to a main virtual device of a current tax number; initiating an electronic invoice issuing request to the tax control server according to the address information so that the tax control server calls the main virtual equipment to complete issuing of an electronic invoice and returns a corresponding electronic invoice issuing result; receiving the electronic invoice invoicing result, and counting the electronic invoice invoicing result in a preset time period to obtain the invoicing failure proportion of the current tax number; and if the invoicing failure ratio is larger than a preset threshold value, switching the standby virtual equipment into the main virtual equipment, and refreshing the main and standby information of the virtual equipment corresponding to the current tax number recorded in the cache so as to call the new main virtual equipment for invoicing. According to the method, the main virtual equipment is used for making out an invoice at present, the standby virtual equipment is not responsible for making out an invoice, the electronic invoice making-out result of each tax number is monitored, and when the failure rate of making out an invoice is greater than a preset threshold value, the standby virtual equipment is switched to the main virtual equipment, namely the minimum available unit is the virtual equipment corresponding to the tax number, so that the high availability of each tax number making-out service is ensured.
The application also discloses a high-availability electronic invoice issuing device, electronic equipment and a computer readable storage medium, and the technical effects can be achieved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is an architecture diagram of a highly available electronic invoicing system disclosed in an embodiment of the present application;
fig. 2 and 3 are flowcharts illustrating a highly available electronic invoicing method disclosed in an embodiment of the present application;
FIG. 4 is a flowchart of a specific interface query process disclosed in an embodiment of the present application;
FIG. 5 is a flow chart of a particular method of electronic invoicing disclosed in embodiments of the present application;
FIG. 6 is a block diagram of a highly available electronic invoicing apparatus disclosed in an embodiment of the present application;
fig. 7 is a block diagram of an electronic device disclosed in an embodiment of the present application;
fig. 8 is a block diagram of another electronic device disclosed in the embodiments of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In a new tax control business scene, one tax control server can issue thousands of virtual devices of different enterprises, and when the virtual devices of the enterprises have problems, the invoicing behavior of the enterprises can be influenced, so that the normal operation of the enterprises is influenced, and each virtual device must be ensured to keep business continuity.
Therefore, the embodiment of the application discloses a high-availability electronic invoice issuing method, and high-availability of each tax number issuing service is realized.
To facilitate an understanding of the electronic invoicing method provided herein, the system used therewith is first described below. Referring to fig. 1, which shows an architecture diagram of a highly available electronic invoice issuing system provided in an embodiment of the present application, as shown in fig. 1, the highly available electronic invoice issuing system may include an invoice issuing module, a database module, a cache module, a load balancing module, a security agent module, a tax control server, a message queue module, an invoice result counting module, a virtual device switching module, an interface monitoring module, and an early warning module.
The database module is mainly used for storing the mapping relation of the tax control server where the main and standby virtual devices corresponding to each tax number are located. Each tax number has two mapping relation records of the virtual equipment and the tax control server stored in a database, wherein one record is the currently available main virtual equipment information, and the other record is the standby virtual equipment information. And the caching module is mainly used for caching the IP and port information of the main virtual equipment available for each current tax number and the tax control server where the main virtual equipment is located so as to be ready for the invoicing module to quickly call.
Specifically, the invoice issuing module is used for acquiring the tax control server IP and the port corresponding to the currently available virtual device from the cache module, and assembling an invoice issuing message to initiate an invoice issuing request. And the load balancing module can be used for distributing the request to the plurality of security agent modules in a balanced manner so as to realize high concurrent processing capacity of the system. And the safety proxy module is used for receiving the electronic invoice issuing request and calling the corresponding tax control server virtual equipment to finish the electronic invoice issuing. And data interaction is carried out between the safety agent module and the tax control server, so that the safety of an interface of the tax control server is protected.
It should be noted that the tax control server is mainly used for issuing virtual devices of an enterprise, and providing tax control services for issuing electronic invoices for the enterprise.
It is understood that the message queue module is used for receiving the electronic invoice result sent by the invoice issuing module. The invoicing result counting module can acquire the electronic invoice invoicing result from the message queue and count the invoicing failure proportion of each tax number. If the rate of the invoicing failure is larger than the preset threshold value, the virtual equipment corresponding to the tax number at the moment is considered to have a problem of invoicing. And calling a virtual equipment switching module to update the main and standby virtual equipment information of the tax number in the relational database and refresh the cache, calling an early warning module to send early warning information, and processing the virtual equipment corresponding to the invoicing tax number with possible problems by operation and maintenance.
And the virtual equipment switching module is used for updating the virtual equipment main and standby information of the tax number in the relational database and refreshing the cache according to the calling of the billing result counting module. The interface monitoring module is used for sending an interface query request at regular time, accessing a basic query interface of the tax control server through a security proxy, considering that the tax control server may have problems if the interface query and call are failed for a plurality of times continuously, sending early warning information, but not switching the main-standby relation, and processing the tax control server with possible problems by operation and maintenance personnel. The early warning module is used for sending electronic invoice invoicing failure proportion early warning information, virtual equipment switching early warning information, tax control server interface monitoring early warning information and the like to operation and maintenance personnel.
Referring to fig. 2 and 3, a highly available electronic invoice issuing method disclosed in an embodiment of the present application includes:
s101: acquiring address information of a tax control server corresponding to a main virtual device of a current tax number;
in the embodiment of the application, the address information of the tax control server is firstly acquired. Specifically, the IP address and port information of the main virtual device available for each current tax number and the tax control server where the main virtual device is located are stored in the cache module in advance, and when an electronic invoicing service is required, the invoice issuing module may first read the address information of the tax control server corresponding to the main virtual device of the current tax number in the cache module.
It should be noted that the virtual device includes a tax logic kernel and a secure carrier and an operating environment of a tax digital certificate. The method and the device for issuing the virtual equipment to the tax control server in advance, namely, the tax logic application and the tax digital certificate are written into the tax control server, so that the follow-up large-batch and multi-tax-number electronic invoice issuing service can be realized, and the reliable storage and safe transmission of electronic invoice service data are ensured.
In a specific embodiment, the process of initiating an electronic invoice issuing request to the tax control server according to the address information may specifically include: and sending the electronic invoice issuing request to the security agent module based on a load balancing mode so as to forward the electronic invoice issuing request to the corresponding tax control server by using the security agent module according to the address information. That is, data interaction can be carried out with the tax control server through the safety agent module, and the safety of the interface of the tax control server is protected.
Specifically, in the embodiment of the application, the database module may be used to store the mapping relationship among the main virtual device, the standby virtual device, and the main and standby tax control servers of the current tax number. That is, the mapping relationship of the tax control server where the main and standby virtual devices corresponding to each tax number are located may be stored in the database module. Each tax number has two mapping relation records of the virtual equipment and the tax control server stored in the database module, wherein one record is the currently available main virtual equipment information, and the other record is the standby virtual equipment information.
S102: initiating an electronic invoice issuing request to the tax control server according to the address information so that the tax control server calls the main virtual equipment to complete issuing of an electronic invoice and returns a corresponding electronic invoice issuing result;
in the step, after the address information of the tax control server is obtained, an electronic invoice billing request can be initiated by assembling a billing message, and the electronic invoice billing request is sent to the tax control server. The tax control server can call the corresponding main virtual equipment to complete the issuing of the electronic invoice according to the current electronic invoice issuing request, and feeds back the corresponding electronic invoice issuing result.
Specifically, the security agent module can call the virtual equipment corresponding to the tax control server after receiving the electronic invoice invoicing request, complete electronic invoice invoicing and return an electronic invoice invoicing result.
The electronic invoice billing result comprises but is not limited to a billing tax number, a tax control server IP and port, billing time, whether billing is successful, a billing failure type and a billing failure reason.
S103: receiving the electronic invoice invoicing result, and counting the electronic invoice invoicing result in a preset time period to obtain the invoicing failure proportion of the current tax number;
according to the embodiment of the application, the electronic invoice billing result returned by the tax control server can be received, and the billing failure proportion of each tax number in the preset time period can be counted according to the electronic invoice billing result. Specifically, the load balancing module may obtain an electronic invoice issuing result returned by the security agent module, and forward the electronic invoice issuing result to the invoice issuing module. The invoice issuing module can further send the electronic invoice issuing result to the message queue module, and the invoice issuing result counting module can obtain the electronic invoice issuing result from the message queue and count the tax number invoice issuing failure proportion.
It should be noted that, in order to avoid false early warning that may occur when the number of services is too small, a fixed value may be added to the denominator to process when calculating the failure proportion.
S104: and if the invoicing failure ratio is larger than a preset threshold value, switching the standby virtual equipment into the main virtual equipment, and refreshing the main and standby information of the virtual equipment corresponding to the current tax number recorded in the cache so as to call the new main virtual equipment for invoicing.
It can be understood that if the rate of the invoicing failure of the current tax number is greater than the preset threshold, it is considered that the virtual device corresponding to the current tax number at the moment may have the invoicing problem. And calling a virtual equipment switching module, switching the standby virtual equipment into the main virtual equipment, refreshing the main and standby virtual equipment information corresponding to the current tax number recorded in the cache, and further utilizing the switched main virtual equipment to perform subsequent invoicing.
As a preferred implementation manner, after the standby virtual device is switched to the main virtual device, the embodiment of the application may further invoke the early warning module to generate early warning information of the billing failure ratio and/or the main/standby switching early warning information and return the generated early warning information to the management terminal, so as to prompt the management party to perform troubleshooting.
According to the scheme, the highly-available electronic invoice issuing method comprises the following steps: acquiring address information of a tax control server corresponding to a main virtual device of a current tax number; initiating an electronic invoice issuing request to the tax control server according to the address information so that the tax control server calls the main virtual equipment to complete issuing of an electronic invoice and returns a corresponding electronic invoice issuing result; receiving the electronic invoice invoicing result, and counting the electronic invoice invoicing result in a preset time period to obtain the invoicing failure proportion of the current tax number; and if the invoicing failure ratio is larger than a preset threshold value, switching the standby virtual equipment into the main virtual equipment, and refreshing the main and standby information of the virtual equipment corresponding to the current tax number recorded in the cache so as to call the new main virtual equipment for invoicing. According to the method, the main virtual equipment is used for making out an invoice at present, the standby virtual equipment is not responsible for making out an invoice, the electronic invoice making-out result of each tax number is monitored, and when the failure rate of making out an invoice is greater than a preset threshold value, the standby virtual equipment is switched to the main virtual equipment, namely the minimum available unit is the virtual equipment corresponding to the tax number, so that the high availability of each tax number making-out service is ensured.
On the basis of the above embodiment, as a preferred implementation manner, in the embodiment of the present application, an interface of the tax control server may also be monitored to determine whether the tax control server is normally available. Specifically, as shown in fig. 4, the following process may be included:
s201: sending an interface query request to a tax control server to obtain an interface query result representing whether an interface of a basic server of the tax control server is communicated;
s202: if the interface query result is interface communication, the interface query request is initiated again after the next monitoring period is dormant;
s203: if the interface query result indicates that the interfaces are not communicated, sending the interface query requests of the preset number again;
s204: and if the interface query results corresponding to the preset number of the interface query requests are that the interfaces are not communicated, generating server interface early warning information and returning the server interface early warning information to the management terminal.
In the embodiment of the application, the interface query request can be sent to the tax control server at regular time according to the preset time period. Specifically, the interface query request may be sent to the security proxy module based on load balancing, and after receiving the request, the security proxy module invokes the tax control server to query the interface and returns the interface query result. If the interface query result is that the interface is communicated, the interface query request is initiated again after the next monitoring period is dormant; and if the interface query result is that the interfaces are not communicated, sending the interface query requests of the preset number again. If the interface query results corresponding to the preset number of interface query requests are all that the interfaces are not communicated, server interface early warning information is generated and returned to the management terminal, so that operation and maintenance management personnel can conveniently perform troubleshooting.
The highly available electronic invoicing method provided by the embodiment of the present application is described in detail by a specific embodiment. Referring to fig. 5, the following process may be included:
1.1, the invoicing module acquires the IP and the port of the tax control server corresponding to the main virtual equipment from the cache module according to the tax number;
1.2, assembling the invoice message and initiating an electronic invoice billing request;
1.3, the load balancing module forwards the electronic invoice billing request to the security agent module;
1.4, the security agent module receives an electronic invoice issuing request, calls virtual equipment corresponding to the tax control server to complete electronic invoice issuing and returns an electronic invoice issuing result;
1.5, the load balancing module returns the electronic invoice billing result to the invoice billing module, and the invoice billing module sends the electronic invoice billing result to the message queue module;
1.6, the invoicing result counting module acquires an electronic invoice invoicing result from the message queue and counts the tax number invoicing failure proportion;
1.7, judging whether the tax number invoicing failure proportion is greater than a preset threshold value or not;
1.8, calling a virtual equipment switching module, and updating the main and standby information of the virtual equipment of the tax number in a database module;
1.9, refreshing the information of the main virtual equipment and the standby virtual equipment in the cache;
and 1.10, calling an early warning module by the billing result counting module to send early warning information to operation and maintenance personnel.
2.1, the interface monitoring module sends a tax control server interface query request;
2.2, the load balancing module forwards the tax control server interface query request to the security agent module;
2.3, the safety agent module receives the tax control server interface query request, calls the tax control server query interface and returns an interface query result, and the load balancing module forwards the tax control server interface query result to the interface monitoring module;
and 2.4, the interface monitoring module receives the interface query result, and if the query is successful, the monitoring module sleeps to wait for the next monitoring period. And if the query fails, sending the interface query request again, and if the interface query fails for a preset number of times, generating early warning information and calling an early warning module to send the early warning information to operation and maintenance personnel.
3.1, receiving and checking the tax control server interface early warning information, or the invoicing failure proportion early warning information, or the virtual device master-slave switching early warning information by operation and maintenance personnel;
and 3.2, the operation and maintenance personnel check the early warning tax control server and the virtual equipment according to the information of the tax number, the tax control server IP, the port and the like of the early warning information, verify the early warning condition and further process according to the verification result.
In the following, a description is given of a high-availability electronic invoice issuing device provided by an embodiment of the present application, and an electronic invoice issuing device described below and a high-availability electronic invoice issuing method described above may be referred to each other.
Referring to fig. 6, a highly available electronic invoice issuing device provided in an embodiment of the present application includes:
an address obtaining unit 301, configured to obtain address information of a tax control server corresponding to a main virtual device of a current tax number;
a request initiating unit 302, configured to initiate an electronic invoice issuing request to the tax control server according to the address information, so that the tax control server invokes the main virtual device to complete issuing of an electronic invoice, and returns a corresponding electronic invoice issuing result;
the result counting unit 303 is configured to receive the electronic invoice drawing result, and count the electronic invoice drawing result within a preset time period to obtain a drawing failure proportion of the current tax number;
the main/standby switching unit 304 is configured to switch the standby virtual device to the main virtual device and refresh the main/standby information of the virtual device corresponding to the current tax number recorded in the cache, so as to call a new main virtual device to issue an invoice in the subsequent process if the invoicing failure ratio is greater than a preset threshold.
For the specific implementation process of the modules 301 to 304, reference may be made to the specific content disclosed in the foregoing embodiments, and details are not repeated here.
The present application further provides an electronic device, and as shown in fig. 7, an electronic device provided in an embodiment of the present application includes:
a memory 100 for storing a computer program;
the processor 200, when executing the computer program, may implement the steps provided by the above embodiments.
Specifically, the memory 100 includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer-readable instructions, and the internal memory provides an environment for the operating system and the computer-readable instructions in the non-volatile storage medium to run. The processor 200 may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor or other data Processing chip in some embodiments, and provides computing and controlling capability for electronic devices, and when executing the computer program stored in the memory 100, the steps of the highly available electronic invoicing method disclosed in any of the foregoing embodiments may be implemented.
On the basis of the above embodiment, as a preferred implementation, referring to fig. 8, the electronic device further includes:
and an input interface 300 connected to the processor 200, for acquiring computer programs, parameters and instructions imported from the outside, and storing the computer programs, parameters and instructions into the memory 100 under the control of the processor 200. The input interface 300 may be connected to an input device for receiving parameters or instructions manually input by a user. The input device may be a touch layer covered on a display screen, or a button, a track ball or a touch pad arranged on a terminal shell, or a keyboard, a touch pad or a mouse, etc.
And a display unit 400 connected to the processor 200 for displaying data processed by the processor 200 and for displaying a visualized user interface. The display unit 400 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch panel, or the like.
And a network port 500 connected to the processor 200 for performing communication connection with each external terminal device. The communication technology adopted by the communication connection can be a wired communication technology or a wireless communication technology, such as a mobile high definition link (MHL) technology, a Universal Serial Bus (USB), a High Definition Multimedia Interface (HDMI), a wireless fidelity (WiFi), a bluetooth communication technology, a low power consumption bluetooth communication technology, an ieee802.11 s-based communication technology, and the like.
While fig. 8 illustrates only an electronic device having the assembly 100 and 500, those skilled in the art will appreciate that the configuration illustrated in fig. 8 is not intended to be limiting of electronic devices and may include fewer or more components than those illustrated, or some components may be combined, or a different arrangement of components.
The present application also provides a computer-readable storage medium, which may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk. The storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the highly available electronic invoicing method disclosed in any of the preceding embodiments.
The main virtual equipment is used for making out an invoice at present, the standby virtual equipment is not responsible for making out an invoice, the electronic invoice making-out result of each tax number is monitored, and when the failure rate of making out an invoice is greater than a preset threshold value, the standby virtual equipment is switched to the main virtual equipment, namely, the minimum available unit is the virtual equipment corresponding to the tax number, so that the high availability of each tax number making-out service is ensured.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (6)

1. A method for high availability electronic invoicing, comprising:
acquiring address information of a tax control server corresponding to a main virtual device of a current tax number;
initiating an electronic invoice issuing request to the tax control server according to the address information so that the tax control server calls the main virtual equipment to complete issuing of an electronic invoice and returns a corresponding electronic invoice issuing result;
receiving the electronic invoice invoicing result, and counting the electronic invoice invoicing result in a preset time period to obtain the invoicing failure proportion of the current tax number;
if the invoicing failure proportion is larger than a preset threshold value, switching the standby virtual equipment into the main virtual equipment, and refreshing the main and standby information of the virtual equipment corresponding to the current tax number recorded in the cache so as to call new main virtual equipment for invoicing in the following process;
the virtual equipment comprises a tax logic kernel, a tax digital certificate security carrier and an operating environment;
the initiating an electronic invoice issuing request to the tax control server according to the address information comprises the following steps:
sending the electronic invoice billing request to a security agent module based on a load balancing mode so as to forward the electronic invoice billing request to a corresponding tax control server by using the security agent module according to the address information;
further comprising:
storing the mapping relation among the main virtual equipment, the standby virtual equipment and the main and standby tax control servers of the current tax number by using a database;
writing available main virtual equipment information of the current tax number and an IP and a port of a corresponding tax control server into a cache;
regularly sending an interface query request to the tax control server according to a preset time period so as to obtain an interface query result representing whether the interfaces of the tax control server basic server are communicated;
if the interface query result is interface communication, the interface query request is initiated again after the next monitoring period is dormant;
if the interface query result indicates that the interfaces are not communicated, sending the interface query requests of the preset number again;
and if the interface query results corresponding to the preset number of the interface query requests are that the interfaces are not communicated, generating server interface early warning information and returning the server interface early warning information to the management terminal.
2. The electronic invoice issuing method according to claim 1, wherein the electronic invoice issuing result comprises any one or a combination of any several items of an issuing tax number, a tax control server IP and port, an issuing time, whether the issuing is successful, an issuing failure type and an issuing failure reason.
3. The electronic invoice issuing method according to claim 1, wherein after switching the standby virtual device to the primary virtual device if the invoice failure rate is greater than a preset threshold, the method further comprises:
and generating early warning information of the billing failure ratio and/or the main-standby switching early warning information and returning the early warning information to the management terminal so as to prompt a manager to carry out troubleshooting.
4. A highly available electronic invoicing apparatus, comprising:
the address acquisition unit is used for acquiring the address information of the tax control server corresponding to the main virtual equipment of the current tax number;
the request initiating unit is used for initiating an electronic invoice issuing request to the tax control server according to the address information so that the tax control server calls the main virtual equipment to complete issuing of an electronic invoice and returns a corresponding electronic invoice issuing result;
the result counting unit is used for receiving the electronic invoice billing result and counting the electronic invoice billing result in a preset time period to obtain the billing failure proportion of the current tax number;
the main/standby switching unit is used for switching the standby virtual equipment into the main virtual equipment and refreshing the main/standby information of the virtual equipment corresponding to the current tax number recorded in the cache if the invoicing failure proportion is greater than a preset threshold value so as to call a new main virtual equipment for invoicing;
the virtual equipment comprises a tax logic kernel, a tax digital certificate security carrier and an operating environment;
the request initiating unit is specifically configured to send the electronic invoice billing request to a security agent module based on a load balancing manner, so that the security agent module is used to forward the electronic invoice billing request to a corresponding tax control server according to the address information;
further comprising:
storing the mapping relation among the main virtual equipment, the standby virtual equipment and the main and standby tax control servers of the current tax number by using a database;
writing available main virtual equipment information of the current tax number and an IP and a port of a corresponding tax control server into a cache;
regularly sending an interface query request to the tax control server according to a preset time period so as to obtain an interface query result representing whether the interfaces of the tax control server basic server are communicated;
if the interface query result is interface communication, the interface query request is initiated again after the next monitoring period is dormant;
if the interface query result indicates that the interfaces are not communicated, sending the interface query requests of the preset number again;
and if the interface query results corresponding to the preset number of the interface query requests are that the interfaces are not communicated, generating server interface early warning information and returning the server interface early warning information to the management terminal.
5. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the highly available electronic invoicing method according to any one of claims 1 to 3 when executing the computer program.
6. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, carries out the steps of the highly available electronic invoicing method according to one of the claims 1 to 3.
CN202010829450.7A 2020-08-18 2020-08-18 High-availability electronic invoice issuing method and system Active CN111738783B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010829450.7A CN111738783B (en) 2020-08-18 2020-08-18 High-availability electronic invoice issuing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010829450.7A CN111738783B (en) 2020-08-18 2020-08-18 High-availability electronic invoice issuing method and system

Publications (2)

Publication Number Publication Date
CN111738783A CN111738783A (en) 2020-10-02
CN111738783B true CN111738783B (en) 2021-03-16

Family

ID=72658572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010829450.7A Active CN111738783B (en) 2020-08-18 2020-08-18 High-availability electronic invoice issuing method and system

Country Status (1)

Country Link
CN (1) CN111738783B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112686719B (en) * 2020-12-24 2024-03-26 航天信息股份有限公司 Billing method and device, storage medium and electronic equipment
CN113450165A (en) * 2021-06-28 2021-09-28 首约科技(北京)有限公司 Method for issuing invoices with different main bodies and tax rates according to configuration
CN114205078A (en) * 2021-11-22 2022-03-18 航天信息股份有限公司 Virtual tax UKey remote issuing method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103810794A (en) * 2014-03-18 2014-05-21 上海汉得信息技术股份有限公司 Small and medium-sized enterprise supply chain financial platform on basis of could computing
JP6140909B1 (en) * 2015-09-01 2017-06-07 Tranzax株式会社 Electronic receivable system and method for managing transfer collateral for electronic record receivable with stop condition
CN106530024B (en) * 2016-11-09 2019-06-14 百望金赋科技有限公司 A kind of billing method, billing system and its tax control server
CN106779988A (en) * 2016-11-15 2017-05-31 百望金赋科技有限公司 A kind of tax control server management system and method
CN110768848B (en) * 2019-10-31 2022-07-01 杭州迪普科技股份有限公司 Method and device for switching main server and standby server

Also Published As

Publication number Publication date
CN111738783A (en) 2020-10-02

Similar Documents

Publication Publication Date Title
CN111738783B (en) High-availability electronic invoice issuing method and system
US11461329B2 (en) Tracking query execution status for selectively routing queries
US9553781B2 (en) Service level agreement based storage access
US10785320B2 (en) Managing operation of instances
CN110162424B (en) Fault processing method, system, device and storage medium
WO2021258753A1 (en) Service processing method and apparatus, and electronic device and storage medium
CN111352696A (en) Consumption-based resource tagging systems and methods
US11080146B2 (en) System and method for storage unavailability tolerant backup
JP2008152591A (en) Method for allocating information processing apparatus, and information processing system and management server
CN112256676A (en) Method, device, equipment and medium for migrating database
CN111586177B (en) Cluster session loss prevention method and system
CN110727523B (en) Service request processing method, service request processing device and readable storage medium
CN104753987A (en) Distributed session management method and system
CN108241616B (en) Message pushing method and device
US20230021746A1 (en) Allocation and management of computing platform resources
CN111625344B (en) Resource scheduling system, method and device in application system
CN110798347B (en) Service state detection method, device, equipment and storage medium
CN112346949A (en) AOP-based operation log recording method and system, electronic device and medium
CN114968216A (en) Application program development project generation method and device
CN112650959A (en) Page loading duration statistical method, device, equipment and storage medium
US10922666B1 (en) Resource management for logical and physical availability zones of a provider network
JP6943318B1 (en) Programs, information processing methods, and information processing equipment
US20200348847A1 (en) System and method for event based storage management
JP5384566B2 (en) Front-end server, interpreted program and method
CN112540880A (en) Method and device for rapidly shielding fault display card in cluster and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant