CN111738779A - Intelligent contract system based on standard SQL grammar - Google Patents

Intelligent contract system based on standard SQL grammar Download PDF

Info

Publication number
CN111738779A
CN111738779A CN202010721291.9A CN202010721291A CN111738779A CN 111738779 A CN111738779 A CN 111738779A CN 202010721291 A CN202010721291 A CN 202010721291A CN 111738779 A CN111738779 A CN 111738779A
Authority
CN
China
Prior art keywords
value
module
person
uplink data
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010721291.9A
Other languages
Chinese (zh)
Other versions
CN111738779B (en
Inventor
杜葵
王剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Rongzer Information Technology Co Ltd
Original Assignee
Jiangsu Rongzer Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Rongzer Information Technology Co Ltd filed Critical Jiangsu Rongzer Information Technology Co Ltd
Priority to CN202010721291.9A priority Critical patent/CN111738779B/en
Publication of CN111738779A publication Critical patent/CN111738779A/en
Application granted granted Critical
Publication of CN111738779B publication Critical patent/CN111738779B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0282Rating or review of business operators or products
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2452Query translation
    • G06F16/24528Standardisation; Simplification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • G06F16/24535Query rewriting; Transformation of sub-queries or views
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • G06F16/24537Query rewriting; Transformation of operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • G06F16/24549Run-time optimisation
    • 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
    • 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/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/083Shipping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/12Hotels or restaurants
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/52Network services specially adapted for the location of the user terminal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/321Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority
    • H04L9/3213Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority using tickets or tokens, e.g. Kerberos

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computational Linguistics (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Development Economics (AREA)
  • Power Engineering (AREA)
  • Accounting & Taxation (AREA)
  • Computing Systems (AREA)
  • Human Resources & Organizations (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Finance (AREA)
  • Game Theory and Decision Science (AREA)
  • Quality & Reliability (AREA)
  • Remote Sensing (AREA)
  • Operations Research (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses an intelligent contract system based on standard SQL grammar, which is used for solving the problem that an intelligent contract allows to execute trusted transaction without a third party, and the data recorded on a chain is not falsifiable but has input credibility, and comprises a server, a client, a server, an analysis and cutting module, a data request module and an allocation verification module; according to the method, the selected personnel receive the uplink data through the mobile phone terminal and reach the receiving address in the uplink data, review the comment content, shoot the reviewed video through the mobile phone terminal, and send the video passing the instruction and the review to the distribution verification module through the mobile phone terminal when the review is passed; the reliability of the uplink data is improved by verifying the uplink data distribution to the corresponding selected personnel.

Description

Intelligent contract system based on standard SQL grammar
Technical Field
The invention relates to the technical field of computer information processing and block chaining, in particular to an intelligent contract system based on standard SQL grammar.
Background
An intelligent contract is a computer protocol intended to facilitate, verify or perform negotiation or fulfillment of a contract digitally. Smart contracts allow trusted transactions to be performed without a third party. Although the data recorded on the chain is not falsifiable, the data recorded on the chain has the problem of input credibility, and the user inputs and evaluates the takeaway by using the existing takeaway data and then enters the chain, but the existing technology does not verify the data and has the problem of poor feasibility.
Disclosure of Invention
The invention aims to solve the problem that an intelligent contract allows trusted transaction to be executed without a third party, although data recorded on a chain is not falsifiable, the data recorded on the chain must have input credibility, and provides an intelligent contract system based on standard SQL grammar, in the invention, a selected person receives uplink data through a mobile phone terminal and reaches a receiving address in the uplink data, reviews the review content, shoots the reviewed video through the mobile phone terminal, and when the review is passed, the selected person sends a video passing an instruction and the review to an allocation verification module through the mobile phone terminal; when the audit is not passed, the selected personnel send out the inconsistent instruction and the audited video to the distribution verification module through the mobile phone terminal; the reliability of the uplink data is improved by verifying the uplink data distribution to the corresponding selected personnel.
The purpose of the invention can be realized by the following technical scheme: an intelligent contract system based on standard SQL grammar comprises a server, a client, a server, an analysis and cutting module, a data request module and an allocation verification module;
the server sends the random character string to the client, and the client processes the random character string after receiving the random character string, wherein the specific processing is as follows: stage1_ hash = SHA1, SHA1 is a plaintext cipher;
token=SHA1(scramble+SHA1(stage1_hash))XORstage1_hash;
the method comprises the following steps that the client sends a token to the server, and the server receives the token sent by the client and then processes the token, specifically: align SHA1(stage1_ hash) with mysql.user.passhold, i.e., stage1_ hash = tokenXORSHA1(scramble + mysql.user.passhold);
the analysis and cutting module is used for performing lexical analysis on the sql statement and cutting the sql statement, and comprises the following specific steps:
s1: performing lexical analysis on the sql statement in a recursive descending mode, writing a recursive function for each non-terminal character, judging the first token of all the conditions converted from the non-terminal character in the recursive function, and performing corresponding processing;
s2: carrying out syntactic analysis through a Yacc analyzer and a LALR analyzer, cutting out the support grammar of standard SQL and removing the view grammar;
s3: the analysis cutting module sends the cut grammar to the query optimization module;
the data request module is used for a user to submit a chain loading request instruction and chain loading data to the server through the intelligent terminal, and the server receives the chain loading data, the chain loading request instruction and the chain loading data and sends the chain loading data to the distribution module; the uplink data comprises the ID, the mobile phone number, the receiving address and the evaluation content of the user;
the distribution verification module is used for performing data verification on selected personnel corresponding to uplink data distribution, and specifically comprises the following steps:
SS 1: sending a position acquisition instruction to a mobile phone terminal of a registered person to acquire the real-time position of the registered person;
SS 2: taking the receiving address as the center of a circle, drawing a circle with a preset radius to obtain a screening range, and marking the registered personnel with the real-time position in the screening range as preferred personnel; preferred persons are labeled Rj, j =1, … …, n;
SS 3: calculating the distance difference between the real-time position of the preferred person and the receiving address to obtain the distance value of the preferred person and marking the distance value as HRj(ii) a The total number of validations by the preferred person is marked as YRj(ii) a Age marker of preferred person NRj
SS 4: acquiring a floor number and floor information of a receiving address, setting the floor number to be M1, taking a value M2 when the floor is provided with an elevator, and taking a value M3 when the floor is not provided with the elevator;
obtaining a stair value M of a receiving address by using a formula M = M1 × b1+ Mk × b 2; wherein b1 and b2 are both preset proportionality coefficients, k =2 or 3, and the value of M2 is zero;
SS 5: when the M value is larger than the set threshold value, the distance value, the total verification times and the age are subjected to dequantization treatment and numerical values are obtained, and a formula is utilized
Figure 246877DEST_PATH_IMAGE002
Obtaining the test kiss value E of the optimized personnelRj
When the M value is less than or equal to the set threshold, the distance value, the total verification times and the age are subjected to dequantization treatment, the numerical values are obtained, and a formula is utilized
Figure 845349DEST_PATH_IMAGE004
Obtaining the test kiss value E of the optimized personnelRj(ii) a Wherein b3, b4, b5, b6 and b7 are all preset proportionality coefficients; j. the design is a squareRjIs the verification mean of the preferred person;
SS 6: selecting the optimal person with the largest checking and matching value as the selected person, sending uplink data to the mobile phone terminal of the selected person by the distribution verification module, and marking the time for sending the uplink data as the sending time of the selected person;
SS 7: the selected person receives the uplink data through the mobile phone terminal, reaches the receiving address in the uplink data, reviews the comment content, shoots the reviewed video through the mobile phone terminal, and sends the approved video and the instruction to the distribution verification module through the mobile phone terminal when the review is passed; when the audit is not passed, the selected personnel send out the inconsistent instruction and the audited video to the distribution verification module through the mobile phone terminal; the distribution verification module marks the moment when the passing instruction or the non-conforming instruction is received as the receiving moment of the selected person;
SS 8: the distribution verification module sends the received passing instruction or the received non-conforming instruction to the server;
SS 9: the distribution verification module calculates the time difference between the receiving time and the sending time to obtain the processing time length of the selected person, processes the processing time length of the selected person to obtain the single processing value of the selected person, sums the single processing values of the selected person and obtains the verification mean value of the selected person;
when the server receives a passing instruction corresponding to the uplink data, performing data uplink processing on the uplink data and storing the uplink data in the server, and generating an intelligent contract; and when a non-conforming instruction corresponding to the uplink data is received, deleting the uplink data and sending the non-conforming instruction to the intelligent terminal of the user.
Preferably, the system further comprises a registration login module, wherein the registration login module is used for the takeout to submit registration information through the mobile phone terminal for registration and send the registration information which is successfully registered to the server for storage, and the registration information comprises a name, an identity card number, a mobile phone number and an age.
Preferably, the system further comprises a monitoring creation module, and the monitoring creation module is used for monitoring the local unix socket and making network communication and creating a local server for accepting the request.
Preferably, the query optimization module is configured to perform query and optimization processing on the clipped grammar, where the optimization processing includes elimination of sub-queries, elimination of nested connections, elimination of external connections, elimination of connections, rewriting by using equivalent predicates, simplification of conditions, semantic optimization, cutting of redundant operations, and minimization of query blocks, and the query optimization module maps the optimized grammar tree to iterators with different conditions to retrieve bottom-layer data.
Preferably, the specific processing steps for processing the processing time length of the selected person in SS9 are as follows:
the method comprises the following steps: marking the processing time length as T1;
step two: setting a time threshold to tq, q =1, … …, n; and tq is the largest;
the time threshold value corresponds to a distance matching range, and the distance matching range is marked as (g)q-1,gq],g0<……<gq-1<gq(ii) a And g is0The value range of (a) is zero;
step three: the distance value of the selected person is set at (g)q-1,gq]If the time is within the preset time threshold, the time threshold tq of the selected person is determined;
step four: obtaining the calculated time length T2 of the selected person by using a formula T2= T1-tq;
step five: setting a time length conversion coefficient to Fp;
step six: the single treatment value D for the selected person is obtained using the formula D = T2 × Fp.
Compared with the prior art, the invention has the beneficial effects that:
1. the data request module is used for a user to submit a chain-up request instruction and chain-up data to the server through the intelligent terminal, and the server receives the chain-up data, the chain-up request instruction and the chain-up data and sends the chain-up data to the distribution module; the distribution verification module is used for performing data verification on the selected personnel corresponding to the uplink data distribution, when the value M is larger than a set threshold value, the distance value, the total verification times and the age are subjected to dequantization processing, the numerical values are taken, and the verification value of the preferred personnel is obtained by a formula; when the M value is smaller than or equal to the set threshold value, carrying out dequantization processing on the spacing value, the total verification times and the age, taking the numerical value of the dequantization processing, and obtaining the verification value of the optimal person by using a formula; selecting the optimal person with the largest checking and matching value as the selected person, sending uplink data to the mobile phone terminal of the selected person by the distribution verification module, and marking the time for sending the uplink data as the sending time of the selected person; the selected person receives the uplink data through the mobile phone terminal, reaches the receiving address in the uplink data, reviews the comment content, shoots the reviewed video through the mobile phone terminal, and sends the approved video and the instruction to the distribution verification module through the mobile phone terminal when the review is passed; when the audit is not passed, the selected personnel send out the inconsistent instruction and the audited video to the distribution verification module through the mobile phone terminal; the reliability of the uplink data is improved by verifying the uplink data distribution to the corresponding selected personnel.
Drawings
In order to facilitate understanding for those skilled in the art, the present invention will be further described with reference to the accompanying drawings.
Fig. 1 is a schematic block diagram of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the following embodiments, and it should be understood that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
Referring to fig. 1, an intelligent contract system based on standard SQL syntax includes a server, a client, a server, an analysis and cutting module, a data request module, an allocation verification module, a registration and login module, a monitoring and creation module, and a query optimization module;
the server sends the random character string to the client, and the client processes the random character string after receiving the random character string, wherein the specific processing is as follows: stage1_ hash = SHA1, SHA1 is a plaintext cipher;
token=SHA1(scramble+SHA1(stage1_hash))XORstage1_hash;
the method comprises the following steps that the client sends a token to the server, and the server receives the token sent by the client and then processes the token, specifically: align SHA1(stage1_ hash) with mysql.user.passhold, i.e., stage1_ hash = tokenXORSHA1(scramble + mysql.user.passhold);
the analysis and cutting module is used for performing lexical analysis on the sql statement and cutting the sql statement, and comprises the following specific steps:
s1: performing lexical analysis on the sql statement in a recursive descending mode, writing a recursive function for each non-terminal character, judging the first token of all the conditions converted from the non-terminal character in the recursive function, and performing corresponding processing;
s2: carrying out syntactic analysis through a Yacc analyzer and a LALR analyzer, cutting out the support grammar of standard SQL and removing the view grammar;
s3: the analysis cutting module sends the cut grammar to the query optimization module;
the data request module is used for a user to submit a chain-up request instruction and chain-up data to the server through the intelligent terminal, and the server receives the chain-up data, the chain-up request instruction and the chain-up data and sends the chain-up data to the distribution module; the uplink data comprises the ID, the mobile phone number, the receiving address and the evaluation content of the user;
the distribution verification module is used for performing data verification on selected personnel corresponding to uplink data distribution, and specifically comprises the following steps:
SS 1: sending a position acquisition instruction to a mobile phone terminal of a registered person to acquire the real-time position of the registered person;
SS 2: taking the receiving address as the center of a circle, drawing a circle with a preset radius to obtain a screening range, and marking the registered personnel with the real-time position in the screening range as preferred personnel; preferred persons are labeled Rj, j =1, … …, n;
SS 3: calculating the distance difference between the real-time position of the preferred person and the receiving address to obtain the distance value of the preferred person and marking the distance value as HRj(ii) a The total number of validations by the preferred person is marked as YRj(ii) a Age marker of preferred person NRj
SS 4: acquiring a floor number and floor information of a receiving address, setting the floor number to be M1, taking a value M2 when the floor is provided with an elevator, and taking a value M3 when the floor is not provided with the elevator;
obtaining a stair value M of a receiving address by using a formula M = M1 × b1+ Mk × b 2; wherein b1 and b2 are both preset proportionality coefficients, k =2 or 3, and the value of M2 is zero;
SS 5: when the M value is larger than the set threshold value, the distance value, the total verification times and the age are subjected to dequantization treatment and numerical values are obtained, and a formula is utilized
Figure DEST_PATH_IMAGE005
Obtaining the test kiss value E of the optimized personnelRj
When the M value is less than or equal to the set threshold, the distance value, the total verification times and the age are subjected to dequantization treatment, the numerical values are obtained, and a formula is utilized
Figure DEST_PATH_IMAGE006
Obtaining the test kiss value E of the optimized personnelRj(ii) a Wherein b3, b4, b5, b6 and b7 are all preset proportionality coefficients; j. the design is a squareRjIs the verification mean of the preferred person;
SS 6: selecting the optimal person with the largest checking and matching value as the selected person, sending uplink data to the mobile phone terminal of the selected person by the distribution verification module, and marking the time for sending the uplink data as the sending time of the selected person;
SS 7: the selected person receives the uplink data through the mobile phone terminal, reaches the receiving address in the uplink data, reviews the comment content, shoots the reviewed video through the mobile phone terminal, and sends the approved video and the instruction to the distribution verification module through the mobile phone terminal when the review is passed; when the audit is not passed, the selected personnel send out the inconsistent instruction and the audited video to the distribution verification module through the mobile phone terminal; the distribution verification module marks the moment when the passing instruction or the non-conforming instruction is received as the receiving moment of the selected person;
SS 8: the distribution verification module sends the received passing instruction or the received non-conforming instruction to the server;
SS 9: the distribution verification module calculates the time difference between the receiving time and the sending time to obtain the processing time length of the selected person, processes the processing time length of the selected person to obtain the single processing value of the selected person, and the specific processing steps are as follows:
the method comprises the following steps: marking the processing time length as T1;
step two: setting a time threshold to tq, q =1, … …, n; and tq is the largest;
the time threshold value corresponds to a distance matching range, and the distance matching range is marked as (g)q-1,gq],g0<……<gq-1<gq(ii) a And g is0The value range of (a) is zero;
step three: the distance value of the selected person is set at (g)q-1,gq]If the time is within the preset time threshold, the time threshold tq of the selected person is determined;
step four: obtaining the calculated time length T2 of the selected person by using a formula T2= T1-tq;
step five: setting a time length conversion coefficient to Fp;
step six: obtaining a single processing value D of the selected person by using a formula D = T2 multiplied by Fp;
summing the single processing values of the selected personnel and taking the average value to obtain a verification average value of the selected personnel;
when the server receives a passing instruction corresponding to the uplink data, performing data uplink processing on the uplink data and storing the uplink data in the server, and generating an intelligent contract; and when a non-conforming instruction corresponding to the uplink data is received, deleting the uplink data and sending the non-conforming instruction to the intelligent terminal of the user.
The registration login module is used for the takeout to submit registration information through the mobile phone terminal for registration and send the registration information which is successfully registered into the server for storage, wherein the registration information comprises a name, an identification card number, a mobile phone number and an age;
the monitoring creation module is used for monitoring a local unix socket, performing network communication and creating a local server for receiving a request;
the query optimization module is used for querying and optimizing the cut grammar, the optimization processing comprises sub-query elimination, nested connection elimination, external connection elimination, equivalent predicate rewriting, condition simplification, semantic optimization, redundant operation cutting and query block minimization, and the query optimization module maps the optimized grammar tree to iterators with different conditions to retrieve bottom layer data;
the invention realizes that:
1. and monitoring the local unix socket for network communication, and creating a local server capable of receiving the request.
2. The challenge handshake protocol is realized to perform connection authentication:
21. the server sends a random string (scrambles) to the client.
22. The client needs to make the following calculation, and then the client sends token to the server.
stage1_ hash = SHA1 (plain text password)
token = SHA1(scramble + SHA1(stage1_hash)) XOR stage1_hash
23. The server performs the following calculation to compare whether the SHA1(stage1_ hash) is the same as mysql.user.password;
stage1_hash = token XOR SHA1(scramble + mysql.user.password)
3. compatible support is developed aiming at each large-version Mysql protocol, and the compatibility of each language Mysql connector is realized.
4. And performing lexical analysis on the sql statement by using a recursive descending mode, writing a recursive function for each non-terminal, judging the first token of all the conditions which the terminal may be converted into in the function, and performing corresponding processing.
5. And introducing an automatic generator of a Yacc LALR (1) analyzer to analyze syntax, cutting the supporting syntax of standard SQL, removing the related syntax of view, removing the related syntax of a stored process and the like.
6. Applying a plurality of query optimizations on the pruned grammar:
61. preference selection and projection (selection conditions are pushed down on the query tree);
62. elimination of sub-queries;
63. elimination of nested connections;
64. elimination of external connections;
65. elimination of the connection;
66. rewriting by using an equivalent predicate, and simplifying the condition;
67. semantic optimization;
68. pruning redundant operations (some pruning optimization techniques), minimizing query blocks.
7, searching the bottom data according to the iterator which is mapped to different conditions by the optimized syntax tree, preferentially searching the index when the index exists, determining the range-based search of the search range, and scanning the whole table if the index does not exist.
8 structured data are converted into KV form for access according to ASCII ascending order coding, types of the uint8, the uint16, the uint32 and the uint64 are directly coded in a large end, the types of the int8, the int16, the int32 and the int64 are firstly converted into the uint64, then the bits are subjected to exclusive OR 0x800000000000, and finally the large end is coded.
9. And creating a hash table in the service to cache the operated data, searching the cache before searching the bottom KV in the query operation, only searching whether a corresponding key exists in the write operation and the delete operation, and recording the operation into the cache instead of writing in real time.
10. The index data is updated using the LSM tree when the data is actually written. And the read-write lock is used for protecting the linear consistency of the index results;
the formulas are obtained by acquiring a large amount of data and performing software simulation, and the coefficients in the formulas are set by the technicians in the field according to actual conditions;
when the system is used, the server sends the random character string to the client, the client processes the random character string after receiving the random character string, the client sends the token to the server, the server processes the token after receiving the token sent by the client, and the analyzing and cutting module is used for performing lexical analysis and cutting on the sql statement, so that the operability of data can be greatly enhanced by providing functions with standard sql grammar, and a contract with stronger capability can be realized. Contract developers do not need to additionally learn the SDK and interfaces thereof, and can easily develop intelligent contracts through massive mysql courses and articles on the network, so that the development threshold is reduced; the structured data is converted into KV form for access according to ASCII ascending order code;
the data request module is used for a user to submit a chain-up request instruction and chain-up data to the server through the intelligent terminal, and the server receives the chain-up data, the chain-up request instruction and the chain-up data and sends the chain-up data to the distribution module; the distribution verification module is used for performing data verification on selected personnel corresponding to uplink data distribution, when the M value is larger than a set threshold value, the interval value, the total verification times and the age are subjected to dequantization treatment and numerical values are obtained, and a formula is utilized
Figure DEST_PATH_IMAGE007
Obtaining the test kiss value E of the optimized personnelRj(ii) a When the M value is less than or equal to the set threshold, the distance value, the total verification times and the age are subjected to dequantization treatment, the numerical values are obtained, and a formula is utilized
Figure DEST_PATH_IMAGE008
Obtaining the test kiss value E of the optimized personnelRj(ii) a Selecting the optimal person with the largest checking and matching value as the selected person, sending uplink data to the mobile phone terminal of the selected person by the distribution verification module, and marking the time for sending the uplink data as the sending time of the selected person; the selected person receives the uplink data through the mobile phone terminal, reaches the receiving address in the uplink data, reviews the comment content, shoots the reviewed video through the mobile phone terminal, and sends the approved video and the instruction to the distribution verification module through the mobile phone terminal when the review is passed; when the audit is not passed, the selected personnel send out the inconsistent instruction and the audited video to the distribution verification module through the mobile phone terminal; the distribution verification module marks the moment when the passing instruction or the non-conforming instruction is received as the receiving moment of the selected person; the reliability of the uplink data is improved by verifying the uplink data distribution to the corresponding selected personnel.
The preferred embodiments of the invention disclosed above are intended to be illustrative only. The preferred embodiments are not intended to be exhaustive or to limit the invention to the precise forms disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims (5)

1. An intelligent contract system based on standard SQL grammar is characterized by comprising a server, a client, a server, an analysis and cutting module, a data request module and an allocation verification module;
the server sends the random character string to the client, the client processes the random character string after receiving the random character string, the client sends the token to the server, the server receives and processes the token sent by the client, the analysis and cutting module is used for performing lexical analysis on the sql statement and cutting the sql statement, and the specific steps are as follows:
s1: performing lexical analysis on the sql statement in a recursive descending mode, writing a recursive function for each non-terminal character, judging the first token of all the conditions converted from the non-terminal character in the recursive function, and performing corresponding processing;
s2: carrying out syntactic analysis through a Yacc analyzer and a LALR analyzer, cutting out the support grammar of standard SQL and removing the view grammar;
s3: the analysis cutting module sends the cut grammar to the query optimization module;
the data request module is used for a user to submit a chain loading request instruction and chain loading data to the server through the intelligent terminal, and the server receives the chain loading data, the chain loading request instruction and the chain loading data and sends the chain loading data to the distribution module; the uplink data comprises the ID, the mobile phone number, the receiving address and the evaluation content of the user;
the distribution verification module is used for performing data verification on selected personnel corresponding to uplink data distribution, and specifically comprises the following steps:
SS 1: sending a position acquisition instruction to a mobile phone terminal of a registered person to acquire the real-time position of the registered person;
SS 2: taking the receiving address as the center of a circle, drawing a circle with a preset radius to obtain a screening range, and marking the registered personnel with the real-time position in the screening range as preferred personnel; preferred persons are labeled Rj, j =1, … …, n;
SS 3: calculating the distance difference between the real-time position of the preferred person and the receiving address to obtain the distance value of the preferred person and marking the distance value as HRj(ii) a The total number of validations by the preferred person is marked as YRj(ii) a Age marker of preferred person NRj
SS 4: acquiring a floor number and floor information of a receiving address, setting the floor number to be M1, taking a value M2 when the floor is provided with an elevator, and taking a value M3 when the floor is not provided with the elevator;
obtaining a stair value M of a receiving address by using a formula M = M1 × b1+ Mk × b 2; wherein b1 and b2 are both preset proportionality coefficients, k =2 or 3, and the value of M2 is zero;
SS 5: when the M value is larger than the set threshold value, the distance value, the total verification times and the age are subjected to dequantization treatment and numerical values are obtained, and a formula is utilized
Figure 37396DEST_PATH_IMAGE002
Obtaining the test kiss value E of the optimized personnelRj
When the M value is less than or equal to the set threshold, the distance value, the total verification times and the age are subjected to dequantization treatment, the numerical values are obtained, and a formula is utilized
Figure 954536DEST_PATH_IMAGE004
Obtaining the test kiss value E of the optimized personnelRj(ii) a Wherein b3, b4, b5, b6 and b7 are all preset proportionality coefficients; j. the design is a squareRjIs the verification mean of the preferred person;
SS 6: selecting the optimal person with the largest checking and matching value as the selected person, sending uplink data to the mobile phone terminal of the selected person by the distribution verification module, and marking the time for sending the uplink data as the sending time of the selected person;
SS 7: the selected person receives the uplink data through the mobile phone terminal, reaches the receiving address in the uplink data, reviews the comment content, shoots the reviewed video through the mobile phone terminal, and sends the approved video and the instruction to the distribution verification module through the mobile phone terminal when the review is passed; when the audit is not passed, the selected personnel send out the inconsistent instruction and the audited video to the distribution verification module through the mobile phone terminal; the distribution verification module marks the moment when the passing instruction or the non-conforming instruction is received as the receiving moment of the selected person;
SS 8: the distribution verification module sends the received passing instruction or the received non-conforming instruction to the server;
SS 9: the distribution verification module calculates the time difference between the receiving time and the sending time to obtain the processing time length of the selected person, processes the processing time length of the selected person to obtain the single processing value of the selected person, sums the single processing values of the selected person and obtains the verification mean value of the selected person;
when the server receives a passing instruction corresponding to the uplink data, performing data uplink processing on the uplink data and storing the uplink data in the server, and generating an intelligent contract; and when a non-conforming instruction corresponding to the uplink data is received, deleting the uplink data and sending the non-conforming instruction to the intelligent terminal of the user.
2. The system according to claim 1, further comprising a registration module, wherein the registration module is configured to allow the franchisee to submit registration information via the mobile phone terminal for registration and send the registration information that is successfully registered to the server for storage, and the registration information includes a name, an identification number, a mobile phone number, and an age.
3. The system according to claim 1, further comprising a monitor creation module, wherein the monitor creation module is configured to monitor and perform network communication with a local unix socket and create a local server that accepts requests.
4. The system according to claim 1, wherein the query optimization module is configured to perform query and optimization processing on the clipped grammar, the optimization processing includes elimination of sub-queries, elimination of nested connections, elimination of outer connections, elimination of connections, rewriting using equivalent predicates, simplification of conditions, semantic optimization, pruning of redundant operations, and minimization of query blocks, and the query optimization module maps the optimized grammar tree to iterators with different conditions to retrieve the underlying data.
5. The system according to claim 1, wherein the specific processing steps for processing the processing duration of the selected person in SS9 are as follows:
the method comprises the following steps: marking the processing time length as T1;
step two: setting a time threshold to tq, q =1, … …, n; and tq is the largest;
the time threshold value corresponds to a distance matching range, and the distance matching range is marked as (g)q-1,gq],g0<……<gq-1<gq(ii) a And g is0The value range of (a) is zero;
step three: the distance value of the selected person is set at (g)q-1,gq]If the time is within the preset time threshold, the time threshold tq of the selected person is determined;
step four: obtaining the calculated time length T2 of the selected person by using a formula T2= T1-tq;
step five: setting a time length conversion coefficient to Fp;
step six: the single treatment value D for the selected person is obtained using the formula D = T2 × Fp.
CN202010721291.9A 2020-07-24 2020-07-24 Intelligent contract system based on standard SQL grammar Active CN111738779B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010721291.9A CN111738779B (en) 2020-07-24 2020-07-24 Intelligent contract system based on standard SQL grammar

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010721291.9A CN111738779B (en) 2020-07-24 2020-07-24 Intelligent contract system based on standard SQL grammar

Publications (2)

Publication Number Publication Date
CN111738779A true CN111738779A (en) 2020-10-02
CN111738779B CN111738779B (en) 2020-12-08

Family

ID=72657568

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010721291.9A Active CN111738779B (en) 2020-07-24 2020-07-24 Intelligent contract system based on standard SQL grammar

Country Status (1)

Country Link
CN (1) CN111738779B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109544160A (en) * 2018-11-20 2019-03-29 杭州呯嘭智能技术有限公司 A kind of transaction authenticity verification methods and system based on block chain and intelligent contract
CN109993669A (en) * 2019-04-11 2019-07-09 北京启迪区块链科技发展有限公司 A kind of house-purchase qualification examination method, apparatus, equipment and storage medium
CN110489486A (en) * 2019-08-02 2019-11-22 腾讯科技(深圳)有限公司 Generate method, seed node and the medium of block chain network
CN110599107A (en) * 2019-09-24 2019-12-20 腾讯科技(深圳)有限公司 Logistics data processing method and device based on block chain
US20200127812A1 (en) * 2018-10-22 2020-04-23 Motorola Solutions, Inc Method to establish distributed ledger networks with multiple access levels for an incident

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200127812A1 (en) * 2018-10-22 2020-04-23 Motorola Solutions, Inc Method to establish distributed ledger networks with multiple access levels for an incident
CN109544160A (en) * 2018-11-20 2019-03-29 杭州呯嘭智能技术有限公司 A kind of transaction authenticity verification methods and system based on block chain and intelligent contract
CN109993669A (en) * 2019-04-11 2019-07-09 北京启迪区块链科技发展有限公司 A kind of house-purchase qualification examination method, apparatus, equipment and storage medium
CN110489486A (en) * 2019-08-02 2019-11-22 腾讯科技(深圳)有限公司 Generate method, seed node and the medium of block chain network
CN110599107A (en) * 2019-09-24 2019-12-20 腾讯科技(深圳)有限公司 Logistics data processing method and device based on block chain

Also Published As

Publication number Publication date
CN111738779B (en) 2020-12-08

Similar Documents

Publication Publication Date Title
CN102598007B (en) Effective detection fingerprints the system and method for data and information
CN101057248B (en) Fingerprint biomass machine
CN110309259A (en) Audit result data storage, querying method, audit item storage method and device
CN109117440A (en) A kind of metadata information acquisition methods, system and computer readable storage medium
CN113377740A (en) Railway metadata management method, application method and device
KR101691412B1 (en) Phone number based 2channel user authentication assistive device and method
CN112925914A (en) Data security classification method, system, device and storage medium
CN115952547A (en) Database desensitization device and method based on protocol analysis
CN114898831A (en) Medical data retrieval system and retrieval method
CN111738779B (en) Intelligent contract system based on standard SQL grammar
KR100724532B1 (en) System for providing unified profile service and method thereof
CN111460139B (en) Intelligent management based engineering supervision knowledge service system and method
CN115935042B (en) Mortgage asset intelligent duplicate checking method and system based on fusion model
US20040062428A1 (en) Minutiae matching system and method
CN113572792B (en) Engineering measurement intelligent management platform based on Internet of things
CN113010865B (en) Big data base component safety management method and system of intelligent education platform
CN114757805A (en) Block chain-based convenient government affair service system
US11068236B2 (en) Identification of users across multiple platforms
CN112330305A (en) E-government system based on block chain
KR101709952B1 (en) Management server and method for detecting personal information
CN112559846B (en) APP code authentication system and implementation method thereof
CN117077210B (en) Financial data query method and system
CN117520617B (en) Data information display method based on chart component
US20200327968A1 (en) System and method of integrated unique identity management
CN114117540B (en) Big data analysis processing method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20201002

Assignee: Nanjing Jiangbei new area Yangzi Technology Finance Leasing Co.,Ltd.

Assignor: JIANGSU RONGZER INFORMATION TECHNOLOGY Co.,Ltd.

Contract record no.: X2021320000067

Denomination of invention: An intelligent contract system based on standard SQL syntax

Granted publication date: 20201208

License type: Exclusive License

Record date: 20210805

PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: An intelligent contract system based on standard SQL syntax

Effective date of registration: 20210811

Granted publication date: 20201208

Pledgee: Nanjing Jiangbei new area green Financing Guarantee Co.,Ltd.

Pledgor: JIANGSU RONGZER INFORMATION TECHNOLOGY Co.,Ltd.

Registration number: Y2021320000168

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20220905

Granted publication date: 20201208

Pledgee: Nanjing Jiangbei new area green Financing Guarantee Co.,Ltd.

Pledgor: JIANGSU RONGZER INFORMATION TECHNOLOGY CO.,LTD.

Registration number: Y2021320000168

PC01 Cancellation of the registration of the contract for pledge of patent right
EC01 Cancellation of recordation of patent licensing contract

Assignee: Nanjing Jiangbei new area Yangzi Technology Finance Leasing Co.,Ltd.

Assignor: JIANGSU RONGZER INFORMATION TECHNOLOGY CO.,LTD.

Contract record no.: X2021320000067

Date of cancellation: 20220921

EC01 Cancellation of recordation of patent licensing contract