CN112131478B - Transaction detection method and device - Google Patents

Transaction detection method and device Download PDF

Info

Publication number
CN112131478B
CN112131478B CN202011041344.9A CN202011041344A CN112131478B CN 112131478 B CN112131478 B CN 112131478B CN 202011041344 A CN202011041344 A CN 202011041344A CN 112131478 B CN112131478 B CN 112131478B
Authority
CN
China
Prior art keywords
transaction
service module
proxy service
sensitive
end application
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.)
Active
Application number
CN202011041344.9A
Other languages
Chinese (zh)
Other versions
CN112131478A (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.)
Jingdong Technology Holding Co Ltd
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology Holding Co Ltd
Jingdong Technology 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 Jingdong Technology Holding Co Ltd, Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202011041344.9A priority Critical patent/CN112131478B/en
Publication of CN112131478A publication Critical patent/CN112131478A/en
Application granted granted Critical
Publication of CN112131478B publication Critical patent/CN112131478B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • 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
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Computing Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the application provides a transaction detection method and a transaction detection device, which are applied to nodes in a block chain system, wherein the nodes in the block chain system comprise front-end application, a proxy service module and a bottom layer service module, and the method comprises the following steps: the front-end application sends a transaction uplink request to the proxy service module, wherein the transaction uplink request comprises transaction data of a transaction to be processed; if the transaction data of the transaction to be processed does not contain sensitive words, the proxy service module sends a transaction uplink instruction to the bottom layer service module; the bottom layer service module writes transaction data of the pending transaction into the blockchain system. Compared with the prior art, the method and the system have the advantages that before the transaction data are uplink, the transaction data are detected according to the sensitive words, and the transaction data with the sensitive words which do not meet the specification are not written into the blockchain system, so that the function that the blockchain system can filter the transaction data with the content which does not meet the specification is realized.

Description

Transaction detection method and device
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a transaction detection method and apparatus.
Background
Blockchains refer to traceable, non-tamperable, distributed billing mechanisms implemented by cryptographic techniques, point-to-point networks, consensus mechanisms, and block-chained data structures organized in time series. Wherein the blockchain backend as-a-service (blockchain AS A SERVICE, baaS) platform can quickly create, deploy, run, and monitor blockchain applications.
In the prior art, the Baas platform can realize the functions of constructing a network, managing an account book, deploying an electronic contract and the like. On the Baas platform, enterprise organization users may invoke electronic contracts to submit transaction data to the blockchain or to query transaction data from the chain.
However, when receiving transaction data submitted to the chain by the enterprise organization by calling the electronic contract, the conventional Baas platform only needs to detect whether the transaction data meets the rule of the electronic contract, and does not need to detect specific content of the transaction data, so that the blockchain systems such as Baas platform cannot filter the transaction data of which the content does not meet the specification.
Disclosure of Invention
The embodiment of the application provides a transaction detection method and a transaction detection device, which are used for solving the problem that a block chain system in the prior art cannot filter transaction data of which the content is not in accordance with the specification.
In a first aspect, an embodiment of the present application provides a transaction detection method applied to a node in a blockchain system, where the node in the blockchain system includes a front-end application, a proxy service module, and a bottom layer service module, the method includes:
The front-end application sends a transaction uplink request to the proxy service module, wherein the transaction uplink request comprises transaction data of a to-be-processed transaction;
If the transaction data of the transaction to be processed does not contain sensitive words, the proxy service module sends a transaction uplink instruction to the bottom layer service module;
and the bottom layer service module writes the transaction data of the transaction to be processed into the blockchain system.
In an optional implementation manner, the node in the blockchain system further comprises a back-end service module corresponding to the front-end application;
The front-end application sending a transaction uplink request to the proxy service module, comprising:
And the front-end application calls the back-end service module to send the transaction uplink request to the proxy service module.
In an alternative embodiment, after the underlying service module writes the transaction data for the pending transaction to the blockchain system, the method further includes:
the proxy service module sends a first message to the front-end application, wherein the first message is used for indicating that the transaction data of the pending transaction is successfully written into the blockchain system.
In an alternative embodiment, after the front-end application sends a transaction uplink request to the proxy service module, the method further comprises:
And if the transaction data of the transaction to be processed contains the sensitive word, the proxy service module sends a second message to the front-end application, wherein the second message is used for indicating the sensitive word in the transaction data of the transaction to be processed.
In an alternative embodiment, the method further comprises:
the front-end application sends a query request to the proxy service module, wherein the query request comprises an identification of a transaction to be queried;
the proxy service module sends a query instruction to the bottom layer service module according to the query request;
The bottom layer service module acquires transaction data of the transaction to be queried according to the query instruction;
and the bottom layer service module sends the transaction data of the transaction to be queried to the proxy service module.
In an alternative embodiment, after the bottom layer service module sends the transaction data of the transaction to be queried to the proxy service module, the method further includes:
And if the transaction data of the transaction to be queried does not contain the sensitive word, the proxy service module sends the transaction data of the transaction to be queried to the front-end application.
In an alternative embodiment, after the bottom layer service module sends the transaction data of the transaction to be queried to the proxy service module, the method further includes:
and if the transaction data of the transaction to be queried contains the sensitive word, the proxy service module executes sensitive transaction processing operation.
In an alternative embodiment, the sensitive transaction processing operation includes: recording the transaction to be queried as a sensitive transaction, sending a sensitive transaction prompt to the front-end application, and accumulating the times of the user calling the behavior of the sensitive transaction by using the front-end application.
In an alternative embodiment, after the proxy service module performs the sensitive transaction processing operation, the method further comprises:
If the number of times of the user calling the sensitive transaction by using the front-end application exceeds a threshold value, the proxy service module sends a forbidden indication to the front-end application, wherein the forbidden indication comprises account information of the user;
The front-end application stops receiving the transaction uplink request and/or the query request input by the user.
In an alternative embodiment, the front-end application stops receiving the transaction uplink request and/or the query request input by the user, and includes:
And the front-end application stops receiving the transaction uplink request and/or the query request input by the user by calling a back-end service module corresponding to the front-end application.
In an alternative embodiment, the method further comprises:
the agent service module receives a sensitive word change request sent by a management node;
And the proxy service module adds or deletes the sensitive word in the sensitive word stock in the proxy service module according to the sensitive word change request.
In an alternative embodiment, the method further comprises:
the front-end application sends a sensitive word adding request to the proxy service module, wherein the sensitive word adding request comprises a sensitive word;
the proxy service module adds the sensitive word in a sensitive word stock in the proxy service module.
In a second aspect, an embodiment of the present application provides a transaction detection device, the transaction detection device being a node in a blockchain system, the transaction detection device including: front-end application, proxy service module and bottom layer service module;
The front-end application is used for sending a transaction uplink request to the proxy service module, wherein the transaction uplink request comprises transaction data of a transaction to be processed;
the proxy service module is used for sending a transaction uplink instruction to the bottom layer service module if the transaction data of the transaction to be processed does not contain sensitive words;
The bottom layer service module is used for writing the transaction data of the transaction to be processed into the blockchain system.
In an optional implementation manner, the transaction detection device further comprises a back-end service module corresponding to the front-end application;
The front-end application is specifically configured to invoke the back-end service module to send the transaction uplink request to the proxy service module.
In an alternative embodiment, the proxy service module is further configured to send a first message to the front-end application, where the first message is used to indicate that the transaction data of the pending transaction is successfully written into the blockchain system.
In an optional implementation manner, the proxy service module is further configured to send a second message to the front end application if the transaction data of the to-be-processed transaction includes the sensitive word, where the second message is used to indicate the sensitive word in the transaction data of the to-be-processed transaction.
In an optional implementation manner, the front-end application is further configured to send a query request to the proxy service module, where the query request includes an identifier of a transaction to be queried;
The proxy service module is further used for sending a query instruction to the bottom layer service module according to the query request;
The bottom layer service module is further used for acquiring transaction data of the transaction to be queried according to the query instruction; and transmitting the transaction data of the transaction to be queried to the proxy service module.
In an optional implementation manner, the proxy service module is further configured to, if the transaction data of the transaction to be queried does not include the sensitive word, send the transaction data of the transaction to be queried to the front end application.
In an optional implementation manner, the proxy service module is further configured to execute a sensitive transaction processing operation if the transaction data of the transaction to be queried includes the sensitive word.
In an alternative embodiment, the sensitive transaction processing operation includes: recording the transaction to be queried as a sensitive transaction, sending a sensitive transaction prompt to the front-end application, and accumulating the times of the user calling the behavior of the sensitive transaction by using the front-end application.
In an optional implementation manner, the proxy service module is further configured to send a disable instruction to the front-end application if the number of times that the user uses the front-end application to invoke the behavior of the sensitive transaction exceeds a threshold, where the disable instruction includes account information of the user;
The front-end application is further configured to stop receiving the transaction uplink request and/or the query request input by the user.
In an optional implementation manner, the front-end application is specifically configured to stop receiving the transaction uplink request and/or the query request input by the user by calling a back-end service module corresponding to the front-end application.
In an optional implementation manner, the proxy service module is further configured to receive a sensitive word change request sent by the management node; and adding or deleting the sensitive word in a sensitive word stock in the proxy service module according to the sensitive word change request.
In an optional implementation manner, the front-end application is further configured to send a sensitive word adding request to the proxy service module, where the sensitive word adding request includes a sensitive word;
the proxy service module is further used for adding the sensitive words in a sensitive word stock in the proxy service module.
In a third aspect, the present application also provides an electronic device, including:
A memory and a processor;
the memory is used for storing executable instructions of the processor;
The processor is configured to perform the method of the first aspect via execution of the executable instructions.
In a fourth aspect, the invention also provides a non-transitory computer readable storage medium having stored thereon computer instructions, the computer program implementing any one of the possible methods of the first aspect when executed by a processor.
The transaction detection method and device provided by the embodiment of the application are applied to nodes in a block chain system, wherein the nodes in the block chain system comprise front-end application, a proxy service module and a bottom layer service module, and the method comprises the following steps: the front-end application sends a transaction uplink request to the proxy service module, wherein the transaction uplink request comprises transaction data of a transaction to be processed; if the transaction data of the transaction to be processed does not contain sensitive words, the proxy service module sends a transaction uplink instruction to the bottom layer service module; the bottom layer service module writes transaction data of the pending transaction into the blockchain system. Compared with the prior art, the method and the system have the advantages that before the transaction data are uplink, the transaction data are detected according to the sensitive words, and the transaction data with the sensitive words which do not meet the specification are not written into the blockchain system, so that the function that the blockchain system can filter the transaction data with the content which does not meet the specification is realized.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description of the embodiments or the drawings used in the description of the prior art will be given in brief, it being obvious that the drawings in the description below are some embodiments of the invention and that other drawings can be obtained from them without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of an application scenario of a transaction detection method according to an embodiment of the present application;
Fig. 2 is a signaling interaction diagram of a transaction detection method according to an embodiment of the present application;
FIG. 3 is a signaling interaction diagram of another transaction detection method according to an embodiment of the present application;
Fig. 4 is a signaling interaction diagram of yet another transaction detection method according to an embodiment of the present application;
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Blockchains refer to traceable, non-tamperable, distributed billing mechanisms implemented by cryptographic techniques, point-to-point networks, consensus mechanisms, and block-chained data structures organized in time series. Wherein the blockchain backend as-a-service (blockchain AS A SERVICE, baaS) platform can quickly create, deploy, run, and monitor blockchain applications.
In the prior art, the Baas platform can realize the functions of constructing a network, managing an account book, deploying an electronic contract and the like. On the Baas platform, enterprise organization users may invoke electronic contracts to submit transaction data to the blockchain or to query transaction data from the chain. However, when receiving transaction data submitted to the chain by the enterprise organization by calling the electronic contract, the conventional Baas platform only needs to detect whether the transaction data meets the rule of the electronic contract, and does not need to detect specific content of the transaction data, so that the problem that the blockchain system such as Baas platform cannot filter the transaction data of which the content does not meet the specification is caused.
In order to solve the problems, the application provides a transaction detection method and a transaction detection device, which avoid storing transaction data which does not accord with the content specification in a blockchain system by detecting sensitive words in the transaction data, thereby realizing that the blockchain system has no filtering of the transaction data which does not accord with the content specification.
The application scenario of the present application is described below.
Fig. 1 is a schematic diagram of an application scenario of a transaction detection method according to an embodiment of the present application. As shown in fig. 1, terminal equipment 101, terminal equipment 102, terminal equipment 103, terminal equipment 104, and the like constitute one blockchain system. When the user writes transaction data into the blockchain system through the terminal device 101, the terminal device 101 can detect the sensitive word of the transaction data input by the user, and only the transaction data without the sensitive word is written into the blockchain system by the terminal device 101.
The terminal device 101, the terminal device 102, the terminal device 103, and the terminal device 104 may be one node in a blockchain system. The terminal device may be a mobile phone (mobile phone), a tablet computer (pad), a computer with a wireless transceiving function, a Virtual Reality (VR) terminal device, an augmented reality (augmented reality, AR) terminal device, a wireless terminal in industrial control (industrial control), a wireless terminal in teleoperation (remote medical surgery), a wireless terminal in smart grid (SMART GRID), a wireless terminal in smart home (smart home), or the like. In the embodiment of the present application, the device for implementing the function of the terminal may be a terminal device, or may be a device capable of supporting the terminal to implement the function, for example, a chip system, and the device may be installed in the terminal device. In the embodiment of the application, the chip system can be composed of chips, and can also comprise chips and other discrete devices.
It should be noted that, the application scenario of the technical solution of the present application may be the scenario in fig. 1, but is not limited thereto, and may be applied to other scenarios where transaction detection is required.
It may be understood that the transaction detection method may be implemented by the transaction detection device provided by the embodiment of the present application, where the transaction detection device may be part or all of a device, and specifically may be a node in a blockchain system, for example, the terminal device or a chip of the terminal device.
The following takes a transaction detection device integrated with or installed with related execution codes as an example, and uses specific embodiments to describe the technical solution of the embodiment of the present application in detail as a node in a blockchain system. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Fig. 2 is a signaling interaction diagram of a transaction detection method according to an embodiment of the present application, where the embodiment relates to a specific process of how to perform transaction detection in a process of uplink transaction data. The execution subject of the application is a transaction detection device which can be a node in a blockchain system, wherein the node in the blockchain system comprises a front-end application, a proxy service module and a bottom layer service module. As shown in fig. 2, the method includes:
s201, the front-end application sends a transaction uplink request to the proxy service module, wherein the transaction uplink request comprises transaction data of a to-be-processed transaction.
The front-end application may be an application that supports uploading transaction data to the blockchain system. The proxy service module may be a service module that manages requests initiated by the front-end application.
In the application, when the user needs to store the transaction data of the transaction to be processed on the blockchain system, the operation can be performed on the front-end application, so that the transaction uplink request is triggered to be sent to the proxy service module.
The embodiment of the application does not limit the type of the transaction data of the transaction to be processed, and can determine the type of the transaction data according to the actual situation.
In some embodiments, the transaction uplink request input by the user may further include identification or account information of the user, and the proxy service module may verify whether the user has authority to write the transaction data into the blockchain system by verifying the identification or account information of the user.
It should be appreciated that in some embodiments, the nodes in the blockchain system further include backend service modules corresponding to the front-end applications. The back-end service module is used for processing the operation triggered by the user on the page of the front-end application. The front-end application may specifically send a transaction uplink request to the proxy service module by invoking the back-end service module, for example.
S202, if the transaction data of the transaction to be processed does not contain sensitive words, the proxy service module sends a transaction uplink instruction to the bottom layer service module.
In this step, after the proxy service module receives the transaction uplink request sent by the front end application, the proxy service module may perform sensitive word detection on the transaction data of the transaction to be processed, and if the transaction data of the transaction to be processed does not include a sensitive word, the proxy service module sends a transaction uplink instruction to the bottom service module to instruct the bottom service module to write the transaction data into the blockchain system.
The bottom layer service module is used for writing and inquiring transaction data on the blockchain system.
It should be appreciated that the sensitive words may be pre-set specific words, such as words with a violent tendency, non-civilized words, words with a sensitive political tendency, etc.
In some embodiments, the proxy service module may be sensitive to word thesaurus. The sensitive word stock is updated in a number of ways.
For example, the proxy service module may receive a sensitive word change request sent by the management node, and then the proxy service module adds or deletes a sensitive word in a sensitive word stock in the proxy service module according to the sensitive word change request.
Illustratively, the front-end application sends a sensitive word addition request to the proxy service module, the sensitive word addition request including the sensitive word. Then, the proxy service module adds sensitive words in a sensitive word stock in the proxy service module.
The proxy service module can also periodically and actively acquire common sensitive words from the network, so that the sensitive word stock is periodically updated.
In some embodiments, before writing the transaction data of the transaction to be processed into the blockchain system, the proxy service module may further detect whether the transaction data meets a rule of the electronic contract, and only when the transaction data of the transaction to be processed does not include a sensitive word and meets the rule of the electronic contract, the proxy service module sends a transaction uplink indication to the bottom layer service module.
In some alternative embodiments, if the transaction data of the transaction to be processed includes a sensitive word, the proxy service module sends a second message to the front-end application, where the second message is used to indicate the sensitive word in the transaction data of the transaction to be processed. For example, if the transaction data of the transaction to be processed includes a sensitive word, the proxy service module may send a second message with "transaction includes a sensitive word" by the front-end application.
S203, the bottom layer service module writes transaction data of the transaction to be processed into the blockchain system.
In the embodiment of the application, the transaction data of the transaction to be processed is written into the blockchain system by the bottom layer service module without limitation, and a common mode can be adopted.
In some alternative embodiments, after the underlying service module writes the transaction data for the pending transaction to the blockchain system, the proxy service module sends a first message to the front-end application, the first message indicating that the transaction data for the pending transaction was successfully written to the blockchain system.
The transaction detection method provided by the embodiment of the application is applied to the nodes in the block chain system, wherein the nodes in the block chain system comprise front-end application, proxy service modules and bottom layer service modules, and the method comprises the following steps: the front-end application sends a transaction uplink request to the proxy service module, wherein the transaction uplink request comprises transaction data of a transaction to be processed; if the transaction data of the transaction to be processed does not contain sensitive words, the proxy service module sends a transaction uplink instruction to the bottom layer service module; the bottom layer service module writes transaction data of the pending transaction into the blockchain system. Compared with the prior art, the method and the system have the advantages that before the transaction data are uplink, the transaction data are detected according to the sensitive words, and the transaction data with the sensitive words which do not meet the specification are not written into the blockchain system, so that the function that the blockchain system can filter the transaction data with the content which does not meet the specification is realized.
On the basis of the above embodiment, the following describes a process for detecting that the transaction data contains a sensitive word. Fig. 3 is a signaling interaction diagram of another transaction detection method according to an embodiment of the present application, as shown in fig. 3, where the method includes:
S301, the front-end application sends a transaction uplink request to the proxy service module, wherein the transaction uplink request comprises transaction data of a to-be-processed transaction.
S302, the proxy service module judges whether the transaction data of the transaction to be processed contains sensitive words.
If yes, step S305 is executed, and if no, step S303 is executed.
S303, the proxy service module sends a transaction uplink instruction to the bottom layer service module.
S304, the bottom layer service module writes transaction data of the transaction to be processed into the blockchain system.
The technical terms, effects, features, and alternative embodiments of S301-S304 may be understood with reference to S201-S203 shown in fig. 2, and will not be described again here for repeated matters.
S305, the proxy service module sends a second message to the front-end application, wherein the second message is used for indicating sensitive words in transaction data of the transaction to be processed.
In this step, if it is detected that the transaction data of the transaction to be processed includes a sensitive word, the proxy service module sends a second message to the front-end application, where the second message is used to indicate the sensitive word in the transaction data of the transaction to be processed.
It should be appreciated that the front-end application receives the second message, which may be displayed on a display component of a node in the blockchain system. The sensitive words can be displayed on a display screen of a node in the blockchain system, and the positions of the sensitive words are marked, so that a user is reminded to modify transaction data to meet the quality requirements of the content.
In the transaction detection method provided by the application, when the transaction data of the transaction to be processed contains the sensitive word, the proxy service module sends the second message to the front-end application to send the error prompt to the user, so that the user can find the sensitive word in the transaction data of the transaction to be processed in time and modify the sensitive word in time, and further the content quality of the transaction data recorded on the blockchain system is improved.
On the basis of the embodiment, since the sensitive words may change with time, the already-chained transaction data may also have the sensitive words in the subsequent query process. Therefore, the transaction detection method provided by the embodiment of the application not only carries out sensitive word detection in the process of uploading transaction data, but also carries out sensitive word detection in the process of inquiring transaction data. The following describes how sensitive word detection is performed during a transaction data query. Fig. 4 is a signaling interaction diagram of another transaction detection method according to an embodiment of the present application, as shown in fig. 4, where the method includes:
s401, the front-end application sends a query request to the proxy service module, wherein the query request comprises an identification of a transaction to be queried.
In this step, the user may input a query instruction to the proxy service module through the front-end application in addition to the transaction uplink request to the proxy service module through the front-end application, so as to query transaction data stored in the blockchain system.
The embodiment of the application does not limit the transaction to be queried, can write the transaction data of the blockchain system for the nodes in the blockchain system, and can also write the transaction data of the blockchain system for the nodes in other blockchain systems.
S402, the proxy service module sends a query instruction to the bottom layer service module according to the query request.
In some embodiments, the query instruction may further include an identifier of the user or account information of the user, so that the proxy service module verifies whether the user has the query authority. If the proxy service module inquires that the user has the authority to inquire the transaction data, an inquiry instruction can be sent to the bottom layer service module according to the inquiry request.
The query indication may also include an identification of the transaction to be queried.
S403, the bottom layer service module acquires transaction data of the transaction to be queried according to the query instruction.
In some embodiments, the underlying service module may obtain transaction data for the transaction to be queried from the transaction data stored in the blockchain system according to the identification of the transaction to be queried.
S404, the bottom layer service module sends the transaction data of the transaction to be queried to the proxy service module.
S405, the proxy service module judges whether the transaction data of the transaction to be queried contains sensitive words.
If yes, step S407 is executed, and if no, step S406 is executed.
It should be noted that, in the embodiment of the present application, the manner of determining whether the transaction data of the transaction to be queried includes the sensitive word may refer to the manner of determining whether the transaction data of the transaction to be processed includes the sensitive word in the above embodiment, which is not described herein in detail.
S406, the proxy service module sends the transaction data of the transaction to be queried to the front-end application.
S407, the proxy service module executes sensitive transaction processing operation.
Wherein the sensitive transaction processing operations include: recording the transaction to be queried as a sensitive transaction, sending a sensitive transaction prompt to the front-end application, and accumulating the times of the actions of calling the sensitive transaction by the user by using the front-end application.
It should be noted that, if the transaction data of the transaction to be queried includes a sensitive word, the proxy service module may perform one sensitive transaction processing operation, or may perform multiple sensitive transaction processing operations, which is not limited in the present application.
S408, if the number of times of calling the sensitive transaction by the user through the front-end application exceeds a threshold, the proxy service module sends a forbidden indication to the front-end application, wherein the forbidden indication comprises account information of the user.
Wherein the disabling indication sent by the sensitive transaction server may also contain an identification of the disabled user.
S409, the front-end application stops receiving the transaction uplink request and/or the query request input by the user.
Embodiments of the present application are not limited in terms of how to cease receiving user-entered transaction uplink requests and/or query requests, and, by way of example,
Illustratively, the front-end application may invoke the proxy service module to suspend the user, and the proxy service module may then update the user's status to the suspended status, with nodes in the blockchain system ceasing to receive the user-entered transaction uplink request and/or query indication.
In other embodiments, upon receiving an indication of the management node, the proxy service module may also reactivate the user such that the node in the blockchain system re-executes the user-entered transaction uplink request and/or query indication.
According to the transaction detection method provided by the embodiment of the application, the front-end application sends the query request to the proxy service module, wherein the query request comprises the identification of the transaction to be queried. And the proxy service module sends a query instruction to the bottom layer service module according to the query request. And the bottom layer service module acquires transaction data of the transaction to be queried according to the query instruction. The bottom layer service module sends the transaction data of the transaction to be queried to the proxy service module. And if the transaction data of the transaction to be queried does not contain the sensitive word, the proxy service module sends the transaction data of the transaction to be queried to the front-end application. And if the transaction data of the transaction to be queried contains sensitive words, the proxy service module executes sensitive transaction processing operation. Compared with the prior art, the method has the advantages that as the verification process of the sensitive words is added when the transaction data is inquired, the inquired transaction data can be ensured not to contain the latest sensitive words, and therefore the content of the transaction data can be ensured to meet the latest specification.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware associated with program instructions, where the foregoing program may be stored in a computer readable storage medium, and when executed, the program performs steps including the above method embodiments; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
The transaction detection device may be implemented by software, hardware or a combination of the two, and may be, for example, a node in the blockchain system in the foregoing embodiment, so as to execute the transaction detection method in the foregoing embodiment. The transaction detection device includes: front-end application, proxy service module and underlying service module.
And the front-end application is used for sending a transaction uplink request to the proxy service module, wherein the transaction uplink request comprises transaction data of the transaction to be processed.
And the proxy service module is used for sending a transaction uplink instruction to the bottom layer service module if the transaction data of the transaction to be processed does not contain sensitive words.
And the bottom layer service module is used for writing the transaction data of the transaction to be processed into the blockchain system.
In an optional implementation manner, the transaction detection device further comprises a back-end service module corresponding to the front-end application.
The front-end application is specifically used for calling the back-end service module to send a transaction uplink request to the proxy service module.
In an alternative embodiment, the proxy service module is further configured to send a first message to the front-end application, where the first message is used to indicate that the transaction data of the pending transaction is successfully written into the blockchain system.
In an alternative embodiment, the proxy service module is further configured to send a second message to the front-end application if the transaction data of the transaction to be processed includes a sensitive word, where the second message is used to indicate the sensitive word in the transaction data of the transaction to be processed.
In an alternative embodiment, the front-end application is further configured to send a query request to the proxy service module, where the query request includes an identification of the transaction to be queried.
And the proxy service module is also used for sending a query instruction to the bottom layer service module according to the query request.
The bottom layer service module is also used for acquiring transaction data of the transaction to be queried according to the query instruction; and transmitting the transaction data of the transaction to be queried to the proxy service module.
In an alternative embodiment, the proxy service module is further configured to send the transaction data of the transaction to be queried to the front-end application if the transaction data of the transaction to be queried does not include a sensitive word.
In an alternative embodiment, the proxy service module is further configured to execute the sensitive transaction processing operation if the transaction data of the transaction to be queried includes a sensitive word.
In an alternative embodiment, the sensitive transaction processing operations include: recording the transaction to be queried as a sensitive transaction, sending a sensitive transaction prompt to the front-end application, and accumulating the times of the actions of calling the sensitive transaction by the user by using the front-end application.
In an optional implementation manner, the proxy service module is further configured to send a disabling instruction to the front-end application if the number of times that the user uses the front-end application to invoke the behavior of the sensitive transaction exceeds a threshold, where the disabling instruction includes account information of the user;
the front-end application is further configured to stop receiving the transaction uplink request and/or the query request input by the user.
In an alternative embodiment, the front-end application is specifically configured to stop receiving the transaction uplink request and/or the query request input by the user by calling the back-end service module corresponding to the front-end application.
In an optional implementation manner, the proxy service module is further configured to receive a sensitive word change request sent by the management node; and adding or deleting the sensitive words in a sensitive word stock in the proxy service module according to the sensitive word change request.
In an optional implementation manner, the front-end application is further configured to send a sensitive word adding request to the proxy service module, where the sensitive word adding request includes a sensitive word;
The proxy service module is also used for adding sensitive words in the sensitive word stock in the proxy service module.
It should be noted that, the transaction detection device provided in the embodiment of the present application may be used to execute the method provided in any of the foregoing embodiments, and the specific implementation manner and technical effects are similar, and are not repeated here.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 5, the electronic device may include: at least one processor 501 and a memory 502. Fig. 5 shows an electronic device, for example a processor.
A memory 502 for storing a program. In particular, the program may include program code including computer-operating instructions.
The memory 502 may comprise high-speed RAM memory or may further comprise non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor 501 is configured to execute computer-executable instructions stored in the memory 502 to implement the transaction detection method described above;
The processor 501 may be a central processing unit (Central Processing Unit, abbreviated as CPU), or an Application SPECIFIC INTEGRATED Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present application.
Alternatively, in a specific implementation, if the communication interface, the memory 502, and the processor 501 are implemented independently, the communication interface, the memory 502, and the processor 501 may be connected to each other through a bus and perform communication with each other. The bus may be an industry standard architecture (Industry Standard Architecture, abbreviated ISA) bus, an external device interconnect (PERIPHERAL COMPONENT, abbreviated PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated EISA) bus, among others. Buses may be divided into address buses, data buses, control buses, etc., but do not represent only one bus or one type of bus.
Alternatively, in a specific implementation, if the communication interface, the memory 502, and the processor 501 are integrated on a chip, the communication interface, the memory 502, and the processor 501 may complete communication through an internal interface.
The embodiment of the application also provides a chip which comprises a processor and an interface. Wherein the interface is used for inputting and outputting data or instructions processed by the processor. The processor is configured to perform the methods provided in the method embodiments above. The chip can be applied to a transaction detection device.
The present application also provides a computer-readable storage medium, which may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, and the like, specifically, the computer-readable storage medium stores program information therein, and the program information is used in the transaction detection method.
The embodiment of the application also provides a program which is used for executing the transaction detection method provided by the embodiment of the method when being executed by a processor.
Embodiments of the present application also provide a program product, such as a computer-readable storage medium, having instructions stored therein, which when run on a computer, cause the computer to perform the transaction detection method provided by the method embodiments described above.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present invention are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.) means from one website, computer, server, or data center. Computer readable storage media can be any available media that can be accessed by a computer or data storage devices, such as servers, data centers, etc., that contain an integration of one or more available media. Usable media may be magnetic media (e.g., floppy disks, hard disks, magnetic tape), optical media (e.g., DVD), or semiconductor media (e.g., solid state disk Solid STATE DISK (SSD)), among others.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (11)

1. The transaction detection method is characterized by being applied to nodes in a blockchain system, wherein the nodes in the blockchain system comprise front-end applications, a proxy service module and a bottom layer service module, and the method comprises the following steps:
The front-end application sends a transaction uplink request to the proxy service module, wherein the transaction uplink request comprises transaction data of a to-be-processed transaction;
If the transaction data of the transaction to be processed does not contain sensitive words, the proxy service module sends a transaction uplink instruction to the bottom layer service module;
the bottom layer service module writes the transaction data of the transaction to be processed into the blockchain system;
the front-end application sends a query request to the proxy service module, wherein the query request comprises an identification of a transaction to be queried, and the transaction to be queried is transaction data written into a blockchain system by a node in the blockchain system;
the proxy service module sends a query instruction to the bottom layer service module according to the query request;
The bottom layer service module acquires transaction data of the transaction to be queried according to the query instruction;
The bottom layer service module sends the transaction data of the transaction to be queried to the proxy service module;
After the bottom layer service module sends the transaction data of the transaction to be queried to the proxy service module, the method further comprises:
If the transaction data of the transaction to be queried does not contain the sensitive word, the proxy service module sends the transaction data of the transaction to be queried to the front-end application;
If the transaction data of the transaction to be queried contains the sensitive word, the proxy service module executes sensitive transaction processing operation;
the sensitive transaction processing operations include: recording the transaction to be queried as a sensitive transaction, sending a sensitive transaction prompt to the front-end application, and accumulating the times of the user calling the behavior of the sensitive transaction by using the front-end application.
2. The method of claim 1, wherein the nodes in the blockchain system further comprise a backend service module corresponding to the front-end application;
The front-end application sending a transaction uplink request to the proxy service module, comprising:
And the front-end application calls the back-end service module to send the transaction uplink request to the proxy service module.
3. The method of claim 1, wherein after the underlying service module writes the transaction data for the pending transaction to the blockchain system, the method further comprises:
the proxy service module sends a first message to the front-end application, wherein the first message is used for indicating that the transaction data of the pending transaction is successfully written into the blockchain system.
4. A method according to any of claims 1-3, wherein after the front-end application sends a transaction uplink request to the proxy service module, the method further comprises:
And if the transaction data of the transaction to be processed contains the sensitive word, the proxy service module sends a second message to the front-end application, wherein the second message is used for indicating the sensitive word in the transaction data of the transaction to be processed.
5. The method of claim 1, wherein after the proxy service module performs the sensitive transaction processing operation, the method further comprises:
If the number of times of the user calling the sensitive transaction by using the front-end application exceeds a threshold value, the proxy service module sends a forbidden indication to the front-end application, wherein the forbidden indication comprises account information of the user;
The front-end application stops receiving the transaction uplink request and/or the query request input by the user.
6. The method of claim 5, wherein the front-end application ceasing to receive the user-entered transaction uplink request and/or query request comprises:
And the front-end application stops receiving the transaction uplink request and/or the query request input by the user by calling a back-end service module corresponding to the front-end application.
7. The method according to claim 1, wherein the method further comprises:
the agent service module receives a sensitive word change request sent by a management node;
And the proxy service module adds or deletes the sensitive word in the sensitive word stock in the proxy service module according to the sensitive word change request.
8. The method according to claim 1, wherein the method further comprises:
the front-end application sends a sensitive word adding request to the proxy service module, wherein the sensitive word adding request comprises a sensitive word;
the proxy service module adds the sensitive word in a sensitive word stock in the proxy service module.
9. A transaction detection device, wherein the transaction detection device is a node in a blockchain system, the transaction detection device comprising: front-end application, proxy service module and bottom layer service module;
The front-end application is used for sending a transaction uplink request to the proxy service module, wherein the transaction uplink request comprises transaction data of a transaction to be processed;
the proxy service module is used for sending a transaction uplink instruction to the bottom layer service module if the transaction data of the transaction to be processed does not contain sensitive words;
The bottom layer service module is used for writing the transaction data of the transaction to be processed into the blockchain system;
the front-end application is further configured to send a query request to the proxy service module, where the query request includes an identifier of a transaction to be queried, and the transaction to be queried writes transaction data of the blockchain system into a node in the blockchain system;
The proxy service module is further used for sending a query instruction to the bottom layer service module according to the query request;
the bottom layer service module is further used for acquiring transaction data of the transaction to be queried according to the query instruction; transmitting the transaction data of the transaction to be queried to the proxy service module;
The proxy service module is further configured to send the transaction data of the transaction to be queried to the front-end application if the transaction data of the transaction to be queried does not include the sensitive word after the bottom service module sends the transaction data of the transaction to be queried to the proxy service module; if the transaction data of the transaction to be queried contains the sensitive word, executing sensitive transaction processing operation; the sensitive transaction processing operations include: recording the transaction to be queried as a sensitive transaction, sending a sensitive transaction prompt to the front-end application, and accumulating the times of the user calling the behavior of the sensitive transaction by using the front-end application.
10. An electronic device, comprising: a memory and a processor;
the memory is used for storing executable instructions of the processor;
The processor is configured to perform the method of any of claims 1-8 via execution of the executable instructions.
11. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-8.
CN202011041344.9A 2020-09-28 2020-09-28 Transaction detection method and device Active CN112131478B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011041344.9A CN112131478B (en) 2020-09-28 2020-09-28 Transaction detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011041344.9A CN112131478B (en) 2020-09-28 2020-09-28 Transaction detection method and device

Publications (2)

Publication Number Publication Date
CN112131478A CN112131478A (en) 2020-12-25
CN112131478B true CN112131478B (en) 2024-05-17

Family

ID=73844017

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011041344.9A Active CN112131478B (en) 2020-09-28 2020-09-28 Transaction detection method and device

Country Status (1)

Country Link
CN (1) CN112131478B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113469811A (en) * 2021-07-05 2021-10-01 支付宝(杭州)信息技术有限公司 Block chain transaction processing method and device
CN113495927B (en) * 2021-09-06 2022-02-25 支付宝(杭州)信息技术有限公司 Block management method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108846752A (en) * 2018-06-06 2018-11-20 北京京东金融科技控股有限公司 Data processing method, system, block platform chain and readable storage medium storing program for executing
CN111343142A (en) * 2020-01-22 2020-06-26 腾讯科技(深圳)有限公司 Data processing method and device based on block chain network and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10917233B2 (en) * 2018-10-16 2021-02-09 International Business Machines Corporation Selective exchange of transaction data
CN109617698B (en) * 2019-01-09 2021-08-03 腾讯科技(深圳)有限公司 Method for issuing digital certificate, digital certificate issuing center and medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108846752A (en) * 2018-06-06 2018-11-20 北京京东金融科技控股有限公司 Data processing method, system, block platform chain and readable storage medium storing program for executing
CN111343142A (en) * 2020-01-22 2020-06-26 腾讯科技(深圳)有限公司 Data processing method and device based on block chain network and storage medium

Also Published As

Publication number Publication date
CN112131478A (en) 2020-12-25

Similar Documents

Publication Publication Date Title
CN109885786B (en) Data caching processing method and device, electronic equipment and readable storage medium
CN112131478B (en) Transaction detection method and device
CN108897628A (en) A kind of implementation method of distributed lock, device and electronic equipment
CN106648440B (en) Control method for operating storage device and storage device
US11050550B2 (en) Methods and systems for reading data based on plurality of blockchain networks
EP3817333B1 (en) Method and system for processing requests in a consortium blockchain
CN115344197A (en) Data access method, network card and server
US11868631B2 (en) System startup method and related device
US20220107752A1 (en) Data access method and apparatus
CN108228842B (en) Docker mirror image library file storage method, terminal, device and storage medium
CN111159298B (en) Service request processing method and device, electronic equipment and storage medium
CN115114042A (en) Storage data access method and device, electronic equipment and storage medium
CN110275772B (en) Data processing method and related equipment thereof
CN105144073A (en) Removable storage device identity and configuration information
CN115827778A (en) Data acquisition method and device, electronic equipment and storage medium
CN110825309A (en) Data reading method, device and system and distributed system
CN112835762B (en) Data processing method and device, storage medium and electronic equipment
CN115291998A (en) Rbd-nbd mapping method and device
CN113391759B (en) Communication method and equipment
CN108959405B (en) Strong consistency reading method of data and terminal equipment
CN107209882B (en) Multi-stage de-registration for managed devices
CN111866093B (en) Service data distribution method and device
CN113704274B (en) Data reading method and electronic equipment
CN110515959B (en) Data consistency implementation method and device and readable storage medium
CN113709710B (en) Interface management method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 601, 6 / F, building 2, No. 18, Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Information Technology Co.,Ltd.

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: 601, 6 / F, building 2, No. 18, Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Shuke Haiyi Information Technology Co.,Ltd.

Applicant before: Jingdong Technology Holding Co.,Ltd.

Address after: 601, 6 / F, building 2, No. 18, Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Shuke Haiyi Information Technology Co.,Ltd.

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: 601, 6 / F, building 2, No. 18, Kechuang 11th Street, Beijing Economic and Technological Development Zone, Beijing 100176

Applicant before: BEIJING HAIYI TONGZHAN INFORMATION TECHNOLOGY Co.,Ltd.

Applicant before: Jingdong Digital Technology Holding Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant