CN112364031A - Business derivative record storage method based on credible account book database - Google Patents

Business derivative record storage method based on credible account book database Download PDF

Info

Publication number
CN112364031A
CN112364031A CN202110033621.XA CN202110033621A CN112364031A CN 112364031 A CN112364031 A CN 112364031A CN 202110033621 A CN202110033621 A CN 202110033621A CN 112364031 A CN112364031 A CN 112364031A
Authority
CN
China
Prior art keywords
service
sub
value
numerical
space
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110033621.XA
Other languages
Chinese (zh)
Other versions
CN112364031B (en
Inventor
杨新颖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Ant Blockchain Technology Shanghai Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Ant Blockchain Technology Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd, Ant Blockchain Technology Shanghai Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202110033621.XA priority Critical patent/CN112364031B/en
Publication of CN112364031A publication Critical patent/CN112364031A/en
Application granted granted Critical
Publication of CN112364031B publication Critical patent/CN112364031B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • G06F16/24578Query processing with adaptation to user needs using ranking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A business derivative record storage method based on a credible account book database is disclosed. Each sub-service identifier obtained based on each division of the service is not recorded any more, but when the sub-service identifier is distributed to the sub-service, a specific algorithm is adopted, so that the sub-service identifier can be restored without an index table, and the efficient retrieval of the service derived record is realized.

Description

Business derivative record storage method based on credible account book database
Technical Field
The embodiment of the specification relates to the technical field of information, in particular to a business derivative record storage method based on a trusted account book database.
Background
The credible account book database is a novel storage scheme obtained by improvement on the basis of a block chain storage scheme, can overcome the problems of low throughput, long response time and the like of decentralized block chain storage, and can meet the credible storage requirement of a user on data.
The credible account book database is maintained locally by a centralized database server, the service object of the credible account book database is usually an enterprise-level user, the user registers an account at the database server, business data generated by self business is packaged into business records through the registered account, the business records contain business identifiers, then the business records are submitted to the database server, and the database server sequentially writes all the business records into the local credible account book database for storage according to the receiving sequence.
Sometimes, a user may segment a service at least once, and each segment results in a plurality of sub-services, each sub-service may generate some service derivative records, and these service derivative records may also be submitted to the database server side for storing the trusted account book data. Users often want to be able to quickly retrieve a business derivative record corresponding to a certain sub-business segmented by a business from a trusted account book database.
Disclosure of Invention
The technical scheme of the application aims to solve the technical problem of how to quickly retrieve business derivative records from the credible account book database.
In order to solve the technical problem, the technical scheme of the application is realized as follows:
according to the 1 st aspect of the embodiments of the present specification, there is provided a method for storing business derived records based on a trusted ledger database, wherein an associated value space is specified in advance for a business, and the value space includes M consecutive values, the method includes:
n obtained for i-th segmentation based on serviceiRespectively determining sub-service identifications by the sub-services; i = (1, 2, 3, …), NiGreater than 1;
for each sub-service obtained by the ith division based on the service, writing the sub-service identification of the sub-service into each service derivative record generated by the sub-service, and then submitting each service derivative record generated by the sub-service to trusted account book data maintained by a database server for storage;
wherein is NiThe sub-services respectively determine sub-service identifiers, including:
will be S in the numerical spaceiTo M-SiNumerical value ofIs sequentially allocated to the NiFirst N in sub-servicesi-1 sub-service; for front Ni-1 each of the sub-services, composing a sub-service identifier of the service from the service identifier and the value corresponding to the sub-service; si is the 1 st unoccupied numerical value in the numerical value space when the ith division is carried out based on the service;
the business identification is associated with the M-N in the numerical spacei-2 values to the group NiSub-service identification of each sub-service.
According to the 2 nd aspect of the embodiments of the present specification, there is provided a sub-service identity determining method based on the method of the 1 st aspect, including:
determining a numerical value space associated with a service, initializing i =1, and circularly executing the following steps until i is the maximum value;
determining the occupied maximum value in the value space, and calculating M-the maximum value to obtain a value to be hashed;
starting from the 1 st numerical value in the numerical space, continuously selecting at least one numerical value to meet the condition that the sum of the selected numerical values is the value to be hashed;
determining a sub-service identifier of the last sub-service obtained by the ith division based on the service according to the maximum value; according to each selected numerical value, sequentially determining sub-service identifications of other sub-services obtained by the i-th division of the service;
and taking the maximum numerical value and each selected numerical value out of the numerical value space, and finishing updating the numerical value space.
According to the 3 rd aspect of the embodiments of the present specification, there is provided a service derivative record query method, including:
for any sub-service obtained by any division based on the service, acquiring a sub-service identifier of the sub-service; the sub-service identifier of the sub-service is determined by the method of the 2 nd aspect;
and reading the business derivative record containing the sub-business identification from the credible account book database.
According to the scheme provided in the embodiment of the present specification, if a user divides a service once to obtain a plurality of sub-services, before submitting a service derivative record generated by any sub-service obtained by the division to a database server, the user needs to write a sub-service identifier of the sub-service into the service derivative record generated by the sub-service, so as to subsequently retrieve a required service derivative record from a trusted account book database according to the sub-service identifier.
For how to determine sub-service identifiers for a plurality of sub-services generated by partitioning a service at a time, specifically, in order to avoid that a database server maintains an index table to record a plurality of sub-services and service sub-identifiers obtained by each service (which may cause a relatively large pressure to the database server), a specific identifier allocation algorithm is used to allocate the sub-service identifiers.
The sub-service identifications distributed by the specific algorithm do not need to be recorded by the database server, and when the database server needs to determine each sub-service identification corresponding to a certain divided batch, each sub-service identification corresponding to the divided batch can be restored by adopting the restoration algorithm corresponding to the specific identification distribution algorithm through simple calculation. Therefore, the corresponding business derivative records can be quickly retrieved from the credible account book database according to the corresponding business sub-identifications of the certain restored divided batch.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of embodiments of the invention.
In addition, any one of the embodiments in the present specification is not required to achieve all of the effects described above.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present specification, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a schematic diagram of a trusted ledger database-based data storage system provided herein;
fig. 2 is a schematic flowchart of a method for storing business derivative records based on a trusted ledger database provided in the present specification;
fig. 3 is a flowchart schematically illustrating a sub-service identifier determining method provided in an embodiment of the present specification;
FIG. 4 is a flow chart of a business derivative record query method provided in the present specification;
fig. 5 is a schematic structural diagram of a business derivative record storage device based on a trusted ledger database according to an embodiment of the present specification;
fig. 6 is a schematic structural diagram of a sub-service identifier determining apparatus provided in this specification;
fig. 7 is a schematic structural diagram of a service derivative record query device provided in this specification;
fig. 8 is a schematic structural diagram of an apparatus for configuring a method according to an embodiment of the present disclosure.
Detailed Description
Fig. 1 is a schematic diagram of a data storage system based on a trusted ledger database provided in the present specification. As shown in fig. 1, the data storage system includes a centralized database server and a plurality of clients. The database server is responsible for maintaining a trusted account book database, each client corresponds to an enterprise-level user (organization), and each enterprise-level user further interfaces with one or more individual users.
For example, the takeout platform and the e-commerce platform are respectively used as users to register on the database server to obtain user accounts, and install clients provided by the database server on own equipment to log in the user accounts in the clients, so that the takeout platform and the e-commerce platform have the capability of performing data interaction with the database server.
The take-out platform and the electronic commodity platform are respectively connected with a large number of individual users. After a certain individual user purchases a takeout food by using a takeout client installed on a mobile phone of the individual user, equipment of the takeout platform generates a takeout order record (namely business data generated by the takeout platform based on business), the takeout platform encapsulates the order record into a record through a user account registered at a database server by the individual user (similar to transactions in the field of block chains, the record is a special data structure suitable for storage of a credible account book database), and submits the record to the database server so that the database server encapsulates the record into the record and writes the record into the credible account book database for storage. Similarly, the e-commerce platform encapsulates each e-commerce order generated based on the e-commerce business into a record and submits the record to the database server.
For convenience of description, the user described hereinafter refers to an enterprise-level user served by the database server, and the user account described hereinafter refers to an account registered by the enterprise-level user at the database server.
Generally, the sequence of business records submitted to a database server by a user reflects the sequence of business data generated by recording the encapsulated business data, and the database server can store all the business records into a credible account book database in sequence according to the sequence of the business records submitted by the same user.
For the way of storing business records in the trusted account book database, a block chain may be similar, that is, according to a certain blocking condition, received business records are packed into individual data blocks in batches, each data block calculates a root hash of a tacle tree based on all the business records encapsulated in the block, the root hash is written into a block header of the data block, and the block header of the next data block includes a hash value of the previous data block (that is, a hash value obtained by performing hash calculation on the block header). In this case, the trusted account book database actually belongs to a block chain type account book, and it can be ensured that it is difficult to tamper with part of business records in the trusted account book database.
In addition, the credible account book database can store all business records according to a certain sequence (usually, a receiving sequence), all business records in the credible account book database form a global merkel tree, and the root hash of the global merkel tree can ensure that part of business records in the credible account book database are difficult to be tampered.
Due to the storage mode, the existing credible account book database is credible for users, the users usually store the root hash of the Mercker tree returned by the database server, and whether the business records in the credible account book database are tampered or not can be verified by using the root hash.
Sometimes, a user may segment a service at least once, and each segment results in a plurality of sub-services, each sub-service may generate some service derivative records, and these service derivative records may also be submitted to the database server side for storing the trusted account book data. Users often want to be able to quickly retrieve a business derivative record corresponding to a certain sub-business segmented by a business from a trusted account book database.
For example, suppose the service is a copyrighted work stream, the service identification is a copyrighted work identification, and the service record generated by the service is a copyrighted work stream record. Sometimes, a user may split a copyright work into a plurality of sub-works, each sub-work is independently circulated to become a sub-service, and the service derivative record generated by the sub-service is a sub-work circulation record.
For this reason, in one or more embodiments of the present specification, if a user divides a service once to obtain a plurality of sub-services, before submitting a service derived record generated by any sub-service obtained by this division to a database server, the user needs to write a sub-service identifier of the sub-service into the service derived record generated by the sub-service, so as to subsequently retrieve a required service derived record from the trusted account book database according to the sub-service identifier.
For how to determine sub-service identifiers for a plurality of sub-services generated by partitioning a service at a time, specifically, in order to avoid that a database server maintains an index table to record a plurality of sub-services and service sub-identifiers obtained by each service (which may cause a relatively large pressure to the database server), a specific identifier allocation algorithm is used to allocate the sub-service identifiers.
The sub-service identifications distributed by the specific algorithm do not need to be recorded by the database server, and when the database server needs to determine each sub-service identification corresponding to a certain divided batch, each sub-service identification corresponding to the divided batch can be restored by adopting the restoration algorithm corresponding to the specific identification distribution algorithm through simple calculation. Therefore, the corresponding business derivative records can be quickly retrieved from the credible account book database according to the corresponding business sub-identifications of the certain restored divided batch.
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present specification, the technical solutions in the embodiments of the present specification will be described in detail below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all the embodiments. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of protection.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
Fig. 2 is a schematic flowchart of a method for storing business derivative records based on a trusted ledger database, which includes the following steps:
s200: n obtained for i-th segmentation based on serviceiAnd the sub-services respectively determine sub-service identifiers.
The method shown in fig. 2 is applied to a user equipment. Wherein the user equipment is typically equipment of an enterprise level user operating a service. The user generally submits the business records generated by the business operated by the user to the database server, and the database server sequentially writes the business records into the credible account book database for credible storage according to the sequence of receiving the business records.
During the operation of a service, a user may perform one or more partitions based on the service. A split is to split a service into multiple sub-services (more than two sub-services), and different splits are actually to re-split the service, not to further split it. For example, for the copyrighted work transfer service, the copyrighted work transfer service is split into the transfer service of the sub-work a, the transfer service of the sub-work B and the transfer service of the sub-work C by the 1 st splitting, and after a period of time elapses, the user wants to re-split the services again, and then the copyrighted work is re-split into the transfer service of the sub-work D and the transfer service of the sub-work E.
For convenience of description, the total number of times that a user has performed service during operation is denoted as P, and a variable i is defined to characterize that a certain division in question is the number of times. The value range of i is (1, 2, …, P).
Also for convenience of description, the number of sub-services obtained by performing one division is denoted as N, and subscripts are used to distinguish different division batches, for example, N1Is the number of sub-services resulting from the first segmentation.
In one or more embodiments of the present specification, a specific identifier assignment algorithm is used to assign sub-service identifiers to a plurality of sub-services corresponding to a split batch. Specifically, the method comprises the following steps:
an associated numerical space is specified in advance for the service. Is NiThe sub-services respectively determine sub-service identifiers, including: will be S in the numerical spaceiTo M-SiAre sequentially assigned to the NiFirst N in sub-servicesi-1 sub-service; for front Ni-1 each of the sub-services, composing a sub-service identifier of the service from the service identifier and the value corresponding to the sub-service; the business identification is associated with the M-N in the numerical spacei-2 values to the group NiSub-service identification of each sub-service.
The numerical value space is a space including M consecutive numerical values. In practical applications, the number of digits of a value may be specified, for example, the value may be specified as an 8-bit (one byte) binary number, and thus, the value space may be a space containing all 8-bit binary values, and the value space includes 0-255 for 256 values in decimal view, in which case, M = 256.
SiIs the 1 st numerical value which is not occupied in the numerical value space when the ith division is carried out based on the service. It will be appreciated that when i =1, all values in the value space are unoccupied, in which case S is present1Is the 1 st value in the value space. Assuming that the first 2 values in the value space are all allocated to the 1 st split batch, then, when i =2, the 1 st value S in the value space that is unoccupied2This is the 3 rd value in the value space.
Through the specific identifier allocation algorithm, the sub-service identifiers can be allocated to the sub-services corresponding to any one divided batch.
S202: for each sub-service obtained by the i-th division based on the service, writing the sub-service identification of the sub-service into each service derivative record generated by the sub-service, and then submitting each service derivative record generated by the sub-service to a trusted account book database maintained by a database server for storage.
For any sub-service, the sub-service identifier of the sub-service needs to be written into the service derivative record generated by the sub-service, and then the service derivative record can be submitted to the database server for trusted storage.
Fig. 3 is a schematic flowchart of a method for determining a sub-service identifier according to an embodiment of the present disclosure, which includes the following steps:
s300: and determining the occupied maximum value in the value space, and calculating M to subtract the maximum value to obtain the value to be hashed.
The execution subject of the method shown in fig. 3 may be a database server.
In practical application, it is necessary to determine the sub-service identifiers corresponding to each split batch in sequence from the 1 st split batch.
Specifically, i =1 is initialized, and steps S300-S308 are executed in a loop, and each sub-service identifier corresponding to one divided batch is determined every time S300-S308 is executed.
After each round of S300-S308 is executed, i = i +1 corresponds to entering a process of determining each sub-service identifier corresponding to the next divided batch, and the value space is also updated, which corresponds to excluding the value occupied by each sub-service identifier corresponding to the last divided batch that has been determined from the value space.
S302: at least one value is selected consecutively starting from the 1 st value in the value space.
In step S302, at least one selected value is required to satisfy continuity, and the sum of the selected values is the value to be hashed. Only then will the correct sub-service identity be restored.
S304: and determining the sub-service identifier of the last 1 sub-service obtained by the ith division based on the service according to the maximum value.
S306: and sequentially determining the sub-service identifier of each other sub-service obtained by the ith division of the service according to each selected numerical value.
S308: let i = i +1 and take the maximum value and each selected value out of the numerical space, completing the updating of the numerical space.
The stop condition of the cycle may be that i reaches the maximum value (i.e., P), or that i is greater than the number of the designated divided lot. It can be understood that, in practical applications, the above-mentioned loop is executed only until the split batch that needs to be queried is obtained, and it may not be necessary to execute until the sub-service identifiers corresponding to the last split batch are determined.
Fig. 4 is a schematic flow chart of a service derived record query method provided in this specification, including:
s400: and acquiring the serial number of the partitioned batch specified by the query requester.
The execution subject of the method flow shown in fig. 4 may be a database server. In practical application, the query requester may be the user who submits the business derivative record, or may be a third party.
The split batch number is used to specify that it is a plurality of sub-services of the next split batch that is desired to be queried.
S402: and returning the sub-service identification set corresponding to the split batch serial number to the query requester based on the split batch serial number.
And the database server side returns the sub-service identification set corresponding to the to-be-inquired divided batches to the inquiry requester so that the inquiry requester can select the sub-service identification set.
The query requester may select to query the service derivative record corresponding to a specific sub-service identifier, or may select the service derivative records corresponding to multiple sub-service identifiers.
S404: and acquiring the sub-service identifier specified by the query requester.
S406: and reading the service derivative record containing the sub-service identifier from the maintained trusted account book database and returning the service derivative record to the query requester.
Fig. 5 is a schematic structural diagram of a service derivative record storage apparatus based on a trusted ledger database, which is applied to a user equipment, and the apparatus includes:
a determining module 501, configured to determine N obtained by performing the ith segmentation based on the serviceiRespectively determining sub-service identifications by the sub-services; i = (1, 2, …, P), NiMore than 1, P is total dividing times;
the storage module 502 is configured to, for each sub-service obtained by performing the ith division based on the service, write a sub-service identifier of the sub-service into each service derivative record generated by the sub-service, and then submit each service derivative record generated by the sub-service to a trusted account book database maintained by a database server for storage;
wherein is NiThe sub-services respectively determine sub-service identifiers, including:
will be S in the numerical spaceiTo M-SiAre sequentially assigned to the NiFirst N in sub-servicesi-1 sub-service; for front Ni-1 each of the sub-services, composing a sub-service identifier of the service from the service identifier and the value corresponding to the sub-service; si is that when the ith division is carried out based on the service, the unoccupied numerical value space in the numerical value space1 st numerical value;
the business identification is associated with the M-N in the numerical spacei-2 values to the group NiSub-service identification of each sub-service.
Each value in the value space is an 8-bit binary number, and M is 256.
Fig. 6 is a schematic structural diagram of a sub-service identifier determining apparatus provided in this specification, applied to a database server, where the apparatus includes:
a loop execution module 601, which initializes i =1 and executes the following steps in a loop until a stop condition is satisfied; determining the occupied maximum value in the value space, and calculating M to subtract the maximum value to obtain a value to be hashed; starting from the 1 st numerical value in the numerical space, continuously selecting at least one numerical value, and taking the sum of all the selected numerical values as the value to be hashed; determining sub-service identifiers of the last 1 sub-service obtained by the ith division based on the service according to the maximum numerical value; sequentially determining sub-service identifiers of other sub-services obtained by the i-th division of the service according to each selected numerical value; let i = i +1 and take the maximum value and each selected value out of the numerical space, completing the updating of the numerical space.
The stop condition includes:
i is greater than the number of the designated divided lot.
Fig. 7 is a schematic structural diagram of a service derivative record query device provided in this specification, which is applied to a database server and includes:
a first obtaining module 701, configured to obtain a serial number of a split batch specified by a query requester;
the first query module 702 returns the sub-service identifier set corresponding to the split batch serial number to the query requester based on the split batch serial number; the set of sub-service identities is determined by the method of claim 3 or 4;
a second obtaining module 703, configured to obtain a sub-service identifier specified by the query requester;
and the second query module 704 reads the service derivative record containing the sub-service identifier from the maintained trusted ledger database and returns the service derivative record to the query requester.
The present specification also provides a computer device comprising at least a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of fig. 2, 3 or 4 when executing the program.
Fig. 8 is a schematic diagram illustrating a more specific hardware structure of a computing device according to an embodiment of the present disclosure, where the computing device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 are communicatively coupled to each other within the device via bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 1020 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called to be executed by the processor 1010.
The input/output interface 1030 is used for connecting an input/output module to input and output information. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 1040 is used for connecting a communication module (not shown in the drawings) to implement communication interaction between the present apparatus and other apparatuses. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 1050 includes a path that transfers information between various components of the device, such as processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
It should be noted that although the above-mentioned device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040 and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
Embodiments of the present description also provide a computer-readable storage medium on which a computer program is stored, which when executed by a processor implements the method shown in fig. 2, fig. 3 or fig. 4.
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, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
From the above description of the embodiments, it is clear to those skilled in the art that the embodiments of the present disclosure can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the embodiments of the present specification may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments of the present specification.
The systems, methods, modules or units described in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the method embodiment, since it is substantially similar to the method embodiment, it is relatively simple to describe, and reference may be made to the partial description of the method embodiment for relevant points. The above-described method embodiments are merely illustrative, wherein the modules described as separate components may or may not be physically separate, and the functions of the modules may be implemented in one or more software and/or hardware when implementing the embodiments of the present specification. And part or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The foregoing is only a specific embodiment of the embodiments of the present disclosure, and it should be noted that, for those skilled in the art, a plurality of modifications and decorations can be made without departing from the principle of the embodiments of the present disclosure, and these modifications and decorations should also be regarded as the protection scope of the embodiments of the present disclosure.

Claims (12)

1. A business derivative record storage method based on a credible account book database is applied to user equipment, and an associated numerical value space is specified for business in advance, wherein the numerical value space comprises M continuous numerical values, and the method comprises the following steps:
n obtained for i-th segmentation based on serviceiRespectively determining sub-service identifications by the sub-services; i = (1, 2, …, P), NiMore than 1, P is total dividing times;
for each sub-service obtained by the ith division based on the service, writing the sub-service identification of the sub-service into each service derivative record generated by the sub-service, and then submitting each service derivative record generated by the sub-service to a trusted account book database maintained by a database server for storage;
wherein is NiThe sub-services respectively determine sub-service identifiers, including:
will be S in the numerical spaceiTo M-SiAre sequentially assigned to the NiFirst N in sub-servicesi-1 sub-service; for front Ni-1 each of the sub-services, composing a sub-service identifier of the service from the service identifier and the value corresponding to the sub-service; si is the 1 st unoccupied numerical value in the numerical value space when the ith division is carried out based on the service;
the business identification is associated with the M-N in the numerical spacei-2 values to the group NiSub-service identification of each sub-service.
2. The method of claim 1, wherein each value in the value space is an 8-bit binary number and M is 256.
3. A sub-service identifier determining method based on the method of claim 1 or 2, applied to a database server, comprising:
initializing i =1, and circularly executing the following steps until a stop condition is met;
determining the occupied maximum value in the value space, and calculating M to subtract the maximum value to obtain a value to be hashed;
starting from the 1 st numerical value in the numerical space, continuously selecting at least one numerical value, and taking the sum of all the selected numerical values as the value to be hashed;
determining sub-service identifiers of the last 1 sub-service obtained by the ith division based on the service according to the maximum numerical value; sequentially determining sub-service identifiers of other sub-services obtained by the i-th division of the service according to each selected numerical value;
let i = i +1 and take the maximum value and each selected value out of the numerical space, completing the updating of the numerical space.
4. The method of claim 3, the stop condition comprising:
i is greater than the number of the designated divided lot.
5. A business derived record query method is applied to a database server side and comprises the following steps:
acquiring a segmentation batch serial number designated by a query requester;
based on the sequence number of the divided batch, returning the sub-service identification set corresponding to the sequence number of the divided batch to the query requester; the set of sub-service identities is determined by the method of claim 3 or 4;
acquiring a sub-service identifier specified by the query requester;
and reading the service derivative record containing the sub-service identifier from the maintained trusted account book database and returning the service derivative record to the query requester.
6. A business derived record storage device based on a credible account book database is applied to user equipment and assigns an associated numerical value space for business in advance, wherein the numerical value space comprises M continuous numerical values, and the device comprises:
a determining module for N obtained by i-th division based on the serviceiRespectively determining sub-service identifications by the sub-services; i = (1, 2, …, P), NiMore than 1, P is total dividing times;
the storage module is used for writing the sub-service identification of each sub-service into each service derivative record generated by the sub-service for each sub-service obtained by the ith division based on the service, and then submitting each service derivative record generated by the sub-service to a credible account book database maintained by a database server for storage;
wherein is NiThe sub-services respectively determine sub-service identifiers, including:
will be S in the numerical spaceiTo M-SiAre sequentially assigned to the NiFirst N in sub-servicesi-1 sub-service; for front Ni-1 each of the sub-services, composing a sub-service identifier of the service from the service identifier and the value corresponding to the sub-service; si is the 1 st unoccupied numerical value in the numerical value space when the ith division is carried out based on the service;
the business identification is associated with the M-N in the numerical spacei-2 values to the group NiSub-service identification of each sub-service.
7. The apparatus of claim 6, each value in the value space is an 8-bit binary number, M being 256.
8. A sub-service identifier determining apparatus based on the method of claim 1 or 2, applied to a database server, comprising:
the loop execution module initializes i =1 and executes the following steps in a loop until a stop condition is met; determining the occupied maximum value in the value space, and calculating M to subtract the maximum value to obtain a value to be hashed; starting from the 1 st numerical value in the numerical space, continuously selecting at least one numerical value, and taking the sum of all the selected numerical values as the value to be hashed; determining sub-service identifiers of the last 1 sub-service obtained by the ith division based on the service according to the maximum numerical value; sequentially determining sub-service identifiers of other sub-services obtained by the i-th division of the service according to each selected numerical value; let i = i +1 and take the maximum value and each selected value out of the numerical space, completing the updating of the numerical space.
9. The apparatus of claim 8, the stop condition comprising:
i is greater than the number of the designated divided lot.
10. A business derivative record inquiry device is applied to a database server and comprises:
the first acquisition module is used for acquiring the serial number of the segmentation batch specified by the query requester;
the first query module returns the sub-service identification set corresponding to the split batch serial number to the query requester based on the split batch serial number; the set of sub-service identities is determined by the method of claim 3 or 4;
the second acquisition module is used for acquiring the sub-service identifier appointed by the query requester;
and the second query module is used for reading the service derivative record containing the sub-service identifier from the maintained trusted account book database and returning the service derivative record to the query requester.
11. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1-2 when executing the program.
12. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method according to any of claims 3-5 when executing the program.
CN202110033621.XA 2021-01-12 2021-01-12 Business derivative record storage method based on credible account book database Active CN112364031B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110033621.XA CN112364031B (en) 2021-01-12 2021-01-12 Business derivative record storage method based on credible account book database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110033621.XA CN112364031B (en) 2021-01-12 2021-01-12 Business derivative record storage method based on credible account book database

Publications (2)

Publication Number Publication Date
CN112364031A true CN112364031A (en) 2021-02-12
CN112364031B CN112364031B (en) 2021-04-06

Family

ID=74534777

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110033621.XA Active CN112364031B (en) 2021-01-12 2021-01-12 Business derivative record storage method based on credible account book database

Country Status (1)

Country Link
CN (1) CN112364031B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107770154A (en) * 2017-09-22 2018-03-06 中国科学院信息工程研究所 Block chain reliable data storage method, terminal and system based on cloud storage
CN108446371A (en) * 2018-03-15 2018-08-24 平安科技(深圳)有限公司 Data return guiding method, device, computer equipment and storage medium
US20190138585A1 (en) * 2017-11-08 2019-05-09 Adobe Inc. Digital form optimization
CN111464319A (en) * 2020-06-15 2020-07-28 支付宝(杭州)信息技术有限公司 Transaction storage and signature verification method based on centralized block chain type account book
CN111737686A (en) * 2020-07-31 2020-10-02 支付宝(杭州)信息技术有限公司 Processing method, device and equipment of block chain data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107770154A (en) * 2017-09-22 2018-03-06 中国科学院信息工程研究所 Block chain reliable data storage method, terminal and system based on cloud storage
US20190138585A1 (en) * 2017-11-08 2019-05-09 Adobe Inc. Digital form optimization
CN108446371A (en) * 2018-03-15 2018-08-24 平安科技(深圳)有限公司 Data return guiding method, device, computer equipment and storage medium
CN111464319A (en) * 2020-06-15 2020-07-28 支付宝(杭州)信息技术有限公司 Transaction storage and signature verification method based on centralized block chain type account book
CN111737686A (en) * 2020-07-31 2020-10-02 支付宝(杭州)信息技术有限公司 Processing method, device and equipment of block chain data

Also Published As

Publication number Publication date
CN112364031B (en) 2021-04-06

Similar Documents

Publication Publication Date Title
TWI743458B (en) Method, device and system for parallel execution of blockchain transactions
US11626972B2 (en) Data processing method and apparatus
CN110162526B (en) Method, device and equipment for inquiring data records in block chain type account book
CN110020854B (en) Data evidence storage method and system based on multiple block chain networks
CN110162662A (en) Verification method, device and the equipment of data record in a kind of piece of chain type account book
EP3812998B1 (en) Data storage and attestation method and system based on multiple blockchain networks
US11050550B2 (en) Methods and systems for reading data based on plurality of blockchain networks
CN110474775B (en) User creating method, device and equipment in block chain type account book
CN111459948B (en) Transaction integrity verification method based on centralized block chain type account book
CN111506580B (en) Transaction storage method based on centralized block chain type account book
CN111444216A (en) Data block deleting method based on centralized block chain type account book
CN111464319B (en) Transaction storage and signature verification method based on centralized block chain type account book
CN110750533A (en) Data storage method, device and equipment based on multiple service attributes
CN110837499A (en) Data access processing method and device, electronic equipment and storage medium
CN112364031B (en) Business derivative record storage method based on credible account book database
CN112364030B (en) Business derivative record storage method based on credible account book database
CN111506613A (en) Method, system, device and equipment for querying incidence relation of data record
US11086849B2 (en) Methods and systems for reading data based on plurality of blockchain networks
CN111563272B (en) Information statistical method and device
CN109656805B (en) Method and device for generating code link for business analysis and business server
CN111444198B (en) Transaction storage and query method based on centralized block chain type account book
CN111444215A (en) Blocking method, device and equipment in block chain type account book
CN111369282A (en) Resource processing method and device
CN110753032B (en) Risk dimension combination excavation method, device and equipment
CN110378608A (en) It signs a bill processing method and processing device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40045950

Country of ref document: HK