CN112133386A - Block chain-based information processing method, device, equipment and medium - Google Patents

Block chain-based information processing method, device, equipment and medium Download PDF

Info

Publication number
CN112133386A
CN112133386A CN202011068462.9A CN202011068462A CN112133386A CN 112133386 A CN112133386 A CN 112133386A CN 202011068462 A CN202011068462 A CN 202011068462A CN 112133386 A CN112133386 A CN 112133386A
Authority
CN
China
Prior art keywords
information
piece
sub
sub information
target
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.)
Pending
Application number
CN202011068462.9A
Other languages
Chinese (zh)
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.)
OneConnect Smart Technology Co Ltd
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202011068462.9A priority Critical patent/CN112133386A/en
Publication of CN112133386A publication Critical patent/CN112133386A/en
Priority to PCT/CN2021/109279 priority patent/WO2022068362A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H10/00ICT specially adapted for the handling or processing of patient-related medical or healthcare data
    • G16H10/20ICT specially adapted for the handling or processing of patient-related medical or healthcare data for electronic clinical trials or questionnaires
    • 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/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • 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/602Providing cryptographic facilities or services
    • 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
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H10/00ICT specially adapted for the handling or processing of patient-related medical or healthcare data
    • G16H10/60ICT specially adapted for the handling or processing of patient-related medical or healthcare data for patient-specific data, e.g. for electronic patient records
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H20/00ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance
    • G16H20/10ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance relating to drugs or medications, e.g. for ensuring correct administration to patients

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Public Health (AREA)
  • Primary Health Care (AREA)
  • Epidemiology (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Bioethics (AREA)
  • Chemical & Material Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Medicinal Chemistry (AREA)
  • Computing Systems (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the application discloses an information processing method, device, equipment and medium based on a block chain, and mainly relates to a block chain technology and a hospital management technology, wherein the method comprises the following steps: acquiring an objective function for describing information and a curve parameter of the objective function; dividing target information to be processed according to the curve parameters to obtain at least two pieces of sub information; acquiring a random number corresponding to each piece of sub information, and adjusting each piece of sub information according to the random number to obtain each piece of adjusted sub information; acquiring coordinate information corresponding to each piece of sub-information in at least two pieces of sub-information according to the target function and each piece of adjusted sub-information, and encrypting the coordinate information corresponding to each piece of sub-information to obtain a ciphertext of the coordinate information corresponding to each piece of sub-information; and determining the ciphertext of the coordinate information corresponding to each piece of sub information as the ciphertext of the target information, and storing the ciphertext of the target information into the block chain network. By adopting the embodiment of the application, the safety of the information can be improved.

Description

Block chain-based information processing method, device, equipment and medium
Technical Field
The present application relates to the field of block chain technologies, and in particular, to a method, an apparatus, a device, and a medium for processing information based on a block chain.
Background
The existing information storage method is generally terminal local storage, for example, in hospital management, the storage method of information for prescription circulation, patient management and the like of patients is generally terminal local storage. The information storage mode has a large risk, an illegal terminal easily acquires the locally stored information to cause information leakage, an illegal user can tamper the locally stored information to cause lower information safety, and when the local storage fails, the information cannot be retrieved, so that loss is caused. Therefore, how to ensure the security of information in the information storage process and prevent information leakage is an urgent problem to be solved.
Disclosure of Invention
The embodiment of the application provides an information processing method, an information processing device, information processing equipment and an information processing medium based on a block chain, which can be used for encrypting information, improving the safety of the information and preventing the information from being leaked.
An embodiment of the present application provides an information processing method based on a block chain, including:
acquiring an objective function for describing information and a curve parameter of the objective function;
dividing the target information to be processed according to the curve parameters of the target function to obtain at least two pieces of sub information;
acquiring a random number corresponding to each piece of sub information, and adjusting each piece of sub information according to the random number to obtain each piece of adjusted sub information;
acquiring coordinate information corresponding to each piece of sub information in the at least two pieces of sub information according to the target function and each piece of adjusted sub information;
encrypting the coordinate information corresponding to each piece of sub information in the at least two pieces of sub information to obtain a ciphertext of the coordinate information corresponding to each piece of sub information;
and determining the ciphertext of the coordinate information corresponding to each piece of sub information as the ciphertext of the target information, and storing the ciphertext of the target information into the block chain network.
Optionally, the adjusting each piece of sub information according to the random number to obtain each piece of adjusted sub information includes: splicing the random number with each piece of sub information to obtain each piece of spliced sub information; and if the spliced sub information is smaller than the information threshold, determining the spliced sub information as the adjusted sub information.
Optionally, the method further includes: if each piece of spliced sub information is larger than or equal to the information threshold, adjusting the random number; splicing the adjusted random number with each piece of sub information to obtain each piece of candidate sub information; and if each piece of candidate sub information is smaller than the information threshold, determining each piece of candidate sub information as each piece of adjusted sub information.
Optionally, the curve parameter includes a curve length; dividing the target information to be processed according to the curve parameter of the target function to obtain at least two pieces of sub information, including: acquiring the length of the target information; generating a length threshold according to the curve length, wherein the length threshold is smaller than the curve length; if the length of the target information is an integral multiple of the length threshold, dividing the target information according to the length threshold to obtain at least two pieces of sub information; if the length of the target information is not an integral multiple of the length threshold, filling the target information according to the length threshold to obtain filled target information; dividing the target information after the filling processing to obtain at least two pieces of sub information; wherein the length of each piece of sub information in the at least two pieces of sub information is equal to the length threshold.
Optionally, the encrypting the coordinate information corresponding to each piece of sub information in the at least two pieces of sub information to obtain the ciphertext of the coordinate information corresponding to each piece of sub information includes: acquiring a private key of a terminal to which the target information belongs and position information of each piece of sub information in the target information; generating a key corresponding to each piece of sub information according to the position information; and encrypting the coordinate information corresponding to each piece of sub information in the at least two pieces of sub information according to the private key of the terminal and the key corresponding to each piece of sub information to obtain the ciphertext of the coordinate information corresponding to each piece of sub information.
Optionally, the encrypting the coordinate information corresponding to each piece of sub information in the at least two pieces of sub information according to the private key and the key corresponding to each piece of sub information to obtain the ciphertext of the coordinate information corresponding to each piece of sub information includes: obtaining the coordinates of a base point of the curve of the objective function; obtaining the product of the base point coordinate and the private key of the terminal to obtain a candidate coordinate; encrypting the candidate coordinate according to the key corresponding to each piece of sub information to obtain a ciphertext of the candidate coordinate; and fusing the coordinate information corresponding to each piece of sub information with the corresponding candidate coordinate ciphertext to obtain the coordinate information ciphertext corresponding to each piece of sub information.
Optionally, the method further includes: reading a ciphertext of the target information from the block chain network, wherein the ciphertext of the target information comprises a ciphertext of the coordinate information corresponding to each piece of sub information; decrypting the ciphertext of each piece of sub information and the ciphertext corresponding to the candidate coordinate to obtain coordinate information of each piece of sub information; determining each piece of sub information according to the coordinate information of each piece of sub information and the random number corresponding to each piece of sub information; and splicing each piece of sub information to obtain the target information.
An embodiment of the present application provides an information processing apparatus based on a block chain, including:
the function acquisition module is used for acquiring an objective function for describing information and a curve parameter of the objective function;
the information dividing module is used for dividing the target information to be processed according to the curve parameters of the target function to obtain at least two pieces of sub information;
the information adjusting module is used for acquiring a random number corresponding to each piece of sub information, and adjusting each piece of sub information according to the random number to obtain each piece of adjusted sub information;
a coordinate obtaining module, configured to obtain, according to the target function and each piece of adjusted sub information, coordinate information corresponding to each piece of sub information in the at least two pieces of sub information;
the information encryption module is used for encrypting the coordinate information corresponding to each piece of sub information in the at least two pieces of sub information to obtain a ciphertext of the coordinate information corresponding to each piece of sub information;
and the information storage module is used for determining the ciphertext of the coordinate information corresponding to each piece of sub information as the ciphertext of the target information and storing the ciphertext of the target information into the block chain network.
Optionally, the information adjusting module is specifically configured to splice the random number with each piece of sub information to obtain each piece of spliced sub information; and if the spliced sub information is smaller than the information threshold, determining the spliced sub information as the adjusted sub information.
Optionally, the apparatus further comprises: a random number adjustment module to: if each piece of spliced sub information is larger than or equal to the information threshold, adjusting the random number; splicing the adjusted random number with each piece of sub information to obtain each piece of candidate sub information; and if each piece of candidate sub information is smaller than the information threshold, determining each piece of candidate sub information as each piece of adjusted sub information.
Optionally, the curve parameter includes a curve length; the information dividing module is specifically configured to: acquiring the length of the target information; generating a length threshold according to the curve length, wherein the length threshold is smaller than the curve length; if the length of the target information is an integral multiple of the length threshold, dividing the target information according to the length threshold to obtain at least two pieces of sub information; if the length of the target information is not an integral multiple of the length threshold, filling the target information according to the length threshold to obtain filled target information; dividing the target information after the filling processing to obtain at least two pieces of sub information; wherein the length of each piece of sub information in the at least two pieces of sub information is equal to the length threshold.
Optionally, the information encryption module is specifically configured to: acquiring a private key of a terminal to which the target information belongs and position information of each piece of sub information in the target information; generating a key corresponding to each piece of sub information according to the position information; and encrypting the coordinate information corresponding to each piece of sub information in the at least two pieces of sub information according to the private key of the terminal and the key corresponding to each piece of sub information to obtain the ciphertext of the coordinate information corresponding to each piece of sub information.
Optionally, the information encryption module is specifically configured to: obtaining the coordinates of a base point of the curve of the objective function; obtaining the product of the base point coordinate and the private key of the terminal to obtain a candidate coordinate; encrypting the candidate coordinate according to the key corresponding to each piece of sub information to obtain a ciphertext of the candidate coordinate; and fusing the coordinate information corresponding to each piece of sub information with the corresponding candidate coordinate ciphertext to obtain the coordinate information ciphertext corresponding to each piece of sub information.
Optionally, the apparatus further comprises: an information decryption module to: reading a ciphertext of the target information from the block chain network, wherein the ciphertext of the target information comprises a ciphertext of the coordinate information corresponding to each piece of sub information; decrypting the ciphertext of each piece of sub information and the ciphertext corresponding to the candidate coordinate to obtain coordinate information of each piece of sub information; determining each piece of sub information according to the coordinate information of each piece of sub information and the random number corresponding to each piece of sub information; and splicing each piece of sub information to obtain the target information.
One aspect of the present application provides a computer device, comprising: a processor, a memory, a network interface;
the processor is connected to a memory and a network interface, wherein the network interface is used for providing a data communication function, the memory is used for storing a computer program, and the processor is used for calling the computer program to execute the method in the aspect in the embodiment of the present application.
An aspect of the embodiments of the present application provides a computer-readable storage medium, which stores a computer program, where the computer program includes program instructions, and the program instructions, when executed by a processor, cause the processor to execute a block chain-based information processing method according to the first aspect.
In the embodiment of the application, the target information to be processed is divided according to the curve parameter of the target function to obtain at least two pieces of sub information, and each piece of sub information in the at least two pieces of sub information is adjusted, so that the coordinate information corresponding to each piece of adjusted sub information is generated according to each piece of adjusted sub information, and the success rate of obtaining the coordinate information corresponding to each piece of adjusted sub information is improved. And encrypting the coordinate information corresponding to each piece of sub information in at least two pieces of sub information to obtain a ciphertext of the coordinate information corresponding to each piece of sub information, determining the ciphertext of the coordinate information corresponding to each piece of sub information as the ciphertext of the target information, and storing the ciphertext of the target information into the block chain network. By encrypting each piece of sub information in the target information, the illegal terminal is prevented from cracking the ciphertext, so that the safety of each piece of sub information is improved, and the safety of the target information is improved; the ciphertext information of the target information is stored in the block chain network, and the safety of the information can be improved based on the characteristic that the block chain cannot be tampered and is not easy to lose; and moreover, the ciphertext of the target information is stored in the block chain network, so that the resource occupation of the local storage space of the terminal can be reduced, and the subsequent terminal can conveniently acquire the target information.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a block diagram of an information handling system according to an embodiment of the present disclosure;
fig. 2 is a schematic view of a scenario of an interaction process of each device in an information processing system based on a block chain according to an embodiment of the present application;
fig. 3 is a schematic flowchart of an information processing method based on a block chain according to an embodiment of the present application;
fig. 4 is a schematic flowchart of an information processing method based on a block chain according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a block chain-based information processing apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The block chain related to the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission (P2P transmission), consensus mechanism, encryption algorithm and the like, is essentially a decentralized database, and is a series of data blocks which are generated in a correlation mode by using a cryptography method, wherein each data block contains information of a batch of network transactions and is used for verifying the validity (anti-counterfeiting) of the information and generating the next block. The blockchain can comprise a blockchain bottom platform, a platform product service layer and an application service layer; the blockchain can be composed of a plurality of serial transaction records (also called blocks) which are connected in series by cryptography and protect the contents, and the distributed accounts connected in series by the blockchain can effectively record the transactions by multiple parties and can permanently check the transactions (can not be tampered). The consensus mechanism is a mathematical algorithm for establishing trust and obtaining rights and interests among different nodes in the block chain network; that is, the consensus mechanism is a mathematical algorithm commonly recognized by network nodes in the blockchain.
The technical scheme of the application is suitable for hospital management, namely the target information can refer to information of prescription circulation, patient management and the like of a patient, the ciphertext corresponding to the information of the prescription circulation, the patient management and the like of the patient is obtained by encrypting the information of the prescription circulation, the patient management and the like of the patient, the encrypted data is stored in the block chain network, management of the information of the prescription circulation, the patient management and the like of the patient is facilitated, and safety of hospital management information is improved.
Referring to fig. 1, fig. 1 is a schematic diagram of an architecture of an information processing system according to an embodiment of the present disclosure. The system architecture diagram includes a blockchain node system 10, a first terminal 11 and a second terminal 12.
The first terminal 11 may refer to a terminal that uploads target information, that is, a terminal that needs to upload target information to a block chain network for storage; the second terminal 12 may be a terminal that needs to acquire the target information, the block link node system 10 may be a backend service device that performs information processing, and the information processing may include processing such as encrypting and storing the target information, and may be specifically used to execute processing such as acquiring the target information, encrypting the target information to obtain a ciphertext of the target information, and storing the ciphertext of the target information. The number of the first terminal and the second terminal may be one or more, and in the embodiment of the application, one first terminal and one second terminal are used for description, and for a plurality of first terminals and a plurality of second terminals, reference may be made to this manner for processing. It should be noted that information processing, for example, processing such as encryption and storage of target information may be executed by the first terminal or the second terminal, and a mode in which the first terminal and the second terminal perform information processing may refer to a mode in which the blockchain node system performs information processing, and the following description will take the example of performing information processing by the blockchain node system as an example.
The nodes in the block link node system 10 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, Content Delivery Network (CDN), big data, and an artificial intelligence platform. The first terminal and the second terminal may be computer devices, including a mobile phone, a tablet computer, a notebook computer, a palm computer, an intelligent sound, a Mobile Internet Device (MID), a POS (Point Of Sales) device, a wearable device (e.g., a smart watch, a smart bracelet, etc.), and the like.
As shown in fig. 2, fig. 2 is a scene schematic diagram of an interaction process of each device in an information processing system based on a block chain according to an embodiment of the present application, and assuming that a sheetlet needs to send target information to the block chain for encryption and storage, so as to facilitate acquisition by a subsequent terminal, a terminal corresponding to the sheetlet is referred to as a first terminal; assuming that the small terminal needs to acquire the target information from the blockchain network, the terminal corresponding to the small terminal may be referred to as a second terminal. After a first terminal corresponding to a small piece of information sends target information, such as 'message 1', to a block link point system, the block link point system acquires the target information, acquires a target function for describing information and a curve parameter of the target function, and divides the target information according to the curve parameter of the target function to obtain at least two pieces of sub information; then, the block chain link point system acquires a random number corresponding to each piece of sub information, adjusts each piece of sub information according to the random number to obtain adjusted sub information, and acquires coordinate information corresponding to each piece of sub information in at least two pieces of sub information according to the target function and each piece of adjusted sub information; then, the block chain node point system encrypts the coordinate information corresponding to each piece of sub information in at least two pieces of sub information to obtain a ciphertext of the coordinate information corresponding to each piece of sub information, determines the ciphertext of the coordinate information corresponding to each piece of sub information as the ciphertext of the target information, for example, "×", and stores the ciphertext of the target information into the block chain network. After the second terminal corresponding to the small terminal sends an information acquisition request for acquiring the target information to the block link point system, the block link point system can verify the validity of the second terminal corresponding to the small terminal, and when the verification is passed, the ciphertext of the target information is decrypted to obtain target information "message 1", and the target information is sent to the second terminal corresponding to the small terminal.
Or after the target information is stored in the block chain, the first terminal corresponding to the small piece of information deletes the locally stored target information in order to save the resource occupation of the local space, and if the target information needs to be acquired from the block chain, an information acquisition request for acquiring the target information is sent to the block chain link point system, and after the ciphertext of the target information is decrypted by the block chain link point system, the decrypted target information is sent to the first terminal corresponding to the small piece of information, so that the target information is acquired. The target information is encrypted by the block chain technology, so that the safety of the target information can be improved, an illegal terminal is prevented from acquiring the target information, and due to the fact that the target information is encrypted, even if the illegal terminal acquires the encrypted target information, the content corresponding to the target information cannot be acquired, and the target information is prevented from being leaked.
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating an information processing method based on a blockchain according to an embodiment of the present application, where the method is applied to a node in a blockchain network, where the node may refer to a computer device; as shown in fig. 3, the method includes:
s101, an objective function for describing information and a curve parameter of the objective function are obtained.
Here, the objective function may be, for example, an elliptic curve function, such as secp256r1, and secp256r1 refers to a parameter of an elliptic curve digital signature algorithm used in bitcoin. Correspondingly, the curve parameter of the objective function may include a curve length, for example, the curve length may be 32 bytes, or the curve length may also be 64 bytes, 128 bytes, etc., and it is known that the curve length may correspond to a multiple of the number of bytes of 32.
S102, dividing the target information to be processed according to the curve parameters of the target function to obtain at least two pieces of sub information.
The target information to be processed may be information that is uploaded to the blockchain network by the terminal and needs to be encrypted and stored, and the target information may refer to transaction data, business data, internal data of an organization, and the like of the organization.
In the embodiment of the present application, a length threshold may be generated according to a curve parameter of an objective function, and the objective information is divided according to the length threshold, that is, the objective information is divided into at least two pieces of sub information whose length is equal to the length threshold. Here, the length threshold is smaller than the curve length, and the lengths of the at least two pieces of sub information obtained by dividing are both the length thresholds.
In one possible implementation, before dividing the target information, the target information may be padded, so that the length of the padded target information is an integer multiple of a length threshold, for example, the length threshold is 31 bytes, and then the length of the padded target information is 31 × n bytes, where n is a positive integer. By filling the target information before dividing the target information, the lengths of the sub information obtained by dividing the filled target information can be all equal to the length threshold.
S103, acquiring a random number corresponding to each piece of sub information, and adjusting each piece of sub information according to the random number to obtain each piece of adjusted sub information.
In a specific implementation, a random number generation algorithm may be used to generate a random number, for example, a central limit theorem and a Box Muller (coordinate transformation method), a monte carlo algorithm, a numerical probability algorithm, a las vegas algorithm, or other algorithms, and determine the generated random number as the random number corresponding to each piece of sub information. For example, the generated random number may be any number within the [0,128] interval.
In a possible case, if each piece of sub information is not data of a numerical type, each piece of sub information may be encoded to obtain encoded data of the numerical type, and the encoded data corresponding to each piece of sub information is adjusted according to a random number corresponding to each piece of sub information to obtain each piece of adjusted sub information.
In another possible case, if each piece of sub information is data of a numerical type, each piece of sub information is adjusted according to a random number corresponding to each piece of sub information, and each piece of adjusted sub information is obtained. It can be known that each piece of sub information after adjustment includes the piece of sub information and a random number corresponding to the piece of sub information, and the length of each piece of sub information after adjustment is equal to the length of the curve.
And S104, acquiring coordinate information corresponding to each piece of sub information in at least two pieces of sub information according to the target function and each piece of adjusted sub information.
Here, for example, each piece of sub information of the adjusted non-numerical type may be encoded to obtain encoded data corresponding to each piece of sub information of the adjusted numerical type, and the encoded data corresponding to each piece of sub information of the adjusted numerical type may be mapped onto a curve corresponding to the objective function to obtain a corresponding coordinate point, so as to obtain coordinate information corresponding to each piece of sub information according to the coordinate point.
In a possible implementation manner, a curve corresponding to a target function may be obtained, and each piece of adjusted sub information is mapped to a first coordinate of a target point on the curve corresponding to the target function; determining a second coordinate of a target point on a curve corresponding to the target function according to the first coordinate and the target function; and determining the first coordinate and the second coordinate as coordinate information corresponding to each piece of sub information, so as to obtain the coordinate information corresponding to each piece of sub information in at least two pieces of sub information.
For example, to describe obtaining coordinate information corresponding to any piece of sub information c in at least two pieces of sub information, a second coordinate of a target point on a curve corresponding to an objective function may be determined according to a first coordinate and the objective function, and the first coordinate and the second coordinate are determined as coordinate information corresponding to the sub information c. For example, the curve corresponding to the objective function can be shown in equation (1-1):
y2=x3+ax+b (1-1)
wherein a and b are both known real numbers, x and y are both parameters, and by determining the value of any one of x or y, the value of the other parameter can be calculated by formula (1-1), for example, by determining the value of x and calculating the value of y by formula (1-1).
For example, if a is 1 and b is-1, the curve corresponding to the objective function can be represented as y2=x3+ x-1, the first coordinate of the target point (e.g. the abscissa of the target point) mapped by the sub-information c onto the curve corresponding to the target function is 1, and the first coordinate is substituted into y as x2=x3In + x-1, y is 1, that is, the second coordinate of the target point on the curve corresponding to the target function is 1, and the coordinate information corresponding to the sub information c is (1, 1).
S105, encrypting the coordinate information corresponding to each piece of sub information in the at least two pieces of sub information to obtain a ciphertext of the coordinate information corresponding to each piece of sub information.
Here, the computer device may obtain a private key of a terminal to which the target information belongs, and encrypt, according to the private key of the terminal, coordinate information corresponding to each piece of sub information in the at least two pieces of sub information to obtain a ciphertext of the coordinate information corresponding to each piece of sub information. It is understood that the ciphertext of the coordinate information corresponding to the sub information is the ciphertext obtained by encrypting the sub information, and when the ciphertext is not decrypted, the content of the sub information corresponding to the ciphertext cannot be known even if the ciphertext is obtained. Each piece of sub information corresponding to the target information is encrypted by using a private key of a terminal to which the target information belongs, so that the safety of the target information can be improved.
And S106, determining the ciphertext of the coordinate information corresponding to each piece of sub information as the ciphertext of the target information, and storing the ciphertext of the target information into the block chain network.
Here, in the above step, for each piece of sub information in the at least two pieces of sub information, a ciphertext of the coordinate information corresponding to each piece of sub information is obtained, so that the ciphertext of the coordinate information corresponding to each piece of sub information is determined as the ciphertext of the target information, that is, the ciphertext of the target information includes the ciphertext of the coordinate information corresponding to each piece of sub information in the at least two pieces of sub information, so that the target information can be encrypted to obtain the ciphertext of the target information, and the ciphertext of the target information can be stored in the block chain network. By sending the target information to the block chain network for encryption and storage, the resource occupation of the local storage space of the terminal can be reduced, the target information can be prevented from being stored locally in the terminal and being tampered by illegal users, and the safety of the target information is improved.
After the ciphertext of the target information is stored in the blockchain network, and when a terminal needing to acquire the target information exists subsequently, the computer equipment can verify the legality of the terminal needing to acquire the target information, decrypt the ciphertext of the target information to obtain the target information under the condition that the terminal needing to acquire the legality is determined, and send the target information to the terminal needing to acquire the target information, so that the target information is acquired. Or, the ciphertext of the target information may be sent to the terminal to which the target information belongs, and after the ciphertext of the target information is decrypted by the terminal to which the target information belongs, the decrypted target information is sent to the terminal that needs to acquire the target information, so as to acquire the target information.
In the embodiment of the application, the target information to be processed is divided according to the curve parameter of the target function to obtain at least two pieces of sub information, and each piece of sub information in the at least two pieces of sub information is adjusted, so that the coordinate information corresponding to each piece of adjusted sub information is generated according to each piece of adjusted sub information, and the success rate of obtaining the coordinate information corresponding to each piece of adjusted sub information is improved. And encrypting the coordinate information corresponding to each piece of sub information in at least two pieces of sub information to obtain a ciphertext of the coordinate information corresponding to each piece of sub information, determining the ciphertext of the coordinate information corresponding to each piece of sub information as the ciphertext of the target information, and storing the ciphertext of the target information into the block chain network. By encrypting each piece of sub information in the target information, the illegal terminal is prevented from cracking the ciphertext, so that the safety of each piece of sub information is improved, and the safety of the target information is improved; the ciphertext information of the target information is stored in the block chain network, and the safety of the information can be improved based on the characteristic that the block chain cannot be tampered and is not easy to lose; and moreover, the ciphertext of the target information is stored in the block chain network, so that the resource occupation of the local storage space of the terminal can be reduced, and the subsequent terminal can conveniently acquire the target information.
In one embodiment, the step S103 includes the following steps S11-S12.
And s11, splicing the random number with each piece of sub information to obtain each piece of spliced sub information.
s12, if each piece of concatenated sub information is smaller than the information threshold, determining each piece of concatenated sub information as each piece of adjusted sub information.
In steps s11 to s12, if each piece of concatenated sub information is smaller than the information threshold, it is considered that the piece of sub information is mapped to the first coordinate of the target point on the curve corresponding to the target function, and the second coordinate of the target point on the curve corresponding to the target function is obtained through calculation according to the first coordinate and the target function, that is, the coordinate information corresponding to each piece of sub information can be obtained. If each piece of spliced sub information is greater than or equal to the information threshold, it is considered that the piece of sub information is mapped to a first coordinate of a target point on a curve corresponding to the target function, and a second coordinate of the target point on the curve corresponding to the target function cannot be obtained through calculation according to the first coordinate and the target function, that is, coordinate information corresponding to each piece of sub information cannot be obtained. The random numbers corresponding to each piece of sub information may be equal or unequal. The length of each piece of spliced sub information is equal to the length of the curve, that is, the sum of the length of the random number and the length of any piece of sub information is equal to the length of the curve. The information threshold may be, for example, 2256And may be less than 2256. And splicing the random number with each piece of sub information to obtain each piece of spliced sub information, and determining each piece of spliced sub information as each piece of adjusted sub information according to the size relation between each piece of spliced sub information and the information threshold.
In this embodiment, the method includes the following steps s 21-s 23.
s21, if each piece of sub information after splicing is larger than or equal to the information threshold, adjusting the random number.
And s22, splicing the adjusted random number with each piece of sub information to obtain each piece of candidate sub information.
s23, if each piece of the candidate sub information is smaller than the information threshold, determining each piece of the candidate sub information as each piece of the adjusted sub information.
In steps s21 to s23, when each piece of concatenated sub information is greater than or equal to the information threshold, the piece of sub information is mapped to the first coordinate of the target point on the curve corresponding to the target function, and the second coordinate of the target point on the curve corresponding to the target function cannot be calculated according to the first coordinate and the target function, that is, the coordinate information corresponding to each piece of sub information cannot be obtained. Therefore, the random number corresponding to each piece of sub information needs to be adjusted, and the adjusted random number is spliced with each piece of sub information to obtain each piece of candidate sub information.
It can be known that, if each piece of candidate sub information is smaller than the information threshold, the piece of candidate sub information is mapped to a first coordinate of a target point on a curve corresponding to the target function, and a second coordinate of the target point on the curve corresponding to the target function can be obtained through calculation according to the first coordinate and the target function, that is, coordinate information corresponding to each piece of candidate sub information can be obtained. If each piece of candidate sub information is greater than or equal to the information threshold, it is considered that the piece of sub information is mapped to a first coordinate of a target point on a curve corresponding to the target function, and a second coordinate of the target point on the curve corresponding to the target function cannot be obtained through calculation according to the first coordinate and the target function, that is, coordinate information corresponding to each piece of sub information cannot be obtained. That is, if each piece of candidate sub information is greater than or equal to the information threshold, the random number continues to be adjusted until the adjusted random number is spliced with each piece of candidate sub information, and each piece of spliced candidate sub information is smaller than the information threshold, and each piece of spliced candidate sub information is determined as each piece of adjusted sub information.
By splicing the random number corresponding to each piece of sub information with the sub information and continuously adjusting the random number corresponding to each piece of sub information, each piece of adjusted sub information can be obtained, and the success rate of subsequently encrypting each piece of sub information is improved.
In one embodiment, the curve parameter of the objective function includes a curve length, and the step S102 includes the following steps S31 to S32.
s31, the length of the target information is obtained.
Here, the length of the target information may be, for example, the number of bytes of the target information.
s32, generating a length threshold based on the curve length, the length threshold being less than the curve length.
s33, if the length of the target information is an integral multiple of the length threshold, dividing the target information according to the length threshold to obtain at least two pieces of sub information.
Here, for example, if the length threshold is 31 bytes, the length of the target information is 31 × n bytes, and n is a positive integer, the length of the target information is an integer multiple of the length threshold, and the target information is divided according to the length threshold to obtain n pieces of sub information.
s34, if the length of the target information is not an integral multiple of the length threshold, performing filling processing on the target information according to the length threshold to obtain the target information after the filling processing; and dividing the target information after the filling processing to obtain at least two pieces of sub information. Wherein, the length of each piece of sub information in the at least two pieces of sub information is equal to the length threshold value.
In steps s31 to s32, if the length of the target information is not an integer multiple of the length threshold, the target information may be padded using a Padding method such as PKCS7Padding, ZeroPadding, or PKCS5Padding, so that the length of the padded target information is an integer multiple of the length threshold. For example, assuming that the length of the target information requires padding d (d >0) bytes to be an integer multiple of the length threshold, then d bytes are padded, each byte being 0. If the length of the target information is not an integral multiple of the length threshold, the target information after filling processing is obtained by filling the target information, so that when the filled target information is divided subsequently, the length of at least two pieces of sub information obtained by dividing is equal to the length threshold, the consistency of each piece of sub information is ensured, and the subsequent processing is facilitated.
In one embodiment, the curve parameter of the objective function includes a curve length, and the step S105 includes the following steps S41 to S43.
s41, obtaining the private key of the terminal to which the target information belongs, and the position information of each piece of sub information in the target information.
In a specific implementation, a number may be randomly generated by using the SECP256K1 algorithm, and if the randomly generated number is less than 256 bits, the randomly generated number is padded to obtain a 256-bit number as the private key of the terminal.
The position information of each piece of sub information in the target information may be, for example, an order of each piece of sub information in the target information, for example, the target information is c1 c2c3 c4, the 4 pieces of sub information obtained by dividing are c1, c2, c3, and c4, and lengths of the 4 pieces of sub information are all equal to a length threshold, and it is known that orders of the pieces of sub information c1, c2, c3, and c4 in the target information are 1, 2, 3, and 4, respectively, that is, the piece of sub information c1 is located at a first position in the target information, the piece of sub information c2 is located at a second position in the target information, the piece of sub information c3 is located at a third position in the target information, and the piece of sub information c4 is located at a fourth position in the target information.
s42, a key corresponding to each piece of sub information is generated according to the position information.
In the embodiment of the application, a root key corresponding to the target information can be obtained, and the root key is a parameter input in an algorithm for converting the sub information into the ciphertext corresponding to the sub information or converting the ciphertext corresponding to the sub information into the sub information. And obtaining a key corresponding to each piece of sub information according to the root key and the position information of each piece of sub information in the target information.
In a specific implementation, for example, the root key corresponding to the target information is k, the target information shown in step s42 is c1 c2c3 c4, the corresponding sub information is c1, c2, c3, and c4, respectively, the sub information c1 is located at a first position in the target information, and the root key k is subjected to hash operation to obtain a first hash value k0, that is, the key corresponding to the sub information c 1; the sub information c2 is located at a second position in the target information, and the hash operation is performed on the key k0 corresponding to the sub information c2 to obtain a second hash value k1, namely the key corresponding to the sub information c 2; the sub information c3 is located at the third position in the target information, and the hash operation is performed on the key k1 corresponding to the sub information c3 to obtain a third hash value k2, namely, the key corresponding to the sub information c 3; the sub information c4 is located at the fourth position in the target information, and the key k2 corresponding to the sub information c3 is hashed to obtain a third hash value k3, i.e., the key corresponding to the sub information c4, so that the key corresponding to each piece of sub information can be obtained.
s43, according to the private key of the terminal and the key corresponding to each piece of sub information, encrypting the coordinate information corresponding to each piece of sub information in at least two pieces of sub information to obtain the ciphertext of the coordinate information corresponding to each piece of sub information.
In steps s41 to s43, the coordinate information corresponding to each piece of sub information in at least two pieces of sub information is encrypted according to the private key of the terminal and the key corresponding to each piece of sub information to obtain the ciphertext of the coordinate information corresponding to each piece of sub information, so that each piece of sub information can be encrypted to obtain the corresponding ciphertext, and after the terminal obtains the ciphertext corresponding to each piece of sub information, the terminal needs to decrypt to obtain the sub information corresponding to each ciphertext.
In this embodiment, the step s43 includes the following steps s51 to s 54.
s51, coordinates of a base point of the curve of the objective function are obtained.
And s52, obtaining the product of the coordinates of the base point and the private key of the terminal to obtain candidate coordinates.
And s53, encrypting the candidate coordinates according to the key corresponding to each piece of sub information to obtain the ciphertext of the candidate coordinates.
s54, fusing the coordinate information corresponding to each piece of sub information with the corresponding candidate coordinate ciphertext to obtain the coordinate information ciphertext corresponding to each piece of sub information.
In steps S51 to S54, since the computer apparatus acquires the curve of the objective function and the curve parameters of the objective function in step S101 described above, the base point coordinates of the curve of the objective function can be acquired. For example, if the coordinates of the base point and the corresponding base point are G (x1, y1), and the private key of the terminal is h, the candidate coordinates can be calculated according to the formula (1-2):
H=h*G (1-2)
the candidate coordinate is H, the base point is G, and the private key of the terminal is H.
For example, the number of pieces of sub information corresponding to the target information is n, the piece of sub information i is any piece of sub information in the n pieces of sub information, the candidate coordinates can be encrypted in a formula (1-3) manner to obtain a ciphertext of the candidate coordinates, and the coordinate information corresponding to the piece of sub information i and the ciphertext of the candidate coordinates are subjected to sum fusion to obtain the ciphertext of the coordinate information corresponding to the piece of sub information i.
Ci=Mi+ki*H (1-3)
The candidate coordinates are H, Ci is a ciphertext of the coordinate information corresponding to the sub-information i, Mi is the coordinate information corresponding to the sub-information i, and ki is a key corresponding to the sub-information i. And ki x H represents that the candidate coordinates are encrypted according to the key corresponding to the sub information i to obtain the ciphertext of the candidate coordinates. It can be known that, for other pieces of sub information in the n pieces of sub information, the coordinate information ciphertext corresponding to the other pieces of sub information can be obtained by encrypting and fusing the other pieces of sub information according to the formula (1-3). For each piece of sub information, the ciphertext of the coordinate information corresponding to the piece of sub information can be obtained by encrypting and fusing the pieces of sub information according to the formula (1-3), that is, the number of the ciphertext of the coordinate information corresponding to one piece of sub information is n, that is, for n pieces of sub information, the number of the ciphertext of the coordinate information corresponding to the piece of sub information finally obtained is n.
By encrypting each piece of sub information, even if an illegal terminal acquires a ciphertext corresponding to the sub information, the content of the sub information cannot be acquired because decryption cannot be realized, so that the safety of each piece of sub information can be ensured, and the safety of target information is ensured.
In an embodiment, fig. 4 is a flowchart illustrating an information processing method based on a blockchain according to an embodiment of the present application, where the method is applied to a node in a blockchain network, where the node may refer to a computer device; as shown in FIG. 4, the method includes steps s 61-s 64:
s61, reading the ciphertext of the target information from the block chain network, where the ciphertext of the target information includes the ciphertext of the coordinate information corresponding to each piece of sub information.
s62, decrypting the ciphertext of each sub-message and the ciphertext corresponding to the candidate coordinates to obtain the coordinate information of each sub-message.
Here, each piece of sub information may be decrypted by the formula (1-4) to obtain the coordinate information of each piece of sub information.
Mi=Ci-ki*H (1-4)
The candidate coordinates are H, Ci is a ciphertext of the coordinate information corresponding to the sub-information i, Mi is the coordinate information corresponding to the sub-information i, and ki is a key corresponding to the sub-information i. And each piece of sub information can be decrypted by the mode of the formula (1-4), so that the coordinate information of each piece of sub information is obtained.
s63, determining each piece of sub information according to the coordinate information of each piece of sub information and the random number corresponding to each piece of sub information.
Here, since the coordinate information of each piece of sub information is generated according to the objective function and each piece of adjusted sub information, and each piece of adjusted sub information is obtained by adjusting each piece of sub information according to the random number corresponding to each piece of sub information, each piece of sub information can be determined according to the coordinate information of each piece of sub information and the random number corresponding to each piece of sub information, that is, the random number corresponding to the piece of sub information in the coordinate information of each piece of sub information can be deleted, and each piece of sub information can be determined according to the coordinate information of each piece of sub information from which the random number is deleted, thereby realizing decryption of each piece of sub information.
And s64, splicing each piece of sub information to obtain target information.
Here, the target information may be obtained by concatenating each piece of sub information. For example, if the 4 pieces of sub information are c1, c2, c3 and c4, respectively, the target information obtained after splicing may be c1 c2c3 c 4. Thereby, decryption of the target information can be achieved.
In steps s61 to s64, since the terminal to which the target information belongs (hereinafter referred to as the first terminal) uploads the target information to the blockchain network, encrypts the target information and stores the ciphertext of the target information in the blockchain network, the terminal that needs to acquire the target information (hereinafter referred to as the second terminal) may send an acquisition request for the target information to the blockchain network, and the computer device decrypts the ciphertext of the target information and sends the target information to the second terminal, thereby acquiring the target information by the second terminal.
In a possible implementation manner, when the computer device acquires that the second terminal sends the acquisition request for the target information, the validity of the second terminal may be verified, and when it is determined that the second terminal has validity, the ciphertext of the target information is decrypted by the method in steps s62 to s64, and the decrypted target information is sent to the second terminal, so that the target information is acquired. Here, verifying the validity of the second terminal means verifying whether the second terminal is a valid terminal. For example, when the first terminal uploads the target information, the first terminal may authorize some terminals that need to acquire the target information to obtain authorization information, and send the authorization information to the block chain network, so that the computer device may verify whether the second terminal belongs to a terminal in the authorization information when receiving an acquisition request for the target information sent by the second terminal, and if so, the second terminal is considered to be legal; if not, the second terminal is not legal. The validity of the second terminal may also be verified in other ways, which is not limited in this embodiment.
In another possible implementation manner, when receiving an acquisition request for target information sent by a second terminal, a computer device may verify the validity of the second terminal, and when the second terminal has validity, may read a ciphertext of the target information from a block chain network, where the ciphertext of the target information includes a ciphertext of coordinate information corresponding to each piece of sub information, and the acquisition request of the second terminal may include user information corresponding to the second terminal and a terminal identifier of the second terminal. The computer device sends the ciphertext of the target information and the user information corresponding to the second terminal to the first terminal, and the first terminal may confirm the user information corresponding to the second terminal, for example, confirm whether the user information corresponding to the second terminal is trusted user information of the first terminal, where the trusted user information may be, for example, user information stored in the first terminal or user information corresponding to a terminal that performs data interaction with the first terminal, and so on. Thereby determining whether to decrypt the ciphertext of the target information and transmitting the decrypted target information to the second terminal. If the first terminal confirms to send the decrypted target information to the second terminal, the first terminal may first decrypt the ciphertext of the target information, and the process of the first terminal decrypting the ciphertext of the target information may include s71 to s 75:
s71, the first terminal obtains the ciphertext of the target information from the block chain network, where the ciphertext of the target information includes the ciphertext of the coordinate information corresponding to each piece of sub information.
s72, the first terminal obtains the base point coordinate of the curve of the objective function from the block chain network, and obtains the candidate coordinate according to the product of the base point coordinate and the private key of the first terminal.
s73, the first terminal obtains the key corresponding to each piece of sub information from the block chain network, and decrypts the candidate coordinate according to the key corresponding to each piece of sub information, so as to obtain the coordinate information corresponding to each piece of sub information in the at least two pieces of sub information.
s74, the first terminal obtains the random number corresponding to each piece of sub information from the block chain network, and determines each piece of sub information according to the random number corresponding to each piece of sub information and the coordinate information corresponding to each piece of sub information.
And s75, the first terminal splices each piece of sub information to obtain target information.
Through the steps s 71-s 75, the first terminal can decrypt the ciphertext of the target information to obtain the target information, and the first terminal can send the decrypted target information to the second terminal according to the terminal identifier of the second terminal included in the user information corresponding to the second terminal, so that the target information is sent to the second terminal.
Optionally, after the first terminal decrypts the ciphertext of the target information to obtain the target information, the first terminal may also send the target information to the block chain network, and the computer device sends the decrypted target information to the second terminal, so as to enable the second terminal to obtain the target information.
The corresponding target information is obtained by decrypting the ciphertext of the target information, and therefore, if the terminal for obtaining the target information is an illegal terminal, the ciphertext of the target information cannot be decrypted; only when the terminal for acquiring the target information is a legal terminal, the ciphertext of the target information can be decrypted, so that the corresponding target information is acquired, and the legality of the terminal for acquiring the target information is verified, so that the safety of the target information can be ensured, and the possibility of target information leakage is reduced.
The method of the embodiments of the present application is described above, and the apparatus of the embodiments of the present application is described below.
Referring to fig. 5, fig. 5 is a schematic diagram illustrating a structure of a block chain based information processing apparatus according to an embodiment of the present application, where the block chain based information processing apparatus may be a computer program (including program code) running in a computer device, for example, the block chain based information processing apparatus is an application software; the apparatus may be used to perform the corresponding steps in the methods provided by the embodiments of the present application. The apparatus 50 comprises:
a function obtaining module 501, configured to obtain an objective function for describing information and a curve parameter of the objective function;
an information dividing module 502, configured to divide the target information to be processed according to the curve parameter of the target function to obtain at least two pieces of sub information;
the information adjusting module 503 is configured to obtain a random number corresponding to each piece of sub information, and adjust each piece of sub information according to the random number to obtain each piece of adjusted sub information;
a coordinate obtaining module 504, configured to obtain, according to the objective function and each piece of adjusted sub information, coordinate information corresponding to each piece of sub information in the at least two pieces of sub information;
an information encryption module 505, configured to encrypt coordinate information corresponding to each piece of sub information in the at least two pieces of sub information, to obtain a ciphertext of the coordinate information corresponding to each piece of sub information;
the information storage module 506 is configured to determine a ciphertext of the coordinate information corresponding to each piece of sub information as a ciphertext of the target information, and store the ciphertext of the target information in the block chain network.
Optionally, the information adjusting module 503 is specifically configured to:
splicing the random number with each piece of sub information to obtain each piece of spliced sub information;
and if the spliced sub information is smaller than the information threshold, determining the spliced sub information as the adjusted sub information.
Optionally, the apparatus 50 further comprises: a random number adjustment module 507, configured to:
if each piece of spliced sub information is larger than or equal to the information threshold, adjusting the random number;
splicing the adjusted random number with each piece of sub information to obtain each piece of candidate sub information;
and if each piece of candidate sub information is smaller than the information threshold, determining each piece of candidate sub information as each piece of adjusted sub information.
Optionally, the curve parameter includes a curve length; the information dividing module 502 is specifically configured to:
acquiring the length of the target information;
generating a length threshold according to the curve length, wherein the length threshold is smaller than the curve length;
if the length of the target information is an integral multiple of the length threshold, dividing the target information according to the length threshold to obtain at least two pieces of sub information;
if the length of the target information is not an integral multiple of the length threshold, filling the target information according to the length threshold to obtain filled target information; dividing the target information after the filling processing to obtain at least two pieces of sub information;
wherein the length of each piece of sub information in the at least two pieces of sub information is equal to the length threshold.
Optionally, the information encryption module 505 is specifically configured to:
acquiring a private key of a terminal to which the target information belongs and position information of each piece of sub information in the target information;
generating a key corresponding to each piece of sub information according to the position information;
and encrypting the coordinate information corresponding to each piece of sub information in the at least two pieces of sub information according to the private key of the terminal and the key corresponding to each piece of sub information to obtain the ciphertext of the coordinate information corresponding to each piece of sub information.
Optionally, the information encryption module 505 is specifically configured to:
obtaining the coordinates of a base point of the curve of the objective function;
obtaining the product of the base point coordinate and the private key of the terminal to obtain a candidate coordinate;
encrypting the candidate coordinate according to the key corresponding to each piece of sub information to obtain a ciphertext of the candidate coordinate;
and fusing the coordinate information corresponding to each piece of sub information with the corresponding candidate coordinate ciphertext to obtain the coordinate information ciphertext corresponding to each piece of sub information.
Optionally, the apparatus 50 further comprises: an information decryption module 508, configured to:
reading a ciphertext of the target information from the block chain network, wherein the ciphertext of the target information comprises a ciphertext of the coordinate information corresponding to each piece of sub information;
decrypting the ciphertext of each piece of sub information and the ciphertext corresponding to the candidate coordinate to obtain coordinate information of each piece of sub information;
determining each piece of sub information according to the coordinate information of each piece of sub information and the random number corresponding to each piece of sub information;
and splicing each piece of sub information to obtain the target information.
It should be noted that, for the content that is not mentioned in the embodiment corresponding to fig. 5, reference may be made to the description of the method embodiment, and details are not described here again.
According to an embodiment of the present application, the steps involved in a block chain based information processing method shown in fig. 3 may be performed by respective modules in a block chain based information processing apparatus shown in fig. 5. For example, step S101 shown in fig. 3 may be performed by the function acquisition module 501 in fig. 5, and step S102 shown in fig. 3 may be performed by the information dividing module 502 in fig. 5; step S103 shown in fig. 3 may be performed by the information adjusting module 503 in fig. 5; step S104 shown in fig. 3 may be performed by the coordinate acquisition module 504 in fig. 5; step S105 shown in fig. 3 may be performed by the information encryption module 505 in fig. 5; step S106 shown in fig. 3 may be performed by the information storage module 506 in fig. 5. According to an embodiment of the present application, each module in the information processing based on the block chain shown in fig. 5 may be respectively or completely merged into one or several units to form the unit, or some unit(s) therein may be further split into multiple sub-units with smaller functions, which may implement the same operation without affecting implementation of technical effects of the embodiment of the present application. The modules are divided based on logic functions, and in practical application, the functions of one module can be realized by a plurality of units, or the functions of a plurality of modules can be realized by one unit. In other embodiments of the present application, the information processing apparatus based on the blockchain may also include other units, and in practical applications, these functions may also be implemented by assistance of other units, and may be implemented by cooperation of a plurality of units.
According to another embodiment of the present application, the block chain based information processing apparatus as shown in fig. 5 may be constructed by running a computer program (including program codes) capable of executing the steps involved in the respective methods as shown in fig. 3 and 4 on a general-purpose computer device such as a computer including a processing element such as a Central Processing Unit (CPU), a random access storage medium (RAM), a read only storage medium (ROM), and a storage element, and the block chain based information processing method of the embodiment of the present application may be implemented. The computer program may be recorded on a computer-readable recording medium, for example, and loaded into and executed by the computing apparatus via the computer-readable recording medium.
In the embodiment of the application, the target information to be processed is divided according to the curve parameter of the target function to obtain at least two pieces of sub information, and each piece of sub information in the at least two pieces of sub information is adjusted, so that the coordinate information corresponding to each piece of adjusted sub information is generated according to each piece of adjusted sub information, and the success rate of obtaining the coordinate information corresponding to each piece of adjusted sub information is improved. And encrypting the coordinate information corresponding to each piece of sub information in at least two pieces of sub information to obtain a ciphertext of the coordinate information corresponding to each piece of sub information, determining the ciphertext of the coordinate information corresponding to each piece of sub information as the ciphertext of the target information, and storing the ciphertext of the target information into the block chain network. By encrypting each piece of sub information in the target information, the illegal terminal is prevented from cracking the ciphertext, so that the safety of each piece of sub information is improved, and the safety of the target information is improved; the ciphertext information of the target information is stored in the block chain network, and the safety of the information can be improved based on the characteristic that the block chain cannot be tampered and is not easy to lose; and moreover, the ciphertext of the target information is stored in the block chain network, so that the resource occupation of the local storage space of the terminal can be reduced, and the subsequent terminal can conveniently acquire the target information.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure. As shown in fig. 6, the computer device 60 may include: the processor 601, the network interface 604 and the memory 605, and the computer device 60 may further include: a user interface 603, and at least one communication bus 602. Wherein a communication bus 602 is used to enable the connection communication between these components. The user interface 603 may include a Display (Display) and a Keyboard (Keyboard), and the selectable user interface 603 may also include a standard wired interface and a standard wireless interface. The network interface 604 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 605 may be a high-speed RAM memory or a non-volatile memory (e.g., at least one disk memory). The memory 605 may optionally be at least one storage device located remotely from the processor 601. As shown in fig. 6, the memory 605, which is a kind of computer-readable storage medium, may include therein an operating system, a network communication module, a user interface module, and a device control application program.
In the computer device 60 shown in fig. 6, the network interface 604 may provide network communication functions; and the user interface 603 is primarily an interface for providing input to a user; and processor 601 may be used to invoke the device control application stored in memory 605 to implement:
acquiring an objective function for describing information and a curve parameter of the objective function;
dividing the target information to be processed according to the curve parameters of the target function to obtain at least two pieces of sub information;
acquiring a random number corresponding to each piece of sub information, and adjusting each piece of sub information according to the random number to obtain each piece of adjusted sub information;
acquiring coordinate information corresponding to each piece of sub information in the at least two pieces of sub information according to the target function and each piece of adjusted sub information;
encrypting the coordinate information corresponding to each piece of sub information in the at least two pieces of sub information to obtain a ciphertext of the coordinate information corresponding to each piece of sub information;
and determining the ciphertext of the coordinate information corresponding to each piece of sub information as the ciphertext of the target information, and storing the ciphertext of the target information into the block chain network.
It should be understood that the computer device 60 described in this embodiment of the present application may perform the description of the above-mentioned method for processing information based on a block chain in the embodiment corresponding to fig. 3 and fig. 4, and may also perform the description of the above-mentioned apparatus for processing information based on a block chain in the embodiment corresponding to fig. 5, which is not described herein again. In addition, the beneficial effects of the same method are not described in detail.
In the embodiment of the application, the target information to be processed is divided according to the curve parameter of the target function to obtain at least two pieces of sub information, and each piece of sub information in the at least two pieces of sub information is adjusted, so that the coordinate information corresponding to each piece of adjusted sub information is generated according to each piece of adjusted sub information, and the success rate of obtaining the coordinate information corresponding to each piece of adjusted sub information is improved. And encrypting the coordinate information corresponding to each piece of sub information in at least two pieces of sub information to obtain a ciphertext of the coordinate information corresponding to each piece of sub information, determining the ciphertext of the coordinate information corresponding to each piece of sub information as the ciphertext of the target information, and storing the ciphertext of the target information into the block chain network. By encrypting each piece of sub information in the target information, the illegal terminal is prevented from cracking the ciphertext, so that the safety of each piece of sub information is improved, and the safety of the target information is improved; the ciphertext information of the target information is stored in the block chain network, and the safety of the information can be improved based on the characteristic that the block chain cannot be tampered and is not easy to lose; and moreover, the ciphertext of the target information is stored in the block chain network, so that the resource occupation of the local storage space of the terminal can be reduced, and the subsequent terminal can conveniently acquire the target information.
Embodiments of the present application also provide a computer-readable storage medium storing a computer program, the computer program comprising program instructions, which, when executed by a computer, cause the computer to perform the method according to the foregoing embodiments, and the computer may be a part of the above-mentioned computer device. Such as the processor 601 described above. By way of example, the program instructions may be executed on one computer device, or on multiple computer devices located at one site, or distributed across multiple sites and interconnected by a communication network, which may comprise a blockchain network.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

Claims (10)

1. An information processing method based on a block chain is characterized by comprising the following steps:
acquiring an objective function for describing information and a curve parameter of the objective function;
dividing the target information to be processed according to the curve parameters of the target function to obtain at least two pieces of sub information;
acquiring a random number corresponding to each piece of sub information, and adjusting each piece of sub information according to the random number to obtain each piece of adjusted sub information;
acquiring coordinate information corresponding to each piece of sub information in the at least two pieces of sub information according to the target function and each piece of adjusted sub information;
encrypting the coordinate information corresponding to each piece of sub information in the at least two pieces of sub information to obtain a ciphertext of the coordinate information corresponding to each piece of sub information;
and determining the ciphertext of the coordinate information corresponding to each piece of sub information as the ciphertext of the target information, and storing the ciphertext of the target information into a block chain network.
2. The method according to claim 1, wherein the adjusting each piece of sub information according to the random number to obtain each piece of adjusted sub information comprises:
splicing the random number with each piece of sub information to obtain each piece of spliced sub information;
and if the spliced sub information is smaller than the information threshold, determining the spliced sub information as the adjusted sub information.
3. The method of claim 2, further comprising:
if each piece of spliced sub information is larger than or equal to the information threshold, adjusting the random number;
splicing the adjusted random number with each piece of sub information to obtain each piece of candidate sub information;
and if each piece of candidate sub information is smaller than the information threshold, determining each piece of candidate sub information as each piece of adjusted sub information.
4. The method of claim 1, wherein the curve parameter comprises a curve length; the dividing the target information to be processed according to the curve parameter of the target function to obtain at least two pieces of sub information includes:
acquiring the length of the target information;
generating a length threshold according to the curve length, wherein the length threshold is smaller than the curve length;
if the length of the target information is an integral multiple of the length threshold, dividing the target information according to the length threshold to obtain at least two pieces of sub information;
if the length of the target information is not an integral multiple of the length threshold, filling the target information according to the length threshold to obtain filled target information; dividing the target information after the filling processing to obtain at least two pieces of sub information;
wherein the length of each piece of sub information in the at least two pieces of sub information is equal to the length threshold.
5. The method according to claim 1, wherein the encrypting the coordinate information corresponding to each piece of the at least two pieces of sub information to obtain the ciphertext of the coordinate information corresponding to each piece of sub information comprises:
acquiring a private key of a terminal to which the target information belongs and position information of each piece of sub information in the target information;
generating a key corresponding to each piece of sub information according to the position information;
and encrypting the coordinate information corresponding to each piece of sub-information in the at least two pieces of sub-information according to the private key of the terminal and the key corresponding to each piece of sub-information to obtain the ciphertext of the coordinate information corresponding to each piece of sub-information.
6. The method according to claim 5, wherein the encrypting, according to the private key and the key corresponding to each piece of sub information, the coordinate information corresponding to each piece of sub information in the at least two pieces of sub information to obtain a ciphertext of the coordinate information corresponding to each piece of sub information comprises:
obtaining the coordinates of a base point of a curve of the objective function;
obtaining a product of the base point coordinate and a private key of the terminal to obtain a candidate coordinate;
encrypting the candidate coordinates according to the key corresponding to each piece of sub information to obtain a ciphertext of the candidate coordinates;
and fusing the coordinate information corresponding to each piece of sub information with the corresponding candidate coordinate ciphertext to obtain the coordinate information ciphertext corresponding to each piece of sub information.
7. The method of claim 6, further comprising:
reading a ciphertext of the target information from the block chain network, wherein the ciphertext of the target information comprises a ciphertext of the coordinate information corresponding to each piece of sub information;
decrypting the ciphertext of each piece of sub information and the ciphertext of the corresponding candidate coordinate to obtain coordinate information of each piece of sub information;
determining each piece of sub information according to the coordinate information of each piece of sub information and the random number corresponding to each piece of sub information;
and splicing each piece of sub information to obtain the target information.
8. An information processing apparatus based on a block chain, comprising:
the function acquisition module is used for acquiring an objective function for describing information and a curve parameter of the objective function;
the information dividing module is used for dividing the target information to be processed according to the curve parameters of the target function to obtain at least two pieces of sub information;
the information adjusting module is used for acquiring a random number corresponding to each piece of sub information, and adjusting each piece of sub information according to the random number to obtain each piece of adjusted sub information;
a coordinate obtaining module, configured to obtain, according to the target function and each piece of adjusted sub information, coordinate information corresponding to each piece of sub information in the at least two pieces of sub information;
the information encryption module is used for encrypting the coordinate information corresponding to each piece of sub information in the at least two pieces of sub information to obtain a ciphertext of the coordinate information corresponding to each piece of sub information;
and the information storage module is used for determining the ciphertext of the coordinate information corresponding to each piece of sub information as the ciphertext of the target information and storing the ciphertext of the target information into the block chain network.
9. A computer device, comprising: a processor, a memory, and a network interface;
the processor is connected to the memory and the network interface, wherein the network interface is configured to provide data communication functions, the memory is configured to store program code, and the processor is configured to call the program code to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to carry out the method according to any one of claims 1-7.
CN202011068462.9A 2020-09-29 2020-09-29 Block chain-based information processing method, device, equipment and medium Pending CN112133386A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011068462.9A CN112133386A (en) 2020-09-29 2020-09-29 Block chain-based information processing method, device, equipment and medium
PCT/CN2021/109279 WO2022068362A1 (en) 2020-09-29 2021-07-29 Block chain-based information processing method and apparatus, device, and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011068462.9A CN112133386A (en) 2020-09-29 2020-09-29 Block chain-based information processing method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN112133386A true CN112133386A (en) 2020-12-25

Family

ID=73843809

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011068462.9A Pending CN112133386A (en) 2020-09-29 2020-09-29 Block chain-based information processing method, device, equipment and medium

Country Status (2)

Country Link
CN (1) CN112133386A (en)
WO (1) WO2022068362A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022068356A1 (en) * 2020-09-29 2022-04-07 深圳壹账通智能科技有限公司 Blockchain-based information encryption method and apparatus, device and medium
WO2022068362A1 (en) * 2020-09-29 2022-04-07 深圳壹账通智能科技有限公司 Block chain-based information processing method and apparatus, device, and medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116188030A (en) * 2022-11-23 2023-05-30 深圳华稷科技有限公司 Secret recipe work tracing method and secret recipe work tracing system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108629027A (en) * 2018-05-09 2018-10-09 深圳壹账通智能科技有限公司 Customer data base method for reconstructing, device, equipment and medium on block chain
CN109543443A (en) * 2018-10-17 2019-03-29 平安科技(深圳)有限公司 User data management, device, equipment and storage medium based on block chain
CN109905232A (en) * 2019-03-11 2019-06-18 郑州师范学院 A kind of label decryption method, system, equipment and computer readable storage medium
CN110839026A (en) * 2019-11-12 2020-02-25 深圳市网心科技有限公司 Data processing method based on block chain and related equipment
CN111079171A (en) * 2019-11-11 2020-04-28 重庆邮电大学 Block chain-based medical data privacy protection method and storage medium
CN111339547A (en) * 2020-03-27 2020-06-26 苏州链原信息科技有限公司 Method for generating data tag, electronic device and computer storage medium
CN111339545A (en) * 2020-03-20 2020-06-26 苏州链原信息科技有限公司 Method for generating data tag, electronic device and computer storage medium

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109493204B (en) * 2018-10-16 2023-04-18 平安科技(深圳)有限公司 Service accounting method based on block chain and terminal equipment
WO2019072317A2 (en) * 2019-01-31 2019-04-18 Alibaba Group Holding Limited Cross-asset trading within blockchain networks
CN110061840B (en) * 2019-03-12 2022-10-28 平安科技(深圳)有限公司 Data encryption method and device, computer equipment and storage medium
CN110336673B (en) * 2019-06-03 2022-03-08 江苏科技大学 Block chain design method based on privacy protection
CN110289060A (en) * 2019-06-20 2019-09-27 福州数据技术研究院有限公司 A kind of personal medical data storage method under the chain based on random Merkle tree
CN111104386B (en) * 2019-11-04 2023-09-01 京东科技信息技术有限公司 File storage method, terminal and storage medium
CN111212026A (en) * 2019-11-21 2020-05-29 深圳壹账通智能科技有限公司 Data processing method and device based on block chain and computer equipment
CN111324517B (en) * 2020-01-20 2023-08-18 阿尔法云计算(深圳)有限公司 Application service supervision method, supervision server and storage medium
CN111444547B (en) * 2020-03-20 2024-03-19 苏州链原信息科技有限公司 Method, apparatus and computer storage medium for data integrity attestation
CN111612600B (en) * 2020-05-29 2023-07-14 深圳市迅雷网络技术有限公司 Block chain auction method, equipment, storage medium and block chain system
CN112133386A (en) * 2020-09-29 2020-12-25 深圳壹账通智能科技有限公司 Block chain-based information processing method, device, equipment and medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108629027A (en) * 2018-05-09 2018-10-09 深圳壹账通智能科技有限公司 Customer data base method for reconstructing, device, equipment and medium on block chain
CN109543443A (en) * 2018-10-17 2019-03-29 平安科技(深圳)有限公司 User data management, device, equipment and storage medium based on block chain
CN109905232A (en) * 2019-03-11 2019-06-18 郑州师范学院 A kind of label decryption method, system, equipment and computer readable storage medium
CN111079171A (en) * 2019-11-11 2020-04-28 重庆邮电大学 Block chain-based medical data privacy protection method and storage medium
CN110839026A (en) * 2019-11-12 2020-02-25 深圳市网心科技有限公司 Data processing method based on block chain and related equipment
CN111339545A (en) * 2020-03-20 2020-06-26 苏州链原信息科技有限公司 Method for generating data tag, electronic device and computer storage medium
CN111339547A (en) * 2020-03-27 2020-06-26 苏州链原信息科技有限公司 Method for generating data tag, electronic device and computer storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022068356A1 (en) * 2020-09-29 2022-04-07 深圳壹账通智能科技有限公司 Blockchain-based information encryption method and apparatus, device and medium
WO2022068362A1 (en) * 2020-09-29 2022-04-07 深圳壹账通智能科技有限公司 Block chain-based information processing method and apparatus, device, and medium

Also Published As

Publication number Publication date
WO2022068362A1 (en) 2022-04-07

Similar Documents

Publication Publication Date Title
CN111737724B (en) Data processing method and device, intelligent equipment and storage medium
CN112202554B (en) Information processing method, device and equipment for generating key based on attribute of information
CN108292402A (en) The determination of the public secret of secure exchange for information and level certainty key
WO2022068362A1 (en) Block chain-based information processing method and apparatus, device, and medium
US20230254129A1 (en) Key management for multi-party computation
CN111294203B (en) Information transmission method
CN114866323B (en) User-controllable privacy data authorization sharing system and method
WO2022068360A1 (en) Shared root key-based information processing method and apparatus, and device and medium
CN112202779B (en) Block chain based information encryption method, device, equipment and medium
CN112184444B (en) Method, device, equipment and medium for processing information based on characteristics of information
WO2020020127A1 (en) Private key storage and reading method and apparatus, and hardware device
CN109660534A (en) Safety certifying method, device, electronic equipment and storage medium based on more trade companies
CN112202555B (en) Information processing method, device and equipment for generating random number based on information attribute
Yoosuf Lightweight fog‐centric auditing scheme to verify integrity of IoT healthcare data in the cloud environment
CN108846671B (en) Online secure transaction method and system based on block chain
CN116455572B (en) Data encryption method, device and equipment
CN112131591A (en) Encryption method, device, equipment and medium for compressing ciphertext of information
CN115409511A (en) Personal information protection system based on block chain
CN112202453A (en) Information processing method, device, equipment and medium for compressing ciphertext
CN114418769A (en) Block chain transaction charging method and device and readable storage medium
CN113824713A (en) Key generation method, system and storage medium
CN112947966A (en) Firmware updating method, device and system for Internet of things equipment and storage medium
CN116996331B (en) Block chain-based data processing method, device, equipment and medium
CN118157855A (en) Information transmission encryption method and device and electronic equipment
CN115801266A (en) Data transmission method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant after: ONECONNECT FINANCIAL TECHNOLOGY Co.,Ltd. (SHANGHAI)

Address before: Room 201, Building A, No. 1 Qianwan Road, Qianhaisheng Cooperation Zone, Shenzhen City, Guangdong Province, 518000

Applicant before: ONECONNECT FINANCIAL TECHNOLOGY Co.,Ltd. (SHANGHAI)

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination