CN115439243A - Transaction system acceleration method, device, equipment and storage medium - Google Patents

Transaction system acceleration method, device, equipment and storage medium Download PDF

Info

Publication number
CN115439243A
CN115439243A CN202210957010.9A CN202210957010A CN115439243A CN 115439243 A CN115439243 A CN 115439243A CN 202210957010 A CN202210957010 A CN 202210957010A CN 115439243 A CN115439243 A CN 115439243A
Authority
CN
China
Prior art keywords
transaction
user data
legal
shared memory
system acceleration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210957010.9A
Other languages
Chinese (zh)
Inventor
钟桂全
王敬普
张文清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Kingdom Technology Co ltd
Original Assignee
Shenzhen Kingdom Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Kingdom Technology Co ltd filed Critical Shenzhen Kingdom Technology Co ltd
Priority to CN202210957010.9A priority Critical patent/CN115439243A/en
Publication of CN115439243A publication Critical patent/CN115439243A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a transaction system acceleration method, a device, equipment and a storage medium, wherein the transaction system acceleration method comprises the following steps: acquiring transaction entrusting information of a user; based on the transaction entrusting information, positioning corresponding user data in a shared memory, wherein the user data is preloaded in the shared memory; judging whether the transaction is legal or not based on the transaction entrusting information and the user data; and if the transaction is legal, generating a transaction order and sending the transaction order to a reporting gateway of the exchange. The method and the device belong to the technical field of computers, and after transaction entrusting information initiated by a user is obtained, corresponding user data preloaded in a shared memory can be positioned so as to judge whether the transaction initiated by the user is legal or not, the corresponding user data is positioned through the shared memory without analyzing database statements, so that the inspection of the transaction entrusting is accelerated, and the time delay of data transmission is reduced.

Description

Transaction system acceleration method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for accelerating a transaction system.
Background
Because the data volume of financial data is large, the existing transaction system needs to perform frequent interprocess communication, thread switching and resource sharing access to the transaction request at present, and a memory database is mainly used as an operation object, so that an SQL statement needs to be analyzed, even if cache data exists, the search and use of the cache object are operated by character string matching, and the transmission delay of the data is long.
Disclosure of Invention
The present application mainly aims to provide a transaction system acceleration method, apparatus, device and storage medium, and aims to solve the technical problem of data transmission time delay of a transaction system in the prior art.
To achieve the above object, the present application provides a transaction system acceleration method, including:
acquiring transaction entrustment information of a user;
based on the transaction entrustment information, positioning corresponding user data in a shared memory, wherein the user data is preloaded in the shared memory;
judging whether the transaction is legal or not based on the transaction entrusting information and the user data;
and if the transaction is legal, generating a transaction order and sending the transaction order to a reporting gateway of the exchange.
Optionally, before the step of obtaining the transaction commission information of the user, the method includes:
acquiring user data;
and determining legal user data in the user data, and loading the legal user data to a shared memory.
Optionally, the step of determining valid user data in the user data and loading the valid user data to a shared memory includes:
screening the user data based on a preset first rule to obtain a screening result;
determining the legal user data and the illegal user data based on the screening result;
and removing the illegal user data, loading the legal user data to a shared memory, and sequencing the legal user data in the shared memory.
Optionally, the step of locating, based on the transaction delegation information, corresponding user data in a shared memory includes:
determining element sizes of keywords in the transaction entrusting information;
and circularly comparing the element size of the keyword with the element size in the shared memory by a dichotomy until the element with the same size as the element size of the keyword in the shared memory is positioned, wherein the element is user data corresponding to the transaction entrusting information in the shared memory.
Optionally, the step of determining whether the transaction is legal based on the transaction delegation information and the user data includes:
judging whether the user data is legal or not;
if the user data is legal, based on a preset second rule, judging and processing the transaction entrustment information and the user data, and judging whether the transaction is legal or not.
Optionally, after the step of sending the trade order to a listing gateway of a exchange, the method comprises:
and receiving a transaction confirmation message sent by the exchange, and sending the transaction confirmation message to the user, wherein the thread for sending the transaction confirmation message and the thread for sending the transaction order to the exchange are the same thread.
Optionally, a network library is used for interaction between data, wherein the network library adopts a low-latency network card technology.
The present application further provides a transaction system accelerating device, which includes:
the acquisition module is used for acquiring transaction entrustment information of a user;
the positioning module is used for positioning corresponding user data in the shared memory based on the transaction entrustment information;
the judging module is used for judging whether the transaction is legal or not based on the transaction entrusting information and the user data;
and the generating module is used for generating a trade order if the trade is legal and sending the trade order to an inventory gateway of the exchange.
The present application also provides a transaction system accelerating device, which includes: a memory, a processor, and a program stored on the memory for implementing the transaction system acceleration method,
the memory is used for storing a program for realizing the transaction system acceleration method;
the processor is used for executing the program for realizing the transaction system acceleration method so as to realize the steps of the transaction system acceleration method.
The present application also provides a storage medium having stored thereon a program for implementing a transaction system acceleration method, which is executed by a processor to implement the steps of the transaction system acceleration method.
Compared with the data transmission time extension of the transaction system in the prior art, the transaction system acceleration method, the transaction system acceleration device, the transaction system acceleration equipment and the storage medium have the advantages that transaction entrustment information of a user is obtained; based on the transaction entrusting information, positioning corresponding user data in a shared memory, wherein the user data is preloaded in the shared memory; judging whether the transaction is legal or not based on the transaction entrusting information and the user data; and if the transaction is legal, generating a transaction order and sending the transaction order to a reporting gateway of the exchange. In other words, in the application, after transaction delegation information initiated by a user is obtained, corresponding user data preloaded in the shared memory can be located, so that whether the transaction initiated by the user is legal or not can be judged, the user data is located through the shared memory, and a database statement does not need to be analyzed, so that the checking of transaction delegation is accelerated, and the time delay of data transmission is reduced.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating a first embodiment of a transaction system acceleration method of the present application;
FIG. 3 is a block diagram of a transaction system acceleration system according to the present application;
FIG. 4 is a flow chart illustrating a transaction system acceleration method according to the present application in comparison with a prior art transaction system.
The implementation, functional features and advantages of the object of the present application will be further explained with reference to the embodiments, and with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present application.
The terminal in the embodiment of the application may be a PC, or may be a mobile terminal device having a display function, such as a smart phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III, motion Picture Experts compression standard Audio Layer 3) player, an MP4 (Moving Picture Experts Group Audio Layer IV, motion Picture Experts compression standard Audio Layer 4) player, a portable computer, or the like.
As shown in fig. 1, the terminal 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 (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 described previously.
Optionally, the terminal may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that may turn off the display screen and/or the backlight when the mobile terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the mobile terminal is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer and tapping) and the like for recognizing the attitude of the mobile terminal; of course, the mobile terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting 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 device, a network communication module, a user interface module, and a transaction system acceleration program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be used to invoke a transaction system acceleration program stored in the memory 1005.
Referring to fig. 2, an embodiment of the present application provides a transaction system acceleration method, where the transaction system acceleration method includes:
step S100, acquiring transaction entrustment information of a user;
step S200, positioning corresponding user data in a shared memory based on the transaction entrustment information, wherein the user data is preloaded in the shared memory;
step S300, based on the transaction entrusting information and the user data, judging whether the transaction is legal;
and step S400, if the transaction is legal, generating a transaction order and sending the transaction order to an inventory gateway of the exchange.
In this embodiment, the specific application scenarios may be:
after a user carries out transaction delegation in a transaction system, the transaction system needs to process a great number of business rules when processing the transaction delegation, and an internal database is used as an operation object, so that SQL statements need to be analyzed and the SQL statements run in a multi-thread mode, and the overhead of thread switching cannot be avoided, so that the data transmission time is prolonged.
The method comprises the following specific steps:
step S100, transaction entrusting information of a user is obtained;
in this embodiment, the transaction system acceleration method is applied to a transaction system acceleration device.
In this embodiment, the user is a user who participates in financial transaction using a transaction system, the transaction system is an application program for processing financial transaction, the transaction commission information is information generated by initiating financial transaction commission for the user, and the information includes information of transaction type, amount, fee and the like, wherein the transaction type is a transaction mode supported by the system, and includes stocks, funds, futures and the like.
In this embodiment, a user initiates a transaction delegation request to a transaction system at a terminal, where the transaction delegation request includes transaction delegation information of the user, and a manner of acquiring the transaction delegation information of the user is to receive the transaction delegation information sent by the user terminal.
Before the step of acquiring the transaction delegation information of the user in the step S100, the method includes the following steps a100-a200:
step A100, acquiring user data;
in this embodiment, the user data is behavior data of the user in the transaction system, and includes personal information data submitted by the user when creating a transaction account, transaction behavior data after generating a transaction, account asset data, and the like, and the manner in which the device acquires the user data includes receiving data information uploaded by the user, storing transaction data information of the user in the transaction system and data information preconfigured by the device, and storing the user data in a database of the transaction system.
Step A200, determining legal user data in the user data, and loading the legal user data to a shared memory.
In this embodiment, legal user data in the obtained user data is determined, and only the legal user data is loaded to the shared memory.
Specifically, the step a200 includes the following steps a210 to a230:
step A210, screening the user data based on a preset first rule to obtain a screening result;
in this embodiment, the first rule determination process is a preset account rule check, that is, it is determined whether an account where the user data is located is legal according to the transaction operation rule, the first rule determination process includes an account rule check and a security rule check, the account rule check includes checking account validity and checking customer transaction service authority, and the security rule check is to check whether the account is a card stopping security. And loading the checked user data into a shared memory, wherein the shared memory is a large-capacity memory which can be accessed by different Central Processing Units (CPUs) in a computer system of a multiprocessor, and the data in the shared memory is stored by adopting a hash table, so that the time complexity of inquiring or modifying the data is constant time, the efficiency of inquiring the corresponding user data is accelerated, and the time delay of data transmission is reduced.
In this embodiment, the apparatus performs a pre-classification process on the user data based on a preset first rule, where the pre-classification process includes performing account information classification, transaction authority classification, security information classification, and the like on the user data, so as to accelerate the determination and screening of the first rule.
In this embodiment, the user data is screened based on a preset first rule, and the user data is screened through a screening model including a first rule screening manner, where the screening model is obtained by iteratively training a model to be trained based on a user data sample and a screening result label of the user data sample, and is screened in a model manner, so as to accelerate the determination efficiency of the user data.
Step A220, determining the legal user data and the illegal user data based on the screening result;
in this embodiment, when the transaction system executes an activation operation, the user data in the database is subjected to judgment and screening of some service rules, that is, a preset first rule, where the first rule includes account rule check, security rule check, and the like, and it is judged whether the user data meets a transaction operation rule, if yes, the user data is legal user data, and if not, the user data is determined to be illegal user data.
Step a230, removing the illegal user data, loading the legal user data to a shared memory, and sorting the legal user data in the shared memory.
In this embodiment, data that does not meet the rules is eliminated, so that the judgment of the business rules is reduced. In this embodiment, the determination of other business rules, such as wind control rules, may also be reduced.
In this embodiment, legal user data is loaded into a shared memory, and the legal user data is sorted in the shared memory so that when the user data is positioned, the corresponding user data is quickly positioned according to a binary search method, thereby reducing data transmission delay.
Step S200, positioning corresponding user data in a shared memory based on the transaction entrustment information, wherein the user data is preloaded in the shared memory;
in this embodiment, the device receives the transaction request message initiated by the user, and first finds the corresponding user data from the shared memory, that is, locates the corresponding user data in the shared memory. If no corresponding user data exists in the shared memory, that is, the user account initiating the transaction is an illegal account, the user terminal prompts that the user is the illegal account, and the transaction cannot be initiated.
Specifically, the step S200 includes the following steps S210 to S220:
step S210, determining the element size of the keyword in the transaction entrusting information;
in this embodiment, the data in the shared memory is stored in a hash table, where the hash table is also a hash table, and is a data structure capable of directly accessing a specific corresponding value through a value of a given key. The key is mapped to a location in a table to directly access the record to speed up access. Usually, we refer to this Key as Key and the corresponding record as Value, so we can also say that the Key accesses a mapping table to obtain the address of Value. This mapping table is also called hash function or hash function, and the array storing records is called hash table.
In this embodiment, based on the transaction entrusting information, a keyword in the transaction entrusting information is obtained according to a preset keyword determination rule, and the keyword obtains an element size of the keyword according to a preset assignment.
Step S220, comparing the sizes of the elements of the keyword with the sizes of the elements in the shared memory in a binary cycle until the element with the same size as the element of the keyword in the shared memory is located, where the element is user data corresponding to the transaction delegation information in the shared memory.
In this embodiment, according to a binary search method, locating user data corresponding to the transaction delegation information in the shared memory, where the data arrangement of the shared memory is sequentially arranged, for example, taking an ascending sequence number as an example, comparing the size of an element with an element at a middle position in the sequence, and if the size is larger than the element at the middle position, continuing to perform binary search in the sequence at the second half; if smaller than the element in the middle position, the comparison is made in the first half of the series; if equal, the position of the element is found. The length of the series for each comparison will be half that of the previous series until an equal element is found or eventually no element to be found is found.
In this embodiment, a space-to-time logical judgment method is adopted in the shared memory, so that the judgment of the complex conditional statement can be completed in the shortest time, and the corresponding user data in the shared memory is located according to the keyword, thereby accelerating the efficiency of querying the corresponding user data and reducing the time delay of data transmission.
Step S300, based on the transaction entrusting information and the user data, judging whether the transaction is legal;
in this embodiment, the apparatus determines whether the transaction initiated by the user this time is legal according to the transaction delegation information and the user data.
Specifically, the step S300 includes the following steps S310 to S320:
step S310, judging whether the user data is legal;
in this embodiment, the device determines whether the user data is legal by determining whether the user data is located in the shared memory, if the shared memory contains the corresponding user data, the user data is legal, and if the user data is not located, the user data is illegal, and the user terminal prompts the user that the user is an illegal account and a transaction cannot be initiated.
Step S320, if the user data is legal, based on a preset second rule, determining the transaction delegation information and the user data, and determining whether the transaction is legal.
In this embodiment, the preset second rule is a preset service rule check, that is, whether the transaction order information and the user data are legal is determined according to a transaction operation rule, where the second rule determination process includes a variety rule check, a behavior rule check, an interface rule check, and the like, where the variety rule check is rise and fall control, and the behavior rule check is to check whether to allow repeat delegation; checking for stock sales, etc., and the interface rule checks to check whether the API interface of the user is normal.
In this embodiment, the trading commission information further includes security code information, that is, code information of a security to be traded by the user, where the security code is composed of 6 digits, and according to the check of the second rule, it is checked whether the security code included in the trading commission information meets the trading condition, and according to the security code in the trading commission information, as an array subscript, by means of a storage pointer, it locates corresponding security data information in the shared memory, and according to the security data information, it is checked whether the user meets the trading condition.
In this embodiment, since the first rule determining process completes the check before the transaction occurs, the check does not need to be performed again after the transaction occurs, so as to speed up the efficiency of the service rule check and reduce the time delay of data transmission.
And step S400, if the transaction is legal, generating a transaction order and sending the transaction order to an inventory gateway of the exchange.
In this embodiment, if the device determines that the transaction initiated by the user is legal, a corresponding transaction order is generated, and the transaction order is sent to an inventory gateway of the exchange. The transaction order commission declaration is directly sent to the exchange declaration gateway, and the embedded declaration is not needed any more, so that the time delay of data transmission is reduced.
After the step of sending the trade order to the listing gateway of the exchange at step S400, the method comprises the following step B100:
and step B100, receiving a transaction confirmation message sent by the exchange, and sending the transaction confirmation message to the user, wherein the thread for sending the transaction confirmation message and the thread for sending the transaction order to the exchange are the same thread.
In the embodiment, a single-thread working mode is adopted, the transaction entrusting request of the user and the return processing of the exchange both use the same thread, the overhead caused by multi-thread switching is avoided, only the minimum amount of locking and unlocking operations are needed, and the locks are only used for a user state space, so that the time delay of data transmission is reduced.
In this embodiment, the device performs interaction between data by using a network library, where the network library uses a low latency network adapter technology, where the low latency network adapter technology may be an onload technology and a TCPDirect technology of a solarfar network adapter, or a rdma technology of a meldonox network adapter, and further reduces latency of data transmission.
In this embodiment, referring to fig. 4, when the apparatus executes the activation operation, data in the database is loaded into the shared memory, and in the process, the first rule determination processing is performed to remove data that does not meet the rule, so that the soft acceleration process can reduce the determination of the service rule. The device can directly operate the data in the shared memory without using a memory database, thereby reducing the analysis of SQL statements. The data in the shared memory is stored by adopting a hash table, so that the time complexity of inquiring or modifying the data is constant time; some logic judgment also adopts a space time-changing strategy, so that the judgment of complex conditional statements can be completed in the shortest time. The soft acceleration process adopts a single-thread working mode, the client entrusts requests and the return processing of the exchange, the same thread is used, and the expenditure caused by multi-thread switching can be avoided. The soft acceleration exclusive exchange report gateway is separated from the original extremely fast process.
Compared with the data transmission time extension of the transaction system in the prior art, the transaction system acceleration method provided by the application obtains the transaction entrustment information of the user; based on the transaction entrustment information, positioning corresponding user data in a shared memory, wherein the user data is preloaded in the shared memory; judging whether the transaction is legal or not based on the transaction entrustment information and the user data; and if the transaction is legal, generating a transaction order and sending the transaction order to a reporting gateway of the exchange. In other words, in the application, after the transaction delegation information initiated by the user is acquired, the corresponding user data preloaded in the shared memory can be located, so that whether the transaction initiated by the user is legal or not is judged, the user data is located through the shared memory without analyzing database statements, so that the checking of the transaction delegation is accelerated, and the time delay of data transmission is reduced.
The present application further provides a transaction system accelerating device, which includes:
an obtaining module 10, configured to obtain transaction commission information of a user;
a positioning module 20, configured to position corresponding user data in the shared memory based on the transaction delegation information;
a judging module 30, configured to judge whether the transaction is legal based on the transaction delegation information and the user data;
and the generating module 40 is configured to generate a trade order if the trade is legal, and send the trade order to an offer gateway of the exchange.
Optionally, the transaction system acceleration device further comprises:
the data acquisition module is used for acquiring user data;
and the loading module is used for determining legal user data in the user data and loading the legal user data to the shared memory.
Optionally, the loading process includes:
the screening module is used for screening the user data based on a preset first rule to obtain a screening result;
a determining module, configured to determine the legal user data and the illegal user data based on the screening result;
and the screening module is used for removing the illegal user data, loading the legal user data to a shared memory, and sequencing the legal user data in the shared memory.
Optionally, the positioning module 20 includes:
the element determining module is used for determining the element size of the keyword in the transaction entrustment information;
and the data positioning module is used for circularly comparing the element size of the keyword with the element size in the shared memory by a dichotomy until the element with the same size as the element size of the keyword in the shared memory is positioned, wherein the element is user data corresponding to the transaction entrusting information in the shared memory.
Optionally, the determining module 30 includes:
the first judging module is used for judging whether the user data is legal or not;
and the second rule judging module is used for judging and processing the transaction entrusting information and the user data based on a preset second rule and judging whether the transaction is legal or not if the user data is legal.
Optionally, the transaction system acceleration device further comprises:
and the receiving module is used for receiving a transaction confirmation message sent by the exchange and sending the transaction confirmation message to the user, wherein the thread for sending the transaction confirmation message and the thread for sending the transaction order to the exchange are the same thread.
The specific implementation of the transaction system acceleration device of the present application is substantially the same as that of the above embodiments of the transaction system acceleration method, and is not described herein again.
Referring to fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present application.
As shown in fig. 1, the terminal 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 (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.
Optionally, the transaction system accelerator may further include a rectangular user interface, a network interface, a camera, RF (Radio Frequency) circuitry, a sensor, audio circuitry, a WiFi module, and the like. The rectangular user interface may comprise a Display screen (Display), an input sub-module such as a Keyboard (Keyboard), and the optional rectangular user interface may also comprise a standard wired interface, a wireless interface. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface).
Those skilled in the art will appreciate that the transaction system acceleration device configuration shown in fig. 1 does not constitute a limitation of transaction system acceleration devices and may include more or fewer components than 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 storage medium, may include therein an operating system, a network communication module, and a transaction system acceleration program. The operating system is a program that manages and controls the hardware and software resources of the transaction system acceleration device, supporting the operation of the transaction system acceleration program, as well as other software and/or programs. The network communication module is used to enable communication between the various components within the memory 1005, as well as with other hardware and software in the transaction system acceleration system.
In the transaction system acceleration device shown in fig. 1, the processor 1001 is configured to execute a transaction system acceleration program stored in the memory 1005 to implement the steps of the transaction system acceleration method described in any one of the above.
The specific implementation of the transaction system acceleration device of the present application is substantially the same as the embodiments of the transaction system acceleration method, and is not described herein again.
The present application also provides a storage medium having stored thereon a program for implementing a transaction system acceleration method, the program being executed by a processor to implement the transaction system acceleration method as follows:
acquiring transaction entrusting information of a user;
based on the transaction entrustment information, positioning corresponding user data in a shared memory, wherein the user data is preloaded in the shared memory;
judging whether the transaction is legal or not based on the transaction entrustment information and the user data;
and if the transaction is legal, generating a transaction order and sending the transaction order to a reporting gateway of the exchange.
Optionally, before the step of obtaining the transaction commission information of the user, the method includes:
acquiring user data;
and determining legal user data in the user data, and loading the legal user data to a shared memory.
Optionally, the step of determining valid user data in the user data and loading the valid user data to a shared memory includes:
screening the user data based on a preset first rule to obtain a screening result;
determining the legal user data and the illegal user data based on the screening result;
and removing the illegal user data, loading the legal user data to a shared memory, and sequencing the legal user data in the shared memory.
Optionally, the step of locating the corresponding user data in the shared memory based on the transaction delegation information includes:
determining element sizes of keywords in the transaction entrusting information;
and circularly comparing the element size of the keyword with the element size in the shared memory by a dichotomy until the element with the same size as the element size of the keyword in the shared memory is positioned, wherein the element is user data corresponding to the transaction entrusting information in the shared memory.
Optionally, the step of determining whether the transaction is legal based on the transaction delegation information and the user data includes:
judging whether the user data is legal or not;
if the user data is legal, based on a preset second rule, the transaction entrusting information and the user data are judged and processed, and whether the transaction is legal or not is judged.
Optionally, after the step of sending the trade order to a listing gateway of a exchange, the method comprises:
and receiving a transaction confirmation message sent by the exchange, and sending the transaction confirmation message to the user, wherein the thread for sending the transaction confirmation message and the thread for sending the transaction order to the exchange are the same thread.
Optionally, a network library is used for interaction between data, wherein the network library adopts a low-latency network card technology.
The specific implementation of the storage medium of the present application is substantially the same as that of the embodiments of the transaction system acceleration method, and is not described herein again.
The present application also provides a computer program product, comprising a computer program which, when executed by a processor, performs the steps of the transaction system acceleration method described above.
The specific implementation of the computer program product of the present application is substantially the same as the embodiments of the transaction system acceleration method, and is not further described 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 apparatus 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 apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present application 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, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all the equivalent structures or equivalent processes that can be directly or indirectly applied to other related technical fields by using the contents of the specification and the drawings of the present application are also included in the scope of the present application.

Claims (10)

1. A transaction system acceleration method, characterized in that the transaction system acceleration method comprises:
acquiring transaction entrustment information of a user;
based on the transaction entrustment information, positioning corresponding user data in a shared memory, wherein the user data is preloaded in the shared memory;
judging whether the transaction is legal or not based on the transaction entrustment information and the user data;
and if the transaction is legal, generating a transaction order and sending the transaction order to a reporting gateway of the exchange.
2. The transaction system acceleration method of claim 1, wherein the step of obtaining transaction commission information for the user is preceded by the method comprising:
acquiring user data;
and determining legal user data in the user data, and loading the legal user data to a shared memory.
3. The transaction system acceleration method of claim 2, wherein the step of determining legitimate user data in the user data and loading the legitimate user data into a shared memory comprises:
screening the user data based on a preset first rule to obtain a screening result;
determining the legal user data and the illegal user data based on the screening result;
and removing the illegal user data, loading the legal user data to a shared memory, and sequencing the legal user data in the shared memory.
4. The method of claim 1, wherein the step of locating corresponding user data in the shared memory based on the transaction delegation information comprises:
determining element sizes of keywords in the transaction entrusting information;
and circularly comparing the element size of the keyword with the element size in the shared memory by a dichotomy until the element with the same size as the element size of the keyword in the shared memory is positioned, wherein the element is user data corresponding to the transaction entrusting information in the shared memory.
5. The transaction system acceleration method of claim 1, wherein the step of determining whether a transaction is legitimate based on the transaction delegation information and the user data comprises:
judging whether the user data is legal or not;
if the user data is legal, based on a preset second rule, the transaction entrusting information and the user data are judged and processed, and whether the transaction is legal or not is judged.
6. The trading system acceleration method of claim 1, wherein after the step of sending the trade order to an inventory gateway of a exchange, the method comprises:
and receiving a transaction confirmation message sent by the exchange, and sending the transaction confirmation message to the user, wherein the thread for sending the transaction confirmation message and the thread for sending the transaction order to the exchange are the same.
7. The transaction system acceleration method of claim 1, characterized in that a network library is used for data interaction, wherein the network library uses a low-latency network card technology.
8. A transaction system acceleration device, characterized in that the transaction system acceleration device comprises:
the acquisition module is used for acquiring transaction entrusting information of a user;
the positioning module is used for positioning corresponding user data in the shared memory based on the transaction entrustment information;
the judging module is used for judging whether the transaction is legal or not based on the transaction entrusting information and the user data;
and the generating module is used for generating a trade order if the trade is legal and sending the trade order to an inventory gateway of the exchange.
9. A transaction system acceleration device, characterized in that the transaction system acceleration device comprises: a memory, a processor, and a program stored on the memory for implementing the transaction system acceleration method,
the memory is used for storing a program for realizing the transaction system acceleration method;
the processor is used for executing a program for implementing the transaction system acceleration method to implement the steps of the transaction system acceleration method according to any one of claims 1 to 7.
10. A storage medium having stored thereon a program for implementing a transaction system acceleration method, the program being executed by a processor to implement the steps of the transaction system acceleration method according to any one of claims 1 to 7.
CN202210957010.9A 2022-08-10 2022-08-10 Transaction system acceleration method, device, equipment and storage medium Pending CN115439243A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210957010.9A CN115439243A (en) 2022-08-10 2022-08-10 Transaction system acceleration method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210957010.9A CN115439243A (en) 2022-08-10 2022-08-10 Transaction system acceleration method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115439243A true CN115439243A (en) 2022-12-06

Family

ID=84243374

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210957010.9A Pending CN115439243A (en) 2022-08-10 2022-08-10 Transaction system acceleration method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115439243A (en)

Similar Documents

Publication Publication Date Title
CN110225104B (en) Data acquisition method and device and terminal equipment
CN111666497B (en) Application program loading method and device, electronic equipment and readable storage medium
US10152660B2 (en) Smart card read/write method and apparatus
CN107807841B (en) Server simulation method, device, equipment and readable storage medium
CN108764374B (en) Image classification method, system, medium, and electronic device
CN113900597A (en) Data storage method, system, equipment and storage medium
CN114139161A (en) Method, device, electronic equipment and medium for batch vulnerability detection
CN110019813A (en) Life insurance case retrieving method, retrieval device, server and readable storage medium storing program for executing
CN112214770A (en) Malicious sample identification method and device, computing equipment and medium
CN111338958A (en) Parameter generation method and device of test case and terminal equipment
CN114816772B (en) Debugging method, debugging system and computing device for application running based on compatible layer
CN115439243A (en) Transaction system acceleration method, device, equipment and storage medium
CN105354506A (en) File hiding method and apparatus
CN110647753A (en) Method, device and equipment for acquiring kernel file and storage medium
CN115470190A (en) Multi-storage-pool data classification storage method and system and electronic equipment
CN111324732B (en) Model training method, text processing device and electronic equipment
CN114417310A (en) Application violation feedback method and device, electronic equipment and storage medium
CN113518119A (en) Service distribution method, device, equipment and storage medium of ABTest
CN111681005A (en) Data interaction method and device and electronic equipment
CN110908958B (en) File processing method, device, terminal and storage medium
CN114979983B (en) Message processing method and device and electronic equipment
CN116471131B (en) Processing method and processing device for logical link information asset
CN114022082B (en) Smart cloud warehouse management method, smart cloud warehouse management device, smart cloud warehouse management equipment and smart cloud warehouse management medium
CN109683926B (en) Network component updating method, device, equipment and computer readable storage medium
CN110891120B (en) Interface content display method and device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination