Data processing method and device based on finite state machine, equipment and storage medium
By constructing a multi-node directed graph of a finite state machine on the server side, and using ciphertext and plaintext data when the client interacts with the nodes, the problem of low security of sensitive information in client-server communication is solved, and the security and integrity of transactions are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-28
- Publication Date
- 2026-03-24
AI Technical Summary
During communication between the client and the server, sensitive information has low security and is at risk of being intercepted and leaked. Furthermore, the client's request status is unstable, which may lead to incomplete or failed transactions.
A data processing method based on finite state machines is adopted. By constructing a multi-node directed graph on the server side, the client uses ciphertext and plaintext data when interacting with adjacent nodes. The plaintext data is displayed on the client side, and sensitive information is decrypted only on the server side. Asymmetric encryption is used to ensure data security and control the data transmission order.
It improves the security of sensitive information, prevents information leakage, ensures that transactions are carried out according to preset steps, avoids abnormal server response caused by client cross-step operations, and enhances the integrity and security of transactions.
Smart Images

Figure CN115601033B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of big data analysis technology, and in particular to a data processing method, apparatus, device and storage medium based on finite state machines. Background Technology
[0002] In a client-server architecture, the client sends data to the server over the network, and data processing is completed through data interaction between the client and the server. In financial trading scenarios, users trigger data interaction with the server through the client.
[0003] During client-server interaction, there is a risk that messages may be intercepted. Once intercepted, analysis of the messages can reveal sensitive information such as user accounts and product content, posing a risk of sensitive information exposure and indicating low security for sensitive information. Summary of the Invention
[0004] This application provides a data processing method, apparatus, device, and storage medium based on a finite state machine to solve the problem of low security of sensitive information during communication between a client and a server in the prior art.
[0005] In a first aspect, embodiments of this application provide a data processing method based on a finite state machine, including:
[0006] A finite state machine is determined based on the transaction request. The finite state machine includes multiple nodes, which form a directed graph to complete the transaction request. The multiple nodes include adjacent first and second nodes.
[0007] The first node sends the first ciphertext data and the first plaintext data to the client;
[0008] The second node receives the second plaintext data and the first ciphertext data sent by the client, wherein the second plaintext data is obtained by the client based on the first plaintext data;
[0009] The second node determines the client's first transaction operation based on the second plaintext data and the first ciphertext data, and performs first processing based on the first transaction operation.
[0010] Secondly, embodiments of this application also provide a data processing apparatus based on a state machine, characterized in that it includes:
[0011] A determination module is used to determine a finite state machine based on a transaction request. The finite state machine includes multiple nodes, which form a directed graph to complete the transaction request. The multiple nodes include adjacent first and second nodes.
[0012] The first node sending module is used for the first node to send the first ciphertext data and the first plaintext data to the client;
[0013] The second node receiving module is used to receive the second plaintext data and the first ciphertext data sent by the client, wherein the second plaintext data is obtained by the client based on the first plaintext data;
[0014] The second node processing module is used to determine the first transaction operation of the client based on the second plaintext data and the first ciphertext data, and to perform first processing based on the first transaction operation.
[0015] Thirdly, embodiments of this application also provide a server, including: a processor, and a memory communicatively connected to the processor;
[0016] The memory stores computer-executed instructions;
[0017] The processor executes computer execution instructions stored in the memory to implement the data processing method based on a finite state machine as shown in the embodiments of this application.
[0018] Fourthly, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the data processing method based on a finite state machine as shown in embodiments of this application.
[0019] Fifthly, embodiments of this application also provide a computer program product, characterized in that it includes a computer program that, when executed by a processor, implements the data processing method based on a finite state machine as shown in embodiments of this application.
[0020] This application provides a data processing method, apparatus, device, and storage medium based on a finite state machine. The method determines a finite state machine based on a transaction request. The finite state machine includes multiple nodes forming a directed graph to complete the transaction request. These nodes include adjacent first and second nodes. The first node sends first encrypted data and first plaintext data to a client. The second node receives second plaintext data and the first encrypted data sent by the client. The second plaintext data is obtained by the client based on the first plaintext data. The second node determines the client's first transaction operation based on the second plaintext data and the first encrypted data, and performs first processing based on the first transaction operation. The client displays the received first plaintext data without processing the first encrypted data. After obtaining the second plaintext data based on the user's operation, the client sends the first encrypted data and the second plaintext data to the second node. The second node determines the user's first transaction operation based on the first encrypted data and the second plaintext data, and performs first processing. The first plaintext data in the message has low sensitivity; even if intercepted, it will not reveal sensitive information about the user or product. More sensitive data can be transmitted using a first encrypted data set, which can only be decrypted by a second node. This ensures that sensitive information is transmitted in an encrypted manner, improving its security. Furthermore, the finite state machine divides client-initiated transaction requests into multiple processing steps, with each node executing one step. Since the finite state machine is a directed graph, the data the client responds to the server can only be sent to the next node in the directed graph, preventing data transmission across nodes. This controls the content of data sent by the client and prevents abnormal server responses caused by client-side cross-step operations. Attached Figure Description
[0021] Figure 1 This is an architecture diagram of the data processing method based on a finite state machine provided in the embodiments of this application;
[0022] Figure 2 This is the flowchart of the data processing method based on finite state machine provided in the embodiments of this application. Figure 1 ;
[0023] Figure 3 This is the flowchart of the data processing method based on finite state machine provided in the embodiments of this application. Figure 2 ;
[0024] Figure 4 This is the flowchart of the data processing method based on finite state machine provided in the embodiments of this application. Figure 3 ;
[0025] Figure 5This is the flowchart of the data processing method based on finite state machine provided in the embodiments of this application. Figure 4 ;
[0026] Figure 6 This is a schematic diagram of the structure of the data processing device based on a finite state machine provided in the embodiments of this application;
[0027] Figure 7 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0028] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0029] During client-server interaction, there is a risk that messages may be intercepted. Once intercepted, analysis of the messages can reveal sensitive information such as user accounts and product content, posing a risk of sensitive information exposure and indicating low security for sensitive information.
[0030] Furthermore, in the current web framework, the client's request state remains at the session layer. The requests sent by the client may be duplicates or unnecessary. The requests initiated by the user through the client may also be triggered by skipping certain steps in the process, leading to risks such as incomplete transactions or failures.
[0031] Enabling clients to execute transactions according to predetermined steps while ensuring the security of sensitive information has become an urgent problem to be solved.
[0032] To address the aforementioned technical problems, this application proposes the following technical concept: A finite state machine is formed on the server side for different transactions. The finite state machine includes multiple nodes, which form a directed graph and interact with the client initiating the transaction in a preset order. The destination address of the client's data is specified by the preceding node. By interacting with different specified nodes, the client completes the transaction step by step in a preset order, avoiding step jumps and duplicate transactions. Not all data involved in the transaction needs to be displayed to the user. During the data interaction between nodes and the client, not all data is transmitted in plaintext. Between adjacent nodes, the preceding node uses a portion of the data required for processing by the next hop node as ciphertext data, and the remaining portion as plaintext data. The client does not process the ciphertext data but transmits it to the next hop node. The client displays the plaintext data so that the user can perform transaction operations based on the displayed data. The client also lacks decryption capabilities for encrypted data, thus reducing the risk of the client being intercepted and parsed by hackers, and improving data security.
[0033] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0034] Figure 1 The schematic diagram of the structure used in the data processing method based on finite state machines provided in this application embodiment includes a client 1 and a server 2. The server 2 maintains multiple pre-established finite state machines 21. Each finite state machine includes multiple nodes, and the multiple nodes form a directed graph. The nodes in the directed graph perform data transmission and data processing with the client in a preset order.
[0035] Figure 2 The flowchart of the data processing method based on finite state machine provided in the embodiments of this application Figure 1 This embodiment is applicable to situations where a client and a server conduct financial transactions, and the method can be executed by the server. For example... Figure 2 As shown, this application provides your finite state machine-based data processing method, including:
[0036] S110. Determine the finite state machine based on the transaction request.
[0037] The finite state machine includes multiple nodes, which form a directed graph to complete transaction requests. The nodes include adjacent first and second nodes.
[0038] After a user triggers a transaction request through the client, the client sends the request to the server. The server selects a finite state machine (FSM) from a pre-configured set of FSMs to handle the transaction request. Each FSM can be pre-configured to handle specific transaction requests. When the client triggers a transaction request, the appropriate FSM is determined based on the request. For example, if the transaction request is for purchasing a financial product, FSM 'a' is selected to handle it. Or, if the transaction request is for customizing financial product A, FSM 'b' is selected to handle it.
[0039] A finite state machine consists of multiple nodes. A transaction request can contain multiple steps, and each node can be used to implement the function of a specific step. For example, a transaction request to purchase a financial product includes steps such as querying product details and available accounts, determining the quantity and content of the product based on parameters selected by the user, and the user paying the amount to purchase the product. In the example above, three nodes can be configured to complete the above three steps respectively, and the execution order of the three nodes is fixed.
[0040] Furthermore, before determining the finite state machine based on the transaction request in S110, the following steps are also included:
[0041] Multiple nodes are determined based on the content of the transaction request; the execution order of each node and the encrypted interaction data with other nodes are configured, the interaction data including the first ciphertext data; a finite state machine is generated based on the configured multiple nodes.
[0042] Based on the transaction request response from the server, the transaction request content, i.e., the multiple steps included in the transaction request, is determined. The execution order of nodes is configured according to the order of these steps, forming a directed graph. The data interaction content between pairs of adjacent nodes can also be configured. In this embodiment, the first node and the second node are adjacent, and the output field of the first node is the request field of the second node. Data in the output field of the first node is sent to the second node via the client as its output. The output field of the first node includes first encrypted data, and the request field of the second node also includes first encrypted data. Furthermore, a display field for each node can be configured. Data in the display field is output by the client after being sent to it.
[0043] By pre-configuring finite state machines suitable for different transaction requests, the server can adapt to more transaction requests, improving ease of use.
[0044] Furthermore, after determining the finite state machine based on the transaction request in S110, the following steps are also included:
[0045] Generate context information, which includes at least one or more of the following: user information, authorization information, service type, finite state machine identifier, or timestamp.
[0046] The server can simultaneously provide transaction request response services to multiple clients. Each transaction request is assigned a finite state machine for processing. When determining which finite state machine to use, context information for the finite state machine is generated. The context information records the user information, which is the account information of the person initiating the transaction request. The authorization information can be used for transaction verification. The business type can be the type of transaction that the finite state machine is responsible for processing. The finite state machine identifier can be used to uniquely identify the finite state machine. The timestamp can be the timestamp used to identify the finite state machine.
[0047] Contextual information can not only identify the users and transaction requests responded to by the finite state machine, but also record information used in the transaction process, such as user information and authorization information, thereby improving information storage efficiency.
[0048] S120, The first node sends the first ciphertext data and the first plaintext data to the client.
[0049] The first encrypted data is the data required for the second node to process the response; this data does not need to be decrypted by the client. The second plaintext data can be the data displayed in the domain by the first node. The first plaintext data is used for output on the client side, allowing the user to perform user operations based on the first plaintext data output by the client and obtain the second plaintext data. For example, in a financial product purchase transaction, the first plaintext data can be used to represent information with partial product descriptions. The client outputs this partial product description information, and the customer inputs the quantity of product to subscribe and the purchase account on the client side based on the output product information. The second plaintext data sent by the client to the server can then represent the quantity of product to subscribe and the purchase account.
[0050] In addition to sending the first ciphertext data and the second plaintext data to the client, the first node also specifies the next-hop data transmission address, which is the address of the second node. After receiving the second plaintext data, the client sends both the second plaintext data and the first ciphertext data to the second node.
[0051] S130, the second node receives the second plaintext data and the first ciphertext data sent by the client.
[0052] The second plaintext data is obtained by the client based on the first plaintext data.
[0053] S140. The second node determines the client's first transaction operation based on the second plaintext data and the first ciphertext data, and performs the first processing based on the first transaction operation.
[0054] The second node decrypts the first encrypted data to obtain the first data. Based on the second plaintext data and the first data, the user's first transaction operation is determined. For example, the first data may be sensitive information that should not be disclosed, such as product description information. By combining the second plaintext data and the first data, the user's first transaction operation can be obtained. Based on this first transaction operation, a first process is then performed. The specific content of the first process is implemented according to the pre-configured functions of the second node.
[0055] The data processing method based on a finite state machine provided in this application determines a finite state machine based on a transaction request. The finite state machine includes multiple nodes, which form a directed graph to complete the transaction request. These nodes include adjacent first and second nodes. The first node sends first encrypted data and first plaintext data to the client. The second node receives second plaintext data and first encrypted data sent by the client. The second plaintext data is obtained by the client based on the first plaintext data. The second node determines the client's first transaction operation based on the second plaintext data and the first encrypted data, and performs first processing based on the first transaction operation. The client displays the received first plaintext data without processing the first encrypted data. After obtaining the second plaintext data based on the user's operation, the client sends the first encrypted data and the second plaintext data to the second node. The second node determines the user's first transaction operation based on the first encrypted data and the second plaintext data, and performs first processing. The first plaintext data in the message has low sensitivity; even if intercepted, it will not reveal sensitive information about the user or product. More sensitive data can be transmitted using a first encrypted data set, which can only be decrypted by a second node. This ensures that sensitive information is transmitted in an encrypted manner, improving its security. Furthermore, the finite state machine divides client-initiated transaction requests into multiple processing steps, with each node executing one step. Since the finite state machine is a directed graph, the data the client responds to the server can only be sent to the next node in the directed graph, preventing data transmission across nodes. This controls the content of data sent by the client and prevents abnormal server responses caused by client-side cross-step operations.
[0056] Figure 3 The flowchart of the data processing method based on finite state machine provided in the embodiments of this application Figure 2 .
[0057] like Figure 3 As shown, the data processing method based on finite state machines includes the following steps:
[0058] S201. Determine the finite state machine based on the transaction request.
[0059] The finite state machine includes multiple nodes, which form a directed graph to complete transaction requests. The nodes include adjacent first and second nodes.
[0060] S202. The first node encrypts the first data according to the first public key to obtain the first ciphertext data.
[0061] The first node and the second node encrypt data using a key pair consisting of a first public key and a first private key. The first node encrypts the first data using the first public key to obtain the first ciphertext data.
[0062] S203. The first node sends the first ciphertext data and the first plaintext data to the client.
[0063] S204. The second node receives the second plaintext data and the first ciphertext data sent by the client.
[0064] The second plaintext data is obtained by the client based on the first plaintext data.
[0065] S205. The second node decrypts the first ciphertext data according to the first private key to obtain the first data, and the first public key and the first private key are matched.
[0066] The second node decrypts the first ciphertext using the pre-stored first private key to obtain the first data. Since the first private key matches the first public key, the first data can be obtained by decoding the first ciphertext using the first private key.
[0067] S206. The second node determines the client's first transaction operation based on the first data and the first plaintext data, and performs the first processing based on the first transaction operation.
[0068] This application embodiment uses an asymmetric encryption method with a first public key and a first private key to encrypt the first data of sensitive data and decrypt the first ciphertext data, thereby improving data security.
[0069] Figure 4 The flowchart of the data processing method based on finite state machine provided in the embodiments of this application Figure 3 A finite state machine also includes a third node adjacent to the second node, such as... Figure 4 As shown, the data processing method based on finite state machines includes the following steps:
[0070] S301. Determine the finite state machine based on the transaction request.
[0071] The finite state machine includes multiple nodes, which form a directed graph to complete transaction requests. The nodes include adjacent first and second nodes.
[0072] S302. The first node encrypts the first data according to the first public key to obtain the first ciphertext data.
[0073] S303, The first node sends the first ciphertext data and the first plaintext data to the client.
[0074] S304. The second node receives the second plaintext data and the first ciphertext data sent by the client.
[0075] The second plaintext data is obtained by the client based on the first plaintext data.
[0076] S305. The second node decrypts the first ciphertext data according to the first private key to obtain the first data, and the first public key and the first private key are matched.
[0077] S306. The second node determines the client's first transaction operation based on the first data and the first plaintext data.
[0078] S307. Response processing is performed according to the first transaction operation to obtain the second data and the second plaintext data.
[0079] S308. Encrypt the second data using the second public key to obtain the second ciphertext data.
[0080] The second data is required for the third node to process the response, and this data does not need to be displayed on the client. Encrypting the second data using the second public key yields the second ciphertext data, which protects the security of the second data.
[0081] S309. Send the second ciphertext data and the second plaintext data to the client.
[0082] After receiving the second ciphertext data and the second plaintext data, the client outputs the data represented by the second plaintext data. The user performs operations based on the data represented by the second plaintext data to obtain the third plaintext data. The client then sends the third plaintext data and the second ciphertext data to the third node. The second data is encrypted using the second public key, thus implementing encryption between the second and third nodes using the second public key, unlike the encryption between the second and first nodes which uses the first public key.
[0083] S310, the third node decrypts the second ciphertext data using the second private key to obtain the second data, and the second public key and the second private key are matched.
[0084] S311. The third node determines the client's second transaction operation based on the second data and the third plaintext data, and performs the second processing based on the second transaction operation.
[0085] The third node decrypts the second ciphertext data using the second private key, enabling data encryption between the second and third nodes using an asymmetric encryption method that uses the second public key and the second private key. This is achieved by using a different asymmetric encryption key between the second and third nodes than the one used between the first and second nodes.
[0086] The data processing method based on a finite state machine provided in this application allows encryption and decryption between the second and third nodes using a second public key and a second private key. This implements encryption using different keys for each pair of adjacent nodes in the finite state machine, further improving data security.
[0087] Figure 5 The flowchart of the data processing method based on finite state machine provided in the embodiments of this application Figure 4 .
[0088] like Figure 5 As shown, the data processing method based on finite state machines includes the following steps:
[0089] S401. Determine the finite state machine based on the transaction request.
[0090] The finite state machine includes multiple nodes, which form a directed graph to complete transaction requests. The nodes include adjacent first and second nodes.
[0091] S402. Determine the first plaintext data corresponding to the first display data so that the client can determine the first display data based on the first plaintext data and output the first display data.
[0092] When data displayed on the client is transmitted directly as plaintext, it is easily intercepted and deciphered. To solve this problem, the initial displayed data can be converted into corresponding plaintext data. This conversion can be done using a mapping table. For example, if the initial displayed data is product A with a start date of January 1, 2022, the mapping table shows that product A corresponds to code 10001, and January 1, 2022 corresponds to code xxxxabc. Therefore, the plaintext data is the converted code.
[0093] Determining the first soldier's data and the first plaintext data can protect the first displayed data, preventing the plaintext first displayed data from being exposed after the first displayed data is intercepted, thus improving security.
[0094] S403, The first node sends the first ciphertext data and the first plaintext data to the client.
[0095] The client retrieves the first display data, represented by the first plaintext data, based on a pre-stored mapping table, and outputs the first display data. When the user performs operations based on the first display data through the client, they obtain the second display data. The client then looks up the corresponding second plaintext data according to the mapping table. Finally, the client sends the second plaintext data and the first encrypted data to the second node.
[0096] S404, The second node receives the second plaintext data and the first ciphertext data sent by the client.
[0097] The second plaintext data is obtained by the client based on the first plaintext data.
[0098] S405. The second node determines the second display data corresponding to the second plaintext data. The second display data is obtained by the client through operation based on the first display data.
[0099] The second node uses the mapping table to find the second displayed data, which represents the second plaintext data.
[0100] S406. Determine the client's first transaction operation based on the second displayed data and the first encrypted data, and perform the first processing based on the first transaction operation.
[0101] The second node determines the client's first transaction operation based on the second displayed data and the first data obtained through decryption.
[0102] The embodiments of this application can convert the displayed data into plaintext data by mapping the plaintext data, thereby preventing the information content from being leaked after the plaintext data is intercepted and improving data security.
[0103] Figure 6 This is a schematic diagram of the structure of a data processing device based on a finite state machine provided in an embodiment of this application. Figure 6 As shown, the data processing device based on a finite state machine includes: a determination module 501, a first node sending module 502, a second node receiving module 503, and a second node processing module 504.
[0104] The determination module 501 is used to determine a finite state machine based on the transaction request. The finite state machine includes multiple nodes, which form a directed graph to complete the transaction request. The multiple nodes include adjacent first nodes and second nodes.
[0105] The first node sending module 502 is used for the first node to send the first ciphertext data and the first plaintext data to the client.
[0106] The second node receiving module 503 is used to receive the second plaintext data and the first ciphertext data sent by the client, wherein the second plaintext data is obtained by the client based on the first plaintext data;
[0107] The second node processing module 504 is used to determine the first transaction operation of the client based on the second plaintext data and the first ciphertext data, and to perform first processing based on the first transaction operation.
[0108] In some embodiments, a finite state machine configuration module is further included. The finite state machine configuration module is used for:
[0109] Multiple nodes are determined based on the content of the transaction request;
[0110] Configure the execution order of each node and the encrypted interaction data with other nodes, wherein the interaction data includes first ciphertext data;
[0111] A finite state machine is generated based on the configured nodes.
[0112] In some embodiments, an encryption module is further included, the encryption module being used for:
[0113] The first node encrypts the first data using the first public key to obtain the first ciphertext data;
[0114] Accordingly, the second node processing module 504 is used for:
[0115] The second node decrypts the first ciphertext data using the first private key to obtain the first data, and the first public key matches the first private key;
[0116] The second node determines the client's first transaction operation based on the first data and the first plaintext data.
[0117] In some embodiments, the finite state machine further includes a third node and a third node processing module. The second node processing module 504 is used for:
[0118] The response is processed according to the first transaction operation to obtain the second data and the second plaintext data.
[0119] The second data is encrypted using the second public key to obtain the second ciphertext data;
[0120] The second ciphertext data and the second plaintext data are sent to the client;
[0121] The third-node processing module is used for:
[0122] The third node decrypts the second ciphertext data using the second private key to obtain the second data, and the second public key matches the second private key;
[0123] The third node determines the client's second transaction operation based on the second data and the third plaintext data, and performs the second processing based on the second transaction operation.
[0124] In some embodiments, a first mapping module and a second mapping module are further included. The first mapping module is used for:
[0125] Determine the first plaintext data corresponding to the first display data so that the client can determine the first display data based on the first plaintext data and output the first display data;
[0126] The second mapping module is used for:
[0127] The second node determines the second display data corresponding to the second plaintext data, and the second display data is obtained by the client through operation based on the first display data;
[0128] The client's first transaction operation is determined based on the second displayed data and the first encrypted data.
[0129] In some embodiments, a context generation module is also included. The context generation module is used for:
[0130] Generate context information, which includes at least one or more of the following: user information, authorization information, service type, finite state machine identifier, or timestamp of the finite state machine.
[0131] The data processing device based on a finite state machine provided in this application can be used to execute the technical solution of the data processing method based on a finite state machine in the above embodiments. Its implementation principle and technical effect are similar, and will not be repeated here.
[0132] It should be noted that the division of the various modules in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software via processing element calls; they can be fully implemented in hardware; or some modules can be implemented by processing element calls to software, while others are implemented in hardware. For example, the second node processing module 504 can be a separate processing element, or it can be integrated into a chip in the above device. Alternatively, it can be stored as program code in the memory of the above device, and its functions can be called and executed by a processing element of the above device. The implementation of other modules is similar. Moreover, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.
[0133] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 7 As shown, the electronic device may include: a transceiver 61, a processor 62, and a memory 63.
[0134] Processor 62 executes computer execution instructions stored in memory, causing processor 62 to perform the scheme in the above embodiments. Processor 62 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0135] The memory 63 is connected to the processor 62 via the system bus and completes communication between them. The memory 63 is used to store computer program instructions.
[0136] Transceiver 61 can be used to interact with clients.
[0137] The system bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. Transceivers are used to enable communication between database access devices and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) and may also include non-volatile memory.
[0138] The electronic device provided in this application embodiment can be the server described in the above embodiment.
[0139] This application also provides a chip for executing instructions, which is used to execute the technical solution of the data processing method based on finite state machine in the above embodiments.
[0140] This application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed on a computer, the computer performs the technical solution of the data processing method based on a finite state machine described in the above embodiments.
[0141] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, it can implement the technical solution of the data processing method based on the finite state machine in the above embodiments.
[0142] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0143] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method of data processing based on a finite state machine, characterized in that, The method comprises the following steps: determining a finite state machine according to a transaction request, the finite state machine comprising a plurality of nodes, the plurality of nodes constituting a directed graph to complete the transaction request, the plurality of nodes comprising adjacent first and second nodes; the first node sends first ciphertext data and first plaintext data to a client; the second node receives second plaintext data and the first ciphertext data sent by the client, the second plaintext data being obtained by the client according to the first plaintext data; the second node determines a first transaction operation of the client according to the second plaintext data and the first ciphertext data, and performs a first processing according to the first transaction operation.
2. The method of claim 1, wherein, Before determining the finite state machine according to the transaction request, the method further comprises the following steps: determining a plurality of nodes according to the content of the transaction request; configuring the execution order of each node and the encrypted interaction data with other nodes, the interaction data comprising the first ciphertext data; generating the finite state machine according to the plurality of nodes after the configuration.
3. The method of claim 1, wherein, Before the first node sends the first ciphertext data and the first plaintext data to the client, the method further comprises the following steps: the first node encrypts the first data according to a first public key to obtain the first ciphertext data; correspondingly, the second node determining the first transaction operation of the client according to the second plaintext data and the first ciphertext data comprises the following steps: the second node decrypts the first ciphertext data according to a first private key to obtain the first data, the first public key and the first private key matching; the second node determines the first transaction operation of the client according to the first data and the first plaintext data.
4. The method of claim 3, wherein, The finite state machine further comprises a third node; and the first processing according to the first transaction operation comprises the following steps: performing a response processing according to the first transaction operation to obtain second data and second plaintext data; encrypting the second data according to a second public key to obtain second ciphertext data; sending the second ciphertext data and the second plaintext data to the client.
5. The method of claim 4, wherein, After the first processing according to the first transaction operation, the method further comprises the following steps: the third node decrypts the second ciphertext data according to a second private key to obtain the second data, the second public key and the second private key matching; the third node determines a second transaction operation of the client according to the second data and third plaintext data, and performs a second processing according to the second transaction operation.
6. The method of claim 1, wherein, Before the first node sends the first ciphertext data and the first plaintext data to the client, the method comprises the following steps: determining first plaintext data corresponding to first display data, so that the client determines the first display data according to the first plaintext data and outputs the first display data.
7. The method of claim 6, wherein, The second node determining the first transaction operation of the client according to the second plaintext data and the first ciphertext data comprises the following steps: the second node determines second display data corresponding to the second plaintext data, the second display data being obtained by the client according to the first display data; determining the first transaction operation of the client according to the second display data and the first ciphertext data.
8. The method of claim 1, wherein, After the finite state machine is determined according to the transaction request, further comprising: generating context information, the context information including at least one or a combination of user information, authorization information, service type, finite state machine identification, or timestamp of the finite state machine.
9. A state machine based data processing apparatus, characterized by comprising: determining module, for determining a finite state machine according to a transaction request, the finite state machine including a plurality of nodes, the plurality of nodes constituting a directed graph to complete the transaction request, the plurality of nodes including adjacent first and second nodes; the first node sending module, for the first node to send first ciphertext data and first plaintext data to the client; the second node receiving module, for the second node to receive second plaintext data and the first ciphertext data sent by the client, the second plaintext data being obtained by the client according to the first plaintext data; the second node processing module, for the second node to determine a first transaction operation of the client according to the second plaintext data and the first ciphertext data, and to perform a first processing according to the first transaction operation.
10. The apparatus of claim 9, wherein, Further comprising a finite state machine configuration module; the finite state machine configuration module is used for: determining a plurality of nodes according to the content of the transaction request; configuring the execution order of each node and the encrypted interaction data with other nodes, the interaction data including first ciphertext data; generating a finite state machine according to the configured plurality of nodes.
11. The apparatus of claim 9, wherein, Further comprising an encryption module, the encryption module is used for: the first node encrypts the first data according to the first public key to obtain the first ciphertext data; correspondingly, the second node processing module is used for: the second node decrypts the first ciphertext data according to the first private key to obtain the first data, the first public key and the first private key matching; the second node determines a first transaction operation of the client according to the first data and the first plaintext data.
12. The apparatus of claim 11, wherein, The finite state machine further includes a third node, and the second node processing module is used for: performing response processing according to the first transaction operation to obtain second data and second plaintext data; encrypting the second data according to a second public key to obtain second ciphertext data; sending the second ciphertext data and the second plaintext data to the client.
13. The apparatus of claim 12, wherein, Further comprising a third node processing module, the third node processing module is used for: the third node decrypts the second ciphertext data according to a second private key to obtain the second data, the second public key and the second private key matching; the third node determines a second transaction operation of the client according to the second data and third plaintext data, and performs a second processing according to the second transaction operation.
14. An electronic device, comprising: comprising: a processor, and a memory in communication connection with the processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory to realize the method in any one of claims 1-7.
15. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to realize the method in any one of claims 1-8.
16. A computer program product, characterised in that, A computer program comprising computer program elements which, when executed by a processor, perform the method of any one of claims 1-8. A computer program comprising computer program elements which, when executed by a processor, perform the method of any one of claims 1-8.
Citation Information
Patent Citations
Mechanism method and device for generating consistency encryption label based on synchronous state machine
CN114139172A
Storage controller, system including the same, and method of operating the same
US20220021515A1