Disclosure of Invention
In view of the above, an object of the present invention is to provide a service processing method based on a block chain and a service processing system based on a block chain, so as to solve the problem in the prior art that it is difficult to effectively process a composite service.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical solutions:
a service processing method based on a block chain comprises the following steps:
acquiring service processing request information sent by service request equipment, wherein the service processing request information comprises a to-be-processed service requested to be processed by the service request equipment;
judging whether the service to be processed is a preset first service to be processed, wherein the first service to be processed comprises at least two sub-services to be processed;
if the to-be-processed service is the first to-be-processed service, performing first processing on each to-be-processed sub-service included in the to-be-processed service by using a first block link point group pre-configured for the to-be-processed sub-service to obtain a first processing result of the to-be-processed sub-service, wherein the first block link point group includes at least two block link nodes;
and for the first processing result of each sub service to be processed, performing second processing on the first processing result by utilizing a second block chain link point group which is pre-configured for the sub service to be processed to obtain a corresponding second processing result, wherein the second block chain link point group comprises at least two block chain nodes.
In a preferred selection of the embodiment of the present application, in the service processing method based on a block chain, the method further includes a step of pre-configuring the first block chain node group and the second block chain node group, where the step includes:
determining a target block chain set in a plurality of preset block chain sets, wherein the target block chain set comprises a first block chain corresponding to each of at least two to-be-processed sub-services of the first to-be-processed service;
acquiring service type information of the sub-service to be processed corresponding to each first block chain in the target block chain set and service data volume information of the sub-service to be processed corresponding to each first block chain;
determining service type related information between the at least two sub services to be processed according to the service type information of each of the at least two sub services to be processed;
for each sub service to be processed, determining a first number of block chain link points for processing the sub service to be processed based on the service type related information and the service type information corresponding to the sub service to be processed;
for each sub-service to be processed, at least utilizing the block chain nodes with the first quantity in the block chain link point set of the first block chain corresponding to the sub-service to be processed to form a first block chain node group for processing the sub-service to be processed;
determining the service data volume related information between the at least two sub services to be processed according to the service data volume information of each of the at least two sub services to be processed;
for each sub service to be processed, determining a second number of block link points for processing the sub service to be processed based on the service data volume related information and the service data volume information corresponding to the sub service to be processed;
and aiming at each sub-service to be processed, at least utilizing the block chain nodes with the second quantity in the block chain link point set of the first block chain corresponding to the sub-service to be processed to form a second block chain node group for processing the sub-service to be processed.
In a preferred selection of the embodiment of the present application, in the service processing method based on a block chain, the step of determining a target block chain set in a plurality of preset block chain sets includes:
constructing a plurality of block chain sets with different numbers of block chains, wherein each block chain set comprises at least two block chains, different block chains belonging to the same block chain set are deployed at block chain nodes in the same block chain node set, different block chains not belonging to the same block chain set are deployed at block chain link points in different block chain link point sets, different block chain node sets are composed of different block chain link points, a trust relationship is formed between any two block chain nodes in the same block chain link point set, and any two block chain nodes in different block chain link point sets do not have a trust relationship;
performing service decomposition on the first to-be-processed service based on whether the service types are the same or not to obtain at least two to-be-processed sub-services, wherein the service types of each to-be-processed sub-service are different;
and determining a target block chain set at least based on the target number of the sub services to be processed in the plurality of block chain sets, wherein the number of the block chains included in the target block chain set is not less than the target number.
In a preferred option of the embodiment of the present application, in the service processing method based on a block chain, the step of determining, according to the service type information of each to-be-processed sub-service of the at least two to-be-processed sub-services, service type related information between the at least two to-be-processed sub-services includes:
determining type grade information corresponding to the service type information based on a first corresponding relation established in advance aiming at the service type information of each to-be-processed sub service in the at least two to-be-processed sub services to obtain at least two types of grade information, wherein the first corresponding relation comprises the corresponding relation between various service type information and various types of grade information, and the grade represented by the type grade information has a positive correlation with the predetermined importance degree and/or complexity degree of the corresponding service type information;
calculating to obtain first-grade discrete degree information between the at least two sub services to be processed based on the at least two types of grade information, wherein the first-grade discrete degree information is used for representing the discrete degree of the at least two types of grade information on the types of grades;
and taking the first-level discrete degree information as the service type related information between the at least two sub services to be processed.
In a preferred choice of the embodiment of the present application, in the service processing method based on a block chain, the step of calculating, based on the at least two types of level information, to obtain first level dispersion degree information between the at least two sub services to be processed includes:
calculating average type grade information based on the at least two types of grade information;
and performing average difference calculation based on the at least two types of grade information and the average type grade information to obtain first grade discrete degree information between the at least two sub services to be processed.
In a preferred option of the embodiment of the present application, in the service processing method based on a block chain, the step of determining, according to the service data volume information of each to-be-processed sub-service of the at least two to-be-processed sub-services, service data volume related information between the at least two to-be-processed sub-services includes:
for the service data volume information of each to-be-processed sub-service in the at least two to-be-processed sub-services, determining data volume grade information corresponding to the service data volume information based on a pre-established second corresponding relationship to obtain at least two data volume grade information, wherein the second corresponding relationship comprises the corresponding relationship between various service data volume information and various data volume grade information, and the grade represented by the data volume grade information has a positive correlation with the data volume represented by the corresponding service data volume information;
calculating to obtain second-level discrete degree information between the at least two sub-services to be processed based on the at least two data volume level information, wherein the second-level discrete degree information is used for representing the discrete degree of the at least two data volume level information on the data volume level;
and taking the second-level discrete degree information as the related information of the service data volume between the at least two sub services to be processed.
In a preferred selection of the embodiment of the present application, in the service processing method based on a block chain, the step of calculating, based on the at least two data volume level information, to obtain second level dispersion degree information between the at least two sub services to be processed includes:
calculating average data volume level information based on the at least two data volume level information;
and performing average difference calculation based on the at least two data volume grade information and the average data volume grade information to obtain second-grade discrete degree information between the at least two sub-services to be processed.
In a preferred selection of the embodiment of the present application, in the service processing method based on a block chain, the step of performing, for each to-be-processed sub-service included in the to-be-processed service, a first process on the to-be-processed sub-service by using a first block chain link point group pre-configured for the to-be-processed sub-service to obtain a first processing result of the to-be-processed sub-service includes:
based on the target data of the target field in the service processing request information, searching a target image corresponding to the target data in a first target database, wherein the target image comprises the facial feature information of a target user corresponding to the service processing request information;
obtaining the facial feature information from the target image based on a preset feature extraction algorithm, and taking the facial feature information as user identification information of the service to be processed;
finding out associated identification information corresponding to the user identification information in the first target database based on the user identification information, wherein the associated identification information comprises associated text characteristic information and associated image characteristic information;
aiming at each sub-service to be processed included in the sub-service to be processed, verifying the user identification information, the associated text characteristic information and the associated image characteristic information respectively by utilizing each block chain node in the first block chain node group corresponding to the sub-service to be processed based on a preset first consensus algorithm and combining verification reference information existing in a local database of each block chain node;
after the user identification information, the associated text feature information and the associated image feature information are verified respectively, for each sub-service to be processed, decomposing the sub-service to be processed into a plurality of partial services based on the logical relationship among the services in the sub-service to be processed and the number of block chain nodes included in the first block chain link point group corresponding to the sub-service to be processed;
for each sub-service to be processed, processing each part of the sub-services to be processed by using each block chain link point in the first block chain node group corresponding to the sub-service to be processed to obtain a plurality of corresponding first processing sub-results;
and generating a first processing result based on the plurality of first processing sub-results and the logic relationship between the partial services corresponding to the first processing sub-results.
In a preferred option of this embodiment, in the service processing method based on a block chain, the step of performing, for a first processing result of each to-be-processed sub-service, second processing on the first processing result by using the corresponding second block chain link point group of the to-be-processed sub-service to obtain a corresponding second processing result includes:
based on the target data of the target field in the service processing request information, searching a target image corresponding to the target data in a second target database, wherein the target image comprises the facial feature information of the target user corresponding to the service processing request information;
obtaining the facial feature information from the target image based on a preset feature extraction algorithm, and taking the facial feature information as user identification information of the service to be processed;
finding out associated identification information corresponding to the user identification information in the second target database based on the user identification information, wherein the associated identification information comprises associated text characteristic information and associated image characteristic information;
for each sub-service to be processed, verifying the user identification information, the associated text characteristic information and the associated image characteristic information respectively by using each block chain node in the second block chain node group corresponding to the sub-service to be processed and combining verification reference information existing in a local database of each block chain node based on a preset second consensus algorithm;
after the user identification information, the associated text feature information and the associated image feature information are verified respectively, for each sub-service to be processed, time stamp marking processing is performed on a first processing result corresponding to the sub-service to be processed by using a target block chain link point deduced from each block chain link point in the second block chain node group corresponding to the sub-service to be processed, a data block with a time stamp is generated, and the data block is used as a second processing result.
On the basis, an embodiment of the present application further provides a service processing system based on a block chain, including a routing node and a block chain node, where the routing node is configured to execute the steps included in the service processing method, so as to process a service to be processed by using the block chain node.
The block chain-based service processing method and the block chain-based service processing system provided by the application utilize the block chain link point groups which are respectively pre-configured for each to-be-processed sub-service included in the to-be-processed service, and respectively process each to-be-processed sub-service, so that the purpose of respectively processing each sub-service in the composite service can be realized, and thus, on the basis of ensuring the safety of data processing, the composite service can be effectively processed, the problem that the composite service is difficult to effectively process in the prior art can be improved, and the block chain-based service processing method and the block chain-based service processing system have higher practical value.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
As shown in fig. 1, an embodiment of the present application provides a service processing system 10 based on a block chain. The traffic processing system may include a routing node 20 and a block link point 30 communicatively coupled to the routing node 20.
In detail, the routing node 20 may be further communicatively connected with a service request device. In this way, when acquiring the service processing request information sent by the service request device, the routing node 20 may utilize the block chain node 30 to process the service to be processed included in the service processing request information.
As shown in fig. 2, the present embodiment provides a routing node 20. The routing node 20 may comprise, among other things, a memory, a processor, and a blockchain based traffic processing device 100.
In detail, the memory and the processor are electrically connected directly or indirectly to realize data transmission or interaction. For example, they may be electrically connected to each other via one or more communication buses or signal lines. The memory may store at least one software functional module, which may be in the form of software or firmware (firmware), such as the service processing device 100 based on the blockchain. The processor may be configured to execute an executable computer program stored in the memory, such as the block chain based service processing apparatus 100, so as to implement the block chain based service processing method provided in the embodiment of the present application (described later).
Alternatively, the Memory may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
Also, the Processor may be a general-purpose Processor including a Central Processing Unit (CPU), a Network Processor (NP), a System on Chip (SoC), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
It will be appreciated that the routing node 20 may be a server having data processing capabilities.
Moreover, the structure shown in fig. 2 is only an illustration, and the routing node 20 may further include more or fewer components than those shown in fig. 2, or have a different configuration from that shown in fig. 2, for example, may further include a communication unit for performing information interaction with other devices (such as a block-linked point 30 or a service request device, where the block-linked point 30 may be a server, or may be a terminal device).
With reference to fig. 3, an embodiment of the present application further provides a service processing method based on a block chain, which is applicable to the routing node 20. Wherein, the method steps defined by the flow related to the service processing method based on the block chain may be implemented by the routing node 20.
The specific process shown in fig. 3 will be described in detail below.
Step S110, obtain service processing request information sent by the service request device.
In this embodiment, after establishing a communication connection with the service request device (which may be a terminal device, or a server), the routing node 20 may obtain service processing request information sent by the service request device.
The service processing request information may include a service to be processed, which is requested to be processed by the service request device, that is, a service that needs to be processed by the routing node 20.
Step S120, determining whether the service to be processed is a preset first service to be processed.
In this embodiment, after obtaining the service processing request information based on step S110, the routing node 20 may further determine whether the service to be processed included in the service processing request information belongs to a preset first service to be processed.
The first to-be-processed service includes at least two to-be-processed sub-services, that is, the first to-be-processed service is a composite service and is composed of at least two to-be-processed sub-services.
And, when it is determined that the service to be processed is the first service to be processed, that is, the service to be processed is the composite service corresponding to the first service to be processed, step S130 may be executed.
Step S130, for each sub-service to be processed included in the sub-service to be processed, performing a first processing on the sub-service to be processed by using a first block link node group pre-configured for the sub-service to be processed, so as to obtain a first processing result of the sub-service to be processed.
In this embodiment, when it is determined that the service to be processed is the first service to be processed based on step S120, for each sub-service to be processed included in the service to be processed, the routing node 20 may perform first processing on the sub-service to be processed by using a first block chain node group configured in advance for the sub-service to be processed, so as to obtain a first processing result of the sub-service to be processed.
That is to say, each sub service to be processed corresponds to a first block chain node group, and each first block chain node group is used for performing first processing on a sub service to be processed. Each first blockchain node group may include at least two blockchain nodes, so that each sub-service to be processed may be processed based on the at least two blockchain nodes.
Step S140, for the first processing result of each sub-service to be processed, performing a second processing on the first processing result by using a second block link point group pre-configured for the sub-service to be processed, so as to obtain a corresponding second processing result.
In this embodiment, after obtaining the first processing result corresponding to each to-be-processed sub-service based on step S130, for each first processing result, the routing node 20 may further perform second processing on the first processing result by using a second block chain node group configured in advance for the to-be-processed sub-service corresponding to the first processing result, so as to obtain a corresponding second processing result.
That is to say, each to-be-processed sub-service corresponds to a second block chain node group, and each second block chain node group is configured to perform second processing on the first processing result corresponding to the to-be-processed sub-service. Each second blockchain node group may include at least two blockchain nodes, so that each first processing result may be processed based on the at least two blockchain nodes.
Based on the method, each sub-service to be processed can be processed by utilizing the block chain link point group which is respectively pre-configured for each sub-service to be processed and comprises the sub-service to be processed, and the aim of respectively processing each sub-service in the composite service can be fulfilled. Moreover, each sub-service to be processed is subjected to two-stage first processing and second processing through the first block chain node group and the second block chain node group, so that the data processing safety is higher.
In the first aspect, it should be noted that, in step S130, a specific manner of performing the first processing on the sub-service to be processed is not limited, and may be selected according to an actual application requirement.
For example, in an alternative example, step S130 may include the following sub-steps:
firstly, user identification information of the service to be processed can be obtained;
secondly, for each sub-service to be processed, verifying the user identification information by using each block chain node in the first block chain node group corresponding to the sub-service to be processed;
then, after the user identification information is verified, for each sub-service to be processed, processing a part of services in the sub-service to be processed by using each block link point in the first block link node group corresponding to the sub-service to be processed, so as to obtain a plurality of corresponding first processing sub-results;
finally, a first processing result may be generated based on a logical relationship between the plurality of first processing sub-results and the portion of the service corresponding to each of the first processing sub-results.
For another example, in another alternative example, step S130 may include the following sub-steps:
a first step of finding a target image corresponding to target data in a first target database (which may be pre-established based on a requirement) based on target data of a target field (which may be pre-configured for different target users) in the service processing request information, where the target image includes facial feature information of the target user corresponding to the service processing request information;
secondly, the facial feature information can be obtained from the target image based on a preset feature extraction algorithm (an image feature extraction model based on deep learning), and the facial feature information is used as the user identification information of the service to be processed;
a third step of finding out associated identification information corresponding to the user identification information in the first target database based on the user identification information, wherein the associated identification information includes associated text characteristic information (characteristic information existing in a text form) and associated image characteristic information (characteristic information existing in an image form);
fourthly, for each sub-service to be processed included in the sub-service to be processed, verifying the user identification information, the associated text feature information and the associated image feature information respectively by using each block chain node in the first block chain node group corresponding to the sub-service to be processed, based on a preset first consensus algorithm, in combination with verification reference information (such as pre-stored user identification information, associated text feature information and associated image feature information, or information having a specific relationship with the user identification information, associated text feature information and associated image feature information) existing in a local database of each block chain node;
the fifth step may be that after the user identification information, the associated text feature information and the associated image feature information are verified respectively, for each sub service to be processed, decomposing the sub service to be processed into a plurality of partial services based on a logical relationship between the partial services in the sub service to be processed (for example, processing the service data of the part a without depending on the service data of other parts, but the processing result of the service data of the part a has a correlation with the processing result of the service data of other parts, such as selecting, such as subtracting or summing, etc.) and the number of the block link points included in the first block link point group corresponding to the sub service to be processed (for example, the number of the block link points is the maximum decomposition number, the sub service to be processed is decomposed, that is, the number of the sub service to be processed obtained by decomposition is not greater than the maximum decomposition number);
sixthly, for each to-be-processed sub-service, each block link point in the first block link node group corresponding to the to-be-processed sub-service is used to process each part of the to-be-processed sub-service (for example, the occurrence frequency of data representing a target object in each part of data is counted respectively), so as to obtain a plurality of corresponding first processing sub-results;
the seventh step may generate a first processing result based on a logical relationship between the plurality of first processing sub-results and the partial service corresponding to each of the first processing sub-results (for example, if the logical relationship between the partial services is an alternative relationship, one of the plurality of first processing sub-results is selected as the first processing result, such as a maximum value, a minimum value, a median value, and the like, or, when the logical relationship is accumulation, the plurality of first processing sub-results are summed to obtain the first processing result).
In the second aspect, it should be noted that, in step S140, a specific manner of performing the second processing on the first processing result is not limited, and may be selected according to an actual application requirement.
For example, in an alternative example, step S140 may include the following sub-steps:
firstly, user identification information of the service to be processed can be obtained;
secondly, for each sub-service to be processed, verifying the user identification information by using each block chain node in the second block chain node group corresponding to the sub-service to be processed;
then, after the user identification information is verified, for each sub-service to be processed, a target block chain node in the second block chain node group corresponding to the sub-service to be processed is used to encrypt according to a predetermined key, and a first processing result corresponding to the sub-service to be processed is encrypted to generate a second processing result.
For another example, in another alternative example, step S140 may include the following sub-steps:
a first step of finding a target image corresponding to target data in a second target database (which may be another database different from the first target database, and is also not a local database of the routing node 20, but a remote database connected through a network) based on the target data of the target field in the service processing request information, where the target image includes facial feature information of a target user corresponding to the service processing request information;
secondly, the facial feature information can be obtained from the target image based on a preset feature extraction algorithm and is used as the user identification information of the service to be processed;
step three, finding out associated identification information corresponding to the user identification information in the second target database based on the user identification information, wherein the associated identification information comprises associated text characteristic information and associated image characteristic information;
fourthly, for each sub-service to be processed, verifying the user identification information, the associated text feature information and the associated image feature information respectively by using each block chain node in the second block chain node group corresponding to the sub-service to be processed, based on a preset second consensus algorithm (the second consensus algorithm may be different from the first consensus algorithm), in combination with verification reference information existing in a local database of each block chain node;
and fifthly, after the user identification information, the associated text feature information and the associated image feature information are verified respectively, for each sub-service to be processed, performing timestamp marking processing on a first processing result corresponding to the sub-service to be processed by using a target block link point deduced from each block link point in the second block link node group corresponding to the sub-service to be processed, so as to generate a data block with a timestamp, and taking the data block as a second processing result.
That is, before the final result, that is, the second processing result, is obtained, verification based on the second consensus algorithm is also required, and the security of data processing can be further improved. And, carry on the time stamp mark processing on the basis of the target block chain link point selected out, on the one hand, can also improve the security of the data processing, on the other hand, can also avoid too much block chain link points to participate in and cause the question of the wasting of resources.
It can be understood that the data block with the timestamp may be returned to the service request device that sent the service processing request information, and may be broadcast to other blockchain nodes belonging to the same blockchain through the target blockchain node for storage. Thus, based on the formed timestamp, the service request device may further perform verification of data processing efficiency of the blockchain node based on the returned data, or verify whether a delay exists in the return process of the output, and if a larger delay exists, it may be considered that a risk of being intercepted and tampered exists in the return process, so as to determine whether the returned data needs to be discarded, where the larger the delay time is, the larger the risk is.
Further, considering that the first and second block chain node groups configured in advance are required to be used in performing steps S130 and S140, the method described above may further include the step of configuring the first and second block chain node groups in advance.
The specific manner of configuring the first block chain node group and the first block node group is not limited, and may be selected according to actual application requirements.
For example, in an alternative example, the foregoing steps may include the following sub-steps:
a first step of determining a target block chain set (i.e., one block chain set is selected from a plurality of block chain sets) in a plurality of preset block chain sets, where the target block chain set includes a first block chain (i.e., includes at least two first block chains) corresponding to each of at least two to-be-processed sub-services of the first to-be-processed service;
second, the service type information of the to-be-processed sub-service corresponding to each first block chain in the target block chain set and the service data volume information of the to-be-processed sub-service corresponding to each first block chain can be obtained (in this way, for at least two to-be-processed sub-services, at least two pieces of service type information and at least two pieces of service data volume information can be obtained);
step three, determining service type related information between the at least two sub services to be processed according to the service type information of each of the at least two sub services to be processed (the service type related information may be used to represent the degree of correlation of the at least two sub services to be processed on the service type);
fourthly, for each sub service to be processed, determining a first number of block link points for processing the sub service to be processed based on the service type related information and the service type information corresponding to the sub service to be processed (since different first numbers are determined according to the same service type related information, a certain correlation is also presented between different first numbers);
fifthly, for each sub-service to be processed, at least the block chain nodes with the first number in the block chain link point set of the first block chain corresponding to the sub-service to be processed are deployed to form a first block chain node group for processing the sub-service to be processed (thus, because the different first numbers have correlation, the numbers of the different first block chain node groups also have correlation, and the problem of large number imbalance among the block chain link points of the different sub-services to be processed during the first processing is improved to a certain extent);
sixthly, determining service data volume related information between the at least two sub services to be processed according to the service data volume information of each of the at least two sub services to be processed (the service data volume related information can be used for representing the degree of correlation of the at least two sub services to be processed on the service data volume);
seventhly, for each sub service to be processed, determining a second number of block link points for processing the sub service to be processed based on the service data volume related information and the service data volume information corresponding to the sub service to be processed (since the determination basis of different second numbers includes the same service data volume related information, a certain correlation is also present between different second numbers);
and eighthly, forming a second block chain node group for processing the sub-service to be processed by at least using the block chain nodes with the second number in the block chain link point set of the first block chain corresponding to the sub-service to be processed, wherein the block chain nodes with the second number are deployed in the block chain link point set of the first block chain corresponding to the sub-service to be processed (in this way, because the different second numbers have correlation, the numbers of the different second block chain node groups also have correlation, so that the problem of large number imbalance among the block chain link points of different sub-services to be processed during the second processing is improved to a certain extent).
Optionally, in the above example, a specific manner of determining the target blockchain set in the preset multiple blockchain sets is also not limited, and may be selected according to an actual application requirement.
For example, in one alternative example, a target blockchain set may be determined among a plurality of blockchain sets based on:
first, a plurality of blockchain sets with different numbers of blockchains may be constructed, where each blockchain set includes at least two blockchains, different blockchains belonging to the same blockchain set are deployed at blockchain nodes in the same blockchain node set, different blockchains not belonging to the same blockchain set are deployed at blockchain link points in different blockchain link point sets, different blockchain node sets are composed of different blockchain link points, any two blockchain nodes included in the same blockchain link point set have a trust relationship (e.g., after data transmission between each other, processing may be directly performed without verification), and any two blockchain nodes included in different blockchain link point sets do not have a trust relationship (e.g., after data transmission between each other, processing may not be directly performed, need to be verified);
secondly, based on whether the service types are the same or not, performing service decomposition on the first to-be-processed service to obtain at least two to-be-processed sub-services, wherein the service types of each to-be-processed sub-service are different;
then, a target blockchain set may be determined based on at least the target number of the sub-services to be processed, in the plurality of blockchain sets, where the number of blockchains included in the target blockchain set is not less than the target number.
In detail, in a specific application example, a blockchain set 1 and a blockchain set 2 may be constructed first, where the blockchain set 1 may include 2 blockchains, such as the blockchain 11 and the blockchain 12, and the blockchain set 2 may include 3 blockchains, such as the blockchain 21, the blockchain 22 and the blockchain 23. And, there are block chain node set 1 and block link point set 2, block link point set 1 includes block chain node 11, block link point 12, block link point 13, and block link point set includes block chain node 21, block link point 22, block link point 23, and block link point 24.
As such, the blockchain 11 and the blockchain 12 are both disposed at least one of the blockchain nodes of the blockchain link point 11, the blockchain link point 12, and the blockchain 13, and the blockchain 21, the blockchain 22, and the blockchain 23 are all disposed at least one of the blockchain nodes of the blockchain link point 21, the blockchain link point 22, the blockchain link point 23, and the blockchain link point 24. Based on this, the building of the blockchain set can be realized.
Secondly, for the configured first to-be-processed service, the first to-be-processed service may be a composite service, as if the first to-be-processed service includes the bill inquiry service and the bill modification service, so that two to-be-processed sub-services, namely the bill inquiry sub-service and the bill modification sub-service, may be obtained by decomposition.
Then, since the number of the sub-services to be processed obtained by the decomposition is two, and the blockchain set 1 includes 2 blockchains, the blockchain set 1 may be determined as the target blockchain set.
For another example, in another alternative example, step S110 may include the following sub-steps:
firstly, a plurality of block chain sets with different numbers of block chains can be constructed, wherein each block chain set comprises at least two block chains, different block chains belonging to the same block chain set are deployed at block chain nodes in the same block chain node set, different block chains not belonging to the same block chain set are deployed at block chain link points in different block chain link point sets, and different block chain node sets are composed of different block chain link points;
secondly, based on whether the service types are the same or not, performing service decomposition on the first to-be-processed service to obtain at least two to-be-processed sub-services;
then, a target blockchain set may be determined from the plurality of blockchain sets, where each blockchain in each blockchain set is configured in advance to process a to-be-processed sub-service of one service type, and the service type configured for each blockchain in the target blockchain set at least includes the service types of the at least two to-be-processed sub-services.
Optionally, in the above example, a specific manner of determining the service type related information is also not limited, and may also be selected according to an actual application requirement.
For example, in an alternative example, the traffic type related information may be determined based on the following sub-steps:
firstly, for the service type information of each sub service to be processed in the at least two sub services to be processed, the type grade information corresponding to the service type information is determined based on the pre-established first corresponding relation to obtain at least two types of grade information, wherein the first corresponding relation comprises the corresponding relation between various service type information and various types of grade information, and the grade represented by the type grade information, the importance degree and/or the complexity degree predetermined by the corresponding service type information have a positive correlation (for example, for the bill inquiry sub-service and the bill modification sub-service, the corresponding first level information and fifth level information can be obtained, and the higher the level is, the higher the importance degree of the corresponding sub-service is, that is, the importance degree of the bill modification sub-service is higher than that of the bill inquiry sub-service);
secondly, calculating and obtaining first-grade discrete degree information between the at least two sub-services to be processed based on the at least two types of grade information, wherein the first-grade discrete degree information is used for representing the discrete degree of the at least two types of grade information on the type grade.
Then, the first-level discrete degree information is used as the service type related information between the at least two sub-services to be processed.
In detail, in a specific application example, the first-level discrete degree information may be calculated based on the following sub-steps:
firstly, calculating average type grade information based on the at least two types of grade information; secondly, average difference calculation is carried out based on the at least two types of grade information and the average type grade information, and first grade discrete degree information between the at least two sub-services to be processed is obtained.
For example, for the first level information and the fifth level information, the corresponding average type level information may be calculated as the third level information. Then, the corresponding first-level degree of dispersion information may be calculated to be 2, i.e., (| 1-3| + |5-3 |)/2 = 2.
Optionally, in the above example, a specific manner of determining the first number is not limited, and may also be selected according to an actual application requirement.
For example, in an alternative example, if the information related to the service type is the first-level discrete degree information, the first number may be determined based on the first-level discrete information and type level information corresponding to the service type information.
In detail, in a specific application example, for the bill inquiry sub-service, since the corresponding first-level discrete degree information is 2 and the corresponding type level information is the first-level information, an intermediate value, such as (2 + 1)/2, may be obtained, which is approximately equal to 2. For the bill modification sub-service, since the corresponding first-level discrete degree information is 2 and the corresponding type level information is fifth-level information, an intermediate value, such as (2 + 5)/2, approximately equal to 4, may be obtained. Then, a corresponding first number may be determined based on a preset corresponding relationship, and if the intermediate value is 2, the corresponding first number may also be 2; the intermediate value is 4, the corresponding first number may also be 4, or may also be other corresponding relationships, and may specifically be set by combining the number of the block link points included in the block chain node set corresponding to the corresponding block chain, as long as a condition that the larger the intermediate value is, the larger the corresponding first number is satisfied.
Optionally, in the above example, a specific manner of forming the first block chain node group is not limited, and may also be selected according to an actual application requirement.
For example, in an alternative example, the first blockchain node group for processing the sub-service to be processed may be formed by selecting, from a set of blockchain nodes where a first blockchain corresponding to the sub-service to be processed is located, a number of blockchain nodes that is the first number (or may also be combined with certain node redundancy).
Optionally, in the above example, a specific manner of determining the traffic data volume related information is also not limited, and may also be selected according to an actual application requirement.
For example, in an alternative, step S160 may include the following sub-steps:
firstly, determining data volume grade information corresponding to the service data volume information based on a pre-established second corresponding relationship aiming at the service data volume information of each to-be-processed sub-service in the at least two to-be-processed sub-services to obtain at least two data volume grade information, wherein the second corresponding relationship comprises the corresponding relationship between various service data volume information and various data volume grade information, and the grade represented by the data volume grade information has a positive correlation with the data volume represented by the corresponding service data volume information;
secondly, calculating second-level discrete degree information between the at least two sub-services to be processed based on the at least two data volume level information, wherein the second-level discrete degree information is used for representing the discrete degree of the at least two data volume level information on the data volume level;
then, the second-level dispersion degree information may be used as the traffic data volume related information between the at least two to-be-processed sub-services.
The specific manner of calculating the second-level discrete degree information may include:
firstly, calculating average data volume grade information based on the at least two data volume grade information;
secondly, performing average difference calculation based on the at least two data volume level information and the average data volume level information to obtain second-level discrete degree information between the at least two sub-services to be processed (that is, the calculated average difference value is used as the second-level discrete degree information).
Regarding the above calculation process, the foregoing description of calculating the first-level dispersion degree information may be combined, and is not repeated herein.
And, for the second corresponding relationship, the configuration may be performed according to the actual application requirement, as long as it is satisfied that the larger the data volume represented by the service data volume information is, the higher the level of the corresponding data volume level information is. For example, the amount of service data corresponding to the bill inquiry sub-service may be greater than the amount of service data of the bill modification sub-service.
Optionally, in the above example, the specific manner for determining the second number is also not limited, and may be selected according to the actual application requirement.
For example, in an alternative example, if the traffic data amount related information is the second-level dispersion degree information, the second amount may be determined based on the second-level dispersion degree information and data amount level information corresponding to the traffic data amount information. The detailed description may be combined with the related explanations, and is not repeated herein.
Optionally, in the above example, a specific manner of forming the second blockchain node group is not limited, and may also be selected according to an actual application requirement.
For example, in an alternative example, the second blockchain node group for processing the sub-service to be processed may be formed by selecting, from the second blockchain corresponding to the sub-service to be processed, a number of blockchain nodes that is the second number (which may also be combined with certain node redundancy).
With reference to fig. 4, an embodiment of the present application further provides a service processing apparatus 100 based on a block chain, which is applicable to the routing node 20. The service processing apparatus 100 based on the block chain may include a request information obtaining module 110, a pending service determining module 120, a first processing module 130, and a second processing module 140.
The request information obtaining module 110 is configured to obtain service processing request information sent by a service request device, where the service processing request information includes a to-be-processed service requested to be processed by the service request device. In this embodiment, the request information obtaining module 110 may be configured to execute step S110 shown in fig. 2, and reference may be made to the foregoing description of step S110 regarding relevant contents of the request information obtaining module 110.
The to-be-processed service determining module 120 is configured to determine whether the to-be-processed service is a preset first to-be-processed service, where the first to-be-processed service includes at least two to-be-processed sub-services. In this embodiment, the to-be-processed service determination module 120 may be configured to execute step S120 shown in fig. 2, and for the relevant content of the to-be-processed service determination module 120, reference may be made to the foregoing description of step S120.
The first processing module 130 is configured to, if the to-be-processed service is the first to-be-processed service, perform, for each to-be-processed sub-service included in the to-be-processed service, first processing on the to-be-processed sub-service by using a first block link point group preconfigured for the to-be-processed sub-service, to obtain a first processing result of the to-be-processed sub-service, where the first block link point group includes at least two block link nodes. In this embodiment, the first processing module 130 may be configured to execute step S130 shown in fig. 2, and reference may be made to the foregoing description of step S130 for relevant contents of the first processing module 130.
The second processing module 140 is configured to, for a first processing result of each to-be-processed sub service, perform second processing on the first processing result by using a second block link point group preconfigured for the to-be-processed sub service, to obtain a corresponding second processing result, where the second block link point group includes at least two block link nodes. In this embodiment, the second processing module 140 may be configured to execute step S140 shown in fig. 2, and reference may be made to the foregoing description of step S140 for relevant contents of the second processing module 140.
Further, in some examples, the block chain based service processing apparatus may further include another module, where the other module may be specifically configured to:
determining a target block chain set in a plurality of preset block chain sets, wherein the target block chain set comprises a first block chain corresponding to each of at least two to-be-processed sub-services of the first to-be-processed service; acquiring service type information of the sub-service to be processed corresponding to each first block chain in the target block chain set and service data volume information of the sub-service to be processed corresponding to each first block chain; determining service type related information between the at least two sub services to be processed according to the service type information of each of the at least two sub services to be processed; for each sub service to be processed, determining a first number of block chain link points for processing the sub service to be processed based on the service type related information and the service type information corresponding to the sub service to be processed; for each sub-service to be processed, at least utilizing the block chain nodes with the first quantity in the block chain link point set of the first block chain corresponding to the sub-service to be processed to form a first block chain node group for processing the sub-service to be processed; determining the service data volume related information between the at least two sub services to be processed according to the service data volume information of each of the at least two sub services to be processed; for each sub service to be processed, determining a second number of block link points for processing the sub service to be processed based on the service data volume related information and the service data volume information corresponding to the sub service to be processed; and aiming at each sub-service to be processed, at least utilizing the block chain nodes with the second quantity in the block chain link point set of the first block chain corresponding to the sub-service to be processed to form a second block chain node group for processing the sub-service to be processed.
In an embodiment of the present application, corresponding to the above service processing method based on a block chain, a computer-readable storage medium is further provided, where a computer program is stored in the computer-readable storage medium, and the computer program executes, when running, each step of the service processing method based on a block chain.
Here, the steps executed when the computer program runs are not described in detail, and reference may be made to the explanation of the service processing method based on the block chain.
To sum up, the block chain-based service processing method and the block chain-based service processing system provided by the application utilize the block chain link point groups respectively pre-configured for each to-be-processed sub-service included in the to-be-processed service to respectively process each to-be-processed sub-service, and can achieve the purpose of respectively processing each sub-service in the composite service.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.