Security trading method, device, system and computer readable storage medium
1. A method of trading securities, the method comprising the steps of:
when a target service instruction sent by terminal equipment is received, acquiring corresponding target service data in the target service instruction, and determining an algorithm set according to the target service data;
sending the algorithm set to the terminal equipment to determine a target algorithm in the algorithm set and receive the target algorithm sent by the terminal equipment;
and sending the target service data to a server corresponding to the target algorithm according to a preset matching protocol to obtain a calculation result, and sending the calculation result to a transaction server to perform transaction operation.
2. A method of trading securities as claimed in claim 1, wherein said step of obtaining corresponding target business data in said target business instructions is preceded by the method further comprising:
storing the target service instruction in a first preset queue, and executing the following steps when other service instructions positioned in front of the target service instruction in the first preset queue are executed: and acquiring corresponding target service data in the target service instruction.
3. A method as claimed in claim 1, wherein said step of sending said target transaction data to a server corresponding to said target algorithm according to a predetermined matching protocol to obtain a calculation result comprises:
according to the preset matching protocol, performing first coding operation on the target service data to obtain target service data codes;
and sending the target service data code to a server corresponding to the target algorithm to obtain a calculation result, wherein the calculation result comprises: and (4) target service data subcode set.
4. A security transaction method as claimed in claim 3, wherein said transmitting said target transaction code to a server corresponding to said target algorithm to obtain a calculation result, said calculation result comprising: after the steps of the target business transaction time set and the target business data subcode set, the security transaction method further comprises the following steps:
and receiving a calculation result sent by the server corresponding to the target algorithm, and performing decoding operation according to a target service data subcode set in the calculation result to obtain a target service transaction time set and a target service data subcode set.
5. A method as claimed in claim 4, wherein after said step of receiving a calculation result from a server corresponding to said target algorithm and decoding a target service data sub-code set in said calculation result to obtain a target service trading time set and a target service data sub-code set, said method further comprises:
sequencing the target service subdata in the target service subdata set according to the target service transaction time in the target service transaction time set to obtain a sequencing result;
and storing the target service sub-data in a second preset queue according to the sequencing result.
6. A method of trading a security as claimed in claim 5, wherein the step of sending the calculation to a trading server for trading operations comprises:
according to the target service transaction time, sequentially carrying out second coding operation on the target service subdata stored in the second preset queue to obtain a target service subdata code;
and sending the target service sub data code to the transaction server to perform transaction operation.
7. A security trading method as claimed in claim 5, wherein after said step of sending said target subdata data code to said trading server for trading operations, said security trading method further comprises:
and receiving a transaction completion instruction sent by the transaction server, acquiring transaction data in the transaction completion instruction, and sending the transaction data to the terminal equipment.
8. A security transaction apparatus, comprising:
the first determining module is used for acquiring corresponding target service data in a target service instruction when the target service instruction sent by terminal equipment is received, and determining an algorithm set according to the target service data;
the second determining module is used for sending the algorithm set to the terminal equipment so as to determine a target algorithm in the algorithm set and receive the target algorithm sent by the terminal equipment;
and the matching module is used for sending the target service data to a server corresponding to the target algorithm according to a preset matching protocol to obtain a calculation result, and sending the calculation result to a transaction server to perform transaction operation.
9. A security trading system, comprising: memory, processor and a stock exchange program stored on the memory and executable on the processor, the stock exchange program when executed by the processor implementing the steps of the stock exchange method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a stock exchange program which, when executed by a processor, implements the steps of the stock exchange method according to any one of claims 1 to 7.
Background
Along with the continuous development of the stock market, more and more stock exchange algorithms appear, algorithm contents and functions provided by various algorithm companies are different at present, the difference is very large, and a unified system is not available for integrating the stock exchange algorithms provided by various companies, so that a user can complete the exchange only by automatically passing through a server of the algorithm company and an exchange server when carrying out the exchange, and the efficiency of stock exchange is greatly reduced by the automatic operation of the user.
Disclosure of Invention
The invention mainly aims to provide a security trading method, a security trading device, a security trading system and a computer readable storage medium, aiming at solving the problem of improving the efficiency of security trading.
In order to achieve the above object, the present invention provides a method for securities trading, comprising the steps of:
when a target service instruction sent by terminal equipment is received, acquiring corresponding target service data in the target service instruction, and determining an algorithm set according to the target service data;
sending the algorithm set to the terminal equipment to determine a target algorithm in the algorithm set and receive the target algorithm sent by the terminal equipment;
and sending the target service data to a server corresponding to the target algorithm according to a preset matching protocol to obtain a calculation result, and sending the calculation result to a transaction server to perform transaction operation.
Preferably, before the step of obtaining the corresponding target business data in the target business instruction, the security trading method further includes:
storing the target service instruction in a first preset queue, and executing the following steps when other service instructions positioned in front of the target service instruction in the first preset queue are executed: and acquiring corresponding target service data in the target service instruction.
Preferably, the step of sending the target service data to a server corresponding to the target algorithm according to a preset matching protocol to obtain a calculation result includes:
according to the preset matching protocol, performing first coding operation on the target service data to obtain target service data codes;
and sending the target service data code to a server corresponding to the target algorithm to obtain a calculation result, wherein the calculation result comprises: and (4) target service data subcode set.
Preferably, the target service code is sent to a server corresponding to the target algorithm to obtain a calculation result, where the calculation result includes: after the steps of the target business transaction time set and the target business data subcode set, the security transaction method further comprises the following steps:
and receiving a calculation result sent by the server corresponding to the target algorithm, and performing decoding operation according to a target service data subcode set in the calculation result to obtain a target service transaction time set and a target service data subcode set.
Preferably, after the steps of receiving a calculation result sent by a server corresponding to the target algorithm and decoding according to a target service data sub-code set in the calculation result to obtain a target service trading time set and a target service sub-data set, the security trading method further includes:
sequencing the target service subdata in the target service subdata set according to the target service transaction time in the target service transaction time set to obtain a sequencing result;
and storing the target service sub-data in a second preset queue according to the sequencing result.
Preferably, the step of sending the calculation result to a transaction server for transaction operation includes:
according to the target service transaction time, sequentially carrying out second coding operation on the target service subdata stored in the second preset queue to obtain a target service subdata code;
and sending the target service sub data code to the transaction server to perform transaction operation.
Preferably, after the step of sending the target service sub data code to the trading server for trading operation, the securities trading method further comprises:
and receiving a transaction completion instruction sent by the transaction server, acquiring transaction data in the transaction completion instruction, and sending the transaction data to the terminal equipment.
Further, to achieve the above object, the present invention also provides a security transaction apparatus including:
the first determining module is used for acquiring corresponding target service data in a target service instruction when the target service instruction sent by terminal equipment is received, and determining an algorithm set according to the target service data;
the second determining module is used for sending the algorithm set to the terminal equipment so as to determine a target algorithm in the algorithm set and receive the target algorithm sent by the terminal equipment;
and the matching module is used for sending the target service data to a server corresponding to the target algorithm according to a preset matching protocol to obtain a calculation result, and sending the calculation result to a transaction server to perform transaction operation.
Further, the determining module further comprises a storing module, and the storing module is configured to:
storing the target service instruction in a first preset queue, and executing the following steps when other service instructions positioned in front of the target service instruction in the first preset queue are executed: and acquiring corresponding target service data in the target service instruction.
Further, the matching module further comprises a first encoding module, the first encoding module is configured to:
according to the preset matching protocol, performing first coding operation on the target service data to obtain target service data codes;
and sending the target service data code to a server corresponding to the target algorithm to obtain a calculation result, wherein the calculation result comprises: and (4) target service data subcode set.
Further, the sampling module further comprises a decoding module for:
and receiving a calculation result sent by the server corresponding to the target algorithm, and performing decoding operation according to a target service data subcode set in the calculation result to obtain a target service transaction time set and a target service data subcode set.
Further, the matching module further comprises a storage module, the storage module is configured to:
sequencing the target service subdata in the target service subdata set according to the target service transaction time in the target service transaction time set to obtain a sequencing result;
and storing the target service sub-data in a second preset queue according to the sequencing result.
Further, the matching module is further configured to:
according to the target service transaction time, sequentially carrying out second coding operation on the target service subdata stored in the second preset queue to obtain a target service subdata code;
and sending the target service sub data code to the transaction server to perform transaction operation.
Further, the matching module further comprises a receiving module, and the receiving module is configured to:
and receiving a transaction completion instruction sent by the transaction server, acquiring transaction data in the transaction completion instruction, and sending the transaction data to the terminal equipment.
Further, to achieve the above object, the present invention also provides a securities trading system comprising: a memory, a processor and a securities trading program stored on said memory and operable on said processor, said securities trading program when executed by said processor implementing the steps of the securities trading method as described above.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a stock exchange program which, when executed by a processor, implements the steps of the stock exchange method as described above.
The security trading method provided by the invention comprises the steps of acquiring corresponding target business data in a target business instruction when the target business instruction sent by terminal equipment is received, and determining an algorithm set according to the target business data; sending the algorithm set to the terminal equipment to determine a target algorithm in the algorithm set and receive the target algorithm sent by the terminal equipment; and sending the target service data to a server corresponding to the target algorithm according to a preset matching protocol to obtain a calculation result, and sending the calculation result to a transaction server to perform transaction operation. The invention also discloses a security trading device, a system and a computer readable storage medium. The method and the device determine the target algorithm by sending the algorithm set to the terminal device, send the target service data to the server corresponding to the target algorithm according to the preset matching protocol to obtain the calculation result, and send the calculation result to the trading server for trading operation, thereby improving the efficiency of stock trading.
Drawings
FIG. 1 is a schematic diagram of an apparatus architecture of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a first embodiment of a method of trading securities according to the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present invention.
The device of the embodiment of the invention can be a PC or a server device.
As shown in fig. 1, the apparatus may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration of the apparatus shown in fig. 1 is not intended to be limiting of the apparatus and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a stock exchange program.
The operating system is a program for managing and controlling the portable security trading equipment and software resources, and supports the operation of a network communication module, a user interface module, a security trading program and other programs or software; the network communication module is used for managing and controlling the network interface 1002; the user interface module is used to manage and control the user interface 1003.
In the securities trading device shown in fig. 1, the securities trading device calls a securities trading program stored in a memory 1005 through a processor 1001 and performs operations in the below-described respective embodiments of the securities trading method.
Based on the hardware structure, the embodiment of the security trading method is provided.
Referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of a security transaction method of the present invention, the method comprising:
step S10, when receiving a target service instruction sent by a terminal device, acquiring corresponding target service data in the target service instruction, and determining an algorithm set according to the target service data;
step S20, sending the algorithm set to the terminal device to determine a target algorithm in the algorithm set, and receiving the target algorithm sent by the terminal device;
step S30, according to a preset matching protocol, sending the target service data to a server corresponding to the target algorithm to obtain a calculation result, and sending the calculation result to a transaction server for performing a transaction operation.
The security trading method is applied to security trading equipment in a security financial institution, the security trading equipment can be a terminal or a PC (personal computer) equipment, for convenience in description, the security trading equipment is taken as an example for description, the security trading equipment is connected with servers of multiple algorithm companies, and different algorithm sets can be determined according to target services; when the security trading equipment receives a target service instruction sent by a user through terminal equipment, storing target service data in a first preset queue, acquiring corresponding target service data in the target service instruction after other service instructions positioned in front of the target service instruction in the first preset queue are executed, and determining an algorithm set according to the target service data; the security trading device sends the algorithm set to the terminal device so that the terminal device determines a target algorithm in the algorithm set; the security trading equipment carries out first coding operation on target service data according to a preset matching protocol to obtain target service data codes, sends the target service data codes to a server corresponding to a target algorithm to obtain a calculation result, and sends the calculation result to a trading server to carry out corresponding trading operation. It should be noted that, because the stock exchange equipment receives a plurality of different target service instructions during operation, different target service instructions need to be stored in the first preset queue according to the time sequence of receiving the target service instructions, and different target service instructions are processed according to the stored sequence; since the servers corresponding to different target algorithms are different, the target service data needs to be encoded, so that different servers can identify the target service data. Target traffic data includes, but is not limited to: name, amount, execution period, etc. of the target service.
In the security trading method of the embodiment, when a target service instruction sent by terminal equipment is received, corresponding target service data in the target service instruction is obtained, and an algorithm set is determined according to the target service data; sending the algorithm set to the terminal equipment to determine a target algorithm in the algorithm set; and sending the target service data to a server corresponding to the target algorithm according to a preset matching protocol to obtain a calculation result, and sending the calculation result to a transaction server to perform transaction operation. The invention determines the target algorithm by sending the algorithm set to the terminal equipment, sends the target service data to the server corresponding to the target algorithm according to the preset matching protocol to obtain the calculation result, and sends the calculation result to the trading server for trading operation, thereby improving the efficiency of stock trading.
The respective steps will be described in detail below:
step S10, when receiving a target service instruction sent by a terminal device, acquiring corresponding target service data in the target service instruction, and determining an algorithm set according to the target service data;
in this embodiment, when the security trading device receives a target service instruction sent by the terminal device, the security trading device obtains corresponding target service data in the target service instruction, and determines an algorithm set according to the target service data; such as: related users need to reduce the stock holding by 100 ten thousand in one day, the related users edit a target service instruction through terminal equipment and send the target service instruction to security trading equipment through the terminal equipment, the security trading equipment obtains corresponding target service data in the target service instruction when receiving the target service instruction sent by the terminal equipment, and the target service data comprises: the target business name is the deduction stock, the amount is 100 ten thousand, and the period is one day; and the security trading equipment determines a corresponding algorithm set according to the target service data. It should be noted that different target service data correspond to different sets of algorithms.
Specifically, step S10 includes:
step a, storing the target service instruction in a first preset queue, and after other service instructions in the first preset queue before the target service instruction are executed, executing the following steps: and acquiring corresponding target service data in the target service instruction.
In this step, the security trading device stores the target service instruction in a first preset queue, and performs corresponding execution operation on other service instructions before the target instruction in real time, and when all other service instructions before the target service instruction in the first preset queue are executed, that is, the target service instruction is located at the head of the first preset queue, the security trading device performs the steps of: acquiring corresponding target service data in the target service instruction; such as: related users need to reduce the stock held by 100 tens of thousands in one day, the related users edit a target service instruction through terminal equipment and send the target service instruction to security trading equipment through the terminal equipment, at the moment, the security trading equipment is processing other services, and the security trading equipment processes the services according to the time sequence, therefore, the security trading equipment stores the received target service instruction in a first preset queue and is positioned after receiving other service instructions with the time earlier than that of the target service instruction, and after the security trading equipment finishes executing other service instructions positioned before the target service instruction, corresponding target service data in the target service instruction is acquired; it should be noted that the service instruction arranged at the head of the first preset queue is processed by the security trading device, when the service instruction at the head of the queue is processed and executed, the service instruction at the second position in the first preset queue is changed to be positioned at the head of the queue, and the like.
Step S20, sending the algorithm set to the terminal device to determine a target algorithm in the algorithm set, and receiving the target algorithm sent by the terminal device;
in this embodiment, the security trading device sends an algorithm set determined according to target service data to the corresponding terminal device, and the related user selects and determines a target algorithm to be used from the algorithm set through the terminal device, and sends the determined target algorithm to the security trading device through the terminal device; such as: the related users need to keep 100 ten thousand of held stocks in one day, and the related users include the following items according to the target business data: the target business name is a deduction stock, the amount of money is 100 thousands, the period is one day, the stock exchange equipment searches through a server of a plurality of algorithm companies connected with the stock exchange equipment, a plurality of algorithms which can realize the deduction of 100 thousands of demands of held stocks in one day by related users are determined, an algorithm set is formed and is sent to terminal equipment corresponding to the related users, after the terminal equipment receives the algorithm set, the related users determine corresponding target algorithms in the algorithm set according to the demands of the related users, and the target algorithms are sent to the stock exchange equipment through the terminal equipment; it should be noted that, if a target algorithm meeting self requirements cannot be determined in an algorithm set sent by a security trading device by a related user, the marking can be performed through a plurality of algorithm sets, and the algorithm set is sent to the security trading device, the security trading device performs algorithm matching again according to the algorithm set marked by the related user to obtain a new algorithm set, the algorithm set marked by the related user is not included in the new algorithm set, and the security trading device sends the new algorithm set to a corresponding terminal device for the related user to select until the related user determines the target algorithm.
Step S30, according to a preset matching protocol, sending the target service data to a server corresponding to the target algorithm to obtain a calculation result, and sending the calculation result to a transaction server for performing a transaction operation.
In this embodiment, after receiving a target algorithm, the security trading device processes target service data according to a preset matching protocol, and sends the processed target service data to a server corresponding to the target algorithm to obtain a calculation result, and sends the processed calculation result to a trading server for trading operation; such as: related users need to reduce the held stocks by 100 ten thousand in one day, stock exchange equipment determines a target algorithm needed to be used as a reduction algorithm, and the stock exchange equipment respectively comprises target business data according to a preset matching protocol: the target business name is the deduction stock, the amount of money is 100 ten thousand, the period is one day, the target business name is sent to a server corresponding to the deduction algorithm, the server corresponding to the deduction algorithm obtains a calculation result according to the target business data, the calculation result is sent to the security trading equipment, and the security trading equipment processes the calculation result and then sends the calculation result to the trading server for trading operation.
Specifically, step S30 further includes:
b, according to the preset matching protocol, performing first coding operation on the target service data to obtain a target service data code;
in the step, the security trading equipment performs a first coding operation on target service data according to a preset matching protocol to obtain a target service data code, so that a server corresponding to a target algorithm can identify the target service data; such as: the security trading equipment comprises the following steps of aiming at target service data according to a preset matching protocol: the target business name is a reduced stock, the amount of money is 100 ten thousand, the period is one day, the first coding operation is carried out to obtain a target business data code, the coding modes are different because the corresponding servers of different target algorithms are different, the coding modes of the servers corresponding to various target algorithms are stored in the preset matching protocol, and the security trading equipment codes the target business data according to the preset matching protocol, so that the target business data can be identified by the servers corresponding to the target algorithms.
Step c, the target service data code is sent to a server corresponding to the target algorithm to obtain a calculation result, wherein the calculation result comprises: and (4) target service data subcode set.
In the step, the security trading equipment sends the target business data code to a server corresponding to a target algorithm, the server corresponding to the target algorithm identifies and calculates the target business data code to obtain a calculation result, and the calculation result comprises a target business data subcode set; such as: the stock exchange equipment carries out first coding operation on target business data of a target business instruction of which the stock holds 100 ten thousand in one day to obtain target business data codes, then the target business data codes are sent to a server corresponding to a target algorithm, the server corresponding to the target algorithm carries out decoding operation on the target business data codes and calculates, and the period of one day and the amount of money of 100 ten thousand in the target business data are split, for example: the period of one day and the sum of 100 ten thousand are split into the preset sum of each hour of transaction, or the period of one day and the sum of 100 ten thousand are split into the preset sum of each two hours of transaction, so that the influence on the financial market in the transaction process is reduced, and the target business data subcode set is obtained.
Further, step c is followed by:
and d, receiving a calculation result sent by the server corresponding to the target algorithm, and performing decoding operation according to the target service data sub-coding set in the calculation result to obtain a target service transaction time set and a target service sub-data set.
In the step, the security trading equipment receives a calculation result sent by a server corresponding to a target algorithm, and performs decoding operation according to a target service data subcode set in the calculation result to obtain a target service trading time set and a target service data subcode set; such as: after a target calculation result is calculated by a server corresponding to a target algorithm, the target calculation result is sent to security trading equipment, the security trading equipment receives the calculation result sent by the server corresponding to the target algorithm, and performs decoding operation according to a target service data subcode set in the calculation result to obtain all target service trading time and all target service subdata in the target service data subcode set, so as to obtain a target service trading time set and a target service subdata set, it needs to be noted that the target service trading time set and the target service subdata in the target service subdata set have a one-to-one correspondence relationship, that is, the target service subdata needing trading at a certain target service trading time is determined. It should be noted that the target service sub data is generally a sub amount obtained by splitting the amount of money in the target service data.
Further, step d is followed by:
step e, according to the target service transaction time in the target service transaction time set, sequencing the target service subdata in the target service subdata set to obtain a sequencing result;
in the step, the security trading equipment sequences the target service subdata in the target service subdata set according to the target service trading time in the target service trading time set to obtain a sequencing result; such as: the security trading equipment determines that the target business trading time in the target business trading time set is respectively as follows: in the same way, in 1 hour, 2 hours, 3 hours, 4 hours and the like in one day, the target service subdata in the corresponding target service subdata sets are respectively preset money for trading at trading time points of 1 hour, 2 hours, 3 hours, 4 hours and the like in one day, and the security trading equipment sorts the target service subdata according to the sequence of the target service trading time to obtain a sorting result.
And f, storing the target service sub data in a second preset queue according to the sequencing result.
In this step, the security trading device stores the target business subdata in a second preset queue according to the obtained sequencing result, and it should be noted that, in the second preset queue, the target business subdata needing to be traded first is placed at the head of the queue according to the sequence of the target business trading time, and so on.
Further, step f is followed by:
step g, sequentially carrying out second coding operation on the target service subdata stored in the second preset queue according to the target service transaction time to obtain a target service subdata code;
in this step, the security trading device sequentially performs a second encoding operation on the target service sub data stored in a second preset queue according to the target service trading time to obtain a target service sub data code, for example: and the security trading equipment detects the current actual time in real time, and when the current actual time reaches the target service trading time, the target service subdata corresponding to the target service trading time stored in a second preset queue is subjected to second coding operation to obtain a target service subdata code, so that the trading server can identify the target service subdata code. It should be noted that the stock exchange equipment can process the target service sub-data coding operation of a plurality of different target services at the same time, thereby greatly improving the coding efficiency.
And h, sending the target service subdata codes to the transaction server to perform transaction operation.
In the step, the security trading device sends the target service subdata code to the trading server, and the trading server performs corresponding trading operation after receiving the target service subdata code sent by the security trading device.
In the security trading method of the embodiment, when a security trading device receives a target service instruction sent by a user through a terminal device, target service data is stored in a first preset queue, after other service instructions positioned in front of the target service instruction in the first preset queue are executed, the corresponding target service data in the target service instruction is obtained, and an algorithm set is determined according to the target service data; the security trading device sends the algorithm set to the terminal device so that the terminal device determines a target algorithm in the algorithm set; the security trading equipment carries out first coding operation on target service data according to a preset matching protocol to obtain target service data codes, sends the target service data codes to a server corresponding to a target algorithm to obtain a calculation result, and sends the calculation result to a trading server to carry out corresponding trading operation; according to the method and the system, the target business instruction is analyzed to obtain the target business data, the algorithm set is further determined, the algorithm set is sent to the terminal equipment to determine the target algorithm, the target business data are sent to the server corresponding to the target algorithm according to the preset matching protocol to obtain the calculation result, the calculation result is sent to the trading server to carry out trading operation, and the efficiency of securities trading is improved.
Further, based on the first embodiment of the method for trading securities of the present invention, a second embodiment of the method for trading securities of the present invention is proposed.
The second embodiment of the securities trading method differs from the first embodiment of the securities trading method in that, after step S30, the securities trading method further comprises:
and step i, receiving a transaction completion instruction sent by the transaction server, acquiring transaction data in the transaction completion instruction, and sending the transaction data to the terminal equipment.
In this embodiment, the trading server performs a decoding operation on the target service sub-data code corresponding to the target service, identifies the corresponding trading amount and time in the target service sub-data code, performs a trading operation, updates account data of an account corresponding to the target service in a trading counter of the trading server, and sends a trading completion instruction to the security trading device, and the security trading device, upon receiving the trading completion instruction sent by the trading server, decodes the trading completion instruction, obtains trading data in the trading completion instruction, performs a corresponding coding operation on the trading data, obtains a trading data code, and sends the trading data code to a corresponding terminal device, so that a related user can check the trading situation of the target service through the terminal device.
According to the security trading method, after trading is completed, the security trading equipment sends trading data after the trading is completed to the corresponding terminal equipment, so that related users can check the trading situation of the target service through the terminal equipment, the timeliness of the security trading is further improved, and the efficiency of the security trading is improved.
The invention also provides a security trading device. The security transaction apparatus of the present invention comprises:
the first determining module is used for acquiring corresponding target service data in a target service instruction when the target service instruction sent by terminal equipment is received, and determining an algorithm set according to the target service data;
the second determining module is used for sending the algorithm set to the terminal equipment so as to determine a target algorithm in the algorithm set and receive the target algorithm sent by the terminal equipment;
and the matching module is used for sending the target service data to a server corresponding to the target algorithm according to a preset matching protocol to obtain a calculation result, and sending the calculation result to a transaction server to perform transaction operation.
Further, the determining module further comprises a storing module, and the storing module is configured to:
storing the target service instruction in a first preset queue, and executing the following steps when other service instructions positioned in front of the target service instruction in the first preset queue are executed: and acquiring corresponding target service data in the target service instruction.
Further, the matching module further comprises a first encoding module, the first encoding module is configured to:
according to the preset matching protocol, performing first coding operation on the target service data to obtain target service data codes;
and sending the target service data code to a server corresponding to the target algorithm to obtain a calculation result, wherein the calculation result comprises: and (4) target service data subcode set.
Further, the sampling module further comprises a decoding module for:
and receiving a calculation result sent by the server corresponding to the target algorithm, and performing decoding operation according to a target service data subcode set in the calculation result to obtain a target service transaction time set and a target service data subcode set.
Further, the matching module further comprises a storage module, the storage module is configured to:
sequencing the target service subdata in the target service subdata set according to the target service transaction time in the target service transaction time set to obtain a sequencing result;
and storing the target service sub-data in a second preset queue according to the sequencing result.
Further, the matching module is further configured to:
according to the target service transaction time, sequentially carrying out second coding operation on the target service subdata stored in the second preset queue to obtain a target service subdata code;
and sending the target service sub data code to the transaction server to perform transaction operation.
Further, the matching module further comprises a receiving module, and the receiving module is configured to:
and receiving a transaction completion instruction sent by the transaction server, acquiring transaction data in the transaction completion instruction, and sending the transaction data to the terminal equipment.
The invention also provides a readable storage medium.
The readable storage medium of the present invention is a computer readable storage medium having stored thereon a stock exchange program, which when executed by a processor implements the steps of the stock exchange method as described above.
The method implemented when the security trading program running on the processor is executed can refer to the embodiments of the security trading method of the present invention, and details are not repeated herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:基于区块链的资产转移方法及装置、电子设备