Disclosure of Invention
Therefore, the invention provides a block chain-based point issuing and recycling system, which is used for overcoming the problem that the prior art still lacks a high-efficiency, strong-safety, rapid and effective block chain-based point issuing and recycling system.
In order to achieve the above object, the present invention provides a block chain based point issuing and recovering system, including:
the new account creation module is used for creating an account in the block chain and creating an account key;
the behavior judgment module is used for judging the behavior of the account and transmitting the judgment result;
the integral checking module is used for checking and determining the key and the integral condition of the account and transmitting the checking result;
the integral settlement module is respectively connected with the behavior judgment module and the integral checking module and used for receiving the judgment result of the behavior judgment module and the checking result transmitted by the integral checking module and executing the judgment result and the checking result, the integral settlement module comprises an integral issuing module and an integral recycling module, the integral issuing module is used for issuing the integral to the account, and the integral recycling module is used for recycling the integral in the account;
the point encryption storage module is connected with the point settlement module and used for encrypting and storing the point transaction information of the account and encrypting and compressing the encrypted account point information in a block chain within preset time;
the behavior judgment module determines the integral behavior according to the behavior type of the account, correspondingly determines the budget value of the integral behavior of the account, and transmits the judgment result to the integral settlement module, the integral verification module verifies and determines the key and the integral condition of the account, the integral verification module determines the key of the account according to the key of the account, when the account determined by the integral verification module is Zi, the integral verification module compares the key of the account with the key Mi in the system, if the comparison results are the same, the account verification is passed, if the comparison results are different, the account verification is failed, the integral verification module transmits the integral information of the account passing the account verification to the integral settlement module, the integral verification module returns the account failing to be verified, and the integral settlement module combines the judgment result of the behavior judgment module with the account integral transmitted by the integral verification module The information carries out integral settlement on the account;
the point issuing module receives the ith preset value of the point preset by the BS of the point behavior transmitted by the behavior judging module, issues the account points by combining point data transmitted by the point checking module, directly issues the account on the received account points, and transmits the result of point settlement to the point encryption storage module for encryption storage;
the integral recovery module receives the ith preset value of the integral preset by the BS of the integral action transmitted by the action judgment module, and recovers the account integral by combining the integral data transmitted by the integral verification module, the integral recovery module compares the account integral data with the ith preset value, and when the comparison result is within the range, the integral recovery module recovers the account integral and transmits the integral settlement result to the integral encryption storage module for encryption storage.
Further, a behavior type matrix group a, a (a1, a2, A3 … An) is stored in the behavior determination module, wherein a1 represents a first preset behavior matrix of the account, a2 represents a second preset behavior matrix of the account, A3 represents a third preset behavior matrix of the account, and An represents An nth preset behavior matrix of the account;
for the ith account preset behavior type Ai, i is 1, 2, 3 … n, Ai (Ai1, Ai2, Ai3,. Ain), wherein Ai1 is a first preset value of the ith account preset behavior, Ai2 is a second preset value of the ith account preset behavior, Ai3 is a third preset value of the ith account preset behavior, and Ain is an nth preset value of the ith account preset behavior.
Further, an integral behavior matrix group B (B1, B2, B3 … Bn) is stored in the behavior determination module, where B1 represents a first preset integral behavior matrix, B2 represents a second preset integral behavior matrix, B3 represents a third preset integral behavior matrix, and Bn represents an nth preset integral behavior matrix;
for the ith integration behavior of the account, Bi, i is 1, 2, 3 … n, Bi (Bi1, Bi2, Bi 3.. Bin), wherein Bi1 is a first integral value of the ith preset integration, Bi2 is a second integral value of the ith preset integration, Bi3 is a third integral value of the ith preset integration, and Bin is an nth integral value of the ith preset integration.
Furthermore, the behavior judgment module determines the point behavior according to the behavior type of the account, sets the behavior of the account AS AS, and then,
if the AS belongs to A1, the behavior judgment module determines that the behavior type of the account is A1 and the point behavior is B1;
if the AS belongs to A2, the behavior judgment module determines that the behavior type of the account is A2 and the point behavior is B2;
if the AS belongs to A3, the behavior judgment module determines that the behavior type of the account is A3 and the point behavior is B3;
and if the AS belongs to An, the behavior judgment module determines that the behavior type of the account is An and determines that the integral behavior is Bn.
Furthermore, the behavior judgment module determines the credit behavior according to the behavior type ASi of the account, sets the credit behavior of the account as BS, and then determines the credit behavior BSi of the account according to the behavior ASi of the account,
if the ASi is not more than AS1, the behavior judgment module determines that the integral behavior is the first preset value of the BS preset integral;
if the AS1 is larger than the ASi and is not larger than the AS2, the behavior judgment module determines a second preset value of the preset integral of the BS-th integral behavior;
if the AS2 is larger than the ASi and is not larger than the AS3, the behavior judgment module determines a third preset value of the preset integral of the BS-th integral behavior;
if AS (n-1) < ASi < ASn, the behavior judgment module determines the nth preset value of the integral preset by the BS-th integral of the integral behavior;
and the behavior judgment module transmits the judgment result to the integral settlement module.
Further, the integral checking module checks and determines the key and the integral condition of the account, and an account matrix Z and a key matrix M are preset in the integral checking module;
for the account matrix Z (Z1, Z2, Z3 … Zn), wherein Z1 represents a first preset account, Z2 represents a second preset account, Z3 represents a third preset account, and Zn represents an nth preset account;
for the key matrix M (M1, M2, M3 … Mn), M1 represents a first preset key, M2 represents a second preset key, M3 represents a third preset key, and Mn represents an nth preset key.
Further, the credit check module checks and determines the key of the account according to the key of the account,
when the account determined by the credit check module is Z1, the credit check module compares the key of the account with the key M1 in the system, if the comparison result is the same, the verification of the account is passed, and if the comparison result is different, the verification of the account is not passed;
when the account determined by the credit check module is Z2, the credit check module compares the key of the account with the key M2 in the system, if the comparison result is the same, the verification of the account is passed, and if the comparison result is different, the verification of the account is not passed;
when the account determined by the credit check module is Z3, the credit check module compares the key of the account with the key M3 in the system, if the comparison result is the same, the verification of the account is passed, and if the comparison result is different, the verification of the account is not passed;
when the account determined by the point checking module is Zn, the point checking module compares the key of the account with the key Mn in the system, if the comparison results are the same, the checking of the account is passed, and if the comparison results are different, the checking of the account is not passed;
the credit checking module transmits credit information of the account passing the account checking to the credit settlement module, and the credit checking module returns the account failing the account checking to re-verify the account.
Furthermore, the integral settlement module performs integral settlement on the account according to the judgment result of the behavior judgment module and the account integral information transmitted by the integral verification module;
setting integral behaviors B1 to Bx as an integral issuing matrix, setting integral behaviors Bx to Bn as an integral recycling matrix, determining integral behaviors according to the integral behavior matrix group by the integral settlement module, if the judgment result of the behavior judgment module belongs to B1 to Bx, processing the data transmitted by the behavior judgment module by the integral issuing module, and if the judgment result of the behavior judgment module belongs to Bx to Bn, processing the data transmitted by the behavior judgment module by the integral recycling module.
Furthermore, the ith preset value of the preset integral is received by the integral issuing module from the integral action BS transmitted by the action judging module, the integral of the account is issued by combining the integral data transmitted by the integral checking module, the account integral data transmitted by the integral checking module is set to be X, the ith preset value is issued by the integral issuing module on the basis of X to serve as a settlement result, and the settlement result of the integral is transmitted to the integral encryption storage module to be encrypted and stored.
Furthermore, the integral recovery module receives the ith preset value of the integral preset by the BS of the integral action transmitted by the action judgment module, recovers the account integral by combining the integral data transmitted by the integral verification module, sets the account integral data transmitted by the integral verification module as X, and compares the account integral data X with the ith preset value by the integral recovery module,
if the account point data X is larger than or equal to the ith preset value, the point recovery module recovers the account points;
if the account point data X is smaller than the ith preset value, the point recovery module judges that the account points are insufficient;
when the integral recovery module recovers the account integral, the integral recovery module recovers the ith preset value as a settlement result on the basis of X, and transmits the integral settlement result to the integral encryption storage module for encryption storage.
Compared with the prior art, the invention has the advantages that the invention provides a block chain-based point issuing and recycling system, the point behavior is determined according to the behavior type of the account by the behavior determination module, the budget value of the point behavior of the account is correspondingly determined, the determination result is transmitted to the point settlement module, the key of the account is determined by the point verification module according to the key of the account, the point settlement module receives the determination result of the behavior determination module and the verification result transmitted by the point verification module, executes the determination result and the verification result, the point issuing and recycling of the account are completed, the platform-related data involved in the point operation process is avoided through the operation between each node of the block chain and the point-to-point operation, the data operation is reduced, and the operation efficiency of the point operation is improved, and the block chain technology is adopted to distribute and recover the integral, so that the distribution and recovery efficiency of the integral is effectively improved.
Furthermore, the behavior judgment module clearly determines the integral behavior corresponding to the behavior type through the built-in behavior type matrix group and the integral behavior matrix group, and further improves the issuing and recycling efficiency of the integral.
Particularly, the account behavior is judged, the credit behavior of the account is determined correspondingly to whether the behavior of the account is purchasing or exchanging or zero clearing operation, the preset value of the credit is determined correspondingly according to the preset value corresponding to the account behavior, the account behavior is determined gradually in a gradual progressive mode, the condition that disorder occurs in the judgment of the account behavior is avoided, and the data accuracy of the system is improved.
Particularly, the account behavior is judged, the credit behavior of the account is determined correspondingly to whether the behavior of the account is purchasing or exchanging or zero clearing operation, the preset value of the credit is determined correspondingly according to the preset value corresponding to the account behavior, the account behavior is determined gradually in a gradual progressive mode, the condition that disorder occurs in the judgment of the account behavior is avoided, and the data accuracy of the system is improved.
Furthermore, before the operation is performed on the data of the account and the point, the key corresponding to the account is verified firstly, if the verification is passed, the account is operated by the user, if the verification is not passed, the risk that the account is stolen may exist, the link of account verification is increased, and the safety of the system can be improved.
Detailed Description
In order that the objects and advantages of the invention will be more clearly understood, the invention is further described below with reference to examples; it should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only for explaining the technical principle of the present invention, and do not limit the scope of the present invention.
It should be noted that in the description of the present invention, the terms of direction or positional relationship indicated by the terms "upper", "lower", "left", "right", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings, which are only for convenience of description, and do not indicate or imply that the device or element must have a specific orientation, be constructed in a specific orientation, and be operated, and thus, should not be construed as limiting the present invention.
Furthermore, it should be noted that, in the description of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
Fig. 1 is a functional block diagram of an integral issuing and recycling system based on a block chain according to an embodiment of the present invention, including:
the new account creation module is used for creating an account in the block chain and creating an account key;
the behavior judgment module is used for judging the behavior of the account and transmitting the judgment result;
the integral checking module is used for checking and determining the key and the integral condition of the account and transmitting the checking result;
the integral settlement module is respectively connected with the behavior judgment module and the integral checking module and used for receiving the judgment result of the behavior judgment module and the checking result transmitted by the integral checking module and executing the judgment result and the checking result, the integral settlement module comprises an integral issuing module and an integral recycling module, the integral issuing module is used for issuing the integral to the account, and the integral recycling module is used for recycling the integral in the account;
and the point encryption storage module is connected with the point settlement module and used for encrypting and storing the point transaction information of the account and encrypting and compressing the encrypted account point information in a block chain within a preset time.
Specifically, in the embodiment of the present invention, the behavior determination module determines an integral behavior according to a behavior type of an account, and correspondingly determines a budget value of the integral behavior of the account, and transmits a determination result to the integral settlement module, the integral verification module verifies and determines a key and an integral condition of the account, the integral verification module determines a key of the account according to the key of the account, when the account determined by the integral verification module is Zi, the integral verification module compares the key of the account with a key Mi in a system, if the comparison results are the same, the account verification is passed, if the comparison results are different, the account verification is failed, the integral verification module transmits integral information of the account passing the account verification to the integral settlement module, and the integral verification module returns to re-verify the account failing the account verification, and the integral settlement module performs integral settlement on the account according to the judgment result of the behavior judgment module and the account integral information transmitted by the integral verification module.
Specifically, in the embodiment of the present invention, the point issuing module receives the ith preset value of the preset point of the BS of the point transmitted by the point behavior determining module, issues the account point in combination with the point data transmitted by the point checking module, and the point issuing module directly issues the account on the received account point and transmits the result of point settlement to the point encrypting storage module for encrypting storage;
specifically, in the embodiment of the present invention, the integral recovery module receives the ith preset value of the preset integral of the BS-th preset integral of the integral behavior transmitted by the behavior determination module, and recovers the account integral in combination with the integral data transmitted by the integral verification module, the integral recovery module first compares the account integral data with the ith preset value, and when the comparison result is within the range, the integral recovery module recovers the account integral and transmits the integral settlement result to the integral encryption storage module for encryption storage.
Specifically, in the embodiment of the present invention, a behavior type matrix group a, a (a1, a2, A3 … An) is stored in the behavior determination module, where a1 represents a first preset behavior matrix of An account, a2 represents a second preset behavior matrix of the account, A3 represents a third preset behavior matrix of the account, and An represents An nth preset behavior matrix of the account;
specifically, in the embodiment of the present invention, for the ith preset behavior type of the account, i is 1, 2, 3 … n, Ai (Ai1, Ai2, Ai3,. Ain), where Ai1 is a first preset value of the ith preset behavior of the account, Ai2 is a second preset value of the ith preset behavior of the account, Ai3 is a third preset value of the ith preset behavior of the account, and Ain is an nth preset value of the ith preset behavior of the account.
Specifically, the embodiment of the present invention does not limit the specific behavior type, a1 may indicate that the customer has purchased, a11 may indicate that the customer has purchased 100, a2 may indicate that the customer has performed the redemption, and a21 may indicate that the customer has redeemed 10 money.
Specifically, in the embodiment of the present invention, an integral behavior matrix group B (B1, B2, B3 … Bn) is stored in the behavior determination module, where B1 represents a first preset integral behavior matrix, B2 represents a second preset integral behavior matrix, B3 represents a third preset integral behavior matrix, and Bn represents an nth preset integral behavior matrix;
specifically, in the embodiment of the present invention, for the ith integration action of the account, Bi, i is 1, 2, 3 … n, Bi (Bi1, Bi2, Bi 3.. Bin), where Bi1 is a first integral value of the ith preset integration, Bi2 is a second integral value of the ith preset integration, Bi3 is a third integral value of the ith preset integration, and Bin is an nth integral value of the ith preset integration.
Specifically, in the embodiment of the present invention, a specific action type is not limited to a preset value of an integral of an order, and a hundred rmb of a purchasing action may be set to correspond to one point, or a thousand rmb of the purchasing action may be set to correspond to one point, for example, B1 may be set to be an integral increase type, Bn may be a point decrease type, B11 may be expressed as an integral increase one point, or may be expressed as a point increase ten point, and the specific preset value is determined by specific implementation.
Specifically, in the embodiment of the present invention, the behavior determination module determines the point behavior according to the behavior type of the account, sets the behavior of the account AS an AS, and then,
if the AS belongs to A1, the behavior judgment module determines that the behavior type of the account is A1 and the point behavior is B1;
if the AS belongs to A2, the behavior judgment module determines that the behavior type of the account is A2 and the point behavior is B2;
if the AS belongs to A3, the behavior judgment module determines that the behavior type of the account is A3 and the point behavior is B3;
and if the AS belongs to An, the behavior judgment module determines that the behavior type of the account is An and determines that the integral behavior is Bn.
Specifically, the embodiment of the invention judges the behavior of the account, firstly determines the point behavior of the account corresponding to the operation of purchasing, exchanging or clearing the behavior of the account, then determines the preset value of the point corresponding to the preset value corresponding to the behavior of the account, and gradually determines the behavior of the account in a gradual progressive mode, thereby avoiding the occurrence of disorder judgment on the behavior of the account, and improving the data accuracy of the system.
Specifically, in the embodiment of the present invention, the behavior determination module determines a credit behavior according to the behavior type ASi of the account, sets the credit behavior of the account as BS, and then determines the credit behavior BSi of the account according to the behavior ASi of the account,
if the ASi is not more than AS1, the behavior judgment module determines that the integral behavior is the first preset value of the BS preset integral;
if the AS1 is larger than the ASi and is not larger than the AS2, the behavior judgment module determines a second preset value of the preset integral of the BS-th integral behavior;
if the AS2 is larger than the ASi and is not larger than the AS3, the behavior judgment module determines a third preset value of the preset integral of the BS-th integral behavior;
if AS (n-1) < ASi < ASn, the behavior judgment module determines the nth preset value of the integral preset by the BS-th integral of the integral behavior;
and the behavior judgment module transmits the judgment result to the integral settlement module.
Specifically, in the embodiment of the present invention, the integral checking module checks and determines a key and an integral condition of an account, and an account matrix Z and a key matrix M are preset in the integral checking module;
specifically, in the embodiment of the present invention, for the account matrix Z (Z1, Z2, Z3 … Zn), where Z1 represents a first preset account, Z2 represents a second preset account, Z3 represents a third preset account, and Zn represents an nth preset account;
specifically, in the embodiment of the present invention, for the key matrix M (M1, M2, M3 … Mn), M1 represents a first preset key, M2 represents a second preset key, M3 represents a third preset key, and Mn represents an nth preset key.
Specifically, in the embodiment of the present invention, the credit verification module verifies and determines the key of the account according to the key of the account,
when the account determined by the credit check module is Z1, the credit check module compares the key of the account with the key M1 in the system, if the comparison result is the same, the verification of the account is passed, and if the comparison result is different, the verification of the account is not passed;
when the account determined by the credit check module is Z2, the credit check module compares the key of the account with the key M2 in the system, if the comparison result is the same, the verification of the account is passed, and if the comparison result is different, the verification of the account is not passed;
when the account determined by the credit check module is Z3, the credit check module compares the key of the account with the key M3 in the system, if the comparison result is the same, the verification of the account is passed, and if the comparison result is different, the verification of the account is not passed;
when the account determined by the point checking module is Zn, the point checking module compares the key of the account with the key Mn in the system, if the comparison results are the same, the checking of the account is passed, and if the comparison results are different, the checking of the account is not passed;
the credit checking module transmits credit information of the account passing the account checking to the credit settlement module, and the credit checking module returns the account failing the account checking to re-verify the account.
Specifically, in the embodiment of the present invention, before operating on the data of the account and the point, the key corresponding to the account is verified first, if the verification passes, the account is operated by the user, and if the verification fails, the account may be stolen, so that the link of account verification is added, and the security of the system can be improved.
Specifically, in the embodiment of the present invention, the point settlement module performs point settlement on the account according to the judgment result of the behavior judgment module in combination with the account point information transmitted by the point verification module.
Specifically, in the embodiment of the present invention, the integral behaviors B1 to Bx are set as an integral issuing matrix, the integral behaviors Bx to Bn are set as an integral recovering matrix, the integral settlement module determines the integral behaviors according to the integral behavior matrix set, if the judgment result of the behavior judgment module belongs to B1 to Bx, the integral issuing module processes the data transmitted by the behavior judgment module, and if the judgment result of the behavior judgment module belongs to Bx to Bn, the integral recovering module processes the data transmitted by the behavior judgment module.
Specifically, in the embodiment of the present invention, the integral issuing module receives the ith preset value of the preset integral of the BS-th preset integral of the integral behavior transmitted by the behavior judging module, issues the account integral in combination with the integral data transmitted by the integral checking module, and sets the account integral data transmitted by the integral checking module to be X, so that the integral issuing module issues the ith preset value as a settlement result on the basis of X, and transmits the settlement result to the integral encrypting and storing module for encrypting and storing.
Specifically, in the embodiment of the present invention, the integral recovery module receives the ith preset value of the integral preset by the BS in the integral action transmitted by the action judgment module, recovers the account integral in combination with the integral data transmitted by the integral verification module, sets the account integral data transmitted by the integral verification module to be X, and the integral recovery module compares the account integral data X with the ith preset value,
if the account point data X is larger than or equal to the ith preset value, the point recovery module recovers the account points;
if the account point data X is smaller than the ith preset value, the point recovery module judges that the account points are insufficient;
when the integral recovery module recovers the account integral, the integral recovery module recovers the ith preset value as a settlement result on the basis of X, and transmits the integral settlement result to the integral encryption storage module for encryption storage.
So far, the technical solutions of the present invention have been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of the present invention is obviously not limited to these specific embodiments. Equivalent changes or substitutions of related technical features can be made by those skilled in the art without departing from the principle of the invention, and the technical scheme after the changes or substitutions can fall into the protection scope of the invention.