Disclosure of Invention
The application provides an electronic bill risk control method, an electronic bill risk control device and electronic equipment, and aims to solve the problem that risk control cannot be performed on an electronic bill in a whole course and accurately in the prior art.
The embodiment of the application provides an electronic bill risk control method, which comprises the following steps:
generating an electronic bill according to an electronic bill application request, and recording related information of the electronic bill;
executing the following steps at each node of the life cycle of the electronic bill:
judging whether the electronic bill operation of the node has risks or not according to the related information of the electronic bill;
if so, executing corresponding risk control operation according to a preset risk control strategy;
and if not, executing corresponding electronic bill operation and updating the related information of the electronic bill.
Optionally, the method is applied to an electronic waybill management system, and the electronic waybill corresponds to an electronic waybill in the electronic waybill management system;
correspondingly, the life cycle of the electronic menu at least comprises one of the following nodes: printing, canceling, updating, delivering, collecting and signing.
Optionally, the generating an electronic receipt according to the electronic receipt application request and recording related information of the electronic receipt includes:
receiving an electronic waybill application request;
generating identification information capable of uniquely identifying the electronic waybill according to a preset identification information generation rule;
generating an electronic waybill with the identification information according to the information contained in the electronic waybill application request;
and storing the related information of the electronic waybill.
Optionally, the preset identification information generation rule includes:
the identification information of the electronic waybill is composed of the following parts: prefix, sequence number, suffix and check code; wherein the serial number is used to uniquely identify the electronic waybill.
Optionally, the sequence number is randomly acquired from the sequence numbers to be allocated stored in a database-by-database and table-by-table manner.
Optionally, the related information of the electronic waybill includes: the request for the electronic waybill application comprises information, identification information of the electronic waybill and state information of the electronic waybill in the life cycle of the electronic waybill.
Optionally, the updating the related information of the electronic menu includes: and updating the state information of the electronic waybill in the life cycle of the electronic waybill.
Optionally, the determining, according to the relevant information of the electronic receipt, whether there is a risk in the electronic receipt operation of the node includes:
judging whether the electronic waybill operation of the node accords with a preset electronic waybill life cycle rule or not according to the state information of the electronic waybill;
and if not, judging that the electronic waybill operation of the node has risks.
Optionally, when the electronic waybill is located in the printing node, the determining whether there is a risk in the electronic waybill operation of the node according to the related information of the electronic waybill further includes:
checking whether the service relation related to the electronic waybill is valid;
checking whether the information to be printed of the electronic waybill conforms to the information of the electronic waybill when the electronic waybill is generated;
and if the result of any one of the verification steps is negative, judging that the electronic waybill operation of the node has risk.
Optionally, the information to be printed of the electronic waybill includes: the identification information of the electronic waybill and the order number corresponding to the electronic waybill.
Optionally, when the electronic waybill is located at the cancel node, the determining whether the electronic waybill operation of the node has a risk according to the related information of the electronic waybill further includes:
checking whether the service relation related to the electronic waybill is valid;
verifying whether the identification information of the electronic waybill conforms to a preset identification information generation rule;
checking whether the identification information of the electronic waybill is the identification information of the electronic waybill generated by the electronic waybill management system;
checking whether the cancellation operation of the node accords with a preset waybill cancellation rule or not;
and if the result of any one of the verification steps is negative, judging that the electronic waybill operation of the node has risk.
Optionally, the check whether the cancellation operation of the local node meets a preset waybill cancellation rule is implemented by adopting the following manner:
checking whether the cancellation times of the electronic waybill are smaller than a preset threshold value or not;
if yes, judging that the cancellation operation of the node accords with a preset waybill cancellation rule.
Optionally, the executing the corresponding electronic bill operation and updating the related information of the electronic bill include:
judging whether the electronic waybill is in a recovery pool or not; if yes, adding one operation to the cancellation times of the electronic waybill; if not, adding the electronic waybill into the recovery pool, and setting the cancellation times of the electronic waybill as one;
and updating the state information of the electronic waybill.
Optionally, when the electronic waybill is located at the shipping node, the determining whether the electronic waybill operation of the node has a risk according to the related information of the electronic waybill further includes:
verifying whether the identification information of the electronic waybill conforms to a preset identification information generation rule;
checking whether the identification information of the electronic waybill is the identification information of the electronic waybill generated by the electronic waybill management system;
and if the result of any one of the verification steps is negative, judging that the electronic waybill operation of the node has risk.
Optionally, when the electronic waybill is located at the collecting or signing node, the determining whether the electronic waybill operation of the node has a risk according to the related information of the electronic waybill further includes:
extracting identification information of the electronic waybill from logistics information fed back by an electronic waybill receiver, and verifying whether the identification information of the electronic waybill meets a preset identification information generation rule or not;
checking whether an applicant exists in the electronic waybill or not by inquiring a database for storing the related information of the electronic waybill;
and if the result of any one of the verification steps is negative, judging that the electronic waybill operation of the node has risk.
Optionally, the checking whether the identification information of the electronic waybill conforms to a preset identification information generation rule is implemented by adopting the following method:
and checking whether the identification information of the electronic waybill conforms to a regular expression corresponding to a preset identification information generation rule.
Optionally, the risk control operation includes:
refusing to execute the electronic bill-of-plane operation of the node; or,
and executing the electronic surface single operation of the node and carrying out corresponding alarm processing.
Correspondingly, this application embodiment still provides an electron list risk control device, the device includes:
the electronic bill generating unit is used for generating an electronic bill according to an electronic bill application request and recording related information of the electronic bill;
the electronic bill operation risk judgment unit is used for judging whether the electronic bill operation of the node has risks or not according to the relevant information of the electronic bill at each node of the life cycle of the electronic bill;
the risk control operation execution unit is used for receiving the judgment result of the electronic bill operation risk judgment unit, and if the judgment result is positive, executing corresponding risk control operation according to a preset risk control strategy;
and the electronic bill operation executing unit is used for receiving the judgment result of the electronic bill operation risk judging unit, executing corresponding electronic bill operation if the judgment result is negative, and updating the related information of the electronic bill.
Optionally, the device is deployed in an electronic waybill management system, and the electronic waybill corresponds to an electronic waybill in the electronic waybill management system;
correspondingly, the life cycle of the electronic menu at least comprises one of the following nodes: printing, canceling, updating, delivering, collecting and signing.
Optionally, the electronic bill generating unit includes:
the request receiving subunit is used for receiving the request of the electronic waybill application;
the identification information generation subunit is used for generating identification information capable of uniquely identifying the electronic waybill according to a preset identification information generation rule;
the electronic waybill generating subunit is used for generating the electronic waybill with the identification information according to the information contained in the electronic waybill application request;
and the electronic waybill related information storage subunit is used for storing the related information of the electronic waybill.
Optionally, the preset identification information generation rule adopted by the identification information generation subunit includes:
the identification information of the electronic waybill is composed of the following parts: prefix, sequence number, suffix and check code; wherein the serial number is used to uniquely identify the electronic waybill.
Optionally, the serial number in the identification information generated by the identification information generating subunit is randomly acquired from the serial numbers to be allocated stored in a database-by-database and table-by-table manner.
Optionally, the electronic waybill related information stored in the electronic waybill related information storage subunit includes: the request for the electronic waybill application comprises information, identification information of the electronic waybill and state information of the electronic waybill in the life cycle of the electronic waybill.
Optionally, the information related to the electronic waybill updated by the electronic waybill operation execution unit includes: status information of the electronic waybill during its lifecycle.
Optionally, the electronic bill of surface operation risk determining unit includes:
and the electronic waybill operation correctness judgment subunit is used for judging whether the electronic waybill operation of the node conforms to the preset electronic waybill life cycle rule or not according to the state information of the electronic waybill, and if not, judging that the electronic waybill operation of the node has risks.
Optionally, when the electronic waybill is located at the printing node, the electronic waybill operation risk determining unit further includes:
the service relation checking subunit is used for checking whether the service relation related to the electronic waybill is valid or not;
the to-be-printed information verifying subunit is used for verifying whether the to-be-printed information of the electronic waybill conforms to the information of the electronic waybill when the electronic waybill is generated;
and the electronic waybill operation risk judgment subunit is used for receiving the result of the check subunit, and judging that the electronic waybill operation of the node has risk if the result output by any check subunit is negative.
Optionally, the information to be printed of the electronic waybill verified by the information to be printed verifying subunit includes: the identification information of the electronic waybill and the order number corresponding to the electronic waybill.
Optionally, when the electronic waybill is located at the cancel node, the electronic waybill operation risk determining unit further includes:
the service relation checking subunit is used for checking whether the service relation related to the electronic waybill is valid or not;
the identification information correctness checking subunit is used for checking whether the identification information of the electronic waybill conforms to a preset identification information generation rule or not;
the identification information generation system verification subunit is used for verifying whether the identification information of the electronic waybill is the electronic waybill identification information generated by the electronic waybill management system;
the cancellation operation correctness checking subunit is used for checking whether the cancellation operation of the node accords with a preset waybill cancellation rule or not;
and the electronic waybill operation risk judgment subunit is used for receiving the result of the check subunit, and judging that the electronic waybill operation of the node has risk if the result output by any check subunit is negative.
Optionally, the cancel operation correctness checking subunit is specifically configured to check whether the number of times of canceling the electronic waybill is smaller than a preset threshold; if yes, judging that the cancellation operation of the node accords with a preset waybill cancellation rule.
Optionally, the electronic single-operation execution unit includes:
a cancellation number updating subunit, configured to determine whether the electronic waybill is in a recovery pool; if yes, adding one operation to the cancellation times of the electronic waybill; if not, adding the electronic waybill into the recovery pool, and setting the cancellation times of the electronic waybill as one;
and the electronic waybill state information updating subunit is used for updating the state information of the electronic waybill.
Optionally, when the electronic waybill is located at the shipping node, the electronic waybill operation risk determination unit further includes:
the identification information correctness checking subunit is used for checking whether the identification information of the electronic waybill conforms to a preset identification information generation rule or not;
the identification information generation system verification subunit is used for verifying whether the identification information of the electronic waybill is the electronic waybill identification information generated by the electronic waybill management system;
and the electronic waybill operation risk judgment subunit is used for receiving the result of the check subunit, and judging that the electronic waybill operation of the node has risk if the result output by any check subunit is negative.
Optionally, when the electronic waybill is located at the collecting or signing node, the electronic waybill operation risk judgment unit further includes:
the identification information correctness checking subunit is used for extracting the identification information of the electronic waybill from the logistics information fed back by the electronic waybill receiver and checking whether the identification information of the electronic waybill meets a preset identification information generation rule or not;
the electronic waybill applicant checking subunit is used for checking whether an applicant exists in the electronic waybill by inquiring a database for storing the related information of the electronic waybill;
and the electronic waybill operation risk judgment subunit is used for receiving the result of the check subunit, and judging that the electronic waybill operation of the node has risk if the result output by any check subunit is negative.
Optionally, the identification information correctness checking subunit is specifically configured to check whether the identification information of the electronic waybill conforms to a regular expression corresponding to a preset identification information generation rule.
Optionally, the risk control operation execution unit is specifically configured to refuse to execute an electronic service order operation of the node; or, executing the electronic surface list operation of the node and carrying out corresponding alarm processing.
In addition, an embodiment of the present application further provides an electronic device, including:
a display;
a processor;
the memory is used for storing an electronic bill risk control file, and when the electronic bill risk control file is executed by the processor, the electronic bill risk control file generates an electronic bill according to an electronic bill application request and records the related information of the electronic bill; executing the following steps at each node of the life cycle of the electronic bill: judging whether the electronic bill operation of the node has risks or not according to the related information of the electronic bill; if so, executing corresponding risk control operation according to a preset risk control strategy; and if not, executing corresponding electronic bill operation and updating the related information of the electronic bill.
Compared with the prior art, the method has the following advantages:
the electronic bill risk control method, the electronic bill risk control device and the electronic equipment generate an electronic bill according to an electronic bill application request, record relevant information of the electronic bill, and execute the following steps at each node of a life cycle of the electronic bill: and judging whether the electronic bill operation of the node has risks according to the related information of the electronic bill, if so, executing corresponding risk control operation according to a preset risk control strategy, otherwise, executing corresponding electronic bill operation, and updating the related information of the electronic bill. Therefore, in the using process of the electronic bill, the risk control can be carried out on the electronic bill in the whole process accurately, the risk control effect is improved, and the safety of the online service based on the electronic bill is guaranteed.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
The application provides an electronic bill risk control method, an electronic bill risk control device and electronic equipment, and the following specific embodiments are provided:
fig. 1 is a flowchart illustrating an embodiment of an electronic bill of risk control method according to the present application. The method comprises the following steps:
step S101: and generating an electronic bill according to the electronic bill application request, and recording related information of the electronic bill.
To perform risk control on the electronic bill, it is usually necessary to accurately and timely obtain the relevant information of the electronic bill. In order to ensure that the obtained relevant information of the electronic bill has timeliness, comprehensiveness and reliability, the method provided by the application obtains the relevant information of the electronic bill in a mode of locally generating the electronic bill, and does not obtain the relevant information in a feedback mode. Therefore, to implement the method provided by the present application, an electronic receipt is first generated according to an electronic receipt application request, and related information of the electronic receipt is recorded. The electronic receipt application request may include electronic receipt application party information and other related information of the electronic receipt. The recorded related information of the electronic bill can comprise information contained in the electronic bill application request and state information of the electronic bill; the status information of the electronic bill, for example, in this step, the status information of the electronic bill may be recorded as generated.
In this embodiment, the method may be applied to an electronic waybill management system, where the electronic waybill corresponds to an electronic waybill in the electronic waybill management system. It should be noted that the application scenario of the electronic bill risk control method provided by the present application is not limited to the electronic waybill management system, and the method can be applied to other application scenarios in which risk control needs to be performed on other electronic bills to ensure the security of the online service based on the electronic bills, and corresponding beneficial effects are obtained. For example, the method can be applied to an electronic bill management system under the condition that the risk control is required to be carried out on the electronic bill to ensure the safety of the online business based on the electronic bill.
The following describes the steps in detail by taking an electronic waybill management system as an example.
In this embodiment, the generating an electronic receipt according to the electronic receipt application request and recording the related information of the electronic receipt may include: receiving an electronic waybill application request; generating identification information capable of uniquely identifying the electronic waybill according to a preset identification information generation rule; generating an electronic waybill with the identification information according to the information contained in the electronic waybill application request; and storing the related information of the electronic waybill.
Here, an implementation of the steps involved in generating the electronic receipt according to the request of the electronic receipt application and recording the related information of the electronic receipt is described in detail. The electronic waybill receiving request can be that the electronic waybill management system receives an electronic waybill application request sent by an electronic waybill applicant, and the request can include information such as an applicant ID, a receiver ID, a goods receiving and sending address and the like of the electronic waybill; the electronic waybill recipient is typically an express company. The step of generating the identification information capable of uniquely identifying the electronic waybill according to the preset identification information generation rule may be that, according to the electronic waybill bearer ID included in the electronic waybill application request, the identification information generation rule corresponding to the electronic waybill bearer is found out in the electronic waybill management system, and the waybill number of the electronic waybill bearer is generated according to the identification information generation rule; if the corresponding identification information generation rule cannot be found, the waybill number cannot be generated. The information related to the electronic waybill storage can be information such as an applicant ID, a receiver ID, a goods receiving and dispatching address, a waybill number and the state of the electronic waybill stored in the electronic waybill management system. After the steps are completed, the electronic waybill management system can also send the related information of the electronic waybill to the corresponding electronic waybill receiver.
It can be seen from the above description that, when the electronic waybill management system generates the electronic waybill, the electronic waybill management system generates the electronic waybill identification information, namely the electronic waybill number, according to the preset identification information generation rule, so that a foundation is provided for identifying the authenticity of the electronic waybill at each node in the life cycle.
It should be noted that, in this embodiment, the preset identification information generation rule may include: the identification information of the electronic waybill is composed of the following parts: prefix, sequence number, suffix and check code; wherein the serial number is used to uniquely identify the electronic waybill. That is, the electronic waybill management system can provide the rules to the electronic waybill bearer, and the position sequence of the prefix, the serial number, the suffix and the check code and the calculation mode of the check code can be specified by the electronic waybill bearer and then provided to the electronic waybill management system.
It should be noted that, in this embodiment, the serial number may be randomly acquired from serial numbers to be allocated stored in a database-based and table-based manner. The serial numbers to be distributed are stored in a database-by-database and table-by-table mode, the problem of single-row hot spots of a database when the serial numbers are obtained can be avoided, even if the serial numbers can be generated and distributed immediately by an electronic waybill management system, the uniqueness of the serial numbers can also be guaranteed. The problem of the single-row hot spots of the database refers to that if the serial numbers are acquired from the same database every time aiming at each electronic waybill receiver, the single-row hot spots of the database may occur, so that the load of the database is overlarge, and potential safety hazards are brought to stable service providing of the database. The sub-base and sub-table mode adopts a grouping Sequence strategy of TDDL (TAOBAO DISTRIBUTEDATA LAYER), and the Sequence is a special table for storing arithmetic progression. For example, as shown in fig. 2, which is a schematic diagram of a storage manner of serial numbers to be allocated provided in this embodiment of the present application, all serial numbers to be allocated may be stored in four sequences, for example, Seq1, Seq2, Seq3, and Seq4, where each Sequence stores a serial number to be allocated for each electronic waybill acceptor; then, the four sequences are respectively stored in four databases, and each database stores one Sequence, so that each database stores the serial numbers to be distributed of all the electronic waybill bearers, but the serial numbers to be distributed among the databases are mutually exclusive; the Sequence numbers to be distributed in the sequences can be stored in a segmented mode according to a preset step length, when the Sequence numbers are obtained, a server of the electronic waybill management system can randomly obtain the Sequence numbers of a certain Sequence according to the preset step length, as shown in fig. 2, the preset step length in the figure is 100, if the Sequence numbers to be distributed in the Sequence 1 from 0 to 99 are used up, the Sequence 1 can be updated to the next section from 400 to 499 when the Sequence numbers are obtained next time, and therefore the Sequence numbers to be distributed among the sequences are ensured to be not repeated.
The electronic waybill identifier is generated by the number generation mechanism, so that uniqueness (the electronic waybill identifier is not repeated), high performance (immediate generation and distribution according to a request) and rule conformity (configurable rules are provided for a receiver of the electronic waybill) can be ensured, and good operation of the electronic waybill management system is guaranteed.
Having described step S101 included in the method provided by the present application, the following steps should be executed at each node of the lifecycle of the electronic bill to implement the method provided by the present application, and specifically, the following steps may be executed when a request for entering each node of the lifecycle of the electronic bill is received.
Step S102: and judging whether the electronic bill operation of the node has risks or not according to the related information of the electronic bill.
After the relevant information of the electronic bill is acquired, whether the electronic bill has risks or not can be judged, namely whether the electronic bill operation of the node has risks or not can be judged according to the relevant information of the electronic bill in the step. Due to the fact that the acquired relevant information of the electronic bill has timeliness, comprehensiveness and reliability, the accuracy of the electronic bill operation risk judgment result in the step can be guaranteed.
In this embodiment, the determining whether there is a risk in the electronic bill handling operation of the node according to the relevant information of the electronic bill may include: and reading the relevant information of the recorded electronic bill, and judging whether the electronic bill operation of the node has risk or not according to the read relevant information of the electronic bill.
If the determination result in this step is yes, the process proceeds to step S103, and if the determination result in this step is no, the process proceeds to step S104.
Step S103: and executing corresponding risk control operation according to a preset risk control strategy.
The electronic bill management system may preset a reasonable risk control policy and risk control operation according to the actual situation of the electronic bill-based online service, and if the determination result in step S102 is yes, that is, the electronic bill operation of the node has a risk, may execute a corresponding risk control operation according to the preset risk control policy to ensure the security of the electronic bill-based online service.
It should be noted that, in this embodiment, the risk control operation may include: refusing to execute the electronic bill-of-plane operation of the node; or, executing the electronic surface list operation of the node and carrying out corresponding alarm processing.
Step S104: and executing corresponding electronic bill operation and updating the related information of the electronic bill.
If the judgment result in the step S102 is negative, that is, there is no risk in the electronic bill operation of the node, the corresponding electronic bill operation may be executed, and the related information of the electronic bill is updated. By executing the corresponding electronic bill operation of the electronic bill at the node and updating the related information of the electronic bill, the latest related information of the electronic bill can be timely obtained after the electronic bill enters the node and executes the corresponding electronic bill operation, and the related information has timeliness, comprehensiveness and reliability; when the electronic bill enters the next node, the judgment of whether the risk exists in the electronic bill operation of the node or not can be realized, and the accuracy of the judgment result of the risk of the electronic bill operation of the node can be ensured.
The steps included in the method provided by the application are described above, and it can be known from the above description that the relevant information of the electronic bill is obtained when the electronic bill is generated, and the relevant information has timeliness, comprehensiveness and reliability. When the node of the life cycle of the electronic bill is entered for the first time after the electronic bill is generated, whether the risk exists in the electronic bill operation of the node or not can be judged, and the accuracy of the judgment result of the risk of the electronic bill operation of the node can be guaranteed. Meanwhile, under the condition that the judgment result is negative, corresponding electronic bill operation is executed, and relevant information of the electronic bill is updated, so that whether the electronic bill operation of the node has risks or not can be judged when the electronic bill enters the next node, and the accuracy of the judgment result of the electronic bill operation risk of the node is ensured. Therefore, whether the electronic bill operation of the node has risks or not can be judged at each node of the life cycle of the electronic bill, and the accuracy of the judgment result of the electronic bill operation risks of the node is ensured. Finally, the method provided by the application can realize whole-course and accurate risk control of the electronic bill in the using process of the electronic bill, improve the risk control effect and ensure the safety of the online service based on the electronic bill.
It should be noted that, in the case that the method provided in the present application is applied to an electronic waybill management system, in this embodiment, the lifecycle of the electronic waybill may include at least one of the following nodes: printing, canceling, updating, delivering, collecting and signing. In this embodiment, the information related to the electronic waybill may include: the request for the electronic waybill application comprises information, identification information of the electronic waybill and state information of the electronic waybill in the life cycle of the electronic waybill. Correspondingly, in this embodiment, the updating the related information of the electronic bill may include: and updating the state information of the electronic waybill in the life cycle of the electronic waybill.
The following describes in detail specific contents of step S102, step S103 and step S104 included in the method provided by the present application when the electronic waybill is at a printing, canceling, shipping, collecting and signing node, taking the electronic waybill management system as an example.
It should be noted that, each time the electronic waybill management system receives an operation request or logistics feedback information for an electronic waybill, the electronic waybill enters a corresponding node corresponding to the operation request or logistics feedback information, for example, when the electronic waybill management system receives an update request of an electronic waybill, the electronic waybill enters an update node of a life cycle of the electronic waybill; when the electronic waybill management system receives feedback information that a certain electronic waybill has signed up, the electronic waybill enters a signing node of the life cycle of the electronic waybill.
It should be noted that, when the electronic waybill is located in each node of the lifecycle of the electronic waybill, in this embodiment, the determining whether there is a risk in the electronic waybill operation of the node according to the relevant information of the electronic waybill may include: judging whether the electronic waybill operation of the node accords with a preset electronic waybill life cycle rule or not according to the state information of the electronic waybill; and if not, judging that the electronic waybill operation of the node has risks. If the life cycle rule of the electronic waybill is updating, printing, canceling, delivering, collecting and signing, and the A electronic waybill sequentially passes through printing, delivering, collecting and signing nodes, the state information of the electronic waybill can be recorded as signed; when the A electronic waybill applicant sends an electronic waybill cancelling request to the electronic waybill management system again after the A electronic waybill is signed, the electronic waybill management system can inquire the state information of the A electronic waybill from the stored electronic waybill information according to the identification information of the A electronic waybill contained in the request, the A electronic waybill can be known to be signed and received according to the inquired state information of the A electronic waybill, and the cancelling operation of the node does not accord with the life cycle rule of the electronic waybill, so that the situation that the cancelling operation of the node has risk can be judged.
When the electronic waybill is located in the printing node, the determining whether the electronic waybill operation of the node has a risk according to the related information of the electronic waybill may further include: checking whether the service relation related to the electronic waybill is valid; checking whether the information to be printed of the electronic waybill conforms to the information of the electronic waybill when the electronic waybill is generated; and if the result of any one of the verification steps is negative, judging that the electronic waybill operation of the node has risk. In this embodiment, the information to be printed of the electronic waybill may include: the identification information of the electronic waybill and the order number corresponding to the electronic waybill.
As shown in fig. 3, which is a flowchart for performing risk control on an electronic waybill at a printing node according to the embodiment of the present application, on the basis of including the above verification step, a specific implementation manner of a risk control flow of the printing node may be that, S301: a request to print an electronic waybill is received. S302: checking whether the service relation related to the electronic waybill is valid, wherein the checking can comprise checking whether the electronic waybill applicant has the authority of using the electronic waybill of the electronic waybill receiver, such as whether the electronic waybill applicant has applied for the waybill service to the electronic waybill receiver and paid for the waybill service; checking whether the delivery area recorded on the electronic waybill is within the service range of the receiver of the electronic waybill. If the result of the checking step is negative, the printing operation is refused, and information such as the reason of refusing the printing can be displayed. And if the result of the checking step is yes, entering the next checking step. S303: and checking whether the information to be printed of the electronic waybill conforms to the information of the electronic waybill when the electronic waybill is generated. If so, judging whether the waybill number of the electronic waybill to be printed by the electronic waybill applicant is the waybill number generated by the electronic waybill applicant applying to the electronic waybill management system; and judging whether the order number to be printed by the electronic waybill applicant is the order number provided when the electronic waybill applicant applies to the electronic waybill management system to generate the electronic waybill according to the waybill number of the electronic waybill to be printed. If the result of the checking step is negative, the printing operation is refused, and information such as the reason of refusing the printing can be displayed. And if the result of the checking step is yes, entering the next checking step. S304: and judging whether the electronic waybill operation of the node accords with a preset electronic waybill life cycle rule or not according to the state information of the electronic waybill. If the state information of the electronic waybill is cancelled and not distributed, namely the electronic waybill is cancelled and not distributed for use, the operation does not accord with the rule, namely the electronic waybill operation of the node does not accord with the preset life cycle rule of the electronic waybill, and the printing operation is refused; if the state of the electronic waybill is distributed, the operation conforms to the rule, the printing operation is executed, and the state information of the electronic waybill is updated; if the electronic waybill is in a printed state, the operation does not conform to the rules, the printing operation is refused, the fact that the printed state belongs to repeated printing can be prompted, and repeated printing information is recorded; if the electronic waybill is in a state of delivered goods, accepted goods or signed goods, judging whether the electronic waybill is printed or not, if so, operating the electronic waybill to be not in accordance with the rule, refusing to print, prompting that the electronic waybill is printed and recording repeated printing information, and if not, operating the electronic waybill to be printed to be in accordance with the rule, executing printing operation and updating the state information of the electronic waybill.
When the electronic waybill is located at the cancel node, the determining whether the electronic waybill operation of the node has a risk according to the related information of the electronic waybill may further include: checking whether the service relation related to the electronic waybill is valid; verifying whether the identification information of the electronic waybill conforms to a preset identification information generation rule; checking whether the identification information of the electronic waybill is the identification information of the electronic waybill generated by the electronic waybill management system; checking whether the cancellation operation of the node accords with a preset waybill cancellation rule or not; and if the result of any one of the verification steps is negative, judging that the electronic waybill operation of the node has risk. In this embodiment, the checking whether the cancel operation of the local node meets the preset waybill cancel rule may be implemented in the following manner: checking whether the cancellation times of the electronic waybill are smaller than a preset threshold value or not; if yes, judging that the cancellation operation of the node accords with a preset waybill cancellation rule. Correspondingly, in this embodiment, the executing the corresponding electronic bill operation and updating the related information of the electronic bill may include: judging whether the electronic waybill is in a recovery pool or not; if yes, adding one operation to the cancellation times of the electronic waybill; if not, adding the electronic waybill into the recovery pool, and setting the cancellation times of the electronic waybill as one; and updating the state information of the electronic waybill. By adopting the risk control mode at the node, the cancelled electronic waybill can be recycled and redistributed, the waste of the electronic waybill caused by misoperation is avoided, and meanwhile, malicious cancellation operation can be monitored and correspondingly processed. Meanwhile, after the electronic waybill is cancelled, the electronic waybill management system can also send the information that the electronic waybill is cancelled to the corresponding electronic waybill receiver.
As shown in fig. 4, which is a flowchart for performing risk control on an electronic waybill at a cancel node according to the embodiment of the present application, on the basis of including the above verification step, a specific implementation manner of a risk control flow for canceling a node may be that, S401: and receiving a request for canceling the electronic waybill. S402: and checking whether the service relation related to the electronic waybill is valid. If the result of the checking step is negative, the operation is refused to be cancelled. And if the result of the checking step is yes, entering the next checking step. S403: and checking whether the identification information of the electronic waybill conforms to a preset identification information generation rule. If the result is no, the cancel operation is refused. If yes, entering the next checking step. S404: and checking whether the identification information of the electronic waybill is the identification information of the electronic waybill generated by the electronic waybill management system. For example, whether the waybill number of the electronic waybill exists is searched from a locally generated waybill number record. If the result is no, the cancel operation is refused. If yes, entering the next checking step. S405: and judging whether the electronic waybill operation of the node accords with a preset electronic waybill life cycle rule or not according to the state information of the electronic waybill. If the result is no, the cancel operation is refused. If yes, entering the next checking step. S406: and checking whether the cancellation operation of the node accords with a preset waybill cancellation rule. And if so, checking whether the cancellation times of the electronic waybill are smaller than a preset threshold value. If the result of the checking step is yes, judging whether the electronic waybill is in the recovery pool or not; if yes, adding one operation to the cancellation times of the electronic waybill; if not, adding the electronic waybill into the recovery pool, and setting the cancellation times of the electronic waybill as one; and updating the state information of the electronic waybill. If the result of the checking step is negative, the operation of the node may be a malicious cancellation operation, and corresponding processing may be performed, for example, cancellation is rejected.
When the electronic waybill is located at the delivery node, the determining whether the electronic waybill operation of the node has a risk according to the related information of the electronic waybill may further include: verifying whether the identification information of the electronic waybill conforms to a preset identification information generation rule; checking whether the identification information of the electronic waybill is the identification information of the electronic waybill generated by the electronic waybill management system; and if the result of any one of the verification steps is negative, judging that the electronic waybill operation of the node has risk.
As shown in fig. 5, which is a flowchart for performing risk control on an electronic waybill at a shipping node according to the embodiment of the present application, on the basis of including the verification step, a specific implementation manner of a risk control flow of the shipping node may be that, S501: a shipping request for an electronic manifest is received. S502: and checking whether the identification information of the electronic waybill conforms to a preset identification information generation rule. And if the result is no, rejecting the delivery, and if the result is no, not sending the information that the electronic waybill is to deliver the electronic waybill to the electronic waybill receiver. If yes, entering the next checking step. S503: and checking whether the identification information of the electronic waybill is the identification information of the electronic waybill generated by the electronic waybill management system. And if the result is no, rejecting the delivery. If yes, entering the next checking step. S504: and judging whether the electronic waybill operation of the node accords with a preset electronic waybill life cycle rule or not according to the state information of the electronic waybill. And if the result is no, rejecting the delivery operation. If so, the electronic waybill may be sent information that the electronic waybill is to be shipped, for example, to the electronic waybill recipient. By adopting the risk control mode at the node, whether the shipping operation accords with the life cycle rule is verified according to the stored state information of the electronic waybill, and irregular behaviors can be identified, for example, the electronic waybill in the state of being shipped, accepted or signed cannot execute the shipping operation again, so that the problems of one single and multiple purposes and the like can be effectively avoided, and the problem that the prior art cannot accurately and timely verify depending on logistics feedback information is solved.
When the electronic waybill is located at the collecting or signing node, the determining whether the electronic waybill operation of the node has a risk according to the related information of the electronic waybill may further include: extracting identification information of the electronic waybill from logistics information fed back by an electronic waybill receiver, and verifying whether the identification information of the electronic waybill meets a preset identification information generation rule or not; checking whether an applicant exists in the electronic waybill or not by inquiring a database for storing the related information of the electronic waybill; and if the result of any one of the verification steps is negative, judging that the electronic waybill operation of the node has risk.
As shown in fig. 6, which is a flowchart for performing risk control on an electronic waybill at a collecting or signing node according to the embodiment of the present application, a specific implementation manner of the risk control flow of the collecting or signing node may be, based on the verification step, that is, S601: and receiving logistics information fed back by the electronic waybill receiver. For example, the electronic waybill acceptor can send the logistics information of each electronic waybill to the electronic waybill management system through the logistics management system. The logistics information may include the name of the recipient of the electronic waybill, the goods circulation information, the waybill number of the electronic waybill, the state of the electronic waybill, and the like. The logistics management system and the electronic waybill management system can communicate with each other through MetaQ (Metamorphism) message middleware. S602: and extracting the identification information of the electronic waybill from the logistics information fed back by the electronic waybill receiver, and checking whether the identification information of the electronic waybill meets a preset identification information generation rule or not. If not, the verification process is ended. If yes, entering the next checking step. S603: and checking whether the electronic waybill has an applicant or not by inquiring a database for storing the related information of the electronic waybill. If the result is no, corresponding alarm processing can be carried out, for example, relevant information of the abnormal electronic waybill offline is recorded, monitoring is continued, or a receiver is informed. If yes, entering the next checking step. S604: and judging whether the electronic waybill operation of the node accords with a preset electronic waybill life cycle rule or not according to the state information of the electronic waybill. If not, the checking result can be recorded. And if so, updating the state information of the electronic bill and recording the verification result.
It should be noted that, in this embodiment, the verifying whether the identification information of the electronic waybill conforms to a preset identification information generation rule may be implemented by the following method: and checking whether the identification information of the electronic waybill conforms to a regular expression corresponding to a preset identification information generation rule.
It should be noted that the lifecycle of the electronic waybill may also include a recycle node. When the electronic waybill is located in the recycling node, the determining whether the electronic waybill operation of the node has a risk according to the related information of the electronic waybill may further include: verifying whether the identification information of the electronic waybill conforms to a preset identification information generation rule; checking whether the identification information of the electronic waybill is the identification information of the electronic waybill generated by the electronic waybill management system; checking whether the service time of the electronic waybill accords with a preset recovery period; and if the result of any one of the verification steps is negative, judging that the electronic waybill operation of the node has risk. For the case of no risk, corresponding recovery operation may be performed, for example, the status information of the electronic waybill may be updated to "recovered", or a certain policy may be adopted to re-allocate and use the electronic waybill.
The electronic waybill management system adopting the method can execute corresponding electronic waybill operation at each node of the life cycle of the electronic waybill and record the state and other related information of the electronic waybill, so that the information of the electronic waybill can be comprehensively and accurately acquired in real time, whether a certain electronic waybill is a recovered waybill or not can be naturally and accurately judged on the basis, a perfect waybill recovery mechanism is realized, misjudgment that the recovered waybill is judged to be an illegal waybill cannot occur, and the electronic waybill management system is more perfect.
In the above embodiment, an electronic bill risk control method is provided, and correspondingly, the present application also provides an electronic bill risk control device. Fig. 7 is a schematic diagram of an embodiment of the electronic single risk control device according to the present application. Since the apparatus embodiments are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for relevant points. The device embodiments described below are merely illustrative.
An electronic surface list risk control device of this embodiment includes:
an electronic receipt generating unit 701, configured to generate an electronic receipt according to an electronic receipt application request, and record relevant information of the electronic receipt;
an electronic receipt operation risk judgment unit 702, configured to judge, at each node in the lifecycle of the electronic receipt, whether there is a risk in the electronic receipt operation of the node according to the relevant information of the electronic receipt;
a risk control operation executing unit 703, configured to receive a determination result of the electronic bill of surface operation risk determining unit, and if the result is yes, execute a corresponding risk control operation according to a preset risk control policy;
and the electronic bill operation executing unit 704 is configured to receive the judgment result of the electronic bill operation risk judging unit, execute a corresponding electronic bill operation if the judgment result is negative, and update the related information of the electronic bill.
Optionally, the device is deployed in an electronic waybill management system, and the electronic waybill corresponds to an electronic waybill in the electronic waybill management system;
correspondingly, the life cycle of the electronic menu at least comprises one of the following nodes: printing, canceling, updating, delivering, collecting and signing.
Optionally, the electronic bill generating unit includes:
the request receiving subunit is used for receiving the request of the electronic waybill application;
the identification information generation subunit is used for generating identification information capable of uniquely identifying the electronic waybill according to a preset identification information generation rule;
the electronic waybill generating subunit is used for generating the electronic waybill with the identification information according to the information contained in the electronic waybill application request;
and the electronic waybill related information storage subunit is used for storing the related information of the electronic waybill.
Optionally, the preset identification information generation rule adopted by the identification information generation subunit includes:
the identification information of the electronic waybill is composed of the following parts: prefix, sequence number, suffix and check code; wherein the serial number is used to uniquely identify the electronic waybill.
Optionally, the serial number in the identification information generated by the identification information generating subunit is randomly acquired from the serial numbers to be allocated stored in a database-by-database and table-by-table manner.
Optionally, the electronic waybill related information stored in the electronic waybill related information storage subunit includes: the request for the electronic waybill application comprises information, identification information of the electronic waybill and state information of the electronic waybill in the life cycle of the electronic waybill.
Optionally, the information related to the electronic waybill updated by the electronic waybill operation execution unit includes: status information of the electronic waybill during its lifecycle.
Optionally, the electronic bill of surface operation risk determining unit includes:
and the electronic waybill operation correctness judgment subunit is used for judging whether the electronic waybill operation of the node conforms to the preset electronic waybill life cycle rule or not according to the state information of the electronic waybill, and if not, judging that the electronic waybill operation of the node has risks.
Optionally, when the electronic waybill is located at the printing node, the electronic waybill operation risk determining unit further includes:
the service relation checking subunit is used for checking whether the service relation related to the electronic waybill is valid or not;
the to-be-printed information verifying subunit is used for verifying whether the to-be-printed information of the electronic waybill conforms to the information of the electronic waybill when the electronic waybill is generated;
and the electronic waybill operation risk judgment subunit is used for receiving the result of the check subunit, and judging that the electronic waybill operation of the node has risk if the result output by any check subunit is negative.
Optionally, the information to be printed of the electronic waybill verified by the information to be printed verifying subunit includes: the identification information of the electronic waybill and the order number corresponding to the electronic waybill.
Optionally, when the electronic waybill is located at the cancel node, the electronic waybill operation risk determining unit further includes:
the service relation checking subunit is used for checking whether the service relation related to the electronic waybill is valid or not;
the identification information correctness checking subunit is used for checking whether the identification information of the electronic waybill conforms to a preset identification information generation rule or not;
the identification information generation system verification subunit is used for verifying whether the identification information of the electronic waybill is the electronic waybill identification information generated by the electronic waybill management system;
the cancellation operation correctness checking subunit is used for checking whether the cancellation operation of the node accords with a preset waybill cancellation rule or not;
and the electronic waybill operation risk judgment subunit is used for receiving the result of the check subunit, and judging that the electronic waybill operation of the node has risk if the result output by any check subunit is negative.
Optionally, the cancel operation correctness checking subunit is specifically configured to check whether the number of times of canceling the electronic waybill is smaller than a preset threshold; if yes, judging that the cancellation operation of the node accords with a preset waybill cancellation rule.
Optionally, the electronic single-operation execution unit includes:
a cancellation number updating subunit, configured to determine whether the electronic waybill is in a recovery pool; if yes, adding one operation to the cancellation times of the electronic waybill; if not, adding the electronic waybill into the recovery pool, and setting the cancellation times of the electronic waybill as one;
and the electronic waybill state information updating subunit is used for updating the state information of the electronic waybill.
Optionally, when the electronic waybill is located at the shipping node, the electronic waybill operation risk determination unit further includes:
the identification information correctness checking subunit is used for checking whether the identification information of the electronic waybill conforms to a preset identification information generation rule or not;
the identification information generation system verification subunit is used for verifying whether the identification information of the electronic waybill is the electronic waybill identification information generated by the electronic waybill management system;
and the electronic waybill operation risk judgment subunit is used for receiving the result of the check subunit, and judging that the electronic waybill operation of the node has risk if the result output by any check subunit is negative.
Optionally, when the electronic waybill is located at the collecting or signing node, the electronic waybill operation risk judgment unit further includes:
the identification information correctness checking subunit is used for extracting the identification information of the electronic waybill from the logistics information fed back by the electronic waybill receiver and checking whether the identification information of the electronic waybill meets a preset identification information generation rule or not;
the electronic waybill applicant checking subunit is used for checking whether an applicant exists in the electronic waybill by inquiring a database for storing the related information of the electronic waybill;
and the electronic waybill operation risk judgment subunit is used for receiving the result of the check subunit, and judging that the electronic waybill operation of the node has risk if the result output by any check subunit is negative.
Optionally, the identification information correctness checking subunit is specifically configured to check whether the identification information of the electronic waybill conforms to a regular expression corresponding to a preset identification information generation rule.
Optionally, the risk control operation execution unit is specifically configured to refuse to execute an electronic service order operation of the node; or, executing the electronic surface list operation of the node and carrying out corresponding alarm processing.
An embodiment of the present application further provides an electronic device, as shown in fig. 8, which is a schematic diagram of an embodiment of the electronic device of the present application. An electronic device of this embodiment, the electronic device includes:
a display 801;
a processor 802;
a memory 803, configured to store an electronic bill risk control file, where the electronic bill risk control file, when executed by the processor, generates an electronic bill according to an electronic bill application request, and records relevant information of the electronic bill; executing the following steps at each node of the life cycle of the electronic bill: judging whether the electronic bill operation of the node has risks or not according to the related information of the electronic bill; if so, executing corresponding risk control operation according to a preset risk control strategy; and if not, executing corresponding electronic bill operation and updating the related information of the electronic bill.
The above embodiments of the electronic bill risk control method, device and electronic device provided by the present application are introduced in detail, and a specific example is applied in the present application to explain the principle and implementation manner of the present application, and the description of the above embodiments is only used to help understanding the method and core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, the specific embodiments and the application range may be changed. In view of the above, the description should not be taken as limiting the application.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
1. Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
2. As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.